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?


Miro Kropacek wrote:
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? :)

You have explained that your goal is to hack ROMs. In this case, you may not need any specific OS feature, so maybe a generic m68k-elf target would be the best for you ?


ELF is more clever than a.out, it stores the alignment value in the object files, and it does not add padding bytes in the section data.

I have just tested the nop example from my earlier message with a m68k-elf toolchain, the alignment is still 2**2 (since it is hardcoded into the binutils), but the section data is only 2 bytes. It even works with a single byte.

So a m68k-elf toolchain with a custom linker script may fit your needs.

--
Vincent Rivière


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