Not really... at least I've never found it significant. However, your proposed alternative is just setting the address with .org, right? Doesn't this have the exact same padding problem?tokumaru wrote:Doesn't that result in wasted ROM space?rainwarrior wrote:that's separately guaranteed for me with either .align directives or segment alignment (or both).
.align will create padding, but only as much as needed. You can always rearrange stuff around the code to take up that padding. (In general I don't actually start worrying about the small amount of bytes lost to padding until I actually run out of space, though.)
If you have a short routine, you can use .align 32, or .align 16, etc. to get the guarantee you need with less potential padding.
You can also put all your alignment requiring routines in one segment (or after one .align). Like the real problem is just branch crossings, right? Guarantee those with an assert, and you can put as many pages worth of code as you want after a single guaranteed page alignment, and just manually stick a few bytes in between your routines whenever one of those asserts triggers.
Sort of an extension of that idea, you can use generally asserts instead of .align to guarantee it for compilation without any implicit padding, and just add it as needed.