[obj2yaml][yaml2obj] - Add support of parsing/dumping of the .gnu.version_r section.
authorGeorge Rimar <grimar@accesssoftek.com>
Tue, 19 Feb 2019 14:03:14 +0000 (14:03 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Tue, 19 Feb 2019 14:03:14 +0000 (14:03 +0000)
commitc09f2cd0cbe4b356704de0f903880dd4e2e9c843
tree2157a178233b443e47fc9327656476210e181f5c
parent95e29763d42833a99f8c813470947e7544a14db0
[obj2yaml][yaml2obj] - Add support of parsing/dumping of the .gnu.version_r section.

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

llvm-svn: 354328
llvm/include/llvm/ObjectYAML/ELFYAML.h
llvm/lib/ObjectYAML/ELFYAML.cpp
llvm/test/tools/obj2yaml/verneed-section.yaml [new file with mode: 0644]
llvm/test/tools/yaml2obj/verneed-section.yaml [new file with mode: 0644]
llvm/tools/obj2yaml/elf2yaml.cpp
llvm/tools/yaml2obj/yaml2elf.cpp