summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2022-05-12 17:51:33 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-05-30 09:40:55 -0400
commit913963271f985d8ac43a9b4d0b230fb9758049cd (patch)
tree0c95eb0342500f8606f85b0d1843614a9f651403 /compiler
parent0092c67cffb707611b2684df24a1a77e40c01cb7 (diff)
downloadhaskell-913963271f985d8ac43a9b4d0b230fb9758049cd.tar.gz
MachO linker: fix handling of ARM64_RELOC_SUBTRACTOR
ARM64_RELOC_SUBTRACTOR relocations are paired with an AMR64_RELOC_UNSIGNED relocation to implement: addend + sym1 - sym2 The linker was doing it in two steps, basically: *addend <- *addend - sym2 *addend <- *addend + sym1 The first operation was likely to overflow. For example when the relocation target was 32-bit and both sym1/sym2 were 64-bit addresses. With the small memory model, (sym1-sym2) would fit in 32 bits but (*addend-sym2) may not. Now the linker does it in one step: *addend <- *addend + sym1 - sym2
Diffstat (limited to 'compiler')
0 files changed, 0 insertions, 0 deletions