[lsb-discuss] Some questions on the LSB build environment

Mike Hearn mike at mail.com
Tue Feb 4 01:21:14 PST 2003


> I'm not familiar enough with glibc and the linker to comment on
> this. Have you suggested this on the glibc mailing list?

Yes, it's been suggested at least twice that I know of in 2002 in fact, the
first time by Luca Barbieri (who provided a patch) and the second time by me.
The questions were in my opinion ignored both times - the closest I came to
getting an answer was "everybody should use symbol versioning", and when I
pointed out the major disadvantages to this approach, that post was simply
ignored as well. 

I've been told that at the moment they are distracted by the threading issues,
and anyhow apparently only very few people are trusted to write patches for
ld.so. <shrug>

As this is more of a specification issue (elf preserves static linking
semantics for dynamic libraries) I think the LSB is a good place to address
the problem, as it already provides its own linker and is committed to
allowing binary portability.

At some point I'm going to rebuild glibc with the altered link order and see
if it affects anything - it shouldn't, I can't think of any way you'd actually
be able to depend on the current behaviour, but I should think people would
want assurance first.
 
> I think you will run into problems when attempting to link the binary
> in the first place. Eg. say your binary links against libfoo which
> uses the strfry glibc function which is not in the LSB. At compile
> time when you attempt to link your binary using libc stub library it
> will fail to find the strfry function and so fail to link.

Hmm, are you sure about that? I'll try it, but if the DSO is already built as
a binary, why should that be the case? The thing you're actually linking
doesn't need that symbol. If this is the case, then it sounds a bit broken to
me, surely symbols in DSOs should be resolved fully at runtime, not
compile/link time. Otherwise, are stub libs the only way to force the linker
in this way? Could version scripts not be used instead?

thanks -mike




More information about the lsb-discuss mailing list