RTS Linker doesn't recognize .text.unlikely section on Windows
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.
Trac metadata
Trac field | Value |
---|---|
Version | 7.8.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Runtime System |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | simonmar |
Operating system | |
Architecture |