brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 727c8af Raw
50 lines · yaml
1# RUN: yaml2obj --docnum=1 %s -o %t12# RUN: llvm-readobj --sections %t1 | FileCheck %s3 4# CHECK:      Name: .rela.text5# CHECK-NEXT: Type: SHT_RELA6# CHECK-NEXT: Flags [7# CHECK-NEXT: ]8# CHECK-NEXT: Address:9# CHECK-NEXT: Offset:10# CHECK-NEXT: Size:11# CHECK-NEXT: Link:12# CHECK-NEXT: Info: 1234513 14--- !ELF15FileHeader:16  Class: ELFCLASS6417  Data:  ELFDATA2LSB18  Type:  ET_REL19Sections:20  - Name:            .rela.text21    Type:            SHT_RELA22    Info:            1234523    Relocations:24 25## Check we report an error when a relocation section references an unknown section via its Info field.26 27# RUN: not yaml2obj --docnum=2 %s 2>&1 | FileCheck %s --implicit-check-not=error --check-prefix=ERR28 29# ERR: error: unknown section referenced: '.unknown1' by YAML section '.foo'30# ERR: error: unknown section referenced: '.unknown2' by YAML section '.bar'31 32--- !ELF33FileHeader:34  Class: ELFCLASS6435  Data:  ELFDATA2LSB36  Type:  ET_REL37Sections:38  - Name: .foo39    Type: SHT_RELA40    Info: .unknown141    Relocations:42  - Name: .bar43    Type: SHT_RELA44    Info: .unknown245    Relocations:46  - Name: .zed47    Type: SHT_RELA48    Info: 0xFF49    Relocations:50