mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-12 06:06:32 +00:00
8231133535
Some kinds of relocations do not have symbols, like R_X86_64_RELATIVE for instance. I would like to test this case in D36554 but currently can't because symbols are required by yaml2obj. The other option is using the empty symbol but that doesn't seem quite right to me. This change makes the Symbol field of Relocation optional and in the case where the user does not specify a symbol name the Symbol index is 0. Patch by Jake Ehrlich Differential Revision: https://reviews.llvm.org/D37276 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312192 91177308-0d34-0410-b5e6-96231b3b80d8
22 lines
563 B
YAML
22 lines
563 B
YAML
# Just make sure this isn't an error even though it has no Symbol
|
|
# RUN: yaml2obj %s
|
|
|
|
!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
|
|
Link: .symtab
|
|
Info: .text
|
|
Relocations:
|
|
- Offset: 0x1000
|
|
Type: R_X86_64_RELATIVE
|