Jivin Erwin Authried lays it down ...
> Hi,
>
> I have recognized that the snapgear arm toolchain
> (arm-linux-tools-20061213.tar.gz) doesn't use -msingle-pic-base in
> libgcc.a. Some of the library function use the global offset table. For
> example, __divdi3 calculates the pic base with
That is 100% correct. We took a non-multilibed compiler and added the
elf2flt code. There are no -msingle-pic-base compiled libs in there
and using -msingle-pic-base will cause pain.
If you want -msingle-pic-base, you are going to have to build your own
toolchain :-(
Thanks for pointing that out,
Cheers,
Davidm
> ldr sl, [pc, #<some-offset>]
> add sl, pc, sl
>
> which is obviously wrong. sl will point to the end of the text section,
> but the data section (where sl should point to) doesn't follow the text
> section. This test program uses __divdi3, and will fail:
>
> #include <stdio.h>
>
> long long a,b;
> int i;
>
> int main()
> {
> a=100;b=3;
> i=a/b;
> printf("res: %d\n",i);
> }
>
> Obviously, -fpic must always be used together with -msingle-pic-base to
> prevent wrong code, including the libgcc build.
>
> Regards,
> Erwin
>
>
>
>
> _______________________________________________
> 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
>
--
David McCullough, [EMAIL PROTECTED], Ph:+61 734352815
Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com
_______________________________________________
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