Is it possible to remove section padding from in as/ld?
Sat May 15 11:40:00 GMT 2010
>>> I think if you force an alignment of 2**0 with the current linker script,
>>> any alignment directive will be ignored, including ".even". Of course
>> True, but in that case, if linker script is able to force such thing,
>> I don't understand why it can't force also this padding alignment. It
>> should be consistent, shouldn't it?
> I have not expressed myself correctly.
> My sentence should be understood like this:
> "If you force a section alignment of 2**0 (by patching BFD), and if you keep
> the current linker script, then..."
Sure, that makes even more sense -- ALIGN() directive in linker script
helps in this case, i.e. increasing alignment of section to desired
value, i.e. it makes things configurable.
As I'm thinking about it, this is perfect answer to my question, if we
force alignment to zero (i.e. no alignment) in BFD (binutils) and
patch linker script with ALIGN(2) or ALIGN(4) directive, it wouldn't
break anything and if someone with special requirements like my case
would need to change it, he would just make custom linker script.
Is there any wrong assumption in my thoughts?
MiKRO / Mystic Bytes
More information about the Binutils