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: Is it possible to remove section padding from in as/ld?


> The problem is that the alignment requirement isn't stored anywhere.
> The a.out format simply does not have any way to express this, so the
> linker is unable to know whether the assembler has seen any alignment
> directives or not.
Aha, now I fully get it. So in other words, input file which ld gets
already contains "bad" length (with padded bytes) and there's no way
how to know what is code and what is just that padding, ok. I was
thinking about the fact both tools ('as' and 'ld') shares the same
library (BFD) so they do know, what's the current align value for
m68k/a.out but then I realized it doesn't help here as we've lost our
original (unpadded) length.

To your knowledge, would my proposal (default/hard coded align of 1
byte plus explicit ALIGN directive in linker script) fix this
situation for a.out format? If so, may I assume I can immediately
forget it as this default (hard coded) align value is common for *all*
m68k targets and for every m68k target platform we would need to patch
its linker scripts? :)


-- 
MiKRO / Mystic Bytes
http://mikro.atari.org


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