llvm-project/llvm/test/tools/llvm-objcopy/common-symbol.test

85 lines
2.2 KiB
Plaintext

# RUN: yaml2obj %s > %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj -symbols %t2 | FileCheck %s
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_HEXAGON
Symbols:
Global:
- Name: test
Index: SHN_COMMON
Value: 0x1234
- Name: test2
Index: SHN_HEXAGON_SCOMMON
Value: 0x1235
- Name: test3
Index: SHN_HEXAGON_SCOMMON_2
Value: 0x1236
- Name: test4
Index: SHN_HEXAGON_SCOMMON_4
Value: 0x1237
- Name: test5
Index: SHN_HEXAGON_SCOMMON_8
Value: 0x1238
#CHECK: Symbols [
#CHECK-NEXT: Symbol {
#CHECK-NEXT: Name:
#CHECK-NEXT: Value: 0x0
#CHECK-NEXT: Size: 0
#CHECK-NEXT: Binding: Local (0x0)
#CHECK-NEXT: Type: None (0x0)
#CHECK-NEXT: Other: 0
#CHECK-NEXT: Section: Undefined (0x0)
#CHECK-NEXT: }
#CHECK-NEXT: Symbol {
#CHECK-NEXT: Name: test
#CHECK-NEXT: Value: 0x1234
#CHECK-NEXT: Size: 0
#CHECK-NEXT: Binding: Global (0x1)
#CHECK-NEXT: Type: None (0x0)
#CHECK-NEXT: Other: 0
#CHECK-NEXT: Section: Common (0xFFF2)
#CHECK-NEXT: }
#CHECK-NEXT: Symbol {
#CHECK-NEXT: Name: test2
#CHECK-NEXT: Value: 0x1235
#CHECK-NEXT: Size: 0
#CHECK-NEXT: Binding: Global (0x1)
#CHECK-NEXT: Type: None (0x0)
#CHECK-NEXT: Other: 0
#CHECK-NEXT: Section: Processor Specific (0xFF00)
#CHECK-NEXT: }
#CHECK-NEXT: Symbol {
#CHECK-NEXT: Name: test3
#CHECK-NEXT: Value: 0x1236
#CHECK-NEXT: Size: 0
#CHECK-NEXT: Binding: Global (0x1)
#CHECK-NEXT: Type: None (0x0)
#CHECK-NEXT: Other: 0
#CHECK-NEXT: Section: Processor Specific (0xFF02)
#CHECK-NEXT: }
#CHECK-NEXT: Symbol {
#CHECK-NEXT: Name: test4
#CHECK-NEXT: Value: 0x1237
#CHECK-NEXT: Size: 0
#CHECK-NEXT: Binding: Global (0x1)
#CHECK-NEXT: Type: None (0x0)
#CHECK-NEXT: Other: 0
#CHECK-NEXT: Section: Processor Specific (0xFF03)
#CHECK-NEXT: }
#CHECK-NEXT: Symbol {
#CHECK-NEXT: Name: test5
#CHECK-NEXT: Value: 0x1238
#CHECK-NEXT: Size: 0
#CHECK-NEXT: Binding: Global (0x1)
#CHECK-NEXT: Type: None (0x0)
#CHECK-NEXT: Other: 0
#CHECK-NEXT: Section: Processor Specific (0xFF04)
#CHECK-NEXT: }
#CHECK-NEXT:]