[PATCH] [yaml2obj] ELF Relocations Support
Simon Atanasyan
simon at atanasyan.com
Sun Apr 6 02:34:59 PDT 2014
Hi Bigcheese, silvas,
The patch implements support for both relocation record formats: `Elf_Rel` and `Elf_Rela`. It is possible to define relocation against symbol only.
Relocations against sections will be implemented later. Now `yaml2obj` recognizes `X86_64`, `MIPS` and `Hexagon` relocation types.
Example of relocation section specification:
```
Sections:
- Name: .text
Type: SHT_PROGBITS
Content: "0000000000000000"
AddressAlign: 16
Flags: [SHF_ALLOC]
- !Relocations
Name: .rel.text
Type: SHT_REL
Info: .text
AddressAlign: 4
Relocations:
- Offset: 0x1
Symbol: glob1
Type: R_MIPS_32
- Offset: 0x2
Symbol: glob2
Type: R_MIPS_CALL16
```
http://reviews.llvm.org/D3302
Files:
include/llvm/Object/ELFYAML.h
lib/Object/ELFYAML.cpp
test/Object/yaml2obj-elf-rel.yaml
tools/yaml2obj/yaml2elf.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3302.1.patch
Type: text/x-patch
Size: 22199 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140406/b36880dd/attachment.bin>
More information about the llvm-commits
mailing list