File tree 1 file changed +16
-7
lines changed
lld/test/ELF/linkerscript
1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change 1
1
# REQUIRES: x86
2
- # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
3
- # RUN: echo "SECTIONS { /DISCARD/ : { *(.aaa*) } }" > %t.script
4
- # RUN: ld.lld -o %t1 --script %t.script %t
5
- # RUN: llvm-objdump --section-headers %t1 | FileCheck %s
2
+ ## Test relocations referencing symbols defined relative to sections discarded by /DISCARD/.
6
3
7
- # CHECK-NOT: .aaa
4
+ # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
5
+ # RUN: echo "SECTIONS { /DISCARD/ : { *(.aaa*) } }" > %t.lds
6
+ # RUN: ld.lld -T %t.lds %t.o -z undefs -o /dev/null 2>&1 | count 0
7
+ # RUN: ld.lld -T %t.lds %t.o -o /dev/null 2>&1 | count 0
8
+ # RUN: ld.lld -r -T %t.lds %t.o -o /dev/null 2>&1 | count 0
9
+
10
+ .globl _start
11
+ _start:
8
12
9
13
.section .aaa ,"a"
10
- aab:
14
+ .globl global
15
+ .weak weak
16
+ global:
17
+ weak:
11
18
.quad 0
12
19
13
20
.section .zzz,"a"
14
- .quad aab
21
+ .quad .aaa
22
+ .quad global
23
+ .quad weak
You can’t perform that action at this time.
0 commit comments