[commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: Adjust section placement and relocation logic for Mach-O (3681875)

git at git.haskell.org git at git.haskell.org
Thu Mar 21 17:01:15 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit
Link       : http://ghc.haskell.org/trac/ghc/changeset/368187591a5454e47c4e08dae90d39d2af1fad40/ghc

>---------------------------------------------------------------

commit 368187591a5454e47c4e08dae90d39d2af1fad40
Author: Artem Pyanykh <artempyanykh at gmail.com>
Date:   Thu Feb 21 12:10:38 2019 +0300

    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.


>---------------------------------------------------------------

368187591a5454e47c4e08dae90d39d2af1fad40
 rts/Linker.c                                       |  10 +-
 rts/linker/MachO.c                                 | 329 ++++++++++++++-------
 rts/linker/MachO.h                                 |  17 +-
 rts/linker/SymbolExtras.c                          |   1 +
 testsuite/tests/rts/linker/Makefile                |   8 +
 testsuite/tests/rts/linker/all.T                   |   9 +
 testsuite/tests/rts/linker/runner                  | Bin 0 -> 1528176 bytes
 testsuite/tests/rts/linker/runner.c                |  65 ++++
 .../tests/rts/linker/unsigned_reloc_macho_64.s     |  11 +
 .../rts/linker/unsigned_reloc_macho_64.stdout      |   2 +
 10 files changed, 329 insertions(+), 123 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 368187591a5454e47c4e08dae90d39d2af1fad40


More information about the ghc-commits mailing list