Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / linkerscript / discard-section-dynsym.s
blob7c7c9c29cee8429048dd1c6f61c5b8e5e21d5d03
1 # REQUIRES: aarch64
3 ## We allow discarding .dynsym, check we don't crash.
4 # RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
6 # RUN: echo 'SECTIONS { /DISCARD/ : { *(.dynsym) } }' > %t.lds
7 # RUN: ld.lld -shared -T %t.lds %t.o -o %t.so
8 # RUN: llvm-readelf -r %t.so | FileCheck %s
10 # RUN: echo 'SECTIONS { /DISCARD/ : { *(.dynsym .dynstr) } }' > %t.lds
11 # RUN: ld.lld -shared -T %t.lds %t.o -o %t.so
12 # RUN: llvm-readelf -r %t.so | FileCheck %s
14 # CHECK: contains 2 entries:
15 # CHECK: R_AARCH64_RELATIVE [[#]]
16 # CHECK-NEXT: R_AARCH64_GLOB_DAT 0{{$}}
18 adrp x9, :got:var
19 ldr x9, [x9, :got_lo12:var]
21 .data
22 .align 8
23 foo:
24 .quad foo