This is an archive of the discontinued LLVM Phabricator instance.

[yaml2obj][ELF] Add support for setting alignment in program headers
ClosedPublic

Authored by jakehehrlich on Oct 20 2017, 11:14 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

jakehehrlich created this revision.Oct 20 2017, 11:14 AM
jakehehrlich retitled this revision from [yaml2obj][ELF] Add support for setting alignment in program headers and fix default alignment to [yaml2obj][ELF] Add support for setting alignment in program headers.

Rafael recommended that I split this into two separate changes. This change makes that split by removing the if-statment change that fixed default alignment.

ping, I haven't heard back on this yet.

jakehehrlich edited the summary of this revision. (Show Details)Nov 1 2017, 11:21 AM
jakehehrlich edited reviewers, added: rafael; removed: atanasyan.Nov 1 2017, 11:26 AM
This revision was automatically updated to reflect the committed changes.