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