This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Section layout with ld script for flash based ARM system : what's wrong?


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]