objcopy --weaken

Daniel Jacobowitz drow@false.org
Wed Apr 12 04:37:00 GMT 2006


On Wed, Apr 12, 2006 at 01:56:50AM +0200, Peter S. Mazinger wrote:
> That is true if modern=glibc (there is though some compat  
> option/environment setting to disable this behaviour).

(A) I believe Solaris does the same thing nowadays.  (B) I believe
they've threatened several times to remove the option.

> At link time if libpthread.so and libc.so provide the same symbol (could 
> happen w/ any other 2 libs, the example is "real-life", the linker fails, 
> if one of them is not weak.

Er, is this really true?  Why should it be?

If there's a good reason for it, e.g. detecting non-deterministic
binding, weakening one is just going to give you unpredictable bugs
later.  The strong one will not be reliably picked at runtime.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Binutils mailing list