1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/tools/llvm-readobj
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
..
COFF Revert "Revert "Reland "[Support] make report_fatal_error abort instead of exit""" 2020-02-13 10:16:06 -08:00
ELF [yaml2obj] - Automatically assign sh_addr for allocatable sections. 2020-02-22 14:43:54 +03:00
MachO [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
wasm [WebAssembly] Use llvm::Optional to store optional symbol attributes. NFC. 2020-02-19 17:25:33 -08:00
archive.test [llvm-readobj][test] - Cleanup and split tests in tools/llvm-readobj folder. 2019-12-12 12:21:58 +03:00
basic.test [llvm-readobj][test] - Cleanup and split tests in tools/llvm-readobj folder. 2019-12-12 12:21:58 +03:00
thin-archive.test [llvm-readobj][test] - Cleanup and split tests in tools/llvm-readobj folder. 2019-12-12 12:21:58 +03:00