Has anybody used 0.9.30 on sh4?
Rob Landley
rob at landley.net
Mon Feb 23 06:57:36 UTC 2009
On Sunday 22 February 2009 02:36:53 Rob Landley wrote:
> Disassembly of section .init:
>
> 00000000 <.init>:
> 0: c6 2f mov.l r12, at -r15
> 2: e6 2f mov.l r14, at -r15
> 4: 22 4f sts.l pr, at -r15
> 6: f3 6e mov r15,r14
> 8: 00 a0 bra 0xc
> a: 09 00 nop
> Disassembly of section .fini:
>
> 00000000 <.fini>:
> 0: c6 2f mov.l r12, at -r15
> 2: e6 2f mov.l r14, at -r15
> 4: 22 4f sts.l pr, at -r15
> 6: f3 6e mov r15,r14
> 8: 00 a0 bra 0xc
> a: 09 00 nop
>
> I looked at uClibc/libc/sysdeps/linux/sh/crti.S and tried removing the
> "hidden" directives for both those, but it didn't help.
Hmmm... I tried hexediting the . into a _, for both symbols, and that didn't
affect the linker issue at all. (Weird. Possibly a shared string table entry
between the section name and the function name? I need to go look at the ELF
header stuff by hand, don't I? Where'd I leave the references for that...)
I compared libc/sysdeps/linux/sh/crt1.S with crti.S and tweaked them to look
more alike (removed the .init and .fini sections and change the @ to an % in
the function line) and the result failed to boot (couldn't run PID 1).
I suspect I'm going to have to stick printf()s into the linker. I have no
idea why the cross compiler works (builds a complete root filesystem that
boots when I don't fiddle with it like this), but the native compiler can't
build hello world. I don't know a darn thing about sh4, other than I finally
got a kernel .config and qemu version that could boot me to a shell prompt
under it...
Anybody?
Rob
More information about the uClibc
mailing list