Is it possible to remove section padding from in as/ld?
Sat May 15 11:07:00 GMT 2010
> The important thing is the Algn column. The value "2**2" means "2 power 2",
> thus 4 bytes. If I'm not wrong, for a.out object files the section alignment
> value is not stored into the file, it is hardcoded into the binutils. So the
> only way to respect that alignment in the final executable is to pad all
> sections to that alignment. The padding described above seems to be useless,
> but it will be useful if the next section starts with .balign 4.
Since I've got a lot if time yesterday, I came to the same conclusion.
It's good (bad, in fact :) you could confirm this to me.
> However, I'm very disappointed because personally I care only about the old
> 68000 for which an alignment of 2 bytes is always enough. So in a 68000
What does happen when one specifies alignment of 1 byte (i.e. no align
at all) in binutils and then use .[b]align ? Will be sections / code
correctly aligned? If so, what about C code? Is there any way how to
force such align here, too? If so, I see no reason why not to use
default align 2, even 1.
Trouble is, I can't use your patch since my code will be / is for
public use, i.e. it must be possible to build it with official
MiKRO / Mystic Bytes
More information about the Binutils