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
29
29
/tests /too-many-strtab
30
30
/tests /big-dynstr *
31
31
/tests /main-scoped
32
+ /tests /libbig-dynstr.debug
Original file line number Diff line number Diff line change 1
1
LIBS =
2
2
3
+ STRIP ?= strip
4
+
3
5
check_PROGRAMS = simple main too-many-strtab main-scoped big-dynstr no-rpath contiguous-note-sections
4
6
5
7
no_rpath_arch_TESTS = \
@@ -32,7 +34,8 @@ src_TESTS = \
32
34
invalid-elf.sh \
33
35
endianness.sh \
34
36
contiguous-note-sections.sh \
35
- no-gnu-hash.sh
37
+ no-gnu-hash.sh \
38
+ no-dynamic-section.sh
36
39
37
40
build_TESTS = \
38
41
$(no_rpath_arch_TESTS )
@@ -73,13 +76,23 @@ main_scoped_LDFLAGS = $(LDFLAGS_local)
73
76
74
77
big-dynstr.c : main.c
75
78
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
77
80
78
81
nodist_big_dynstr_SOURCES = big-dynstr.c
79
82
big_dynstr_LDADD = -lfoo $(AM_LDADD )
80
83
big_dynstr_DEPENDENCIES = libfoo.so
81
84
big_dynstr_LDFLAGS = $(LDFLAGS_local )
82
85
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
+
83
96
# declare local shared libraries as programs as:
84
97
# - without libtool, only archives (static libraries) can be built by automake
85
98
# - 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