libtool-patches
[Top][All Lists]
Advanced

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

Re: [FYI] Cleanup of linux pass_all


From: Alexandre Oliva
Subject: Re: [FYI] Cleanup of linux pass_all
Date: 15 Sep 2004 13:31:56 -0300
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

On Sep 11, 2004, Jacob Meuser <address@hidden> wrote:

> Is there any tool that can determine if an object is PIC?

Not that I know.  You'd have to look at the relocations and, on some
platforms, you'd have to get additional context from the position of
the relocations and the referenced symbols.

> use Open or NetBSD, they need PIC for shared objects on x86 too.

x86 does as well, come to think of it.  At least if you use Thread
Local Storage, compiling code without -fPIC will get you relocations
that are not suitable for shared libraries.

> if there was only a good way to test for PIC ....

The only reasonable way I can think of is to get the linker to try and
link stuff.  If it fails, we print a warning message and proceed to
building a static-only version of the library.  And let's just hope
modern linkers won't silently create corrupt binaries.

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   address@hidden, gcc.gnu.org}
Free Software Evangelist  address@hidden, gnu.org}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]