Hi Drag,
There are some issues on "arm-linux-tools-20070808" and
"arm-linux-tools-20061213" toolchains for both XIP uClinux/non-XIP uClinux.
I posted the conclusions before according to my experience on exploring the
toolchains for ARM uClinux.
See http://www.mail-archive.com/uclinux-dev@uclinux.org/msg05643.html.
For XIP uClinux, you can NOT use the compiler version newer than gcc-4.x
because of the "R_ARM_GOTOFF32" relocation type.
However, if you want to use gcc-3.x compiler, you should make sure your
compiler library "libgcc.a" is compilied with "-fpic -msingle-pic-base" XIP
flags .
For non-XIP uClinux, you have to modify the wrapper linker to bypass the "-a"
option to the elf2flt.
For me, i selected to build my ARM XIP uClinux by the re-built toolchain.
I re-built the gcc-3.4.6 toolchain by buidroot script with the uClibc-0.9.29
and it ran very well.
KJ
________________________________
寄件者: Arthur Wong <wzc0...@gmail.com>
收件者: uClinux development list <uclinux-dev@uclinux.org>
寄件日期: 2008/12/29(星期一) 上午9:42:37
主 旨: Re: [uClinux-dev] How to build bFLT without flag:"Has-PIC-GOT"
Hi.
2008/12/27 Yuan-Lung Li <dra...@gmail.com>
Dear all,
I have search the solution for this problem about 2 months...
Here is my environment:
Toolchain:
arm-linux-tools-20070808.tar.gz fownloaded from
http://ftp.snapgear.org/pub/snapgear/tools/arm-linux/arm-linux-tools-20070808.tar.gz
Do you have tried the arm-linux-gcc.3.4.x, such as arm-linux-tools-20061213 ?
uClinux Distribution:
uClinux-dist-20080808.tar.gz downloaded from
http://www.uclinux.org/pub/uClinux/dist/uClinux-dist-20080808.tar.bz2
Now I got stuck on the booting after /bin/init running. Seems the init launch
the sash shell and then do_rc in the /etc/rc in the romfs. After first command
"hostname XXXX" executed, the program counter goes some invalid place. I am
using the non-XIP version of kernel. I did some trial as below:
1. replace the first command as "ls /bin" or "cat /etc/motd", the main
function of them works well but the platform dead after return.
2. I download the romfs "romfs.2.4.x" from
http://www.uclinux.org/pub/uClinux/utilities/armulator/romfs.2.4.x.gz
The OS start and I see the promt!!!
3. I use the arm-linux-flthdr to check the binary in "romfs.2.4.x" every bFlt
in /bin has the header below:
/mnt/bin/init
Magic: bFLT
Rev: 4
Build Date: not specified
Entry: 0x50
Data Start: 0x3050
Data End: 0x33b0
BSS End: 0x48b0
Stack Size: 0x1000
Reloc Start: 0x33b0
Reloc Count: 0x94
Flags: 0x1 ( Load-to-Ram )
4. I also check the binaries in my romfs directory, evey bFlt in romfs/bin has
the header below:
romfs/bin/init
Magic: bFLT
.....
Flags: 0x2 ( Has-PIC-GOT )
5. modifying the "vendors/config/armnommu/config.arch" to make the LDFLAGS+=
-Wl,-elf2flt="-r", the build result of the romfs bFlt as below:
romfs/bin/init
Magic: bFLT
.........
Flags: 0x3 ( Load-to-Ram Has-PIC-GOT )
The romfs still made my platform dead in nasty place.
6. I have trace many discussion, some kind like "arm-linux-flthdr -r
romfs/init", the result is the same as trial number 5.
How can I build the romfs with the bFlt in pure "Load-to-Ram"(aka the
Flags:0x1)?
Many thanks for any idea and replying.
Drag
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
______________________________________________________________________________________________________
付費才容量無上限?Yahoo!奇摩電子信箱2.0免費給你,信件永遠不必刪! http://tw.mg0.mail.yahoo.com/dc/landing
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev