mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 23:23:38 -04:00
[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
This commit is contained in:
@@ -719,6 +719,7 @@ void MappingTraits<ELFYAML::ProgramHeader>::mapping(
|
||||
IO.mapOptional("Sections", Phdr.Sections);
|
||||
IO.mapOptional("VAddr", Phdr.VAddr, Hex64(0));
|
||||
IO.mapOptional("PAddr", Phdr.PAddr, Hex64(0));
|
||||
IO.mapOptional("Align", Phdr.Align);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
Reference in New Issue
Block a user