#10402: powerpc: unhandled ELF relocation(RelA) type 252 -----------------------------------+------------------------------------ Reporter: cjwatson | Owner: simonmar Type: bug | Status: patch Priority: normal | Milestone: 7.10.2 Component: Runtime System | Version: 7.8.4 Resolution: | Keywords: Operating System: Linux | Architecture: powerpc Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D996 -----------------------------------+------------------------------------ Comment (by Austin Seipp <austin@…>): In [changeset:"c0847967caf51ea4ca88d0ffc25fe1bd99dcabed/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="c0847967caf51ea4ca88d0ffc25fe1bd99dcabed" powerpc: add basic support for PLT relocations (#10402) Commit a93ab43ab5f40cadbedea2f6342b93c245e91434 enabled support for proper PIC relocations from assembler. Commit adds support for relocations of type: R_PPC_REL16_HI R_PPC_REL16_HA R_PPC_REL16_LO R_PPC_PLTREL24 They are used only when GHC is built in DYNAMIC_GHC_PROGRAMS = NO mode. Verified by running the following test: // cat a.c #include <stdio.h> void ffi_a_hello (int i) { fprintf (stderr, "WEEEEEEEE: i=%d\n", i); } -- cat A.hs {-# LANGUAGE ForeignFunctionInterface #-} module A where import Foreign.C foreign import ccall "ffi_a_hello" a :: CInt -> IO () # ghc -fPIC -c a.c -fforce-recomp # ghc -fPIC -c A.hs -fforce-recomp # ghc --interactive ./a.o A ... *A> a 42 WEEEEEEEE: i=42 See gory details in Trac #10402. Signed-off-by: Colin Watson <cjwatson@debian.org> Signed-off-by: Sergei Trofimovich <siarheit@google.com> Reviewed By: bgamari, austin Differential Revision: https://phabricator.haskell.org/D996 GHC Trac Issues: #10402 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10402#comment:19> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler