Eric Christopher | 9cad53c | 2013-04-03 18:31:38 +0000 | [diff] [blame] | 1 | RUN: llvm-readobj -r %p/Inputs/trivial.obj.coff-i386 \ |
| 2 | RUN: | FileCheck %s -check-prefix COFF |
| 3 | RUN: llvm-readobj -r %p/Inputs/trivial.obj.elf-i386 \ |
| 4 | RUN: | FileCheck %s -check-prefix ELF |
| 5 | RUN: llvm-readobj -r %p/Inputs/trivial.obj.macho-i386 \ |
| 6 | RUN: | FileCheck %s -check-prefix MACHO |
| 7 | |
| 8 | COFF: Relocations [ |
| 9 | COFF-NEXT: Section (1) .text { |
| 10 | COFF-NEXT: 0x4 IMAGE_REL_I386_DIR32 .data |
| 11 | COFF-NEXT: 0x9 IMAGE_REL_I386_REL32 _puts |
| 12 | COFF-NEXT: 0xE IMAGE_REL_I386_REL32 _SomeOtherFunction |
| 13 | COFF-NEXT: } |
| 14 | COFF-NEXT: ] |
| 15 | |
| 16 | ELF: Relocations [ |
| 17 | ELF-NEXT: Section (1) .text { |
| 18 | ELF-NEXT: 0xC R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 0x0 |
| 19 | ELF-NEXT: 0x12 R_386_GOTOFF .L.str 0x0 |
| 20 | ELF-NEXT: 0x1A R_386_PLT32 puts 0x0 |
| 21 | ELF-NEXT: 0x1F R_386_PLT32 SomeOtherFunction 0x0 |
| 22 | ELF-NEXT: } |
| 23 | ELF-NEXT: ] |
| 24 | |
| 25 | MACHO: Relocations [ |
| 26 | MACHO-NEXT: Section __text { |
| 27 | MACHO-NEXT: 0x18 GENERIC_RELOC_VANILLA _SomeOtherFunction 0x0 |
| 28 | MACHO-NEXT: 0x13 GENERIC_RELOC_VANILLA _puts 0x0 |
| 29 | MACHO-NEXT: 0xB GENERIC_RELOC_LOCAL_SECTDIFF _main 0x{{[0-9A-F]+}} |
| 30 | MACHO-NEXT: 0x0 GENERIC_RELOC_PAIR _main 0x{{[0-9A-F]+}} |
| 31 | MACHO-NEXT: } |
| 32 | MACHO-NEXT: ] |