File tree Expand file tree Collapse file tree 3 files changed +44
-28
lines changed Expand file tree Collapse file tree 3 files changed +44
-28
lines changed Original file line number Diff line number Diff line change 1+ # RUN: llvm-mc -triple=aarch64 -filetype=obj %s | llvm-readobj -r - | FileCheck %s
2+ # RUN: not llvm-mc -triple=aarch64 -filetype=obj %s --defsym ERR=1 -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR --implicit-check-not=error:
3+
4+ .globl g
5+ g:
6+ l:
7+
8+ # CHECK: Section ({{.*}}) .rela.data {
9+ # CHECK-NEXT: 0x0 R_AARCH64_PLT32 l 0x0
10+ # CHECK-NEXT: 0x4 R_AARCH64_PLT32 l 0x4
11+ # CHECK-NEXT: 0x8 R_AARCH64_PLT32 extern 0x4
12+ # CHECK-NEXT: 0xC R_AARCH64_PLT32 g 0x8
13+ # CHECK-NEXT: 0x10 R_AARCH64_PLT32 g 0x18
14+ # CHECK-NEXT: }
15+ .data
16+ .word l@plt - .
17+ .word l@plt - .data
18+
19+ .word extern@plt - . + 4
20+ .word g@plt - . + 8
21+ .word g@plt - .data + 8
22+
23+ # CHECK: Section ({{.*}}) .rela.data1 {
24+ # CHECK-NEXT: 0x0 R_AARCH64_GOTPCREL32 data1 0x0
25+ # CHECK-NEXT: 0x4 R_AARCH64_GOTPCREL32 extern 0x4
26+ # CHECK-NEXT: 0x8 R_AARCH64_GOTPCREL32 extern 0xFFFFFFFFFFFFFFFB
27+ # CHECK-NEXT: }
28+ .section .data1,"aw"
29+ data1:
30+ .word data1@GOTPCREL
31+ .word extern@gotpcrel+4
32+ .word extern@GOTPCREL-5
33+
34+ .ifdef ERR
35+ # ERR: [[#@LINE+1]]:7: error: symbol 'und' can not be undefined in a subtraction expression
36+ .word extern@plt - und
37+
38+ .quad g@plt - .
39+
40+ .word extern@gotpcrel - .
41+
42+ # ERR: [[#@LINE+1]]:7: error: symbol 'und' can not be undefined in a subtraction expression
43+ .word extern@gotpcrel - und
44+ .endif
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments