EmbDev.net

Forum: ARM programming with GCC/GNU tools Sections padding "*fill*" in .map


von Dustin S. (dbrazeau)


Rate this post
useful
not useful
After compiling and linking I get an ouput map file.  I there there is a
bunch of fill that take up room in memory.  I found that objcopy has
an option --gap-fill which allows you to select what to fill in these
gaps with.  I was wondering if there is any way to eliminate these gaps
altogether? i.e. remove section padding or something like that.

Thanks.

von Clifford S. (clifford)


Rate this post
useful
not useful
They only take up unused memory. The gaps will be determined by the
alignment and location of sections defined in your linker script. So you
would need to modify teh script to close the gaps. Filling with 0xFF
will mean that the memory won't need to be programmed (since 0xFF is the
Flash erase state), on the other hand filling with 0x00 means that the
memory cannot be re-programmed without erasing, which may be more
secure.

Typically you might want to program the entire flash memory even if only
a part of it is used. objcopy can create a load file that exactly fits
your devices flash memory even though your code is unlikely to do so.

In short I think you are worrying about nothing - if you application
fits, that is.

Clifford

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.