brintos

brintos / llvm-project-archived public Read only

0
0
Text · 11.8 KiB · d03d07b Raw
115 lines · plain
1## Test the --loader-section-relocations option.2 3# RUN: yaml2obj --docnum=1 %s -o %t_xcoff32.o4# RUN: yaml2obj --docnum=2  %s -o %t_xcoff64.o5# RUN: llvm-readobj --loader-section-relocations --expand-relocs %t_xcoff32.o | FileCheck --check-prefixes=COMMON,EXPAND,NODEMANEXP %s6# RUN: llvm-readobj --loader-section-relocations --expand-relocs %t_xcoff64.o | FileCheck --check-prefixes=COMMON,EXPAND,NODEMANEXP %s7# RUN: llvm-readobj --loader-section-relocations %t_xcoff32.o | FileCheck --check-prefixes=COMMON,NOEXPAND32,NODEMAN32 %s8# RUN: llvm-readobj --loader-section-relocations %t_xcoff64.o | FileCheck --check-prefixes=COMMON,NOEXPAND64,NODEMAN64 %s9 10# RUN: llvm-readobj --loader-section-relocations --expand-relocs --no-demangle %t_xcoff32.o | FileCheck --check-prefixes=COMMON,EXPAND,NODEMANEXP %s11# RUN: llvm-readobj --loader-section-relocations --expand-relocs --no-demangle %t_xcoff64.o | FileCheck --check-prefixes=COMMON,EXPAND,NODEMANEXP %s12# RUN: llvm-readobj --loader-section-relocations --no-demangle %t_xcoff32.o | FileCheck --check-prefixes=COMMON,NOEXPAND32,NODEMAN32 %s13# RUN: llvm-readobj --loader-section-relocations --no-demangle %t_xcoff64.o | FileCheck --check-prefixes=COMMON,NOEXPAND64,NODEMAN64 %s14 15# RUN: llvm-readobj --loader-section-relocations --expand-relocs --demangle %t_xcoff32.o | FileCheck --check-prefixes=COMMON,EXPAND,DEMANEXP %s16# RUN: llvm-readobj --loader-section-relocations --expand-relocs --demangle %t_xcoff64.o | FileCheck --check-prefixes=COMMON,EXPAND,DEMANEXP %s17# RUN: llvm-readobj --loader-section-relocations --demangle %t_xcoff32.o | FileCheck --check-prefixes=COMMON,NOEXPAND32,DEMAN32 %s18# RUN: llvm-readobj --loader-section-relocations --demangle %t_xcoff64.o | FileCheck --check-prefixes=COMMON,NOEXPAND64,DEMAN64 %s19--- !XCOFF20FileHeader:21  MagicNumber:       0x1DF22Sections:23  - Name:            .loader24    Flags:           [ STYP_LOADER ]25    SectionData:     "0000000100000001000000020000016D00000001000000A400000000000000505f5a3466756e63762000028000021105000000000000000020000294000000011f0000022000029c000000031f000002"26##                    ^-------                                                           -Version=127##                            ^-------                                                   -NumberOfSymbolEntries=128##                                    ^-------                                           -NumberOfRelocationEntries=229##                                            ^-------                                   -LengthOfImportFileIDStringTable=36530##                                                    ^-------                           -NumberOfImportFileIDs=131##                                                            ^-------                   -OffsetToImportFileIDs=0xA432##                                                                    ^-------           -LengthOfStringTable=033##                                                                            ^-------   -OffsetToStringTable=034##                                                                                    ^---------------         SymbolName=_Z4funcv35##                                                                                                    ^------- Value=0x2000028036##                                                                                                            ^---  sectionNumber = 237##                                                                                                                ^- SymbolType=0x1138##                                                                                                                  ^- StorageClass=0x0539##                                                                                                                    ^-------   ImportFileID=040##                                                                                                                            ^-------ParameterCheckType=041##                                                                                                                                    ^-------    Virtual Address = 0x2000029442##                                                                                                                                            ^------- SymbolIndex = 143##                                                                                                                                                    ^--- Type =0x1f0044##                                                                                                                                                        ^--- Section Num =245##                                                                                                                                                            ^-------    Virtual Address = 0x2000029446##                                                                                                                                                                    ^------- SymbolIndex = 347##                                                                                                                                                                            ^--- Type =0x1f0048##                                                                                                                                                                                ^--- Section Num =249 50--- !XCOFF51FileHeader:52  MagicNumber:       0x1F753Sections:54  - Name:            .loader55    Flags:           [ STYP_LOADER ]56    SectionData:     "0000000200000001000000020000016D000000010000001200000000000000D000000000000000700000000000000038000000000000005000000001100003000000000200021105000000000000000000000000200002941f00000200000001000000002000029C1f0000020000000300095f5a3466756e63760000"57##                    ^-------                                                           -Version=258##                            ^-------                                                   -NumberOfSymbolEntries=159##                                    ^-------                                           -NumberOfRelocationEntries=260##                                            ^-------                                   -LengthOfImportFileIDStringTable=36561##                                                    ^-------                           -NumberOfImportFileIDs=162##                                                            ^-------                   --LengthOfStringTable=0x1263##                                                                    ^---------------   -OffsetToImportFileIDs=0xD064##                                                                                    ^---------------   -OffsetToStringTable=0x7065##                                                                                                    ^---------------  -OffsetToSymbolTable=0x3866##                                                                                                                    ^---------------   -OffsetToRelocationEntries=0x5067##                                                                                                                                    ^---------------         Value=0x000000011000030068##                                                                                                                                                    ^------- OffsetToStringTbl=269##                                                                                                                                                            ^---  sectionNumber = 270##                                                                                                                                                                ^- SymbolType=0x1171##                                                                                                                                                                  ^- StorageClass=0x0572##                                                                                                                                                                    ^-------   ImportFileID=073##                                                                                                                                                                            ^-------ParameterCheckType=074##                                                                                                                                                                                    ^--------------- VirtualAddress= 0x2000029475##                                                                                                                                                                                                    ^--- Type= 1f0076##                                                                                                                                                                                                        ^---SectionNumber = 277##                                                                                                                                                                                                            ^------- SymbolIndex =178##                                                                                                                                                                                                                    ^--------------- VirtualAddress= 0x2000029C79##                                                                                                                                                                                                                                    ^--- Type= 1f0080##                                                                                                                                                                                                                                        ^---SectionNumber = 281##                                                                                                                                                                                                                                            ^------- SymbolIndex =382##                                                                                                                                                                                                                                                    ^-------------------StringTable83 84# COMMON:      Loader Section {85# COMMON-NEXT:     Loader Section Relocations {86# NOEXPAND64-NEXT:           Vaddr            Type        SecNum  SymbolName (Index)87# NOEXPAND64-NEXT:     0x0000000020000294 0x1f00 (R_POS)       2    .data (1)88# NODEMAN64-NEXT:      0x000000002000029c 0x1f00 (R_POS)       2    _Z4funcv (3)89# DEMAN64-NEXT:        0x000000002000029c 0x1f00 (R_POS)       2    func() (3)90# NOEXPAND32-NEXT:        Vaddr        Type        SecNum  SymbolName (Index)91# NOEXPAND32-NEXT:      0x20000294 0x1f00 (R_POS)       2    .data (1)92# NODEMAN32-NEXT:       0x2000029c 0x1f00 (R_POS)       2    _Z4funcv (3)93# DEMAN32-NEXT:         0x2000029c 0x1f00 (R_POS)       2    func() (3)94# EXPAND-NEXT:       Relocation {95# EXPAND-NEXT:         Virtual Address: 0x2000029496# EXPAND-NEXT:         Symbol: .data (1)97# EXPAND-NEXT:         IsSigned: No98# EXPAND-NEXT:         FixupBitValue: 099# EXPAND-NEXT:         Length: 32100# EXPAND-NEXT:         Type: R_POS (0x0)101# EXPAND-NEXT:         SectionNumber: 2102# EXPAND-NEXT:       }103# EXPAND-NEXT:       Relocation {104# EXPAND-NEXT:         Virtual Address: 0x2000029C105# NODEMANEXP-NEXT:     Symbol: _Z4funcv (3)106# DEMANEXP-NEXT:       Symbol: func() (3)107# EXPAND-NEXT:         IsSigned: No108# EXPAND-NEXT:         FixupBitValue: 0109# EXPAND-NEXT:         Length: 32110# EXPAND-NEXT:         Type: R_POS (0x0)111# EXPAND-NEXT:         SectionNumber: 2112# EXPAND-NEXT:       }113# EXPAND-NEXT:     }114# EXPAND-NEXT: }115