GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-06-12T12:48:01Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/16784PLT is mapped in too far from code2019-06-12T12:48:01ZBen GamariPLT is mapped in too far from codeThe procedure linkage table (PLT) is mapped too far from code on AArch64. This is the cause of #16776.
It should be using similar logic to that which is used on x86-64, where we take particular care to feed `mmap` an unmapped hint addre...The procedure linkage table (PLT) is mapped too far from code on AArch64. This is the cause of #16776.
It should be using similar logic to that which is used on x86-64, where we take particular care to feed `mmap` an unmapped hint address in the lower 2GB of address space.8.8.1Ben GamariBen Gamarihttps://gitlab.haskell.org/ghc/ghc/-/issues/16779elf_got remaps GOT region as read-only too early2019-06-12T12:45:24ZBen Gamarielf_got remaps GOT region as read-only too early67c422ca0e7b94e021430e3dfc9b19f3de21ed16 taught the linker to remap regions as read-only after linking where appropriate. However, it is a bit overzealous in the case of GOTs (as I originally noted in https://gitlab.haskell.org/ghc/ghc/i...67c422ca0e7b94e021430e3dfc9b19f3de21ed16 taught the linker to remap regions as read-only after linking where appropriate. However, it is a bit overzealous in the case of GOTs (as I originally noted in https://gitlab.haskell.org/ghc/ghc/issues/16776#note_204499). Specifically, `elf_got.c:makeGot` `mprotect`s the GOT region after partially filling it. However, `elf_got.c:fillGot` also needs to write to the GOT region and is called *after* the `mprotect`. Consequently we crash.8.8.1