1 # Check handling relocations into the got that require a GOT entry.
2 # This case handles non-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 # It's difficult to check this in the DejaGNU testsuite without checking for
9 # specific values that we know are good. However this is susceptible to
10 # defaults changing where the .text and .got sections end up.
12 # If this testcase prooves to be too flaky while the linker gets updated then
13 # we should look harder for some solution, but for now we'll take this
16 # Here we have to use a format which dumps the hex of the relocation section
17 # since objdump does not show us dynamic relocations on a non-dynamic binary.
18 #source: emit-relocs-morello-6.s
19 #as: -march=morello+c64
20 #ld: -Ttext-segment 0x100000 -Temit-relocs-morello-7.ld -static
21 #objdump: -D -j .rela.dyn -j .got -j .text -j .data
27 Disassembly of section \.text:
29 0000000000100000 <_start>:
30 100000: c2400c00 ldr c0, \[c0, #48\]
31 100004: c2400800 ldr c0, \[c0, #32\]
32 100008: c2401000 ldr c0, \[c0, #64\]
33 10000c: c2400400 ldr c0, \[c0, #16\]
35 Disassembly of section \.rela\.dyn:
37 0000000000100010 <__rela_dyn_start>:
57 Disassembly of section \.data:
59 0000000000100070 <data_obj>:
62 0000000000100074 <data_func>:
65 Disassembly of section \.got:
67 0000000000101000 <_GLOBAL_OFFSET_TABLE_>: