1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test/Object/yaml2obj-elf-symbol-visibility.yaml
Fangrui Song b2d3b0af04 [llvm-readobj] Change -long-option to --long-option in tests. NFC
We use both -long-option and --long-option in tests. Switch to --long-option for consistency.

In the "llvm-readelf" mode, -long-option is discouraged as it conflicts with grouped short options and it is not accepted by GNU readelf.

While updating the tests, change llvm-readobj -s to llvm-readobj -S to reduce confusion ("s" is --section-headers in llvm-readobj but --symbols in llvm-readelf).

llvm-svn: 359649
2019-05-01 05:27:20 +00:00

145 lines
4.5 KiB
YAML

# RUN: yaml2obj %s | llvm-readobj --symbols - | \
# RUN: FileCheck --check-prefix OBJ %s
# RUN: yaml2obj %s | obj2yaml - | FileCheck --check-prefix YAML %s
# OBJ: Symbol {
# OBJ: Name: default1 (36)
# OBJ-NEXT: Value: 0x0
# OBJ-NEXT: Size: 4
# OBJ-NEXT: Binding: Global (0x1)
# OBJ-NEXT: Type: Object (0x1)
# OBJ-NEXT: Other: 0
# OBJ-NEXT: Section: .data (0x1)
# OBJ-NEXT: }
# OBJ-NEXT: Symbol {
# OBJ-NEXT: Name: default2 (27)
# OBJ-NEXT: Value: 0x4
# OBJ-NEXT: Size: 4
# OBJ-NEXT: Binding: Global (0x1)
# OBJ-NEXT: Type: Object (0x1)
# OBJ-NEXT: Other: 0
# OBJ-NEXT: Section: .data (0x1)
# OBJ-NEXT: }
# OBJ-NEXT: Symbol {
# OBJ-NEXT: Name: internal (8)
# OBJ-NEXT: Value: 0x8
# OBJ-NEXT: Size: 4
# OBJ-NEXT: Binding: Global (0x1)
# OBJ-NEXT: Type: Object (0x1)
# OBJ-NEXT: Other [ (0x1)
# OBJ-NEXT: STV_INTERNAL
# OBJ-NEXT: ]
# OBJ-NEXT: Section: .data (0x1)
# OBJ-NEXT: }
# OBJ-NEXT: Symbol {
# OBJ-NEXT: Name: hidden (1)
# OBJ-NEXT: Value: 0xC
# OBJ-NEXT: Size: 4
# OBJ-NEXT: Binding: Global (0x1)
# OBJ-NEXT: Type: Object (0x1)
# OBJ-NEXT: Other [ (0x2)
# OBJ-NEXT: STV_HIDDEN
# OBJ-NEXT: ]
# OBJ-NEXT: Section: .data (0x1)
# OBJ-NEXT: }
# OBJ-NEXT: Symbol {
# OBJ-NEXT: Name: protected (17)
# OBJ-NEXT: Value: 0x10
# OBJ-NEXT: Size: 4
# OBJ-NEXT: Binding: Global (0x1)
# OBJ-NEXT: Type: Object (0x1)
# OBJ-NEXT: Other [ (0xA3)
# OBJ-NEXT: STO_MIPS_MICROMIPS
# OBJ-NEXT: STO_MIPS_PIC
# OBJ-NEXT: STV_PROTECTED
# OBJ-NEXT: ]
# OBJ-NEXT: Section: .data (0x1)
# OBJ-NEXT: }
# YAML: Symbols:
# YAML-NEXT: - Name: default1
# YAML-NEXT: Type: STT_OBJECT
# YAML-NEXT: Section: .data
# YAML-NEXT: Binding: STB_GLOBAL
# YAML-NEXT: Size: 0x0000000000000004
# YAML-NEXT: - Name: default2
# YAML-NEXT: Type: STT_OBJECT
# YAML-NEXT: Section: .data
# YAML-NEXT: Binding: STB_GLOBAL
# YAML-NEXT: Value: 0x0000000000000004
# YAML-NEXT: Size: 0x0000000000000004
# YAML-NEXT: - Name: internal
# YAML-NEXT: Type: STT_OBJECT
# YAML-NEXT: Section: .data
# YAML-NEXT: Binding: STB_GLOBAL
# YAML-NEXT: Value: 0x0000000000000008
# YAML-NEXT: Size: 0x0000000000000004
# YAML-NEXT: Visibility: STV_INTERNAL
# YAML-NEXT: - Name: hidden
# YAML-NEXT: Type: STT_OBJECT
# YAML-NEXT: Section: .data
# YAML-NEXT: Binding: STB_GLOBAL
# YAML-NEXT: Value: 0x000000000000000C
# YAML-NEXT: Size: 0x0000000000000004
# YAML-NEXT: Visibility: STV_HIDDEN
# YAML-NEXT: - Name: protected
# YAML-NEXT: Type: STT_OBJECT
# YAML-NEXT: Section: .data
# YAML-NEXT: Binding: STB_GLOBAL
# YAML-NEXT: Value: 0x0000000000000010
# YAML-NEXT: Size: 0x0000000000000004
# YAML-NEXT: Visibility: STV_PROTECTED
# YAML-NEXT: Other: [ STO_MIPS_PIC, STO_MIPS_MICROMIPS ]
--- !ELF
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_MIPS
Flags: [ EF_MIPS_ABI_O32, EF_MIPS_ARCH_32 ]
Sections:
- Name: .data
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_WRITE ]
AddressAlign: 0x04
Size: 0x14
Symbols:
- Name: default1
Type: STT_OBJECT
Visibility: STV_DEFAULT
Section: .data
Value: 0x00
Size: 0x04
Binding: STB_GLOBAL
- Name: default2
Type: STT_OBJECT
Section: .data
Value: 0x04
Size: 0x04
Binding: STB_GLOBAL
- Name: internal
Type: STT_OBJECT
Visibility: STV_INTERNAL
Section: .data
Value: 0x08
Size: 0x04
Binding: STB_GLOBAL
- Name: hidden
Type: STT_OBJECT
Visibility: STV_HIDDEN
Section: .data
Value: 0x0C
Size: 0x04
Binding: STB_GLOBAL
- Name: protected
Type: STT_OBJECT
Visibility: STV_PROTECTED
Other: [ STO_MIPS_MICROMIPS, STO_MIPS_PIC ]
Section: .data
Value: 0x10
Size: 0x04
Binding: STB_GLOBAL