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'swrong?


Hello Nick,

After investigation, the problem lies in long jumps between our two areas of memory: FLASH and RAM, separated by an address range of about 16Megs (ram @ 0x0000 0000, flash @ 0x0100 0000).

I followed Bill's advice to use gcc -mlong-calls flag, even if, as Richard pointed right, this has a performance cost (are there any other ways to do that only for those functions that need it? I am thinking about #pragma long_call, is this correct?)

I nevertheless still have problems with _call_via_rX stubs. I re-read the README-interworking included in the gcc/config/arm dir; this made things a lot clearer. I think that the pb might come from the location of the stubs (is this the correct term?) _call_via_rX which may be all located in the .glue_7 and .glue_7t at the end of the flash. Indeed, after having re-read ADS information about Veneer generation, this may come from the fact that the Veneer/glue for a call must be near the caller (not too address-far speaking).

Am I right?

Thanks for your answer.

Regards,

Vincent

nickc@redhat.com wrote:


These errors arise because the linker is trying to resolve branches
and function calls over very large distances.  (ie more than the
26-bit addressing range support by ARM instructions).



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