From: anonymous c. <nas...@us...> - 2010-04-10 22:53:01
|
> One way we could implement this is to define a new directive, call it > [alignment], which increases the current section alignment if necessary. I was about to suggest the same... so I second this approach. :) Do you mind naming it SEGALIGN, to make it more clear to what that alignment applies? Also, a suppressible warning would be good, since it would help alert unsuspecting users to what might happen in ALIGN; that is, when a previous segment alignment choice is overridden. Last but not least, SEGALIGN should fail when the output format doesn't support the desired choice, right? (To do this, the current value may have to be exposed via __SEGALIGN__, to let macro code see whether or not its change attempt worked.) > This is a change to the backend interface, which does mean associated > work. Then we could just add the [alignment] directive to the various > ALIGN macros. To maintain backwards compatibility -- including the ability to use non-power-of-two alignments -- ALIGN needs to default to current NASM behavior. ALIGNMODE should be extended, to let the user select, e.g. via a new set of [NO]SEGALIGN arguments. |