Skip to content

Commit ba00078

Browse files
committed
tests/too-many-strtab: fix linking with lld
llvm's lld also tests the section type and fails otherwise fixes #350
1 parent 44fea0d commit ba00078

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

tests/Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ libbar_scoped_so_LDFLAGS = $(LDFLAGS_sharedlib)
129129
libsimple_so_SOURCES = simple.c
130130
libsimple_so_LDFLAGS = $(LDFLAGS_sharedlib)
131131

132-
libtoomanystrtab_so_SOURCES = too-many-strtab.c
132+
too_many_strtab_SOURCES = too-many-strtab.c too-many-strtab2.s
133+
libtoomanystrtab_so_SOURCES = too-many-strtab.c too-many-strtab2.s
133134
libtoomanystrtab_so_LDFLAGS = $(LDFLAGS_sharedlib)
134135

135136
no_rpath_SOURCES = no-rpath.c

tests/too-many-strtab.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
const int __attribute__((section (".shstrtab"))) lel = 42;
2-
3-
int main(){return 0;}
1+
int main(){ return 0; }

tests/too-many-strtab2.s

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/*
2+
* Create additional .shstrtab section
3+
*/
4+
.section ".shstrtab", "", %3
5+
.byte 0

0 commit comments

Comments
 (0)