SH2aeb support
Carmelo AMOROSO
carmelo.amoroso at st.com
Mon Oct 6 13:01:15 UTC 2008
Kieran Bingham wrote:
> Hi Carmelo.
> Thanks for the hint, Yes SVN:Trunk does solve the memcpy build issue it
> would seem.
>
fine.
> 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
>
Which is the target file format used to build uclibc.
I'm not so aware of not elf format... if I guess correctly sh2a doesn't
use elf format (as from -Wl,-elf2flt).
>
> 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'
>
If __UCLIBC_FORMAT_SHARED_FLAT__ is not defined, these symbols
should not be referenced from __uClibc_fini.
Are you sure uclibc has been properly configured ?
Sorry if cannot help more on this.
Cheers,
Carmelo
> 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 <mailto: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 <mailto:uClibc at uclibc.org>
> http://busybox.net/cgi-bin/mailman/listinfo/uclibc
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://busybox.net/cgi-bin/mailman/listinfo/uclibc
More information about the uClibc
mailing list