Subject: RE: arm jre ?

From: Jamey Hicks <[email-masked]>
Date: Wed, 2 Feb 2000 08:42:11 -0500

Per Borgentun wrote:

>  I also tried kaffe 1.0.5 ( I got it to compile after setting
>  --host=arm-linux --target=arm-linux on my pentium machine)
>  but it says:
>   BUG IN DYNAMIC LINKER ld.so: ../sysdeps/arm/dl-machine.h: 450:
>   elf_machine_rel: Assertion `! "unexpected dynamic reloc type"' failed!
>  when I try to run my HelloWorld progam.

Now that I know what to look for, it was easy to find.  The code for the .so
was actually already compiled with -fPIC, but in config/arm/trampolines.c,
there is some inline assembly.  Two versions, actually, one for shared
library, one not.  But the conditional had been hardcoded for not shared
library.  I just took out the 0, and left in the defined().

-Jamey

#if defined(NO_SHARED_VMLIBRARY)
asm(
	START_ASM_FUNC() C_FUNC_NAME(arm_do_fixup_trampoline) "\n"
C_FUNC_NAME(arm_do_fixup_trampoline) ":				\n
	stmdb	sp!,{r0,r1,r2,r3,lr}\n
	mov	r0,ip\n
	bl	" C_FUNC_NAME(soft_fixup_trampoline) "		\n
	mov	ip, r0\n
	ldmia	sp!,{r0,r1,r2,r3,lr}\n
	mov	pc, ip\n
"
	END_ASM_FUNC()
);

#else

asm(
	START_ASM_FUNC() C_FUNC_NAME(arm_do_fixup_trampoline) "\n"
C_FUNC_NAME(arm_do_fixup_trampoline) ":				\n
	stmdb	sp!,{r0,r1,r2,r3,lr}\n
	mov	r0,ip\n
	bl	" C_FUNC_NAME(soft_fixup_trampoline) " (PLT)	\n
	mov	ip, r0\n
	ldmia	sp!,{r0,r1,r2,r3,lr}\n
	mov	pc, ip\n
"
	END_ASM_FUNC()
);

#endif

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: Scott Bambrough <[email-masked]>
Date: Wed, 02 Feb 2000 09:48:11 -0500

>         ldmia   sp!,{r0,r1,r2,r3,lr}\n

This version should be fine for both cases.  The linker will adjust and handle
it correctly when linking statically.

Scott

-- 
Scott Bambrough - Software Engineer
REBEL.COM    http://www.rebel.com
NetWinder    http://www.netwinder.org