mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 23:18:58 +00:00
9cf90e65d1
Summary: Our YAML library's handling of tags isn't perfect, but it is good enough to get rid of the need for the --format argument to yaml2obj. This patch does exactly that. Instead of requiring --format, it infers the format based on the tags found in the object file. The supported tags are: !ELF !COFF !mach-o !fat-mach-o I have a corresponding patch that is quite large that fixes up all the in-tree test cases. Reviewers: rafael, Bigcheese, compnerd, silvas Subscribers: compnerd, llvm-commits Differential Revision: http://reviews.llvm.org/D21711 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273915 91177308-0d34-0410-b5e6-96231b3b80d8
78 lines
2.4 KiB
YAML
78 lines
2.4 KiB
YAML
# RUN: yaml2obj %s | llvm-readobj -sections -relocations - | FileCheck %s
|
|
|
|
!ELF
|
|
FileHeader: !FielHeader
|
|
Class: ELFCLASS32
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_ARM
|
|
Flags: [ EF_ARM_EABI_VER5 ]
|
|
Sections:
|
|
- Name: .text
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
|
AddressAlign: 0x0000000000000004
|
|
Content: 03308FE0022093E7000052E31EFF2F01
|
|
- Name: .rel.text
|
|
Type: SHT_REL
|
|
Flags: [ SHF_INFO_LINK ]
|
|
Link: .symtab
|
|
AddressAlign: 0x0000000000000004
|
|
Info: .text
|
|
Relocations:
|
|
- Offset: 0x000000000000000C
|
|
Symbol: ''
|
|
Type: R_ARM_V4BX
|
|
- Name: .data
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_WRITE, SHF_ALLOC ]
|
|
AddressAlign: 0x0000000000000001
|
|
Content: ''
|
|
- Name: .bss
|
|
Type: SHT_NOBITS
|
|
Flags: [ SHF_WRITE, SHF_ALLOC ]
|
|
AddressAlign: 0x0000000000000001
|
|
Size: 0
|
|
- Name: .ARM.attributes
|
|
Type: SHT_ARM_ATTRIBUTES
|
|
AddressAlign: 0x0000000000000001
|
|
Content: 4115000000616561626900010B000000060208010901
|
|
Symbols:
|
|
Local:
|
|
- Name: .text
|
|
Type: STT_SECTION
|
|
Section: .text
|
|
- Name: .data
|
|
Type: STT_SECTION
|
|
Section: .data
|
|
- Name: .bss
|
|
Type: STT_SECTION
|
|
Section: .bss
|
|
- Name: '$a'
|
|
Section: .text
|
|
- Name: call_weak_fn
|
|
Type: STT_FUNC
|
|
Section: .text
|
|
- Name: .ARM.attributes
|
|
Type: STT_SECTION
|
|
Section: .ARM.attributes
|
|
|
|
# CHECK: Section {
|
|
# CHECK-NEXT: Index: 0
|
|
# CHECK: }
|
|
# CHECK: Section {
|
|
# CHECK-NEXT: Index: 1
|
|
# CHECK-NEXT: Name: .text (5)
|
|
# CHECK: }
|
|
# CHECK-NEXT: Section {
|
|
# CHECK-NEXT: Index: 2
|
|
# CHECK-NEXT: Name: .rel.text (1)
|
|
# CHECK-NEXT: Type: SHT_REL (0x9)
|
|
# CHECK-NEXT: Flags [ (0x40)
|
|
# CHECK: }
|
|
# CHECK: Relocations [
|
|
# CHECK-NEXT: Section (2) .rel.text {
|
|
# CHECK-NEXT: 0xC R_ARM_V4BX - 0x0
|
|
# CHECK-NEXT: }
|
|
# CHECK-NEXT: ]
|