This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
difference between 32 bit and 64 bit .so
- From: MK <stardust496 at gmail dot com>
- To: binutils at sourceware dot org
- Date: Fri, 23 Jul 2010 00:59:55 -0400
- Subject: difference between 32 bit and 64 bit .so
Hello,
I am sorry if this is not related to the group but I do know of any
other place where I can find the answer to my question.
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.
You can still link these libraries correctly. However the same is not
true on 64 bit machines ie you do need the -fpic flag.
I see from here -
http://www.gentoo.org/proj/en/hardened/pic-internals.xml?style=printable
why this works on 32 bit machines. (the linker doing some magic to
effectively create "private per process" copies of the libraries with
the correct relocations etc.
I am wondering why this stops working on 64 bit machines?
Thanks a lot :)