mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
053d07b664
Create COFF/, ELF/, and Minidump and move tests there. Also * Rename `*.test` to `*.yaml` * For yaml2obj RUN lines, use `-o %t` instead of `> %t` for consistency. We still have tests that check stdout is the default output, e.g. multi-doc.test * Update tests to consistently use `##` for comments. `#` is for RUN and CHECK lines. * Merge symboless-relocation.yaml and invalid-symboless-relocation.yaml to ELF/relocation-implicit-symbol-index.test Reviewed By: grimar, jhenderson Differential Revision: https://reviews.llvm.org/D70264
33 lines
926 B
YAML
33 lines
926 B
YAML
## If "Symbol" is not specified for a relocation, the symbol index is assumed to be 0.
|
|
|
|
# RUN: yaml2obj %s -o %t
|
|
# RUN: llvm-readobj -r %t | FileCheck %s
|
|
|
|
# CHECK: Relocations [
|
|
# CHECK-NEXT: Section (2) .rel.text {
|
|
# CHECK-NEXT: 0x1000 R_X86_64_RELATIVE - 0x0
|
|
# CHECK-NEXT: 0x1001 R_X86_64_PC32 - 0x0
|
|
# CHECK-NEXT: }
|
|
# CHECK-NEXT:]
|
|
|
|
!ELF
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
Type: ET_EXEC
|
|
Machine: EM_X86_64
|
|
Sections:
|
|
- Name: .text
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
|
Content: "00000000"
|
|
- Name: .rel.text
|
|
Type: SHT_REL
|
|
Info: .text
|
|
Relocations:
|
|
- Offset: 0x1000
|
|
Type: R_X86_64_RELATIVE
|
|
## R_X86_64_PC32 should have a non-zero symbol index but we don't error.
|
|
- Offset: 0x1001
|
|
Type: R_X86_64_PC32
|