[commit: ghc] wip/fix-i386-2: Allocate bss section within proper range of other sections (e019ec9)

git at git.haskell.org git at git.haskell.org
Tue Oct 30 16:22:50 UTC 2018


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

On branch  : wip/fix-i386-2
Link       : http://ghc.haskell.org/trac/ghc/changeset/e019ec94f12268dd92ea5d5204e9e57e7ebf10ca/ghc

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

commit e019ec94f12268dd92ea5d5204e9e57e7ebf10ca
Author: Zejun Wu <watashi at fb.com>
Date:   Mon Oct 15 13:52:53 2018 -0400

    Allocate bss section within proper range of other sections
    
    Allocate bss section within proper range of other sections:
    
    * when `+RTS -xp` is passed, allocate it contiguously as we did for
      jump islands
    * when we mmap the code to lower 2Gb, we should allocate bss section
      there too
    
    This depends on {D5195}
    
    Test Plan:
    1. `./validate`
    
    2.
    
    with
    
    ```
    DYNAMIC_GHC_PROGRAMS = NO
    DYNAMIC_BY_DEFAULT = NO
    ```
    
    `TEST="T15729" make test` passed in both linux and macos.
    
    3.
    
    Also test in a use case where we used to encouter error like:
    
    ```
    ghc-iserv-prof: R_X86_64_PC32 relocation out of range: (noname) =
    b90282ba
    ```
    
    and now, everything works fine.
    
    Reviewers: simonmar, bgamari, angerman, erikd
    
    Reviewed By: simonmar
    
    Subscribers: rwbarton, carter
    
    GHC Trac Issues: #15729
    
    Differential Revision: https://phabricator.haskell.org/D5219


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

e019ec94f12268dd92ea5d5204e9e57e7ebf10ca
 rts/Linker.c                               | 22 +++++----
 rts/LinkerInternals.h                      |  4 ++
 rts/linker/Elf.c                           | 73 ++++++++++++++++++------------
 rts/linker/Elf.h                           |  2 +-
 rts/linker/MachO.c                         | 27 ++++++-----
 rts/linker/MachO.h                         |  2 +-
 rts/linker/PEi386.c                        |  2 +-
 rts/linker/PEi386.h                        |  2 +-
 rts/linker/SymbolExtras.c                  | 31 ++++++-------
 rts/linker/SymbolExtras.h                  |  2 +-
 rts/sm/OSMem.h                             | 10 +++-
 testsuite/tests/ghci/linking/Makefile      |  5 ++
 testsuite/tests/ghci/linking/T15729.c      |  4 ++
 testsuite/tests/ghci/linking/T15729.hs     | 14 ++++++
 testsuite/tests/ghci/linking/T15729.stdout |  2 +
 testsuite/tests/ghci/linking/all.T         |  6 +++
 16 files changed, 132 insertions(+), 76 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 e019ec94f12268dd92ea5d5204e9e57e7ebf10ca


More information about the ghc-commits mailing list