llvm.org GIT mirror llvm / 1564bf7
[obj2yaml][ELF] Print relocation's offset as a hex number. Use a proper types to hold relocation's offset and addend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208906 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Atanasyan 6 years ago
2 changed file(s) with 12 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
8888 }
8989 };
9090 struct Relocation {
91 uint32_t Offset;
92 uint32_t Addend;
91 llvm::yaml::Hex64 Offset;
92 int64_t Addend;
9393 ELF_REL Type;
9494 StringRef Symbol;
9595 };
207207 ELF-MIPSEL-NEXT: Symbol: _gp_disp
208208 ELF-MIPSEL-NEXT: Type: R_MIPS_HI16
209209 ELF-MIPSEL-NEXT: Addend: 0
210 ELF-MIPSEL-NEXT: - Offset: 4
210 ELF-MIPSEL-NEXT: - Offset: 0x0000000000000004
211211 ELF-MIPSEL-NEXT: Symbol: _gp_disp
212212 ELF-MIPSEL-NEXT: Type: R_MIPS_LO16
213213 ELF-MIPSEL-NEXT: Addend: 0
214 ELF-MIPSEL-NEXT: - Offset: 24
214 ELF-MIPSEL-NEXT: - Offset: 0x0000000000000018
215215 ELF-MIPSEL-NEXT: Symbol: '$.str'
216216 ELF-MIPSEL-NEXT: Type: R_MIPS_GOT16
217217 ELF-MIPSEL-NEXT: Addend: 0
218 ELF-MIPSEL-NEXT: - Offset: 28
218 ELF-MIPSEL-NEXT: - Offset: 0x000000000000001C
219219 ELF-MIPSEL-NEXT: Symbol: '$.str'
220220 ELF-MIPSEL-NEXT: Type: R_MIPS_LO16
221221 ELF-MIPSEL-NEXT: Addend: 0
222 ELF-MIPSEL-NEXT: - Offset: 32
222 ELF-MIPSEL-NEXT: - Offset: 0x0000000000000020
223223 ELF-MIPSEL-NEXT: Symbol: puts
224224 ELF-MIPSEL-NEXT: Type: R_MIPS_CALL16
225225 ELF-MIPSEL-NEXT: Addend: 0
226 ELF-MIPSEL-NEXT: - Offset: 44
226 ELF-MIPSEL-NEXT: - Offset: 0x000000000000002C
227227 ELF-MIPSEL-NEXT: Symbol: SomeOtherFunction
228228 ELF-MIPSEL-NEXT: Type: R_MIPS_CALL16
229229 ELF-MIPSEL-NEXT: Addend: 0
372372 ELF-X86-64-NEXT: Info: .text
373373 ELF-X86-64-NEXT: AddressAlign: 0x0000000000000008
374374 ELF-X86-64-NEXT: Relocations:
375 ELF-X86-64-NEXT: - Offset: 13
375 ELF-X86-64-NEXT: - Offset: 0x000000000000000D
376376 ELF-X86-64-NEXT: Symbol: .rodata.str1.1
377377 ELF-X86-64-NEXT: Type: R_X86_64_32S
378378 ELF-X86-64-NEXT: Addend: 0
379 ELF-X86-64-NEXT: - Offset: 18
379 ELF-X86-64-NEXT: - Offset: 0x0000000000000012
380380 ELF-X86-64-NEXT: Symbol: puts
381381 ELF-X86-64-NEXT: Type: R_X86_64_PC32
382 ELF-X86-64-NEXT: Addend: 4294967292
383 ELF-X86-64-NEXT: - Offset: 25
382 ELF-X86-64-NEXT: Addend: -4
383 ELF-X86-64-NEXT: - Offset: 0x0000000000000019
384384 ELF-X86-64-NEXT: Symbol: SomeOtherFunction
385385 ELF-X86-64-NEXT: Type: R_X86_64_PC32
386 ELF-X86-64-NEXT: Addend: 4294967292
386 ELF-X86-64-NEXT: Addend: -4
387387 ELF-X86-64-NEXT: Symbols:
388388 ELF-X86-64-NEXT: Local:
389389 ELF-X86-64-NEXT: - Name: trivial-object-test.s