
#9907: "Unknown PEi386 section name `.text$printf'" error in GHCi on Windows -------------------------------------+------------------------------------- Reporter: mmikolajczyk | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.8.3 Resolution: | Keywords: Operating System: Windows | Architecture: x86_64 Type of failure: GHCi crash | (amd64) Blocked By: | Test Case: Related Tickets: #7103, #10051, | Blocking: #7056, #8546 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thoughtpolice): * related: #7103, #10051 => #7103, #10051, #7056, #8546 Comment: (Adding related tickets.) Basically, the check for these debugging symbol sections is a real hack. See https://github.com/ghc/ghc/blob/master/rts/Linker.c#L4388-L4407 for the relevant code. GHC tries to ignore sections containing debugging information in its own linker code, but this has proven pretty painful for us in the long run, because MinGW/binutils changes mean we frequently hit sections we didn't know about before, so things like this fail (even though those sections are almost certainly harmless). I suspect the best thing to do honestly is remove this code, or at least rework it. It is probably better to add a message which is printed out when linked with `-debug` (and using a debugging runtime flag) about what unknown sections we found, instead of always erroring out when an unknown section is found like we do today. This fix would be pretty simple and also fix the root issue of most of the related tickets (since they're basically all dupes of different colors). If someone would submit a (tested!) patch, that would be excellent! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9907#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler