brintos

brintos / llvm-project-archived public Read only

0
0
Text · 11.6 KiB · 053c5b4 Raw
134 lines · plain
1## Test the --loader-section-symbols option.2 3# RUN: yaml2obj --docnum=1 -DSYMNUM=2 %s -o %t_xcoff32.o4# RUN: yaml2obj --docnum=1 -DSYMNUM=4 %s -o %t_xcoff32_invalid.o5# RUN: yaml2obj --docnum=2 %s -o %t_xcoff64.o6 7# RUN: llvm-readobj --loader-section-symbols %t_xcoff32.o |\8# RUN:   FileCheck %s --check-prefixes=CHECK329# RUN: llvm-readobj --loader-section-symbols --no-demangle %t_xcoff32.o |\10# RUN:   FileCheck %s --check-prefixes=CHECK3211# RUN: llvm-readobj --loader-section-symbols --demangle %t_xcoff32.o |\12# RUN:   FileCheck %s --check-prefixes=CHECK3213# RUN: llvm-readobj --loader-section-symbols %t_xcoff32_invalid.o 2>&1 |\14# RUN:   FileCheck -DFILE=%t_xcoff32_invalid.o %s --check-prefixes=CHECK32,WARN15# RUN: llvm-readobj --loader-section-symbols %t_xcoff64.o |\16# RUN:   FileCheck %s --check-prefixes=CHECK64,NODEMAN6417# RUN: llvm-readobj --loader-section-symbols --no-demangle %t_xcoff64.o |\18# RUN:   FileCheck %s --check-prefixes=CHECK64,NODEMAN6419# RUN: llvm-readobj --loader-section-symbols --demangle %t_xcoff64.o |\20# RUN:   FileCheck %s --check-prefixes=CHECK64,DEMAN6421 22--- !XCOFF23FileHeader:24  MagicNumber:       0x1DF25Sections:26  - Name:            .loader27    Flags:           [ STYP_LOADER ]28    SectionData:     "000000010000000[[SYMNUM]]000000050000016D00000001000000A40000000c000000506d79696e74766172200002800002110500000000000000000000000000000002200002840002110a0000000000000000000a66756e63305f5f467600"29##                    ^-------                                                           -Version=130##                            ^----------------                                                   -NumberOfSymbolEntries=SYMNUM31##                                             ^-------                                           -NumberOfRelocationEntries=532##                                                     ^-------                                   -LengthOfImportFileIDStringTable=36533##                                                             ^-------                           -NumberOfImportFileIDs=134##                                                                     ^-------                   -OffsetToImportFileIDs=0xA435##                                                                             ^-------           -LengthOfStringTable=1236##                                                                                     ^-------   -OffsetToStringTable=0x05037##                                                                                             ^---------------         SymbolName=myintvar38##                                                                                                             ^------- Value=0x2000028039##                                                                                                                     ^---  sectionNumber = 240##                                                                                                                         ^- SymbolType=0x1141##                                                                                                                           ^- StorageClass=0x0542##                                                                                                                             ^-------   ImportFileID=043##                                                                                                                                     ^-------ParameterCheckType=044##                                                                                                                                             ^-------SymbolZero=045##                                                                                                                                                     ^-------OffsetToSymTbl=246##                                                                                                                                                             ^------- Value=2000028447##                                                                                                                                                                     ^---  sectionNumber = 248##                                                                                                                                                                         ^- SymbolType=0x1149##                                                                                                                                                                           ^- StorageClass=0x0a50##                                                                                                                                                                              ^-------   ImportFileID=051##                                                                                                                                                                                      ^-------ParameterCheckType=052##                                                                                                                                                                                              ^StringTable53 54--- !XCOFF55FileHeader:56  MagicNumber:       0x1F757Sections:58  - Name:            .loader59    Flags:           [ STYP_LOADER ]60    SectionData:     "0000000200000002000000050000016D000000010000001200000000000000D000000000000000680000000000000038000000000000008000000001100003000000000200021105000000000000000000000001100003080000000d0002110a000000000000000000096d79696e7476617200000a5f5a3566756e6330760000"61##                    ^-------                                                           -Version=262##                            ^-------                                                   -NumberOfSymbolEntries=263##                                    ^-------                                           -NumberOfRelocationEntries=564##                                            ^-------                                   -LengthOfImportFileIDStringTable=36565##                                                    ^-------                           -NumberOfImportFileIDs=166##                                                            ^-------                   --LengthOfStringTable=0x1267##                                                                    ^---------------   -OffsetToImportFileIDs=0xD068##                                                                                    ^---------------   -OffsetToStringTable=0x6869##                                                                                                    ^---------------  -OffsetToSymbolTable=0x3870##                                                                                                                    ^---------------   -OffsetToRelocationEntries=0x8071##                                                                                                                                    ^---------------         Value=0x000000011000030072##                                                                                                                                                    ^------- OffsetToStringTbl=273##                                                                                                                                                            ^---  sectionNumber = 274##                                                                                                                                                                ^- SymbolType=0x1175##                                                                                                                                                                  ^- StorageClass=0x0576##                                                                                                                                                                    ^-------   ImportFileID=077##                                                                                                                                                                            ^-------ParameterCheckType=078##                                                                                                                                                                                    ^--------------- Value=0x000000011000030879##                                                                                                                                                                                                    ^------- OffsetToStringTbl= 0x0d80##                                                                                                                                                                                                            ^---  sectionNumber = 281##                                                                                                                                                                                                                ^- SymbolType=0x1182##                                                                                                                                                                                                                  ^- StorageClass=0x0a83##                                                                                                                                                                                                                    ^-------   ImportFileID=084##                                                                                                                                                                                                                            ^-------ParameterCheckType=085##                                                                                                                                                                                                                                    ^StringTable86 87# CHECK32:      Loader Section {88# CHECK32-NEXT:     Loader Section Symbols {89# CHECK32-NEXT:       Symbol {90# CHECK32-NEXT:         Name: myintvar91# CHECK32-NEXT:         Virtual Address: 0x2000028092# CHECK32-NEXT:         SectionNum: 293# CHECK32-NEXT:         SymbolType: 0x1194# CHECK32-NEXT:         StorageClass: C_EXTDEF (0x5)95# CHECK32-NEXT:         ImportFileID: 0x096# CHECK32-NEXT:         ParameterTypeCheck: 097# CHECK32-NEXT:       }98# CHECK32-NEXT:       Symbol {99# CHECK32-NEXT:         Name: func0__Fv100# CHECK32-NEXT:         Virtual Address: 0x20000284101# CHECK32-NEXT:         SectionNum: 2102# CHECK32-NEXT:         SymbolType: 0x11103# CHECK32-NEXT:         StorageClass: C_STRTAG (0xA)104# CHECK32-NEXT:         ImportFileID: 0x0105# CHECK32-NEXT:         ParameterTypeCheck: 0106# CHECK32-NEXT:       }107# WARN:          warning: '[[FILE]]': The end of the file was unexpectedly encountered108# CHECK32-NEXT:     }109# CHECK32-NEXT: }110 111# CHECK64:      Loader Section {112# CHECK64-NEXT:     Loader Section Symbols {113# CHECK64-NEXT:       Symbol {114# CHECK64-NEXT:         Name: myintvar115# CHECK64-NEXT:         Virtual Address: 0x110000300116# CHECK64-NEXT:         SectionNum: 2117# CHECK64-NEXT:         SymbolType: 0x11118# CHECK64-NEXT:         StorageClass: C_EXTDEF (0x5)119# CHECK64-NEXT:         ImportFileID: 0x0120# CHECK64-NEXT:         ParameterTypeCheck: 0121# CHECK64-NEXT:       }122# CHECK64-NEXT:       Symbol {123# NODEMAN64-NEXT:       Name: _Z5func0v124# DEMAN64-NEXT:         Name: func0()125# CHECK64-NEXT:         Virtual Address: 0x110000308126# CHECK64-NEXT:         SectionNum: 2127# CHECK64-NEXT:         SymbolType: 0x11128# CHECK64-NEXT:         StorageClass: C_STRTAG (0xA)129# CHECK64-NEXT:         ImportFileID: 0x0130# CHECK64-NEXT:         ParameterTypeCheck: 0131# CHECK64-NEXT:       }132# CHECK64-NEXT:     }133# CHECK64-NEXT: }134