SH2aeb support

Kieran Bingham kieranbingham at gmail.com
Mon Oct 6 11:52:22 UTC 2008


Hi Carmelo.
Thanks for the hint, Yes SVN:Trunk does solve the memcpy build issue it
would seem.

I have another issue I've not been able to figure out correctly.

With "Support global constructors and destructors" turned off, uClibc
doesn't seem to build crti.o and crtn.o, yet the linker still looks for
them.
These files get built if i turn on CTOR_DTOR but should they be built when
this is switched off ? or should there be stub files created ?

sh2aeb-linux-uclibc-gcc  -Wl,-EB -Wl,-elf2flt=-s65536 test.c -o test
/opt/sh/2a/toolchain/lib/gcc/sh2aeb-linux-uclibc/4.2.4/../../../../sh2aeb-linux-uclibc/bin/ld.real:
crti.o: No such file: No such file or directory
collect2: ld returned 1 exit status
make[1]: *** [test] Error 1
make[1]: Leaving directory `/opt/sh/2a/build/src/test-apps-0.1'
make: *** [build] Error 2


If I build with "Support global constructors and destructors" turned on,
then I get linker errors as follows:


test.elf2flt: In function `__uClibc_fini':
(.text+0x908): undefined reference to `__fini_array_start'
test.elf2flt: In function `__uClibc_fini':
(.text+0x90c): undefined reference to `__fini_array_end'
test.elf2flt: In function `__uClibc_main':
(.text+0xa54): undefined reference to `__preinit_array_end'
test.elf2flt: In function `__uClibc_main':
(.text+0xa60): undefined reference to `__preinit_array_start'
test.elf2flt: In function `__uClibc_main':
(.text+0xa64): undefined reference to `__init_array_start'
test.elf2flt: In function `__uClibc_main':
(.text+0xa68): undefined reference to `__init_array_end'

I've got round this so far by turning it on to build the files, then off to
create something that links successfully, but I can't figure out how to get
the crt[ni].o to build otherwise :(

--
Cheers
Kieran



2008/10/6 Carmelo Amoroso <carmelo73 at gmail.com>

> Kieran Bingham wrote:
>
>> Hi Guys,
>>
>> I'm currently trying to build uClibc-0.9.30-rc1 for SH2aeb and found an
>> issue when building which I fixed with the attached patches.
>>
>> make[2]: Entering directory `/opt/sh/2a/build/src/test-apps-0.1'
>> sh2aeb-linux-uclibc-gcc  -Wl,-EB test.c -o test
>> test.c: In function 'main':
>> test.c:5: warning: return type of 'main' is not 'int'
>> /opt/sh/2a/toolchain/usr/lib/libc.a(memcpy.o): In function `memcpy':
>> memcpy.c:(.text+0x60): undefined reference to `WORD_COPY_FWD'
>> collect2: ld returned 1 exit status
>> make[2]: *** [test] Error 1
>>
>> I think its the right thing to do - i.e. follow the SH4, and define
>> ARCH_HAS_BWD, but then I had to copy the include from memmove to memcpy
>> which I don't think is a particularly nice way to do this. Why is it
>> currently including a .c file in this way?
>>
>> --
>> Cheers
>>  Kieran Bingham
>>
>>
>>  i,
> it should be already fized in rev 23572.
> Please try with this and let us know.
>
> Carmelo
>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> uClibc mailing list
>> uClibc at uclibc.org
>> http://busybox.net/cgi-bin/mailman/listinfo/uclibc
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/uclibc/attachments/20081006/1e6c83e1/attachment-0002.htm 


More information about the uClibc mailing list