[GHC] #9116: RTS Linker doesn't recognize .text.unlikely section on Windows

#9116: RTS Linker doesn't recognize .text.unlikely section on Windows -------------------------------------+------------------------------------- Reporter: niklasl | Owner: simonmar Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.8.2 Keywords: | Operating System: Windows Architecture: Unknown/Multiple | Type of failure: GHC rejects Difficulty: Easy (less than 1 | valid program hour) | Test Case: Blocked By: | Blocking: Related Tickets: | -------------------------------------+------------------------------------- When trying to use a newer gcc with GHC 7.8.2, some .o files are rejected by the linker for containing a .text.unlikely section with the following message: {{{ Loading package text-1.1.1.2 ... ghc.exe: panic! (the 'impossible' happened) (GHC version 7.8.2 for x86_64-unknown-mingw32): loadObj "C:\\Niklas\\src\\Idris-dev\\.cabal-sandbox\\x86_64 -windows-ghc-7.8.2\\text-1.1.1.2\\HStext-1.1.1.2.o": failed Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug ghc.exe: Unknown PEi386 section name `.text.unlikely' (while processing: C:\Niklas\src\Idris-dev\.cabal-sandbox\x86_64-windows- ghc-7.8.2\text-1.1.1.2\HStext-1.1.1.2.o) }}} This comes from the ocGetNames_PEi386 function in rts/Linker.c. There is a list of section names recognized as code sections at line 4146- in that file. The fix is to add .text.unlikely there, or maybe the right solution is to cast the net wider and accept .text.* as code sections. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9116 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9116: RTS Linker doesn't recognize .text.unlikely section on Windows -------------------------------------+------------------------------------- Reporter: niklasl | Owner: simonmar Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.8.2 Resolution: | Keywords: Operating System: Windows | Architecture: Unknown/Multiple Type of failure: GHC rejects | Difficulty: Easy (less than 1 valid program | hour) Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Comment (by niklasl): Forgot to say that the newer gcc in question was version 4.9.0. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9116#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9116: RTS Linker doesn't recognize .text.unlikely section on Windows -------------------------------------+------------------------------------- Reporter: niklasl | Owner: simonmar Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.8.2 Resolution: | Keywords: Operating System: Windows | Architecture: Unknown/Multiple Type of failure: GHC rejects | Difficulty: Easy (less than 1 valid program | hour) Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Changes (by rcook): * cc: rcook (added) Comment: Bug is probably a duplicate of https://ghc.haskell.org/trac/ghc/ticket/9080. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9116#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9116: RTS Linker doesn't recognize .text.unlikely section on Windows -------------------------------------+------------------------------------- Reporter: niklasl | Owner: simonmar Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.8.2 Resolution: | Keywords: Operating System: Windows | Architecture: Unknown/Multiple Type of failure: GHC rejects | Difficulty: Easy (less than 1 valid program | hour) Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Comment (by niklasl): If it can happen with the mingw distributed with GHC it's quite a bit more urgent to fix. Added a patch to #9080. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9116#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9116: RTS Linker doesn't recognize .text.unlikely section on Windows -------------------------------------+------------------------------------- Reporter: niklasl | Owner: simonmar Type: bug | Status: closed Priority: normal | Milestone: Component: Runtime | Version: 7.8.2 System | Keywords: Resolution: fixed | Architecture: Unknown/Multiple Operating System: Windows | Difficulty: Easy (less than 1 Type of failure: GHC | hour) rejects valid program | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by niklasl): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9116#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC