This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


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: Padding between .text and .data


On 2/15/06, DJ Delorie <dj@redhat.com> wrote:
...
> The idea here is that you want data in the file and data in memory to
> both be similarly aligned; such that if you break memory up into
> sector-sized blocks, the data in each block corresponds to a block of
> data on disk.
...

Thanks for the explanation, DJ. This value of 256 seems fairly
arbitrary and hardware specific. For example, it shows up on my
embedded ARM7 system, which has no MMU. Is the idea that the VMA of
the sections are arbitrary anyways, and so this optimization shouldn't
hurt anything?

I discovered this optimization, because it showed up as zeros in my
flash image when I used objcopy -Obinary, which is an unfortunate side
effect for me. One solution, of course, is to use a custom linker
script. I'm currently using the default linker script though, and I'd
rather continue doing that than maintaining my own. Any other
suggestions?

Cheers,
Shaun


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