91 lines · plain
1## Test how relocations are dumped.2 3# RUN: yaml2obj %s -o %t4# RUN: llvm-readobj --relocs --expand-relocs %t | \5# RUN: FileCheck %s --strict-whitespace --check-prefixes=RELOCSEXP,NODEMANEXP6# RUN: llvm-readobj --relocs %t | \7# RUN: FileCheck %s --strict-whitespace --check-prefixes=RELOCS,NODEMAN8 9# RUN: llvm-readobj --relocs --expand-relocs --no-demangle %t | \10# RUN: FileCheck %s --strict-whitespace --check-prefixes=RELOCSEXP,NODEMANEXP11# RUN: llvm-readobj --relocs --no-demangle %t | \12# RUN: FileCheck %s --strict-whitespace --check-prefixes=RELOCS,NODEMAN13 14# RUN: llvm-readobj --relocs --expand-relocs --demangle %t | \15# RUN: FileCheck %s --strict-whitespace --check-prefixes=RELOCSEXP,DEMANEXP16# RUN: llvm-readobj --relocs --demangle %t | \17# RUN: FileCheck %s --strict-whitespace --check-prefixes=RELOCS,DEMAN18 19# RELOCSEXP:Relocations [20# RELOCSEXP-NEXT: Section (index: 1) .text {21# RELOCSEXP-NEXT: Relocation {22# RELOCSEXP-NEXT: Virtual Address: 0x8023# RELOCSEXP-NEXT: Symbol: foo (0)24# RELOCSEXP-NEXT: IsSigned: No25# RELOCSEXP-NEXT: FixupBitValue: 026# RELOCSEXP-NEXT: Length: 2227# RELOCSEXP-NEXT: Type: R_POS (0x0)28# RELOCSEXP-NEXT: }29# RELOCSEXP-NEXT: Relocation {30# RELOCSEXP-NEXT: Virtual Address: 0x10031# RELOCSEXP-NEXT: Symbol: foo (0)32# RELOCSEXP-NEXT: IsSigned: No33# RELOCSEXP-NEXT: FixupBitValue: 034# RELOCSEXP-NEXT: Length: 2135# RELOCSEXP-NEXT: Type: R_REL (0x2)36# RELOCSEXP-NEXT: }37# RELOCSEXP-NEXT: }38# RELOCSEXP-NEXT: Section (index: 2) .data {39# RELOCSEXP-NEXT: Relocation {40# RELOCSEXP-NEXT: Virtual Address: 0x20041# NODEMANEXP-NEXT: Symbol: _Z3fwpv (1)42# DEMANEXP-NEXT: Symbol: fwp() (1)43# RELOCSEXP-NEXT: IsSigned: No44# RELOCSEXP-NEXT: FixupBitValue: 045# RELOCSEXP-NEXT: Length: 2046# RELOCSEXP-NEXT: Type: R_TOC (0x3)47# RELOCSEXP-NEXT: }48# RELOCSEXP-NEXT: }49# RELOCSEXP-NEXT:]50 51# RELOCS:Relocations [52# RELOCS-NEXT: Section (index: 1) .text {53# RELOCS-NEXT: 0x80 R_POS foo(0) 0x1554# RELOCS-NEXT: 0x100 R_REL foo(0) 0x1455# RELOCS-NEXT: }56# RELOCS-NEXT: Section (index: 2) .data {57# NODEMAN-NEXT: 0x200 R_TOC _Z3fwpv(1) 0x1358# DEMAN-NEXT: 0x200 R_TOC fwp()(1) 0x1359# RELOCS-NEXT: }60# RELOCS-NEXT:]61 62--- !XCOFF63FileHeader:64 MagicNumber: 0x01DF65Sections:66 - Name: .text67 Flags: [ STYP_TEXT ]68 Relocations:69 - Address: 0x8070 Symbol: 0x071 Info: 0x1572 Type: 0x073 - Address: 0x10074 Symbol: 0x075 Info: 0x1476 Type: 0x277 - Name: .data78 Flags: [ STYP_DATA ]79 Relocations:80 - Address: 0x20081 Symbol: 0x182 Info: 0x1383 Type: 0x384Symbols:85 - Name: foo86 Value: 0x087 Section: .text88 - Name: _Z3fwpv89 Value: 0x8090 Section: .data91