]> granicus.if.org Git - llvm/commit
[yaml2obj][ELF] Add support for setting alignment in program headers
authorJake Ehrlich <jakehehrlich@google.com>
Wed, 1 Nov 2017 23:14:48 +0000 (23:14 +0000)
committerJake Ehrlich <jakehehrlich@google.com>
Wed, 1 Nov 2017 23:14:48 +0000 (23:14 +0000)
commit9ae2da659ffdc34a54d8e67df7afcb509bdace17
tree319aa8283dabd98a0b3026d828b5a4b2ce6376c9
parent368924ad91dfdd49a4b28251b47f9e723241ba92
[yaml2obj][ELF] Add support for setting alignment in program headers

Sometimes program headers have larger alignments than any of the
sections they contain. Currently yaml2obj can't produce such files. A
bug recently appeared in llvm-objcopy that failed in such a case. I'd
like to be able to add tests to llvm-objcopy for such cases.

This change adds an optional alignment parameter to program headers that
will be used instead of calculating the alignment.

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

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