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

See the CrossGCC FAQ for lots more information.


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?


Vincent:

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.


Have a look at the asm code for those two functions. I think that for function pointers, the target address is always moved through a register, so you have a full 32 bits to work with...

A few others questions while I have you :)


You were just fortunate enough to catch me on a day when I had a few minutes!

1. What is the difference between .section "SectionName","rx" and .text only? If I look at http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=utf-8&threadm=3AC03478.1B406FA1%40iis.fhg.de&rnum=3&prev=/groups%3Fq%3Dvariables%2B%2Busing%2B%2Bld%2B%2BGNU%2B%2Bscript%2B%2Bmemory%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3Dutf-8%26selm%3D3AC03478.1B406FA1%2540iis.fhg.de%26rnum%3D3

it seems the linker does not properly set LMA != VMA if a section doesn't have these attributes.


Dunno (I didn't follow the link). Run objdump --headers on the object files, and see how the flags for the .text section differ with the two techniques.

In your linker script, what happens if you specify the VMA of the output .data section via a MEMORY command, instead of explicitly at 0?

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


Glue, veneer, whatever it takes. :^)

Seriously, run objdump --disassemble and/or --disassemble-all, see if you can figure out what's in there.


b.g.


--
Bill Gatliff
Embedded GNU and Linux development, training
bgat@billgatliff.com



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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