This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: leading padding in ELF segment
Paul Brook wrote:
I've also seen armcc generate similar things.
Many OS require the file offset to be aligned so they can use mmap, but I
think that's an OS specific requirements on top of the basic ELF spec.
I thought that alignment applied to segments not sections. BFD seems slightly
confused about that, in that it sets a segment's alignment from the maximally
aligned contained section (and looking at the algorithm it uses, I think it only
works when the first section is the maximally aligned one. Because a later
section's offset depends on the sizes of the preceeding sections).
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk