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

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; 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