diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-08-18 12:41:11 +0200 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2017-08-18 22:29:46 +0200 |
commit | 07737584e73714eff3481fcf17f9f0331c8a5b88 (patch) | |
tree | 67958824d82e2be085ac94e75aa2e047d4166704 /libebl | |
parent | 6d2e7e7100429df3d548251e9685a1eb7bb434cb (diff) | |
download | elfutils-07737584e73714eff3481fcf17f9f0331c8a5b88.tar.gz |
Check for -z,defs, -z,relro, -fPIC, -fPIE before using them
Those flags are not available on all platforms, and omitting them when
not available will not cause any harm. In particular:
-z,defs disallows undefined symbols in object files. This option is
unsupported if the target binary format enforces the same condition
already. Furthermore it is only a compile time sanity check. When it is
omitted, the same binary is produced.
-z,relro instructs the loader to mark sections read-only after loading
the library, where possible. This is a hardening mechanism. If it is
unavailable, the functionality of the code is not affected in any way.
-fPIC instructs the compiler to produce position independent code. While
this is preferable to relocatable code, relocatable code also works and
may even be faster. Relocatable code might just be loaded into memory
multiple times for different processes.
-fPIE is the same thing as -fPIC for executables rather than shared
libraries.
Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'libebl')
-rw-r--r-- | libebl/ChangeLog | 4 | ||||
-rw-r--r-- | libebl/Makefile.am | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/libebl/ChangeLog b/libebl/ChangeLog index 334bf224..3b076332 100644 --- a/libebl/ChangeLog +++ b/libebl/ChangeLog @@ -1,3 +1,7 @@ +2017-04-27 Ulf Hermann <ulf.hermann@qt.io> + + * Makefile.am: Use fpic_CFLAGS. + 2017-07-19 Gustavo Romero <gromero@linux.vnet.ibm.com> * eblcorenotetypename.c: Add ppc64 HTM SPRs note as known type. diff --git a/libebl/Makefile.am b/libebl/Makefile.am index 2491df80..737de6b0 100644 --- a/libebl/Makefile.am +++ b/libebl/Makefile.am @@ -28,7 +28,7 @@ ## not, see <http://www.gnu.org/licenses/>. ## include $(top_srcdir)/config/eu.am -AM_CFLAGS += -fPIC +AM_CFLAGS += $(fpic_CFLAGS) AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libdw -I$(srcdir)/../libasm VERSION = 1 LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ |