Commit | Line | Data |
---|---|---|
469a3493 RM |
1 | # This tests PR ld/17277, wherein ld -shared for cross-section PC-relative |
2 | # relocs (other than plain R_ARM_REL32, as in data) produce bogus dynamic | |
3 | # relocs and TEXTREL markers. | |
4 | ||
5 | .syntax unified | |
6 | .arm | |
7 | .arch armv7-a | |
8 | ||
9 | .text | |
10 | .globl foo | |
11 | .type foo,%function | |
12 | foo: movw r0, #:lower16:symbol - 1f - 8 | |
13 | movt r0, #:upper16:symbol - 1f - 8 | |
14 | 1: add r0, pc | |
15 | @ And now a case with a local symbol. | |
16 | movw r0, #:lower16:3f - 2f - 8 | |
17 | movt r0, #:upper16:3f - 2f - 8 | |
18 | 2: add r0, pc | |
19 | bx lr | |
20 | ||
21 | .data | |
22 | .globl symbol | |
23 | .hidden symbol | |
24 | symbol: .long 23 | |
25 | 3: .long 17 |