This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
is -fPIC safe for executable programs, or must -fPIE be used?
- From: Britton Kerin <britton dot kerin at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 23 Mar 2016 14:12:22 -0800
- Subject: is -fPIC safe for executable programs, or must -fPIE be used?
- Authentication-results: sourceware.org; auth=none
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.
Thanks,
Britton