summaryrefslogtreecommitdiff
path: root/src/asmjs/shared-constants.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-06-30 16:27:18 -0700
committerGitHub <noreply@github.com>2020-06-30 16:27:18 -0700
commitca89a9f2f59e991ea1a3341bd4a567b043699eb8 (patch)
tree5a326059e2374b5ebc881364e4a528a253bcd5b4 /src/asmjs/shared-constants.h
parent0d5eca6cf4f61798d0854226d2c78d2655e07c30 (diff)
downloadbinaryen-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/asmjs/shared-constants.h')
0 files changed, 0 insertions, 0 deletions