diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2021-09-13 17:55:05 +0200 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2021-09-13 17:55:05 +0200 |
commit | 90da38b8cfd49dbb653e2976003e8ee08f2c39d2 (patch) | |
tree | c04f870b00fa38706deb8b39804fb49f28e76589 | |
parent | a4ae03d638e4a20d89cfeb2fae3bdfeccd366d16 (diff) | |
download | patchelf-90da38b8cfd49dbb653e2976003e8ee08f2c39d2.tar.gz |
grow-test: fix on non-gcc systems
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | tests/Makefile.am | 5 | ||||
-rwxr-xr-x | tests/grow-file.sh | 6 |
3 files changed, 8 insertions, 4 deletions
@@ -31,3 +31,4 @@ Makefile /tests/main-scoped /tests/libbig-dynstr.debug /tests/contiguous-note-sections +/tests/simple-pie diff --git a/tests/Makefile.am b/tests/Makefile.am index 1722387..6ad76f4 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,7 +2,7 @@ LIBS = STRIP ?= strip -check_PROGRAMS = simple main too-many-strtab main-scoped big-dynstr no-rpath contiguous-note-sections +check_PROGRAMS = simple-pie simple main too-many-strtab main-scoped big-dynstr no-rpath contiguous-note-sections no_rpath_arch_TESTS = \ no-rpath-amd64.sh \ @@ -68,6 +68,9 @@ simple_SOURCES = simple.c # no -fpic for simple.o simple_CFLAGS = +simple_pie_SOURCES = simple.c +simple_pie_CFLAGS = -fPIC -pie + main_SOURCES = main.c main_LDADD = -lfoo $(AM_LDADD) main_DEPENDENCIES = libfoo.so diff --git a/tests/grow-file.sh b/tests/grow-file.sh index 40e0455..e01d2be 100755 --- a/tests/grow-file.sh +++ b/tests/grow-file.sh @@ -5,12 +5,12 @@ SCRATCH=scratch/$(basename $0 .sh) rm -rf ${SCRATCH} mkdir -p ${SCRATCH} -g++ -x c -fPIC -pie -o ${SCRATCH}/simple simple.c +cp simple-pie ${SCRATCH}/simple-pie # Add a 40MB rpath head -c 40000000 /dev/urandom > ${SCRATCH}/foo.bin # Grow the file -../src/patchelf --add-rpath @${SCRATCH}/foo.bin ${SCRATCH}/simple +../src/patchelf --add-rpath @${SCRATCH}/foo.bin ${SCRATCH}/simple-pie # Make sure we can still run it -${SCRATCH}/simple +${SCRATCH}/simple-pie |