[GHC] #13678: Overhaul the linker

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[GHC] #13678: Overhaul the linker

GHC - devs mailing list
#13678: Overhaul the linker
-------------------------------------+-------------------------------------
           Reporter:  angerman       |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  lowest         |         Milestone:  ⊥
          Component:  Compiler       |           Version:  8.3
  (Linking)                          |
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 The linker has gained support for aarch64/macho, and aarch64/elf, as well
 as improved arm/elf code, this code introduces separate mapping of
 sections into different pages, to allow for `W^X` protection. This is
 essentially a requirement on iOS, and I believe a sane default to have.
 To this extend the symbol extras logic needed to be split up into GOT and
 PLTs, where the PLTs are allocated alongside the sections, as
 the architecture may not allow arbitrary jumps (arm/aarch64). The
 introduction aarch64/elf has also been
 done through a pseudo interface so that the actual relocation logic can be
 contained within it's own files.

 Ideally we'd improve the linker by migrating the existing (heavily
 #ifdef'd) to the new separate section mapping (`W^X`) and pseudo interface
 approach. The separate section mapping logic has an inherent memory
 inefficiency (which might be improved a bit by aggregating similar
 sections into the same page), and might also cause a performance penalty
 due to separate mapping instead of a single file mmap.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13678>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #13678: Overhaul the linker

GHC - devs mailing list
#13678: Overhaul the linker
-------------------------------------+-------------------------------------
        Reporter:  angerman          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  lowest            |            Milestone:  ⊥
       Component:  Compiler          |              Version:  8.3
  (Linking)                          |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Moritz Angermann <moritz.angermann@…>):

 In [changeset:"094a752a1561b5cb8640648b0882cea97831226c/ghc" 094a752/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="094a752a1561b5cb8640648b0882cea97831226c"
 Fix iossimulator

 The introduction of the aarch64 linker for
 iOS forgot that the ios simulator was still using
 the x86_64/mach-o linker, which requires the use of
 symbol extras.  Until this is overhauled (see #13678),
 we should revert to the symbol extras logic for
 x86_64-apple-ios

 Reviewers: austin, bgamari, erikd, simonmar

 Reviewed By: simonmar

 Subscribers: rwbarton, thomie

 Differential Revision: https://phabricator.haskell.org/D3556
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13678#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #13678: Overhaul the linker

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#13678: Overhaul the linker
-------------------------------------+-------------------------------------
        Reporter:  angerman          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  lowest            |            Milestone:  ⊥
       Component:  Compiler          |              Version:  8.3
  (Linking)                          |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #14069            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by bgamari):

 * related:   => #14069


Comment:

 For the record, the matter of W^X protection is being tracked by #14069.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13678#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets