[GHC] #11388: Bad Windows PE handling in GHC runtime linker

#11388: Bad Windows PE handling in GHC runtime linker -------------------------------------+------------------------------------- Reporter: awson | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime | Version: System (Linker) | Keywords: | Operating System: Windows Architecture: | Type of failure: Other Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Playing with `-fsplit-sections` on Windows I've found a pile of ancient (it was borrowed from Hugs interpreter code and I don't even know when was it created), absolutely redundant and plain wrong code in RTS linker. Technically it is a bug, but it doesn't break things when used with current Windows binutils with no special linker scripts involved. OTOH, it slows down runtime linker on Windows noticeably and thus can be considered as a performance bug. I've attached the patch which fixes this. The nice side-effect for existing users is that GHCi now loads compiled object code much faster on Windows. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11388 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11388: Bad Windows PE handling in GHC runtime linker -------------------------------------+------------------------------------- Reporter: awson | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: (Linker) | Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by awson): * Attachment "ghc-rts-linker-pe-handling.patch" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11388 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11388: Bad Windows PE handling in GHC runtime linker -------------------------------------+------------------------------------- Reporter: awson | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: (Linker) | Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by awson): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11388#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11388: Bad Windows PE handling in GHC runtime linker -------------------------------------+------------------------------------- Reporter: awson | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: (Linker) | Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * cc: Phyx- (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11388#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11388: Bad Windows PE handling in GHC runtime linker -------------------------------------+------------------------------------- Reporter: awson | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: (Linker) | Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1773 Wiki Page: | -------------------------------------+------------------------------------- Changes (by Phyx-): * differential: => Phab:D1773 Comment: Good spot as always @awson! I've put it up on Phabricator for you. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11388#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11388: Bad Windows PE handling in GHC runtime linker -------------------------------------+------------------------------------- Reporter: awson | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: (Linker) | Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1773 Wiki Page: | -------------------------------------+------------------------------------- Comment (by awson): Thanks! In fact, this is critical to make `-fsplit-sections` on Windows work (but this requires to use HEAD binutils and also to patch a couple of bugs there). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11388#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11388: Bad Windows PE handling in GHC runtime linker
-------------------------------------+-------------------------------------
Reporter: awson | Owner:
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Runtime System | Version:
(Linker) |
Resolution: | Keywords:
Operating System: Windows | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1773
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Tamar Christina

#11388: Bad Windows PE handling in GHC runtime linker -------------------------------------+------------------------------------- Reporter: awson | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Runtime System | Version: (Linker) | Resolution: fixed | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1773 Wiki Page: | -------------------------------------+------------------------------------- Changes (by Phyx-): * status: patch => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11388#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC