2019-03-01 18:18:16 +08:00
|
|
|
## Check we are able to set sh_info field for SHT_SYMTAB sections.
|
|
|
|
# RUN: yaml2obj %s -o %t
|
2019-05-01 13:27:20 +08:00
|
|
|
# RUN: llvm-readobj --sections %t | FileCheck %s
|
2019-03-01 18:18:16 +08:00
|
|
|
|
|
|
|
# CHECK: Name: .symtab
|
|
|
|
# CHECK-NEXT: Type: SHT_SYMTAB
|
|
|
|
# CHECK-NEXT: Flags [
|
|
|
|
# CHECK-NEXT: ]
|
|
|
|
# CHECK-NEXT: Address:
|
|
|
|
# CHECK-NEXT: Offset:
|
|
|
|
# CHECK-NEXT: Size:
|
|
|
|
# CHECK-NEXT: Link:
|
|
|
|
# CHECK-NEXT: Info: 42
|
|
|
|
# CHECK: Name: .dynsym
|
|
|
|
# CHECK-NEXT: Type: SHT_DYNSYM
|
|
|
|
# CHECK-NEXT: Flags [
|
|
|
|
# CHECK-NEXT: SHF_ALLOC
|
|
|
|
# CHECK-NEXT: ]
|
|
|
|
# CHECK-NEXT: Address:
|
|
|
|
# CHECK-NEXT: Offset:
|
|
|
|
# CHECK-NEXT: Size:
|
|
|
|
# CHECK-NEXT: Link:
|
|
|
|
# CHECK-NEXT: Info: 26
|
|
|
|
|
|
|
|
--- !ELF
|
|
|
|
FileHeader:
|
2019-06-14 22:25:34 +08:00
|
|
|
Class: ELFCLASS64
|
|
|
|
Data: ELFDATA2LSB
|
|
|
|
Type: ET_REL
|
|
|
|
Machine: EM_X86_64
|
2019-03-01 18:18:16 +08:00
|
|
|
Sections:
|
2019-06-14 22:25:34 +08:00
|
|
|
- Name: .symtab
|
|
|
|
Info: 42
|
|
|
|
Type: SHT_SYMTAB
|
|
|
|
- Name: .dynsym
|
|
|
|
Info: 26
|
|
|
|
Type: SHT_DYNSYM
|
2019-03-01 18:18:16 +08:00
|
|
|
Symbols:
|
2019-04-03 22:53:42 +08:00
|
|
|
- Name: foo
|
|
|
|
Binding: STB_GLOBAL
|
2019-03-01 18:18:16 +08:00
|
|
|
DynamicSymbols:
|
2019-04-03 22:53:42 +08:00
|
|
|
- Name: bar
|
|
|
|
Binding: STB_GLOBAL
|