+2017-02-17 Ulf Hermann <ulf.hermann@qt.io>
+
+ * Makefile.am: Add libeu.
+ (libebl_%so): Link with --no-undefined,-z,defs,-z,relro
+ and libeu.a.
+
2017-06-17 Mark Wielaard <mark@klomp.org>
* s390_initreg.c: Swap sys/ptrace.h and asm/ptrace.h include order.
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 \
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)
+2017-02-17 Ulf Hermann <ulf.hermann@qt.io>
+
+ * Makefile.am: Add libasm_so_DEPS to specify external libraries
+ that have to be linked in, and libasm_so_LIBS to specify the
+ archives libasm consists of. The dependencies include libeu.a.
+ (libasm_so_LDLIBS): Add $(libasm_so_DEPS).
+ (libasm_so$(EXEEXT): Use $(libasm_so_LIBS),
+ add --no-undefined,-z,defs,-z,relro,
+ drop the manual enumeration of dependencies,
+ specify the correct path for libasm.map.
+
2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
* asm_end.c (binary_end): Fix nesting of braces.
libasm_pic_a_SOURCES =
am_libasm_pic_a_OBJECTS = $(libasm_a_SOURCES:.c=.os)
-libasm_so_LDLIBS =
+libasm_so_DEPS = ../lib/libeu.a ../libebl/libebl.a ../libelf/libelf.so ../libdw/libdw.so
+libasm_so_LDLIBS = $(libasm_so_DEPS)
if USE_LOCKS
libasm_so_LDLIBS += -lpthread
endif
+libasm_so_LIBS = libasm_pic.a
libasm_so_SOURCES =
-libasm.so$(EXEEXT): libasm_pic.a libasm.map
- $(AM_V_CCLD)$(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
- -Wl,--version-script,$(srcdir)/libasm.map,--no-undefined \
- -Wl,--soname,$@.$(VERSION) \
- ../libebl/libebl.a ../libelf/libelf.so ../libdw/libdw.so \
+libasm.so$(EXEEXT): $(srcdir)/libasm.map $(libasm_so_LIBS) $(libasm_so_DEPS)
+ $(AM_V_CCLD)$(LINK) -shared -o $@ \
+ -Wl,--soname,$@.$(VERSION),-z,defs,-z,relro \
+ -Wl,--version-script,$<,--no-undefined \
+ -Wl,--whole-archive $(libasm_so_LIBS) -Wl,--no-whole-archive \
$(libasm_so_LDLIBS)
@$(textrel_check)
$(AM_V_at)ln -fs $@ $@.$(VERSION)
+2017-02-17 Ulf Hermann <ulf.hermann@qt.io>
+
+ * Makefile.am: Add libdw_so_LIBS to specify the archives libdw is is
+ made of, libdw_so_DEPS for libraries it depends on (including
+ libeu.a), libdw_so_LDLIBS to specify libraries libdw links against.
+ (libdw.so$(EXEEXT)): Add $(libdw_so_LDLIBS), remove enumeration of
+ library dependencies, use libdw_so_LIBS rather than relying on the
+ order of dependencies specified, add -z,relro.
+
2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
* libdw.h: Remove attribute macro declarations and use
libdw_pic_a_SOURCES =
am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
+libdw_so_LIBS = libdw_pic.a ../libdwelf/libdwelf_pic.a \
+ ../libdwfl/libdwfl_pic.a ../libebl/libebl.a
+libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so
+libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS)
libdw_so_SOURCES =
-libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
- ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
- ../libelf/libelf.so
+libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
# The rpath is necessary for libebl because its $ORIGIN use will
# not fly in a setuid executable that links in libdw.
- $(AM_V_CCLD)$(LINK) -shared -o $@ -Wl,--soname,$@.$(VERSION),-z,defs \
+ $(AM_V_CCLD)$(LINK) -shared -o $@ \
+ -Wl,--soname,$@.$(VERSION),-z,defs,-z,relro \
-Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
-Wl,--version-script,$<,--no-undefined \
- -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
- -ldl -lz $(argp_LDADD) $(zip_LIBS)
+ -Wl,--whole-archive $(libdw_so_LIBS) -Wl,--no-whole-archive \
+ $(libdw_so_LDLIBS)
@$(textrel_check)
$(AM_V_at)ln -fs $@ $@.$(VERSION)
+2017-02-17 Ulf hermann <ulf.hermann@qt.io>
+
+ * Makefile.am: Add libelf_so_DEPS, which include libeu.a,
+ libelf_so_LIBS.
+ (libelf_so_LDLIBS): Add $(libelf_so_DEPS).
+ (libelf.so$(EXEEXT): Use $(libelf_so_LIBS), require libelf.map
+ from the right directory.
+
2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
* libelfP.h: Don't include config.h.
libelf_pic_a_SOURCES =
am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
-libelf_so_LDLIBS = -lz
+libelf_so_DEPS = ../lib/libeu.a
+libelf_so_LDLIBS = $(libelf_so_DEPS) -lz
if USE_LOCKS
libelf_so_LDLIBS += -lpthread
endif
+libelf_so_LIBS = libelf_pic.a
libelf_so_SOURCES =
-libelf.so$(EXEEXT): libelf_pic.a libelf.map
- $(AM_V_CCLD)$(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
- -Wl,--version-script,$(srcdir)/libelf.map,--no-undefined \
- -Wl,--soname,$@.$(VERSION),-z,defs,-z,relro $(libelf_so_LDLIBS)
+libelf.so$(EXEEXT): $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
+ $(AM_V_CCLD)$(LINK) -shared -o $@ \
+ -Wl,--soname,$@.$(VERSION),-z,defs,-z,relro \
+ -Wl,--version-script,$<,--no-undefined \
+ -Wl,--whole-archive $(libelf_so_LIBS) -Wl,--no-whole-archive \
+ $(libelf_so_LDLIBS)
@$(textrel_check)
$(AM_V_at)ln -fs $@ $@.$(VERSION)