mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +00:00
Original message: Print more information about relocations. With this patch llvm-readobj now prints if a relocation is pcrel, its length, if it is extern and if it is scattered. It also refactors the code a bit to use bit fields instead of shifts and masks all over the place. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179345 91177308-0d34-0410-b5e6-96231b3b80d8
43 lines
1.6 KiB
Plaintext
43 lines
1.6 KiB
Plaintext
RUN: llvm-readobj -r %p/Inputs/trivial.obj.coff-i386 \
|
|
RUN: | FileCheck %s -check-prefix COFF
|
|
RUN: llvm-readobj -r %p/Inputs/trivial.obj.elf-i386 \
|
|
RUN: | FileCheck %s -check-prefix ELF
|
|
RUN: llvm-readobj -r %p/Inputs/trivial.obj.macho-i386 \
|
|
RUN: | FileCheck %s -check-prefix MACHO-I386
|
|
RUN: llvm-readobj -r %p/Inputs/trivial.obj.macho-x86-64 \
|
|
RUN: | FileCheck %s -check-prefix MACHO-X86-64
|
|
|
|
COFF: Relocations [
|
|
COFF-NEXT: Section (1) .text {
|
|
COFF-NEXT: 0x4 IMAGE_REL_I386_DIR32 .data
|
|
COFF-NEXT: 0x9 IMAGE_REL_I386_REL32 _puts
|
|
COFF-NEXT: 0xE IMAGE_REL_I386_REL32 _SomeOtherFunction
|
|
COFF-NEXT: }
|
|
COFF-NEXT: ]
|
|
|
|
ELF: Relocations [
|
|
ELF-NEXT: Section (1) .text {
|
|
ELF-NEXT: 0xC R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 0x0
|
|
ELF-NEXT: 0x12 R_386_GOTOFF .L.str 0x0
|
|
ELF-NEXT: 0x1A R_386_PLT32 puts 0x0
|
|
ELF-NEXT: 0x1F R_386_PLT32 SomeOtherFunction 0x0
|
|
ELF-NEXT: }
|
|
ELF-NEXT: ]
|
|
|
|
MACHO-I386: Relocations [
|
|
MACHO-I386-NEXT: Section __text {
|
|
MACHO-I386-NEXT: 0x18 1 2 1 GENERIC_RELOC_VANILLA 0 _SomeOtherFunction
|
|
MACHO-I386-NEXT: 0x13 1 2 1 GENERIC_RELOC_VANILLA 0 _puts
|
|
MACHO-I386-NEXT: 0xB 0 2 n/a GENERIC_RELOC_LOCAL_SECTDIFF 1 _main
|
|
MACHO-I386-NEXT: 0x0 0 2 n/a GENERIC_RELOC_PAIR 1 _main
|
|
MACHO-I386-NEXT: }
|
|
MACHO-I386-NEXT: ]
|
|
|
|
MACHO-X86-64: Relocations [
|
|
MACHO-X86-64-NEXT: Section __text {
|
|
MACHO-X86-64-NEXT: 0xE 1 2 1 X86_64_RELOC_BRANCH 0 _SomeOtherFunction
|
|
MACHO-X86-64-NEXT: 0x9 1 2 1 X86_64_RELOC_BRANCH 0 _puts
|
|
MACHO-X86-64-NEXT: 0x4 1 2 1 X86_64_RELOC_SIGNED 0 L_.str
|
|
MACHO-X86-64-NEXT: }
|
|
MACHO-X86-64-NEXT:]
|