[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Default value for CFLAGS/LDFLAGS set by dpkg

On Mon, Mar 31, 2008 at 06:57:48PM +0200, Kurt Roeckx wrote:
On Mon, Mar 31, 2008 at 05:34:05PM +0200, Loïc Minier wrote:
 I just wondered: is it possible to reverse/disable the effects of
 -Bsymbolic-functions if LD_PRELOAD is set?  Or is it too late already
 and some information was definitely lost?

If it does the same thing as -Bsymbolic, but only for functions, it
resolved all the relocations already and can only call functions
internally in the library.

According to ld(1):

When creating a shared library, bind references to global function symbols to the definition within the shared library, if any. This option is only meaningful on ELF platforms which support shared libraries.

I also have to wonder that if we have something like this as default,
why -Bsymbolic-functions would be a good default, and not -Bsymbolic.

This is not a sensible default for libc6, libstdc++6, or the standard library for any other programming language. libc6 is overridden by all means of LD_PRELOAD functions. Examples I can think of off the top of my head are zzuf, electric-fence, valgrind, and fakeroot. People like to override the standard libraries to provide useful functionality, and we shouldn't break this. Also note that there are symbols that are present in both libc.so.6 and libpthread.so.0, and that using -Bsymbolic-functions would probably break libc thread safety.


brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
troff on top of XML: http://crustytoothpaste.ath.cx/~bmc/code/thwack
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature

Reply to: