2015-07-08 18:12:40 +08:00
|
|
|
# Check that yaml2obj takes in account section AddressAlign field.
|
|
|
|
|
2016-06-28 03:53:53 +08:00
|
|
|
# RUN: yaml2obj %s > %t
|
2015-07-08 18:12:40 +08:00
|
|
|
# RUN: llvm-readobj -s %t | FileCheck %s
|
|
|
|
|
|
|
|
# CHECK: Section {
|
|
|
|
# CHECK: Index: 2
|
|
|
|
# CHECK-NEXT: Name: .data
|
|
|
|
# CHECK-NEXT: Type: SHT_PROGBITS
|
|
|
|
# CHECK-NEXT: Flags [
|
|
|
|
# CHECK-NEXT: SHF_ALLOC
|
|
|
|
# CHECK-NEXT: SHF_WRITE
|
|
|
|
# CHECK-NEXT: ]
|
|
|
|
# CHECK-NEXT: Address: 0x0
|
|
|
|
# CHECK-NEXT: Offset: 0x{{[0-9A-F]*}}00
|
|
|
|
# CHECK-NEXT: Size: 4
|
|
|
|
# CHECK-NEXT: Link: 0
|
|
|
|
# CHECK-NEXT: Info: 0
|
|
|
|
# CHECK-NEXT: AddressAlignment: 256
|
|
|
|
# CHECK-NEXT: EntrySize: 0
|
|
|
|
# CHECK-NEXT: }
|
|
|
|
|
2016-06-28 03:53:53 +08:00
|
|
|
--- !ELF
|
2015-07-08 18:12:40 +08:00
|
|
|
FileHeader:
|
|
|
|
Class: ELFCLASS32
|
|
|
|
Data: ELFDATA2LSB
|
|
|
|
Type: ET_REL
|
|
|
|
Machine: EM_MIPS
|
|
|
|
Flags: [ EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32 ]
|
|
|
|
|
|
|
|
Sections:
|
|
|
|
- Name: .text
|
|
|
|
Type: SHT_PROGBITS
|
|
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
|
|
|
AddressAlign: 8
|
|
|
|
Size: 4
|
|
|
|
- Name: .data
|
|
|
|
Type: SHT_PROGBITS
|
|
|
|
Flags: [ SHF_WRITE, SHF_ALLOC ]
|
|
|
|
AddressAlign: 256
|
|
|
|
Size: 4
|
|
|
|
|
|
|
|
Symbols:
|
|
|
|
Global:
|
|
|
|
- Name: T0
|
|
|
|
Type: STT_FUNC
|
|
|
|
Section: .text
|
|
|
|
Size: 4
|
|
|
|
- Name: D0
|
|
|
|
Type: STT_OBJECT
|
|
|
|
Section: .data
|
|
|
|
Size: 4
|
|
|
|
...
|