* redundant entry in .dynsym with gnu hash + version script
@ 2007-12-17 11:07 Hiroki Kaminaga
2007-12-17 13:56 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Hiroki Kaminaga @ 2007-12-17 11:07 UTC (permalink / raw)
To: binutils
Hi,
There seems to be a redundant entry in .dynsym, when ld is used with
gnu hash and version script. It appears on ARM architecture, but could
not observed in powerpc and i386 architecuture, but I don't think this
is architecture specific.
I couldn't find similar case to this, if it is a known issue, please
forgive me.
The version I'm using is:
$ arm-unknown-linux-gnueabi-ld --version
GNU ld (Linux/GNU Binutils) 2.17.50.0.15.20070418
Here is how to reproduce:
$ cat foo.c
void foo(void) {}
$ cat bar.c
extern void foo(void);
void bar(void) { foo(); }
$ cat ver.map
TEST_1.0 {
global:
*;
};
$ arm-unknown-linux-gnueabi-gcc -O2 -g -shared -o libfoo.so foo.c -Wl,--version-script,ver.map
$ arm-unknown-linux-gnueabi-gcc -O2 -g -shared -L. -lfoo -Wl,--hash-style,gnu -o libbar.so bar.c
$ arm-unknown-linux-gnueabi-readelf -s libbar.so
Symbol table '.dynsym' contains 19 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000036c 0 SECTION LOCAL DEFAULT 8
2: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__
3: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses
4: 00000000 0 NOTYPE GLOBAL DEFAULT UND foo
5: 00000000 328 FUNC WEAK DEFAULT UND __cxa_finalize@GLIBC_2.4 (2)
6: 00000480 4 FUNC GLOBAL DEFAULT 10 bar
7: 00000000 0 NOTYPE LOCAL DEFAULT UND
8: 00000494 0 NOTYPE GLOBAL DEFAULT ABS __exidx_end
9: 000085b4 0 NOTYPE GLOBAL DEFAULT ABS _bss_end__
10: 000085b4 0 NOTYPE GLOBAL DEFAULT ABS _end
11: 000085b0 0 NOTYPE GLOBAL DEFAULT ABS _edata
12: 000085b4 0 NOTYPE GLOBAL DEFAULT ABS __bss_end__
13: 000085b0 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
14: 0000036c 0 FUNC GLOBAL DEFAULT 8 _init
15: 00000484 0 FUNC GLOBAL DEFAULT 11 _fini
16: 000085b0 0 NOTYPE GLOBAL DEFAULT ABS __bss_start__
17: 000085b4 0 NOTYPE GLOBAL DEFAULT ABS __end__
18: 00000494 0 NOTYPE GLOBAL DEFAULT ABS __exidx_start
...
Entry No 7 with NOTYPE/LOCAL/DEFAULT/UND seems to be redundant.
It seems harmless for this sample, but when I compiled openssl-0.9.8g
with the same toolchain, there was a corrupt entry like this:
$ arm-unknown-linux-gnueabi-readelf -s usr/lib/ssl/engines/libchil.so
Symbol table '.dynsym' contains 87 entries:
Num: Value Size Type Bind Vis Ndx Name
...
71: 00000000 328 FUNC WEAK DEFAULT UND __cxa_finalize@GLIBC_2.4 (4)
72: e24dd004 0xa00002e <OS specific>: 12 WEAK DEFAULT [<other>: 24] 58783
<corrupt>
73: 000038f4 0 NOTYPE GLOBAL DEFAULT ABS __exidx_end@@OPENSSL_0.9.8
entry 72 does not seem good. dump of .dynsym is
Hex dump of section '.dynsym':
0x000000fc 00000000 00000000 00000000 00000000 ................
...
0x0000056c 1c000000 00000000 48010000 22000000 ........H..."...
0x0000057c 000050e3 04d04de2 2e00000a 2c249fe5 ..P...M.....,$..
0x0000058c 7c050000 f4380000 00000000 1000f1ff |....8..........
and entry data in 0x57c does not look good.
Any hint for this problem is appreciated.
Best Regards,
(Hiroki Kaminaga)
t
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: redundant entry in .dynsym with gnu hash + version script
2007-12-17 11:07 redundant entry in .dynsym with gnu hash + version script Hiroki Kaminaga
@ 2007-12-17 13:56 ` Daniel Jacobowitz
2007-12-19 1:50 ` Hiroki Kaminaga
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2007-12-17 13:56 UTC (permalink / raw)
To: Hiroki Kaminaga; +Cc: binutils
On Mon, Dec 17, 2007 at 08:03:46PM +0900, Hiroki Kaminaga wrote:
> The version I'm using is:
>
> $ arm-unknown-linux-gnueabi-ld --version
> GNU ld (Linux/GNU Binutils) 2.17.50.0.15.20070418
Please try a newer version; I believe this is fixed.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: redundant entry in .dynsym with gnu hash + version script
2007-12-17 13:56 ` Daniel Jacobowitz
@ 2007-12-19 1:50 ` Hiroki Kaminaga
2008-01-10 13:10 ` Hiroki Kaminaga
0 siblings, 1 reply; 4+ messages in thread
From: Hiroki Kaminaga @ 2007-12-19 1:50 UTC (permalink / raw)
To: drow; +Cc: binutils, kaminaga
From: Daniel Jacobowitz <drow@false.org>
> On Mon, Dec 17, 2007 at 08:03:46PM +0900, Hiroki Kaminaga wrote:
> > The version I'm using is:
> >
> > $ arm-unknown-linux-gnueabi-ld --version
> > GNU ld (Linux/GNU Binutils) 2.17.50.0.15.20070418
>
> Please try a newer version; I believe this is fixed.
Thank you for reply!
I'll try newer version.
Best Regards,
(Hiroki Kaminaga)
t
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: redundant entry in .dynsym with gnu hash + version script
2007-12-19 1:50 ` Hiroki Kaminaga
@ 2008-01-10 13:10 ` Hiroki Kaminaga
0 siblings, 0 replies; 4+ messages in thread
From: Hiroki Kaminaga @ 2008-01-10 13:10 UTC (permalink / raw)
To: drow; +Cc: binutils, kaminaga
> From: Daniel Jacobowitz <drow@false.org>
> > On Mon, Dec 17, 2007 at 08:03:46PM +0900, Hiroki Kaminaga wrote:
> > > The version I'm using is:
> > >
> > > $ arm-unknown-linux-gnueabi-ld --version
> > > GNU ld (Linux/GNU Binutils) 2.17.50.0.15.20070418
> >
> > Please try a newer version; I believe this is fixed.
>
> Thank you for reply!
> I'll try newer version.
For recording purpose, this problem was fixed with below patch
http://sourceware.org/ml/binutils/2007-07/msg00201.html
Thanks,
(Hiroki Kaminaga)
t
--
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-01-09 10:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-17 11:07 redundant entry in .dynsym with gnu hash + version script Hiroki Kaminaga
2007-12-17 13:56 ` Daniel Jacobowitz
2007-12-19 1:50 ` Hiroki Kaminaga
2008-01-10 13:10 ` Hiroki Kaminaga
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).