On 10/14/11 12:52 AM, Ben Gamari wrote:
On Thu, 13 Oct 2011 19:02:24 +0200, Karel Gardas<[email protected]>
wrote:
OK! Quick testing reveals:
Loading package ghc-prim ... linking ... ghc-stage2:
/export/home/karel/vcs/ghc-src/bgamari-ghc-arm-linker/libraries/ghc-prim/dist-install/build/HSghc-prim-0.2.0.0.o:
ARM to Thumb transition unsupported
ghc-stage2: unable to load package `ghc-prim'
This is fixed in the code I just pushed. I implemented both ARM -> Thumb
and Thumb -> ARM transitions for the R_ARM_CALL and R_ARM_THM_CALL
relocation types. As I note in the code, there are other relocation
types which might also cause instruction set transitions, but these are
harder, requiring the generation of veneer instructions. Hopefully we
won't hit these cases.
I'm afraid this is not the case. With patch:
diff --cc rts/Linker.c
index ce532cc,fcfd740..0000000
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@@ -4322,7 -4317,6 +4322,7 @@@ do_Elf_Rel_relocations ( ObjectCode* oc
StgWord16 *lower = (StgWord16 *)(P + 2);
int sign = (*upper >> 10) & 1;
int j1, j2, i1, i2;
- int is_bl = lower & (1<<12);
++ int is_bl = *lower & (1<<12);
// Decode immediate value
j1 = (*lower >> 13) & 1; i1 = ~(j1 ^ sign) & 1;
applied to get it compiling, I got:
Loading package ghc-prim ... linking ... ghc-stage2:
/export/home/karel/vcs/ghc-src/bgamari-ghc-arm-linker/libraries/ghc-prim/dist-install/build/HSghc-prim-0.2.0.0.o:
Thumb to ARM transition with JUMP24 relocation not supported
ghc-stage2: unable to load package `ghc-prim'
make[1]: ***
[libraries/vector/dist-install/build/Data/Vector/Fusion/Stream/Monadic.o] Error
1
make: *** [all] Error 2
Thanks!
Karel
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc