aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/SampleProfReader.cpp
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2023-07-25 14:13:05 -0700
committerHeejin Ahn <aheejin@gmail.com>2023-07-27 15:43:51 -0700
commit1b21067cf247c62c2442daa7ee2d3915249d1ee2 (patch)
tree799411b3f5b269dc5f896fe80b295e8036110558 /llvm/lib/ProfileData/SampleProfReader.cpp
parentedf2e0e075e8562ca6a57a3614fbb2b65077e375 (diff)
downloadllvm-1b21067cf247c62c2442daa7ee2d3915249d1ee2.zip
llvm-1b21067cf247c62c2442daa7ee2d3915249d1ee2.tar.gz
llvm-1b21067cf247c62c2442daa7ee2d3915249d1ee2.tar.bz2
[WebAssembly][Objcopy] Write output section headers identically to inputs
Previously when objcopy generated section headers, it padded the LEB that encodes the section size out to 5 bytes, matching the behavior of clang. This is correct, but results in a binary that differs from the input. This can sometimes have undesirable consequences (e.g. breaking source maps). This change makes the object reader remember the size of the LEB encoding in the section header, so that llvm-objcopy can reproduce it exactly. For sections not read from an object file (e.g. that llvm-objcopy is adding itself), pad to 5 bytes. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D155535
Diffstat (limited to 'llvm/lib/ProfileData/SampleProfReader.cpp')
0 files changed, 0 insertions, 0 deletions