#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