diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ELF/Inputs/shared.s | 4 | ||||
-rw-r--r-- | test/ELF/dynamic-linker.s | 4 | ||||
-rw-r--r-- | test/ELF/partition-dynamic-linker.s | 24 |
3 files changed, 28 insertions, 4 deletions
diff --git a/test/ELF/Inputs/shared.s b/test/ELF/Inputs/shared.s index c3c22fe4b..4a386be23 100644 --- a/test/ELF/Inputs/shared.s +++ b/test/ELF/Inputs/shared.s @@ -1,9 +1,9 @@ .global bar -.type bar, @function +.type bar, %function bar: .global bar2 -.type bar2, @function +.type bar2, %function bar2: .global zed diff --git a/test/ELF/dynamic-linker.s b/test/ELF/dynamic-linker.s index 3faf8e8a1..d0da77fab 100644 --- a/test/ELF/dynamic-linker.s +++ b/test/ELF/dynamic-linker.s @@ -4,10 +4,10 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o # RUN: ld.lld --dynamic-linker foo %t.o %t.so -o %t -# RUN: llvm-readelf -program-headers %t | FileCheck %s +# RUN: llvm-readelf --program-headers --section-headers %t | FileCheck --implicit-check-not=.bss %s # RUN: ld.lld --dynamic-linker=foo %t.o %t.so -o %t -# RUN: llvm-readelf -program-headers %t | FileCheck %s +# RUN: llvm-readelf --program-headers --section-headers %t | FileCheck --implicit-check-not=.bss %s # CHECK: [Requesting program interpreter: foo] diff --git a/test/ELF/partition-dynamic-linker.s b/test/ELF/partition-dynamic-linker.s new file mode 100644 index 000000000..f542a35e5 --- /dev/null +++ b/test/ELF/partition-dynamic-linker.s @@ -0,0 +1,24 @@ +## Test that we don't create a .ARM.exidx for the main partition. +## Previously we were doing so, which is unnecessary and led to a crash. + +# RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %p/Inputs/shared.s -o %t1.o +# RUN: ld.lld -shared %t1.o -o %t.so +# RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o + +# RUN: ld.lld -shared --gc-sections --dynamic-linker foo %t.o %t.so -o %t +# RUN: llvm-readelf --section-headers %t | FileCheck %s + +# CHECK: .ARM.exidx +# CHECK-NOT: .ARM.exidx + +.section .llvm_sympart,"",%llvm_sympart +.asciz "part1" +.4byte p1 + +.section .text.p1,"ax",%progbits +.globl p1 +p1: +.fnstart +bx lr +.cantunwind +.fnend |