]> granicus.if.org Git - llvm/commit
Reapply: Allow yaml2obj to order implicit sections for ELF
authorDave Lee <davelee.com@gmail.com>
Wed, 8 Nov 2017 00:58:50 +0000 (00:58 +0000)
committerDave Lee <davelee.com@gmail.com>
Wed, 8 Nov 2017 00:58:50 +0000 (00:58 +0000)
commit9fd7184f642d45311e2b514e7a8ba70821d2095f
tree64ac35eb7e231a9741364e252f44af0838a6afda
parenta932c3f118f553c461d9d38fc00feb72d7784487
Reapply: Allow yaml2obj to order implicit sections for ELF

Summary:
This change allows yaml input to control the order of implicitly added sections
(`.symtab`, `.strtab`, `.shstrtab`). The order is controlled by adding a
placeholder section of the given name to the Sections field.

This change is to support changes in D39582, where it is desirable to control
the location of the `.dynsym` section.

This reapplied version fixes:
  1. use of a function call within an assert
  2. failing lld test which has an unnamed section

Additionally, one more test to cover the unnamed section failure.

Reviewers: compnerd, jakehehrlich

Reviewed By: jakehehrlich

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D39749

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