1 ## Show that --disassemble + --reloc prints relocations inline and does not dump
2 ## the relocation sections.
4 # RUN: yaml2obj %s --docnum=1 -o %t1.o
5 # RUN: llvm-objdump %t1.o -d -r | FileCheck %s --implicit-check-not="RELOCATION RECORDS"
7 # CHECK: 0: e8 00 00 00 00 callq 0x5 <.text+0x5>
8 # CHECK-NEXT: 0000000000000001: R_X86_64_PC32 foo-0x4
9 # CHECK-NEXT: 0000000000000002: R_X86_64_NONE bar+0x8
10 # CHECK-NEXT: 5: e8 00 00 00 00 callq 0xa <.text+0xa>
11 # CHECK-NEXT: 0000000000000006: R_X86_64_PLT32 foo+0x1
22 Flags: [SHF_ALLOC, SHF_EXECINSTR]
23 Content: 'e800000000e800000000'
44 ## Check we report an error if the relocated section identified by the
45 ## sh_info field of a relocation section is invalid.
47 # RUN: yaml2obj %s --docnum=2 -o %t2.o
48 # RUN: not llvm-objdump %t2.o -d --reloc 2>&1 | FileCheck %s -DFILE=%t2.o --check-prefix=ERR
50 # ERR: error: '[[FILE]]': section (1): failed to get a relocated section: invalid section index: 255
59 - Name: .rela.debug_info
65 ## Check ranges of addends being displayed in a dump of relocations mixed with disassembly.
66 # RUN: yaml2obj --docnum=3 %s -o %t3
67 # RUN: llvm-objdump -d -r %t3 | FileCheck %s --check-prefix=ADDENDS
69 # ADDENDS: Disassembly of section .text:
70 # ADDENDS: R_X86_64_64 glob-0x8000000000000000
71 # ADDENDS: R_X86_64_64 glob+0x7fffffffffffffff
72 # ADDENDS: R_X86_64_64 glob-0x1
73 # ADDENDS: R_X86_64_64 glob+0x12345678
74 # ADDENDS: R_X86_64_64 glob{{$}}
86 Flags: [SHF_EXECINSTR,SHF_ALLOC]
92 Addend: -9223372036854775808
98 Addend: 9223372036854775807