some question about output section

loody miloody@gmail.com
Wed May 11 08:12:00 GMT 2011


HI:
2011/5/11 Alan Modra <amodra@gmail.com>:
> On Wed, May 11, 2011 at 02:27:09PM +0800, loody wrote:
>> 2. I found if the LMA of 2 sections are quite close, the size of
>> objcopy will get small, script1.
>> But why if the LMA of third section is close to previous section, the
>> size will still get big, script2?
>
> Why do you think the LMAs are close?
I think it will be better if I say "the binary size that objcopy
generate is quite small, when the LMA of section2 is right behind the
section1."

>
> Your scripts are setting LMA of a section to the end VMA of the
> previous section.  I suspect that wasn't what you intended.

in script2, "text' is the place that flash running for and "onlyTest"
is located at dram area.
That means, I can put some functions that need performance in
"onlyTest" and this part of code will copy to dram at the end of
"text" section.

> See ld.info LOADADDR and SIZEOF.
>

Thank you,



More information about the Binutils mailing list