[GHC] #8237: checkProddableBlock: invalid fixup in runtime linker (Windows)
#8237: checkProddableBlock: invalid fixup in runtime linker (Windows) ----------------------------------+--------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Runtime System | Version: 7.7 Keywords: | Operating System: Windows Architecture: x86_64 (amd64) | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ----------------------------------+--------------------------------- I attempted to load a very simple C file into GHC using the linker and got this error. The C file is: {{{ #include <stdio.h> static void f(void); // __attribute__((constructor)); static void f(void) { printf("Hooray!"); } }}} and the test program: {{{ {-# LANGUAGE ForeignFunctionInterface #-} import Foreign.C.String main = do initLinker withCWString "test.o" $ \s -> loadObj s resolveObjs foreign import ccall "initLinker" initLinker :: IO () foreign import ccall "loadObj" loadObj :: CWString -> IO Int foreign import ccall "resolveObjs" resolveObjs :: IO () }}} Test is run as: {{{ bash.exe-3.1$ gcc -c test.c bash.exe-3.1$ ../ghc-init/inplace/bin/ghc-stage2 --make foo.hs -debug -fforce-recomp [1 of 1] Compiling Main ( foo.hs, foo.o ) Linking foo.exe ... bash.exe-3.1$ ./foo foo.exe: Unknown PEi386 section name `.eh_frame' (while processing: test.o) foo.exe: internal error: checkProddableBlock: invalid fixup in runtime linker: 002c0154 (GHC version 7.7.20130905 for i386_unknown_mingw32) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. }}} More useful info: {{{ bash.exe-3.1$ objdump -s -j .text test.o test.o: file format pe-i386 Contents of section .text: 0000 5589e583 ec18c704 24000000 00e80000 U.......$....... 0010 0000c9c3 .... bash.exe-3.1$ objdump -r -j .text test.o test.o: file format pe-i386 RELOCATION RECORDS FOR [.text]: OFFSET TYPE VALUE 00000009 dir32 .rdata 0000000e DISP32 _printf }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8237> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8237: checkProddableBlock: invalid fixup in runtime linker (Windows) -----------------------------------+---------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Runtime System | Version: 7.7 Resolution: | Keywords: Operating System: Windows | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -----------------------------------+---------------------------------- Comment (by ezyang): It's worth noting that it still fails even after teaching the linker to ignore eh_frame. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8237#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8237: checkProddableBlock: invalid fixup in runtime linker (Windows) -----------------------------------+---------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Runtime System | Version: 7.7 Resolution: | Keywords: Operating System: Windows | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -----------------------------------+---------------------------------- Comment (by Edward Z. Yang <ezyang@…>): In [changeset:7e32b2a931714d886db4d4aa07f8fb5c606930b9/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="7e32b2a931714d886db4d4aa07f8fb5c606930b9" Windows: load eh_frame as rodata, fixes #8237 Signed-off-by: Edward Z. Yang <ezyang@mit.edu> }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8237#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8237: checkProddableBlock: invalid fixup in runtime linker (Windows) -----------------------------------+---------------------------------- Reporter: ezyang | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.8.1 Component: Runtime System | Version: 7.7 Resolution: fixed | Keywords: Operating System: Windows | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -----------------------------------+---------------------------------- Changes (by ezyang): * status: new => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8237#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC