* Jeremie LE HEN wrote on Thu, Aug 11, 2005 at 04:10:41PM CEST: > Hi Patrick, > > > quartz% diff -s foo.o .libs/foo.o > > Files foo.o and .libs/foo.o are identical
Another hint: try ---snip int foo() { return 1; } int bar() { return foo(); } ---snip > I'm not a compiler guru, but as far as I can tell cutting-edge Unices > like Linux and *BSD used to always build PIC objects, little does it > matter you asked for it or not. This is not correct. However: For example, it is correct that GNU/Linux on _some_ systems (e.g.: x86 but not x86_64) allows to put text relocations into shared objects. The tradeoff of non-shareable segments in shared libraries are a little higher execution speed vs much higher memory usage. (The extent of "little" and "much" in this context are very much dependent on the specific code and usage pattern.) In general, non-PIC code can not be put into shared objects. > Object files compiled with -fPIC have > however some additional symbols such as ``_GLOBAL_OFFSET_TABLE_''. They also have position-independent relocations. Try 'objdump -x' on my above example. Regards, Ralf _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool