[commit: ghc] master: Refactor MachO.c (f1ce276)

git at git.haskell.org git at git.haskell.org
Mon Mar 27 03:00:57 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/f1ce27669a43710a3dfcafd61d34601f395231bc/ghc

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

commit f1ce27669a43710a3dfcafd61d34601f395231bc
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date:   Tue Mar 21 11:01:40 2017 -0400

    Refactor MachO.c
    
    - Rename existing structs with typedefs from MachOTypes.
    - Update the following functions to make use of the
      extended ObjectCode structure:
      - ocAllocateSymbolExtras_MachO
      - resolveImports
      - ocGetNames_MachO
      - ocResolve_MachO
      - ocRunInit_MachO
    - repalce int with size_t for fread
    - Add aarch64 to the 64bit magic header check.
    
    Depends on D3239, D3251
    
    This is just one of the pieces for the rts linker
    support for ios (aarch64-macho)
    
    ---
    
    The following diagram and legend tries to explain the dependencies a
    bit:
    ```
      .- D3240
      v
    D3255 <- This <- D3251 <- D3239
      ^
      '- D3238
    ```
    
    - In D3238 we started allowing preloading object code with mmap
      in iOS, where we can't have r+w+x.
    - In D3239 we introduced a richer extension of the object code
      data type to make working with mach-o files easier.
    - In D3240 we set the stage to allow loading archives (.a) on iOS
    - In D3251 we added init and deinit functions to populate and
      depopulate the enriched object code data structure for mach-o
      files.
    - In D3252 we refactored most of the MachO.c file to use the
      new types and data structure.
    - in D3255 we finally introduce the aarch64-mach-o linker.
    
    Reviewers: austin, rwbarton, erikd, simonmar, bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D3252


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

f1ce27669a43710a3dfcafd61d34601f395231bc
 rts/linker/MachO.c | 434 ++++++++++++++++++++++-------------------------------
 1 file changed, 183 insertions(+), 251 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 f1ce27669a43710a3dfcafd61d34601f395231bc


More information about the ghc-commits mailing list