[GHC] #9007: fails to build with hardening flags enabled (relocation R_X86_64_32 against `stg_CHARLIKE_closure'...)

GHC ghc-devs at haskell.org
Wed Jul 2 18:57:05 UTC 2014


#9007: fails to build with hardening flags enabled (relocation R_X86_64_32 against
`stg_CHARLIKE_closure'...)
----------------------------------------+----------------------------------
        Reporter:  nomeata              |            Owner:  nomeata
            Type:  bug                  |           Status:  infoneeded
        Priority:  high                 |        Milestone:  7.8.4
       Component:  Compiler             |          Version:  7.9
      Resolution:                       |         Keywords:
Operating System:  Unknown/Multiple     |     Architecture:
 Type of failure:  Building GHC failed  |  Unknown/Multiple
       Test Case:                       |       Difficulty:  Unknown
        Blocking:                       |       Blocked By:
                                        |  Related Tickets:
----------------------------------------+----------------------------------

Comment (by rwbarton):

 I managed to reproduce this by making a Frankenpackage from ghc HEAD plus
 the debian directory from `apt-get source ghc`. Here are the flags that
 are being used:

 {{{
 rwbarton at morphism:/tmp$ ghc -optl-fPIE -optl-pie -optl-Wl,-z,relro -optl-
 Wl,-z,now test
 [1 of 1] Compiling Main             ( test.hs, test.o )
 Linking test ...
 /usr/bin/ld: test.o: relocation R_X86_64_32S against
 `stg_bh_upd_frame_info' can not be used when making a shared object;
 recompile with -fPIC
 test.o: error adding symbols: Bad value
 collect2: error: ld returned 1 exit status
 }}}

 `-optl-pie` is the offending flag.

 (`test.hs` is just a trivial program `main = print "hi"`.)

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9007#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list