File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -29,3 +29,4 @@ Makefile
2929/tests /too-many-strtab
3030/tests /big-dynstr *
3131/tests /main-scoped
32+ /tests /libbig-dynstr.debug
Original file line number Diff line number Diff line change 11LIBS =
22
3+ STRIP ?= strip
4+
35check_PROGRAMS = simple main too-many-strtab main-scoped big-dynstr no-rpath contiguous-note-sections
46
57no_rpath_arch_TESTS = \
@@ -32,7 +34,8 @@ src_TESTS = \
3234 invalid-elf.sh \
3335 endianness.sh \
3436 contiguous-note-sections.sh \
35- no-gnu-hash.sh
37+ no-gnu-hash.sh \
38+ no-dynamic-section.sh
3639
3740build_TESTS = \
3841 $(no_rpath_arch_TESTS )
@@ -73,13 +76,23 @@ main_scoped_LDFLAGS = $(LDFLAGS_local)
7376
7477big-dynstr.c : main.c
7578 cat $< > big-dynstr.c
76- for i in $$ (seq 1 2000); do echo " void f$$ i(void) { };" >> big-dynstr.c; done
79+ for i in $$ (seq 1 2000); do echo " void f$$ i(void) { };" ; done >> big-dynstr.c
7780
7881nodist_big_dynstr_SOURCES = big-dynstr.c
7982big_dynstr_LDADD = -lfoo $(AM_LDADD )
8083big_dynstr_DEPENDENCIES = libfoo.so
8184big_dynstr_LDFLAGS = $(LDFLAGS_local )
8285
86+ # somehow bug does not trigger if we use
87+ # normal autotools rules to build the program:
88+ # https://github.com/NixOS/patchelf/pull/303
89+ libbig-dynstr.so : big-dynstr.c
90+ $(CC ) -fPIC -shared -o $@ $<
91+ libbig-dynstr.debug : libbig-dynstr.so
92+ $(STRIP ) --only-keep-debug libbig-dynstr.so -o libbig-dynstr.debug
93+ check_DATA = libbig-dynstr.debug
94+
95+
8396# declare local shared libraries as programs as:
8497# - without libtool, only archives (static libraries) can be built by automake
8598# - with libtool, it is difficult to control options
Original file line number Diff line number Diff line change 1+ #! /bin/sh -e
2+
3+ # print rpath on library with stripped dynamic section
4+ ../src/patchelf --print-rpath libbig-dynstr.debug
You can’t perform that action at this time.
0 commit comments