File: loader-section-invalid-stringtable-offset.test

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (38 lines) | stat: -rw-r--r-- 4,212 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
## Test invalid offset to symbol string table of loader section for --loader-section-symbols option.

# RUN: yaml2obj %s -o %t_xcoff.o
# RUN: llvm-readobj --loader-section-symbols %t_xcoff.o 2>&1 | FileCheck   -DFILE=%t_xcoff.o %s

--- !XCOFF
FileHeader:
  MagicNumber:       0x1DF
Sections:
  - Name:            .loader
    Flags:           [ STYP_LOADER ]
    SectionData:     "0000000100000002000000050000016D00000001000000A40000000c000000506d79696e747661722000028000021105000000000000000000000000000000A2200002840002110a0000000000000000000a66756e63305f5f467600"
##                    ^-------                                                           -Version=1
##                            ^-------                                                   -NumberOfSymbolEntries=2
##                                    ^-------                                           -NumberOfRelocationEntries=5
##                                            ^-------                                   -LengthOfImportFileIDStringTable=365
##                                                    ^-------                           -NumberOfImportFileIDs=1
##                                                            ^-------                   -OffsetToImportFileIDs=0xA4
##                                                                    ^-------           -LengthOfStringTable=12
##                                                                            ^-------   -OffsetToStringTable=0x050
##                                                                                    ^---------------         SymbolName=myintvar
##                                                                                                    ^------- Value=0x20000280
##                                                                                                            ^---  sectionNumber = 2
##                                                                                                                ^- SymbolType=0x11
##                                                                                                                  ^- StorageClass=0x0a
##                                                                                                                    ^-------   ImportFileID=0
##                                                                                                                            ^-------ParameterCheckType=0
##                                                                                                                                    ^-------SymbolZero=0
##                                                                                                                                            ^-------OffsetToStringTbl=0xA2 (Invalid)
##                                                                                                                                                    ^------- Value=20000284
##                                                                                                                                                            ^---  sectionNumber = 2
##                                                                                                                                                                ^- SymbolType=0x11
##                                                                                                                                                                  ^- StorageClass=0x0a
##                                                                                                                                                                    ^-------   ImportFileID=0
##                                                                                                                                                                            ^-------ParameterCheckType=0
##                                                                                                                                                                                    ^StringTable

# CHECK: warning: '[[FILE]]': entry with offset 0xa2 in the loader section's string table with size 0xc is invalid