Adjust section placement and relocation logic for Mach-O
authorArtem Pyanykh <artempyanykh@gmail.com>
Thu, 21 Feb 2019 09:10:38 +0000 (12:10 +0300)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Wed, 20 Mar 2019 23:52:39 +0000 (19:52 -0400)
commit368187591a5454e47c4e08dae90d39d2af1fad40
treece6b0c92dc5b0b9b493a33421bbe1f71ae915e6c
parent3394a7cd27cec64a577ee0a9df887a431ccb3696
Adjust section placement and relocation logic for Mach-O

1. Place each section on a separate page to ensure required
alignment (wastes lots ot space, needs to be improved).
2. Unwire relocation logic from macho sections (the most fiddly part
is adjusting internal relocations).

Other todos:
0. Add a test for section alignment.
1. Investigate 32bit relocations!
2. Fix memory leak in ZEROPAGE section allocation.
3. Fix creating redundant jump islands for GOT.
4. Investigate more compact section placement.
rts/Linker.c
rts/linker/MachO.c
rts/linker/MachO.h
rts/linker/SymbolExtras.c
testsuite/tests/rts/linker/Makefile [new file with mode: 0644]
testsuite/tests/rts/linker/all.T [new file with mode: 0644]
testsuite/tests/rts/linker/runner [new file with mode: 0755]
testsuite/tests/rts/linker/runner.c [new file with mode: 0644]
testsuite/tests/rts/linker/unsigned_reloc_macho_64.s [new file with mode: 0644]
testsuite/tests/rts/linker/unsigned_reloc_macho_64.stdout [new file with mode: 0644]