diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2021-12-07 18:55:01 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2021-12-07 19:44:37 +0100 |
commit | ba000786e9837e00ca1db5531a7e21da2ef225d2 (patch) | |
tree | 4cbe84857044dda45293ed2012a1490e7abd7576 /tests | |
parent | 44fea0de2fc5ddba8f7466b244dfee5ea8edf45e (diff) | |
download | patchelf-ba000786e9837e00ca1db5531a7e21da2ef225d2.tar.gz |
tests/too-many-strtab: fix linking with lld
llvm's lld also tests the section type and fails otherwise
fixes https://github.com/NixOS/patchelf/issues/350
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 3 | ||||
-rw-r--r-- | tests/too-many-strtab.c | 4 | ||||
-rw-r--r-- | tests/too-many-strtab2.s | 5 |
3 files changed, 8 insertions, 4 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 1d82118..2c3d0bf 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -129,7 +129,8 @@ libbar_scoped_so_LDFLAGS = $(LDFLAGS_sharedlib) libsimple_so_SOURCES = simple.c libsimple_so_LDFLAGS = $(LDFLAGS_sharedlib) -libtoomanystrtab_so_SOURCES = too-many-strtab.c +too_many_strtab_SOURCES = too-many-strtab.c too-many-strtab2.s +libtoomanystrtab_so_SOURCES = too-many-strtab.c too-many-strtab2.s libtoomanystrtab_so_LDFLAGS = $(LDFLAGS_sharedlib) no_rpath_SOURCES = no-rpath.c diff --git a/tests/too-many-strtab.c b/tests/too-many-strtab.c index 0f51316..1075f35 100644 --- a/tests/too-many-strtab.c +++ b/tests/too-many-strtab.c @@ -1,3 +1 @@ -const int __attribute__((section (".shstrtab"))) lel = 42; - -int main(){return 0;} +int main(){ return 0; } diff --git a/tests/too-many-strtab2.s b/tests/too-many-strtab2.s new file mode 100644 index 0000000..1928a82 --- /dev/null +++ b/tests/too-many-strtab2.s @@ -0,0 +1,5 @@ +/* + * Create additional .shstrtab section + */ +.section ".shstrtab", "", %3 +.byte 0 |