Allow yaml2obj to order implicit sections for ELF
authorDave Lee <davelee.com@gmail.com>
Tue, 7 Nov 2017 22:05:24 +0000 (22:05 +0000)
committerDave Lee <davelee.com@gmail.com>
Tue, 7 Nov 2017 22:05:24 +0000 (22:05 +0000)
commit3ae8dfda06ff63d16673b1db9e0ce73ce0b8a3f5
treef499307b1b863370c50642986d93d51ec4001f7d
parentbbe51d86eca2e9a663813fdcc2c6893885c4e452
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.

Reviewers: compnerd, jakehehrlich

Reviewed By: jakehehrlich

Subscribers: llvm-commits

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

llvm-svn: 317622
llvm/lib/ObjectYAML/ELFYAML.cpp
llvm/test/tools/yaml2obj/section-ordering.yaml [new file with mode: 0644]
llvm/tools/yaml2obj/yaml2elf.cpp