diff options
Diffstat (limited to 'test/MC/ELF/relocation-pc.s')
-rw-r--r-- | test/MC/ELF/relocation-pc.s | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/test/MC/ELF/relocation-pc.s b/test/MC/ELF/relocation-pc.s index b6279c3e55..551f5ff378 100644 --- a/test/MC/ELF/relocation-pc.s +++ b/test/MC/ELF/relocation-pc.s @@ -1,33 +1,32 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr | FileCheck %s // Test that we produce the correct relocation. loope 0 # R_X86_64_PC8 jmp -256 # R_X86_64_PC32 -// CHECK: # Section 2 -// CHECK-NEXT: (('sh_name', 0x00000001) # '.rela.text' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x00000000000002e8) -// CHECK-NEXT: ('sh_size', 0x0000000000000030) -// CHECK-NEXT: ('sh_link', 0x00000006) -// CHECK-NEXT: ('sh_info', 0x00000001) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000001) -// CHECK-NEXT: ('r_sym', 0x00000000) -// CHECK-NEXT: ('r_type', 0x0000000f) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 1 -// CHECK-NEXT: (('r_offset', 0x0000000000000003) -// CHECK-NEXT: ('r_sym', 0x00000000) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 1 +// CHECK-NEXT: Name: .text +// CHECK: Relocations [ +// CHECK-NEXT: 0x1 R_X86_64_PC8 - 0x0 +// CHECK-NEXT: 0x3 R_X86_64_PC32 - 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: } + +// CHECK: Section { +// CHECK: Index: 2 +// CHECK-NEXT: Name: .rela.text +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x2E8 +// CHECK-NEXT: Size: 48 +// CHECK-NEXT: Link: 6 +// CHECK-NEXT: Info: 1 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK-NEXT: } |