This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Section layout with ld script for flash based ARM system : what's wrong?
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Vincent Rubiolo <vincent dot rubiolo at st dot com>
- Cc: bgat at billgatliff dot com, crossgcc at sources dot redhat dot com, binutils at sources dot redhat dot com, Richard dot Earnshaw at arm dot com
- Date: Wed, 11 Jun 2003 10:22:57 +0100
- Subject: Re: Section layout with ld script for flash based ARM system : what's wrong?
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Thanks Bill for the information.
>
> I added the -mlong-calls switch and lots of errors are gone but, as the docs
> say, it doesn't handle the calls via function pointers (I keep having a
> relocation error for call_via_r2 and call_via_r3 functions).
> I will investigate that more carefully.
Strictly speaking, there shouldn't be any need for -mlong-calls, in terms
of efficiency its a rather large sledgehammer for the nut that needs
cracking. Instead the linker should be adding trampoline veneers to fix
up the calls that don't reach. That's quite hard to do really well,
particularly if you try to build a HUGE section with Thumb code (spans
more than the 2^22 bit range of the thumb BL instruction), but for the
common case is not that dissimilar to the interworking fixups or
shared-library creation that is already done. We really ought to fix ld.
R.