File: loader-section-relocation-invalid-sym-name.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 (39 lines) | stat: -rw-r--r-- 4,334 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
39
## Test invalid offset to symbol string table of loader section for --loader-section-relocations option.

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

--- !XCOFF
FileHeader:
  MagicNumber:       0x1DF
Sections:
  - Name:            .loader
    Flags:           [ STYP_LOADER ]
    SectionData:     "0000000100000001000000020000016D00000001000000A40000000c0000005000000000000000A22000028000021105000000000000000020000294000000011f0000022000029c000000031f000002000a66756e63305f5f467600"
##                    ^-------                                                           -Version=1
##                            ^-------                                                   -NumberOfSymbolEntries=1
##                                    ^-------                                           -NumberOfRelocationEntries=2
##                                            ^-------                                   -LengthOfImportFileIDStringTable=365
##                                                    ^-------                           -NumberOfImportFileIDs=1
##                                                            ^-------                   -OffsetToImportFileIDs=0xA4
##                                                                    ^-------           -LengthOfStringTable=12
##                                                                            ^-------   -OffsetToStringTable=0x050
##                                                                                    ^-------SymbolZero=0
##                                                                                            ^-------OffsetToStringTbl=0xA2 (Invalid)
##                                                                                                    ^------- Value=0x20000280
##                                                                                                            ^---  sectionNumber = 2
##                                                                                                                ^- SymbolType=0x11
##                                                                                                                  ^- StorageClass=0x05
##                                                                                                                    ^-------   ImportFileID=0
##                                                                                                                            ^-------ParameterCheckType=0
##                                                                                                                                    ^-------    Virtual Address = 0x20000294
##                                                                                                                                            ^------- SymbolIndex = 1
##                                                                                                                                                    ^--- Type =0x1f
##                                                                                                                                                        ^--- Section Num =2
##                                                                                                                                                            ^-------    Virtual Address = 0x20000294
##                                                                                                                                                                    ^------- SymbolIndex = 3
##                                                                                                                                                                            ^--- Type =0x1f
##                                                                                                                                                                                ^--- Section Num =2
##                                                                                                                                                                                    ^StringTable

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