Skip to content

linker: Fix address space management on AArch64

Ben Gamari requested to merge wip/T16784 into master

Like x86-64, AArch64 subjects us to some rather harsh jump displacement restrictions under its small memory model. On x86-64 we use a few tricks to maximize the probability that we can satisfy these constraints. Here we extend one of these tricks to apply on AArch64 and rework our PLT mapping logic for ELF to take advantage of this.

We should probably also do the same for the GOT mapping logic but this is left for future work.

Cc @angerman, @simonmar.

Fixes #16784 (closed) and #16776 .

Merge request reports