aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2022-11-28 12:36:36 +0200
committerMartin Storsjö <martin@martin.st>2022-11-28 22:40:00 +0200
commit30d5b755ea4f07ca014ed7e89b40054fb2b29eda (patch)
tree0db83f2738782a50ffaba07153ed996706a5969f /lldb/packages/Python/lldbsuite/test
parent94f73fd6f834b3c67dc29249f54931c54dbe14c7 (diff)
downloadllvm-30d5b755ea4f07ca014ed7e89b40054fb2b29eda.zip
llvm-30d5b755ea4f07ca014ed7e89b40054fb2b29eda.tar.gz
llvm-30d5b755ea4f07ca014ed7e89b40054fb2b29eda.tar.bz2
[llvm-objcopy] [COFF] Always set PointerToRawData when writing a COFF file
If we don't want to set PointerToRawData, for an empty section, we do must set it to zero explicitly. Some object file generators do set it to zero for empty sections, while others set a nonzero value pointing at the end of the previous section. If the value was nonzero on input, we need to update it - either setting it to zero, or to a valid offset in the output file (not out of bounds) This fixes https://github.com/mstorsjo/llvm-mingw/issues/313. Testing this is tricky, because we can't use yaml2obj, since that doesn't produce object files with nonzero PointerToRawData for empty sections. We can use llvm-mc to assemble a small file (assuming that LLVM's MC layer keeps this behaviour), or bundle a small binary object file. I opted for using llvm-mc for now here (with a test that it actually does keep this property), but I don't mind changing it to a canned object file to make the test less brittle. Differential Revision: https://reviews.llvm.org/D138783
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
0 files changed, 0 insertions, 0 deletions