This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: is -fPIC safe for executable programs, or must -fPIE be used?


On 03/23/2016 04:12 PM, Britton Kerin wrote:
I can't tell from the manual if -fPIC is safe for executable programs,
or only for libraries.

I want to use -fPIC or -fPIE so dladdr() will work right.  I would
rather use -fPIC if possible, because it seems simpler to use one such
option for everything if possible.
Sadly, it depends on the target (processor & OS in use).

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]