1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 10:32:48 +02:00
llvm-mirror/tools/obj2yaml
Georgii Rymar 0ba63b8a56 [yaml2obj] - Automatically assign sh_addr for allocatable sections.
I've noticed that it is not convenient to create YAMLs from
binaries (using obj2yaml) that have to be test cases for obj2yaml
later (after applying yaml2obj).

The problem, for example is that obj2yaml emits "DynamicSymbols:"
key instead of .dynsym. It also does not create .dynstr.
And when a YAML document without explicitly defined .dynsym/.dynstr
is given to yaml2obj, we have issues:

1) These sections are placed after non-allocatable sections (I've fixed it in D74756).
2) They have VA == 0. User needs create descriptions for such sections explicitly manually
    to set a VA.

This patch addresses (2). I suggest to let yaml2obj assign virtual addresses by itself.
It makes an output binary to be much closer to "normal" ELF.
(It is still possible to use "Address: 0x0" for a section to get the original behavior
if it is needed)

Differential revision: https://reviews.llvm.org/D74764
2020-02-22 14:43:54 +03:00
..
CMakeLists.txt [XCOFF] Add functionality for parsing AIX XCOFF object file headers 2019-04-04 00:53:21 +00:00
coff2yaml.cpp [Object/COFF.h] - Stop returning std::error_code in a few methods. NFCI. 2019-08-19 14:32:23 +00:00
dwarf2yaml.cpp [DWARF] Return Error from DWARFDebugArangeSet::extract(). 2020-01-23 12:41:05 +07:00
elf2yaml.cpp [yaml2obj] - Automatically assign sh_addr for allocatable sections. 2020-02-22 14:43:54 +03:00
Error.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Error.h Obj2YamlError - fix uninitialized variable warning. NFCI. 2019-11-08 16:26:20 +00:00
macho2yaml.cpp Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
minidump2yaml.cpp Add minidump support to obj2yaml 2019-04-02 11:58:37 +00:00
obj2yaml.cpp [DWARF] Return Error from DWARFDebugArangeSet::extract(). 2020-01-23 12:41:05 +07:00
obj2yaml.h [DWARF] Return Error from DWARFDebugArangeSet::extract(). 2020-01-23 12:41:05 +07:00
wasm2yaml.cpp [WebAssembly] Allow multivalue signatures in object files 2019-10-18 20:27:30 +00:00
xcoff2yaml.cpp [Object][XCOFF] Add support for 64-bit file header and section header dumping. 2019-07-09 18:09:11 +00:00