This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

-Bfuzzy-dice


So,

    It seems there was some concern about the ODR wrt. my previous
similar patch; this version uses referenced libraries '.direct'
section to detect vague symbols, and in the absence of that marks them
'unknown' and doesn't do direct linkage on them. ie. this works nicely
for C++.

    In addition - there was a concern about the movement of symbols
from 1 library to another as a result of re-factoring. This is not an
issue since if a direct lookup fails, we fallback to the good 'ole
lookup algorithm which will of course behave as normal.

    This .gnu.linkonce based detection is far more robust &
conservative than the previous regexp based checking, though we now do
slow lookups for a load of _ZThn.* relocations which is not really
necessary. The innovative new option name is to reflect these crucial
differences from the Solaris -Bdirect feature.

    So - further thoughts & comment much appreciated; Jakub cc'd you,
hope that's ok - would value your advice as a linker expert. Of course
it'd be nice to have some further annotation for extra linker control
for deliberate use of ELF interposing - clearly some libraries
(eg. glibc) rely on that a lot; not be suitable for use there in it's
current form.

    Latest patches at:
	http://go-oo.org/~michael/binutils-bdirect-2.diff
	http://go-oo.org/~michael/glibc-bdirect-2.diff

    Open questions:
        + How are new elf sections allocated ? and/or typically named
          I know DT_DIRECT / '.direct' are prolly beyond the pale
	  The Solaris linker uses a .SUNW_syminfo section.
	  cf. http://blogs.sun.com/roller/page/msw/20050614

        + LD_PRELOADs need handling for the direct dl-lookup.c
          case ? but that requires a search scope; prolly easy to
	  provide: just use the 1st N entries of existing searchlist

	+ the dl-deps.c change requires re-work on advice - it sucks.

        + should the compiler generate better per-symbol 'vagueness'
	  markup for binutils to avoid using others' .direct sections.

	+ others I havn't thought of.

    Changes
	+ propagate vagueness from other libraries instead of
	  hard-coded broken regexp
	+ add LD_BIND_DIRECT env. var to help profiling

    Thanks,

	    Michael.

-- 
 michael.meeks@novell.com  <><, Pseudo Engineer, itinerant idiot


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