#3260: Linking stage2 on PPC gives "scattered reloc r_address too large"
---------------------------------+------------------------------------------
Reporter: benl | Owner:
Type: bug | Status: new
Priority: highest | Milestone: 6.14.1
Component: Compiler | Version: 6.13
Keywords: | Difficulty: Unknown
Os: MacOS X | Testcase:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Changes (by igloo):
* priority: normal => highest
* milestone: _|_ => 6.14.1
Comment:
Hmm, the failure I pasted above in
[http://hackage.haskell.org/trac/ghc/ticket/3260#comment:9 comment 9] is
when making a single object file, rather than merging.
I just tried a build with
{{{
SRC_HC_OPTS = -fPIC
}}}
in `mk/build.mk`
and got
{{{
"inplace/bin/ghc-stage1" -fPIC -package-name ghc-prim-0.2.0.0 -hide-
all-packages -i -ilibraries/ghc-prim/. -ilibraries/ghc-prim/dist-
install/build -ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries
/ghc-prim/dist-install/build -Ilibraries/ghc-prim/dist-
install/build/autogen -Ilibraries/ghc-prim/. -optP-include
-optPlibraries/ghc-prim/dist-install/build/autogen/cabal_macros.h -package
rts-1.0 -split-objs -package-name ghc-prim -XCPP -XMagicHash
-XForeignFunctionInterface -XUnliftedFFITypes -XUnboxedTuples
-XEmptyDataDecls -XNoImplicitPrelude -no-user-package-conf -rtsopts -O2
-XGenerics -fno-warn-deprecated-flags -odir libraries/ghc-prim/dist-
install/build -hidir libraries/ghc-prim/dist-install/build -stubdir
libraries/ghc-prim/dist-install/build -hisuf hi -osuf o -hcsuf hc -c
libraries/ghc-prim/./GHC/IntWord64.hs -o libraries/ghc-prim/dist-
install/build/GHC/IntWord64.o
/tmp/ghc56286_0/ghc56286_0.split__1.s:unknown:missing indirect symbols for
section (__DATA,__la_sym_ptr2)
make[1]: *** [libraries/ghc-prim/dist-install/build/GHC/IntWord64.o] Error
1
make: *** [all] Error 2
}}}
That file contains
{{{
.data
.align 2
.globl _ghczmprim_GHCziIntWord64_wordToWord64zh_closure
_ghczmprim_GHCziIntWord64_wordToWord64zh_closure:
.long _ghczmprim_GHCziIntWord64_wordToWord64zh_info
.text
.align 2
_ghczmprim_GHCziIntWord64_wordToWord64zh_info_dsp:
.long 65540
.long 0
.long 15
.globl _ghczmprim_GHCziIntWord64_wordToWord64zh_info
_ghczmprim_GHCziIntWord64_wordToWord64zh_info:
Lcat:
movl (%ebp),%eax
subl $12,%esp
pushl %eax
call L_hs_wordToWord64$stub
addl $16,%esp
movl %edx,%ecx
movl %eax,72(%ebx)
movl %ecx,76(%ebx)
addl $4,%ebp
jmp *(%ebp)
.long _ghczmprim_GHCziIntWord64_wordToWord64zh_info -
_ghczmprim_GHCziIntWord64_wordToWord64zh_info_dsp
.section __DATA, __la_sym_ptr2,lazy_symbol_pointers
L_hs_wordToWord64$stub:
.indirect_symbol _hs_wordToWord64
call ___i686.get_pc_thunk.ax
1:
movl L_hs_wordToWord64$lazy_ptr-1b(%eax),%edx
jmp *%edx
L_hs_wordToWord64$stub_binder:
lea L_hs_wordToWord64$lazy_ptr-1b(%eax),%eax
pushl %eax
jmp dyld_stub_binding_helper
.section __DATA, __la_sym_ptr2,lazy_symbol_pointers
L_hs_wordToWord64$lazy_ptr:
.indirect_symbol _hs_wordToWord64
.long L_hs_wordToWord64$stub_binder
.section __TEXT,__picsymbolstub2,symbol_stubs,pure_instructions,25
}}}
We've ended up with multiple issues in this ticket, some or all of which
affect OS X/i386 (tier 1 arch), so I'm remilestoning this to 6.14.1.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3260#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs