diff options
author | Alon Zakai <azakai@google.com> | 2020-06-30 16:27:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-30 16:27:18 -0700 |
commit | ca89a9f2f59e991ea1a3341bd4a567b043699eb8 (patch) | |
tree | 5a326059e2374b5ebc881364e4a528a253bcd5b4 /src/asm2wasm.h | |
parent | 0d5eca6cf4f61798d0854226d2c78d2655e07c30 (diff) | |
download | binaryen-ca89a9f2f59e991ea1a3341bd4a567b043699eb8.tar.gz binaryen-ca89a9f2f59e991ea1a3341bd4a567b043699eb8.tar.bz2 binaryen-ca89a9f2f59e991ea1a3341bd4a567b043699eb8.zip |
DWARF: Always update .debug_loc base offsets (#2936)
.debug_loc entries can have bases: a value that all values after
it in the list are relative to. Previously we used to keep the base
value as it was, to keep things as similar to the original DWARF as
possible. However, if optimizations move code around so that the
values after the base are before the base, then the values could
no longer be emitted, and we skipped them in effect.
This PR makes us always pick a new base for each list. This
allows the base to always work for the values after it, but does
mean we change the lists quite a lot more. If there is any extra
meaning to the original bases here we may lose that, but the
DWARF spec doesn't seem to indicate anything like that
(however, it isn't clear to me why LLVM then doesn't always
choose the maximal base as the code here does - LLVM's values
seem oddly arbitrary).
Also properly note the base of each compile unit, which
previously we just noted the old value, but didn't look at the
new one in the new binary being written.
Diffstat (limited to 'src/asm2wasm.h')
0 files changed, 0 insertions, 0 deletions