You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.2 KiB
51 lines
1.2 KiB
4 months ago
|
## Check we are able to produce an SHT_GROUP section with a custom Info value (12345).
|
||
|
|
||
|
# RUN: yaml2obj %s -o %t1
|
||
|
# RUN: llvm-readobj --sections %t1 | FileCheck %s
|
||
|
|
||
|
--- !ELF
|
||
|
FileHeader:
|
||
|
Class: ELFCLASS64
|
||
|
Data: ELFDATA2LSB
|
||
|
Type: ET_REL
|
||
|
Sections:
|
||
|
- Name: .group
|
||
|
Type: SHT_GROUP
|
||
|
Info: 12345
|
||
|
Members:
|
||
|
- SectionOrType: GRP_COMDAT
|
||
|
|
||
|
# CHECK: Name: .group
|
||
|
# CHECK-NEXT: Type: SHT_GROUP
|
||
|
# CHECK-NEXT: Flags [
|
||
|
# CHECK-NEXT: ]
|
||
|
# CHECK-NEXT: Address:
|
||
|
# CHECK-NEXT: Offset:
|
||
|
# CHECK-NEXT: Size:
|
||
|
# CHECK-NEXT: Link:
|
||
|
# CHECK-NEXT: Info: 12345
|
||
|
|
||
|
## Check we report multiple errors when multiple unknown symbols are referenced by SHT_GROUP sections.
|
||
|
|
||
|
# RUN: not yaml2obj --docnum=2 %s 2>&1 | FileCheck %s --check-prefix=ERR
|
||
|
|
||
|
# ERR: error: unknown symbol referenced: 'foo' by YAML section '.group1'
|
||
|
# ERR: error: unknown symbol referenced: 'bar' by YAML section '.group2'
|
||
|
|
||
|
--- !ELF
|
||
|
FileHeader:
|
||
|
Class: ELFCLASS64
|
||
|
Data: ELFDATA2LSB
|
||
|
Type: ET_REL
|
||
|
Sections:
|
||
|
- Name: .group1
|
||
|
Type: SHT_GROUP
|
||
|
Info: foo
|
||
|
Members:
|
||
|
- SectionOrType: GRP_COMDAT
|
||
|
- Name: .group2
|
||
|
Type: SHT_GROUP
|
||
|
Info: bar
|
||
|
Members:
|
||
|
- SectionOrType: GRP_COMDAT
|