Hi all, this is my first post here.
I have to mention, this text was already posted on the lpc2400_uClinux
forum at yahoo, but I think it's better to post it here now I've found
this mailing list.
I'm trying to compile applications after successfully building
uClinux-dist and booting alright.
I'm using these two test programs:
main1.c
-------
[code]
#include <stdio.h>
int main()
{
printf("Hello\n");
return 1;
}
[/code]
main2.c
-------
[code]
int main()
{
return 1;
}
[/code]
And then, compile the with
../tools/ucfront-gcc arm-linux-gcc -Wl,--fatal-warnings -Wl,-elf2flt
-msoft-float -D__PIC__ -fpic -msingle-pic-base -Wl,--fatal-warnings -
Wl,-elf2flt -msoft-float -D__PIC__ -fpic -msingle-pic-base -o test
test.c
The first one does alright and runs fine, but main2.c doesn't compile
and throws:
../uClibc/lib/libc.a(__uClibc_main.o): In function `__uClibc_init':
__uClibc_main.c:(.text+0x5c): warning: internal error: unsupported
relocation error
__uClibc_main.c:(.text+0x60): warning: internal error: unsupported
relocation error
__uClibc_main.c:(.text+0x64): warning: internal error: unsupported
relocation error
__uClibc_main.c:(.text+0x68): warning: internal error: unsupported
relocation error
../uClibc/lib/libc.a(__uClibc_main.o): In function
`__uClibc_start_main':
__uClibc_main.c:(.text+0x114): warning: internal error: unsupported
relocation error
__uClibc_main.c:(.text+0x118): warning: internal error: unsupported
relocation error
__uClibc_main.c:(.text+0x11c): warning: internal error: unsupported
relocation error
__uClibc_main.c:(.text+0x120): warning: internal error: unsupported
relocation error
__uClibc_main.c:(.text+0x124): warning: internal error: unsupported
relocation error
../uClibc/lib/libc.a(exit.o): In function `exit':
atexit.c:(.text+0x80): warning: internal error: unsupported
relocation error
atexit.c:(.text+0x84): warning: internal error: unsupported
relocation error
atexit.c:(.text+0x88): warning: internal error: unsupported
relocation error
atexit.c:(.text+0x8c): warning: internal error: unsupported
relocation error
../uClibc/lib/libc.a(abort.o): In function `abort':
abort.c:(.text+0x128): warning: internal error: unsupported
relocation error
abort.c:(.text+0x12c): warning: internal error: unsupported
relocation error
../uClibc/lib/libc.a(__errno_location.o): In function
`__errno_location':
__errno_location.c:(.text+0xc): warning: internal error: unsupported
relocation error
../uClibc/lib/libc.a(sigaction.o): In function `__libc_sigaction':
sigaction.c:(.text+0xe0): warning: internal error: unsupported
relocation error
sigaction.c:(.text+0xe4): warning: internal error: unsupported
relocation error
collect2: ld returned 1 exit status
Seems like a linker bug, but I don't know.
Also, and really important, if I use the putchar() function, main1.c
compiles alright but gives an exception when running on the LPC.
Strangely, adding int argc, char *argv[] to main() arguments fixes it
all.
any ideas? I need to be able to compile a do-nothing program like
main2.c in order to make configure scripts work.
oh, I forgot, I'm using arm-linux-tools-2006 from snapgear and the
lastest uClinux-dist with patches from
http://tech.groups.yahoo.com/group/lpc2400_uClinux/ (for the LPC2468
architecture).
thanks everyone.
Carlos
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev