This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A patch for default version and archive


   Date: Sat, 18 Nov 2000 18:17:59 -0800
   From: "H . J . Lu" <hjl@valinux.com>

   Say you want to override "open" in libc.so:

   # objdump --dynamic-sym /lib/libc.so.6 | grep GLIBC| grep " open$"
   000d8d80  w   DF .text  00000040  GLIBC_2.0   open
   # objdump --dynamic-sym /usr/lib/lib*.so | grep GLIBC | grep " open$"
   .....
   00000000      DF *UND*  0000003d  GLIBC_2.0   open

   As you can see, many DSOs in /usr/lib have "open" bound to version
   "GLIBC_2.0". Since GLIBC_2.0 is the default version, by providing your
   own implementation of "open", all refereneces to "open" version
   "GLIBC_2.0" will be resolved to your "open" without version. That is
   exactly what happens if there is no symbol versioning.

Yes, but those references to open were written as references to open,
not as references to open version GLIBC_2.0.  The program linker added
the version GLIBC_2.0 when it linked against the appropriate instance
of the shared library.  It is reasonable that overriding open should
affect those references, since they were references to open.  It seems
less reasonable that overriding open should affect an explicit
reference to open version GLIBC_2.0.

What advantage do we get by permitting this behaviour?

Ian

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]