]> granicus.if.org Git - llvm/commit
[yaml2obj]Allow explicit setting of p_filesz, p_memsz, and p_offset
authorJames Henderson <jh7370@my.bristol.ac.uk>
Fri, 15 Mar 2019 10:35:27 +0000 (10:35 +0000)
committerJames Henderson <jh7370@my.bristol.ac.uk>
Fri, 15 Mar 2019 10:35:27 +0000 (10:35 +0000)
commit24ee1c697ffb927a8c4996fd3076d7cd1e053a11
tree0601d00e1d7ec6039c54dac2d31be7eecb5f0cd0
parent0fb767925397f1dda213d4c01e5e332f07f32af9
[yaml2obj]Allow explicit setting of p_filesz, p_memsz, and p_offset

yaml2obj currently derives the p_filesz, p_memsz, and p_offset values of
program headers from their sections. This makes writing tests for
certain formats more complex, and sometimes impossible. This patch
allows setting these fields explicitly, overriding the default value,
when relevant.

Reviewed by: jakehehrlich, Higuoxing

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

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