1 # Check handling relocations into the got that require a GOT entry.
2 # This case handles PIE binaries.
4 # This testcase uses exact values in order to check that of the two GOT entries
5 # created, the one that is referenced by the first instruction in _start is
6 # the one which has the LSB set in its value.
8 # Have tried to mitigate the flakyness of the test with a linker script that
9 # aligns .text and the GOT to 12 bits so that the ldr addends are just offsets
10 # into the GOT and we are likely to get .text at 0x1000.
11 #source: emit-relocs-morello-6.s
12 #as: -march=morello+c64
13 #ld: -Ttext-segment 0x100000 -T emit-relocs-morello-7.ld -pie -static
14 #objdump: -DR -j .got -j .text -j .data
20 Disassembly of section \.text:
22 0000000000100100 <_start>:
23 100100: c2400c00 ldr c0, \[c0, #48\]
24 100104: c2400800 ldr c0, \[c0, #32\]
25 100108: c2401000 ldr c0, \[c0, #64\]
26 10010c: c2400400 ldr c0, \[c0, #16\]
28 Disassembly of section \.data:
30 00000000001001e8 <data_obj>:
33 00000000001001ec <data_func>:
36 Disassembly of section \.got:
38 0000000000101000 <\.got>:
42 101010: R_MORELLO_RELATIVE \*ABS\*
47 101020: R_MORELLO_RELATIVE \*ABS\*
52 101030: R_MORELLO_RELATIVE \*ABS\*\+0x1
57 101040: R_MORELLO_RELATIVE \*ABS\*