diff options
| author | Ulf Hermann <[email protected]> | 2017-02-17 16:11:28 +0100 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2017-07-24 11:01:09 +0200 |
| commit | 8abf0b5b580094af36b9dc4ed6748379caa32a0e (patch) | |
| tree | bca019b54b6bd1441b2eb68acf7c50c52a4c27a9 /backends | |
| parent | 1dd301b7c302b9df980946e2d04ca99748754991 (diff) | |
Unify linking of libasm, libelf, libdw, backends
Link them all with -z,defs,-z,relro,--no-undefined, provide complete
dependencies for the link steps, and add libeu.a to each one. libeu.a
contains useful library functionality that each of them might use. The
linker will strip unneeded symbols, so linking it in won't hurt even if
none of the functions are used.
Signed-off-by: Ulf Hermann <[email protected]>
Diffstat (limited to 'backends')
| -rw-r--r-- | backends/ChangeLog | 6 | ||||
| -rw-r--r-- | backends/Makefile.am | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/backends/ChangeLog b/backends/ChangeLog index d6282451..784e6b03 100644 --- a/backends/ChangeLog +++ b/backends/ChangeLog @@ -1,3 +1,9 @@ +2017-02-17 Ulf Hermann <[email protected]> + + * Makefile.am: Add libeu. + (libebl_%so): Link with --no-undefined,-z,defs,-z,relro + and libeu.a. + 2017-06-17 Mark Wielaard <[email protected]> * s390_initreg.c: Swap sys/ptrace.h and asm/ptrace.h include order. diff --git a/backends/Makefile.am b/backends/Makefile.am index ac45a452..996602f2 100644 --- a/backends/Makefile.am +++ b/backends/Makefile.am @@ -45,6 +45,7 @@ noinst_DATA = $(libebl_pic:_pic.a=.so) libelf = ../libelf/libelf.so libdw = ../libdw/libdw.so +libeu = ../lib/libeu.a i386_SRCS = i386_init.c i386_symbol.c i386_corenote.c i386_cfi.c \ i386_retval.c i386_regs.c i386_auxv.c i386_syscall.c \ @@ -129,14 +130,14 @@ libebl_bpf_pic_a_SOURCES = $(bpf_SRCS) am_libebl_bpf_pic_a_OBJECTS = $(bpf_SRCS:.c=.os) -libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) +libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu) @rm -f $(@:.so=.map) $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ > $(@:.so=.map) $(AM_V_CCLD)$(LINK) -shared -o $(@:.map=.so) \ -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ - -Wl,--version-script,$(@:.so=.map) \ - -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) + -Wl,--version-script,$(@:.so=.map),--no-undefined \ + -Wl,-z,defs,-z,relro -Wl,--as-needed $(libelf) $(libdw) $(libeu) @$(textrel_check) libebl_i386.so: $(cpu_i386) |
