1 // RUN
: llvm-mc
-filetype
=obj
-triple x86_64-pc-linux-gnu
%s
-o
- | elf-dump | FileCheck
%s
3 // When doing
a rename
, all the checks for where the relocation should go
4 // should
be performed with the original symbol. Only if we decide to relocate
5 // with the symbol we should then use the renamed one.
7 // This is
a regression test for
a bug where we used bar5@@@zed when deciding
8 // if we should relocate with the symbol
or with the section
and we would then
9 // not produce
a relocation with
.text.
13 .symver defined3, bar5@@@zed
19 // CHECK
: # Section 0x00000001
20 // CHECK-NEXT
: (('sh_name', 0x00000006) # '.text'
21 // CHECK-NEXT
: ('sh_type', 0x00000001)
22 // CHECK-NEXT
: ('sh_flags', 0x00000006)
23 // CHECK-NEXT
: ('sh_addr', 0x00000000)
24 // CHECK-NEXT
: ('sh_offset', 0x00000040)
25 // CHECK-NEXT
: ('sh_size', 0x00000004)
26 // CHECK-NEXT
: ('sh_link', 0x00000000)
27 // CHECK-NEXT
: ('sh_info', 0x00000000)
28 // CHECK-NEXT
: ('sh_addralign', 0x00000004)
29 // CHECK-NEXT
: ('sh_entsize', 0x00000000)
31 // The relocation uses symbol
2
32 // CHECK
: # Relocation 0x00000000
33 // CHECK-NEXT
: (('r_offset', 0x00000000)
34 // CHECK-NEXT
: ('r_sym', 0x00000002)
35 // CHECK-NEXT
: ('r_type', 0x0000000a)
36 // CHECK-NEXT
: ('r_addend', 0x00000000)
38 // Symbol
2 is section
1
39 // CHECK
: # Symbol 0x00000002
40 // CHECK-NEXT
: (('st_name', 0x00000000) # ''
41 // CHECK-NEXT
: ('st_bind', 0x00000000)
42 // CHECK-NEXT
: ('st_type', 0x00000003)
43 // CHECK-NEXT
: ('st_other', 0x00000000)
44 // CHECK-NEXT
: ('st_shndx', 0x00000001)
45 // CHECK-NEXT
: ('st_value', 0x0000000000000000)
46 // CHECK-NEXT
: ('st_size', 0x0000000000000000)