llvm-capstone/lld/test/ELF/arm-v4bx.test
Georgii Rymar e4ceb8f421 [lib/ObjectYAML] - Make ELFYAML::Relocation::Offset optional.
Currently `yaml2obj` require `Offset` field in a relocation description.
There are many cases when `Offset` is insignificant in a context of a test case.

Making `Offset` optional allows to simplify our test cases.
This is what this patch does.

Also, with this patch `obj2yaml` does not dump a zero offset of a relocation.

Differential revision: https://reviews.llvm.org/D75608
2020-03-06 13:59:58 +03:00

37 lines
967 B
Plaintext

# REQUIRES: arm
# RUN: yaml2obj %s -o %t.o
# RUN: ld.lld %t.o -o %t
# RUN: llvm-readelf -sections %t | FileCheck %s
# RUN: ld.lld -shared %t.o -o %t
# RUN: llvm-readelf -sections %t | FileCheck %s
# CHECK: .text
--- !ELF
FileHeader:
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: 1EFF2F01
- Name: .rel.text
Type: SHT_REL
Link: .symtab
AddressAlign: 0x0000000000000004
Info: .text
Relocations:
- Type: R_ARM_V4BX
Symbols:
- Name: .text
Type: STT_SECTION
Section: .text
- Name: _start
Section: .text
Binding: STB_GLOBAL