[yaml2obj] - Support the "Offset" key for the .dynsym section.
authorGeorgii Rymar <grimar@accesssoftek.com>
Tue, 27 Oct 2020 11:38:02 +0000 (14:38 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Wed, 28 Oct 2020 11:22:29 +0000 (14:22 +0300)
commitedfb2f8b235ff72f00375ae2424f7eb98da08234
treedd94e388df0397d0373ecaf49e4eb23f4ebcef50
parentb82f80057d69564a889f1439a683c3544d30b7fa
[yaml2obj] - Support the "Offset" key for the .dynsym section.

Our "implicit" sections are handled separately from regular ones.
It turns out that the "Offset" key is not handled properly for them.

Perhaps we can generalize handling in one place, but before doing that I'd like
to add support and test cases for each implicit section.
(I need this particular single change to unblock another patch that is already on review,
and I guess doing it independently for each section will be cleaner, see below).

In this patch I've removed `explicit-dynsym-no-dynstr.yaml` to `dynsym-section.yaml`
and added the new test into. In a follow-up we probably might want
to merge 2 another existent `dynsymtab-*.yaml` tests into it too.

Differential revision: https://reviews.llvm.org/D90224
llvm/lib/ObjectYAML/ELFEmitter.cpp
llvm/test/tools/yaml2obj/ELF/dynsym-section.yaml [new file with mode: 0644]
llvm/test/tools/yaml2obj/ELF/explicit-dynsym-no-dynstr.yaml [deleted file]