Section layout with ld script for flash based ARM system : what's wrong?
Tue Jun 10 14:22:00 GMT 2003
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.
A few others questions while I have you :)
1. What is the difference between .section "SectionName","rx" and .text only? If
I look at
it seems the linker does not properly set LMA != VMA if a section doesn't have
2. Here a very simple script:
.text 0x01000080 :
test1.o (.text .rodata)
test2.o (.text .rodata)
Text_End = . ;
.data 0x00000000 : AT(Text_End) <===========here
* (.data .bss COMMON)
end = . ;
If I change the Text_End reference in the AT command to 0x01000080+
SIZEOF(.text), the error about .data section overlapping .text section is gone.
I can't understand why since, AFAIK both are the same...
3. (and last, thanks for keeping reading :)
What are .glue7 and .glue7t sections? I suspect it is the equivalent of ADS
veneers but I'm not sure. I also have a .rodata.str1.4 section which seems odd
Thanks for these answers, it is hard to find information about these
> Among other things, "Relocation truncated to fit" means that the linker
> tried to generate a reference to something in a short B or BL
> instruction, and couldn't fit it into the 24 bits (IIRC) available in
> that opcode. In other words, the reference destination is too far away
> from the reference to represent.
> Check out gcc's -mlong-calls switch.
> Also, you may want to give gdb's ARM instruction set simulator a try.
> Could be quicker than crashing and burning on real hardware. :^)
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to email@example.com
More information about the crossgcc