]> granicus.if.org Git - llvm/commit
Recommit r354328, r354329 "[obj2yaml][yaml2obj] - Add support of parsing/dumping...
authorGeorge Rimar <grimar@accesssoftek.com>
Tue, 19 Feb 2019 14:53:48 +0000 (14:53 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Tue, 19 Feb 2019 14:53:48 +0000 (14:53 +0000)
commitb9c345bb3bc9f1b1140a549523cc10551b59fcaf
tree4e818f6301626f3ca0c7ecedbcdff004dc436bed
parent43690c27c6feaf1482af7d8cebeef6b0985be816
Recommit r354328, r354329 "[obj2yaml][yaml2obj] - Add support of parsing/dumping of the .gnu.version_r section."

Fix:
Replace
assert(!IO.getContext() && "The IO context is initialized already");
with
assert(IO.getContext() && "The IO context is not initialized");
(this was introduced in r354329, where I tried to quickfix the darwin BB
and seems copypasted the assert from the wrong place).

Original commit message:

The section is described here:
https://refspecs.linuxfoundation.org/LSB_1.3.0/gLSB/gLSB/symverrqmts.html

Patch just teaches obj2yaml/yaml2obj to dump and parse such sections.

We did the finalization of string tables very late,
and I had to move the logic to make it a bit earlier.
That was needed in this patch since .gnu.version_r adds strings to .dynstr.
This might also be useful for implementing other special sections.

Everything else changed in this patch seems to be straightforward.

Differential revision: https://reviews.llvm.org/D58119

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354335 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ObjectYAML/ELFYAML.h
lib/ObjectYAML/ELFYAML.cpp
test/tools/obj2yaml/verneed-section.yaml [new file with mode: 0644]
test/tools/yaml2obj/verneed-section.yaml [new file with mode: 0644]
tools/obj2yaml/elf2yaml.cpp
tools/yaml2obj/yaml2elf.cpp