[oclug] glibc gcc symbol strangeness

Gilles J. Seguin segg at infonet.ca
Wed Mar 6 00:30:56 EST 2002


Johnathan Hicks wrote:
> 
> I have gcc 2.96 installed as well as 3.0.4, and set symlinks up to determine
> the default. GLIBC was to be the first thing I compiled with gcc3 so I have
> compiled no other libraries and whatnot.
> 
> After I rgrepped the glibc source, I found how that GCC_3.0 symbol/tag got in
> there. I don't understand why it is there though.
> 
> Thanks for stirring my brains! :)

Well, now my brains will collapse

Look at the output of

$ objdump -p /lib/libc.so.6

The short answer is that the dynamic linker need extra info to be able
to perform is job and that this information is provided in a special
section.

Dynamic Section:
  NEEDED      ld-linux.so.2
  SONAME      libc.so.6
  INIT        0x17bf0
those are the Dynamic array tags, that is DT_NULL is there by default
and is a dummy section(not printed). And DT_NEEDED, DT_SONAME, DT_INIT
<http://www.caldera.com/developers/gabi/latest/ch5.dynamic.html#dynamic_linker>
see figure 5-10

  VERDEF      0x11524
  VERDEFNUM   0xd
  VERNEED     0x116e8
  VERNEEDNUM  0x1
  VERSYM      0x104d6
  RELCOUNT    0x616
They are called processor-specific semantic,
and are undocumentented.

The section VERDEF has following information
Version definitions:
[...]
13 0x00 0x0b792650 GCC_3.0

others link
<http://www.caldera.com/developers/devspecs/>
<http://www.iecc.com/linker/>



More information about the OCLUG mailing list