This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: difference between 32 bit and 64 bit .so
On Fri, Jul 23, 2010 at 12:59:55AM -0400, MK wrote:
> I recently saw that while building a .so dynamic library on 32 bit
> linux machines (Intel processor), it is ok if you omit the -fpic flag.
This is not true. Some features of ELF shared libraries will not work
properly if you compile without -fpic or -fPIC, even on 32-bit x86.
> I am wondering why this stops working on 64 bit machines?
You'd sacrifice speed in executables if the compiler was forced to
generate code that could be used in shared libs.
It would be better to wonder why we still support non-PIC libraries on
32-bit x86.
--
Alan Modra
Australia Development Lab, IBM