]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - ld/testsuite/ld-aarch64/emit-relocs-morello-6b.d
943b339a6d1b4350202a4d2716d41c59ef8579b4
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-aarch64 / emit-relocs-morello-6b.d
1 # Check handling relocations into the got that require a GOT entry.
2 # This case handles non-PIE binaries.
3 #
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.
7 #
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.
11 #
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
14 # tradeoff.
15 #
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
22
23
24 .*: file format .*
25
26
27 Disassembly of section \.text:
28
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\]
34
35 Disassembly of section \.rela\.dyn:
36
37 0000000000100010 <__rela_dyn_start>:
38 100010: 00101030 .*
39 100014: 00000000 .*
40 100018: 0000e803 .*
41 10001c: 00000000 .*
42 100020: 00000001 .*
43 100024: 00000000 .*
44 100028: 00101020 .*
45 10002c: 00000000 .*
46 100030: 0000e803 .*
47 \.\.\.
48 100040: 00101040 .*
49 100044: 00000000 .*
50 100048: 0000e803 .*
51 \.\.\.
52 100058: 00101010 .*
53 10005c: 00000000 .*
54 100060: 0000e803 .*
55 \.\.\.
56
57 Disassembly of section \.data:
58
59 0000000000100070 <data_obj>:
60 100070: 0000000a .*
61
62 0000000000100074 <data_func>:
63 100074: 0000000a .*
64
65 Disassembly of section \.got:
66
67 0000000000101000 <_GLOBAL_OFFSET_TABLE_>:
68 \.\.\.
69 101010: 00100075 .*
70 101014: 00000000 .*
71 101018: 00000402 .*
72 10101c: 00000000 .*
73 101020: 00100000 .*
74 101024: 00000000 .*
75 101028: 00105001 .*
76 10102c: 00000000 .*
77 101030: 00100000 .*
78 101034: 00000000 .*
79 101038: 00105001 .*
80 10103c: 00000000 .*
81 101040: 00100070 .*
82 101044: 00000000 .*
83 101048: 00000402 .*
84 10104c: 00000000 .*