Hi Jun,

Do you use the toolchains built by yourself?
I use the snapgear pre-compiled ARM toolchain (arm-linux-tools-20061213.tar.gz).
However, when the program uses the "long long" variable division , it will fail 
on "__divid3" of libgcc.a.
The failed reasion is DATA ABORT.
I strongly suspect it is due to the libgcc.a compiling flags without the 
"-msingle-pic-base".
Besides the flag reasion, i can not find any other reasions which cause the 
"long long" variable devision died on "__divid3".
Any hints?

Best Regards,
KJ

 


----- 原始信件 ----
寄件者: Jun Sun <[EMAIL PROTECTED]>
收件者: uClinux development list <uclinux-dev@uclinux.org>
寄件日期: 2008/11/27(星期四) 上午3:00:54
主 旨: Re: [uClinux-dev] ARM compiler option "-msingle-pic-base"

On Thu, Nov 27, 2008 at 02:24:48AM +0800, Lin KJ wrote:
> Hi all,
> 
> In the ARM uClinux world, it seems that the user land XIP code should be 
> compiled with the "-fpic" and "-msingle-pic-base" flags.
> Why not just "-fpic" flag?
> Is it concern with the elf2flt tool?

I think it has more to do the loading FLAT executables. FLAT
does not need run-time loader. As a result, relocatable symboles
are only fixed up once by kernel.  Single pic base would be much
eaiser to do for this case.

> I can have the applications and uClibc to be compiled with 
> "-msingle-pic-base",
> but how about the libgcc.a?
> Does the libgcc.a have to be produced with the "-msingle-pic-base" too?

I took a look of what we did. Surprisingly it did get compiled with
this option. A second look reveals that libgcc.a is a bunch of 
leaf functions (i.e., they never call or refer other functions/symbols).
So they can link with almost all kinds of code (which makes sense).

Cheers.

Jun
_______________________________________________
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

Reply via email to