1 // RUN
: llvm-mc
-filetype
=obj
-triple x86_64-pc-linux-gnu
%s
-o
- | elf-dump
--dump-section-data | FileCheck
%s
3 // Test that relocations with local symbols are represented as relocations
4 // with the section. They should
be equivalent
, but gas behaves like this.
9 // Section number
1 is
.text
10 // CHECK
: # Section 0x00000001
11 // CHECK-next
: (('sh_name', 0x00000001) # '.text'
13 // Symbol number
2 is section number
1
14 // CHECK
: # Symbol 0x00000002
15 // CHECK-NEXT
: (('st_name', 0x00000000) # ''
16 // CHECK-NEXT
: ('st_bind', 0x00000000)
17 // CHECK-NEXT
: ('st_type', 0x00000003)
18 // CHECK-NEXT
: ('st_other', 0x00000000)
19 // CHECK-NEXT
: ('st_shndx', 0x00000001)
20 // CHECK-NEXT
: ('st_value', 0x00000000)
21 // CHECK-NEXT
: ('st_size', 0x00000000)
23 // Relocation refers to symbol number
2
24 // CHECK
: ('_relocations', [
25 // CHECK-NEXT
: # Relocation 0x00000000
26 // CHECK-NEXT
: (('r_offset',
27 // CHECK-NEXT
: ('r_sym', 0x00000002)
28 // CHECK-NEXT
: ('r_type',
29 // CHECK-NEXT
: ('r_addend',