[PATCH v1 0/7 SECTOR: Support aligning to flash sector boundary

Michael Matz matz@suse.de
Fri Mar 10 14:13:34 GMT 2023


Hello,

On Fri, 10 Mar 2023, Ulf Samuelsson via Binutils wrote:

> This can be used later to align a sector to the flash boundary using the 
> 
> ALIGN_SECTOR command in an output sector.

Please consider implementing new features in terms of existing ones.  For 
instance there is already an 'ALIGN' expression, that either takes dot or 
an arbitrary expression to align, to a certain given value.  Your new 
feature is basically just a special value for such alignment, so it makes 
sense to specify _that_ instead of a new top-level expression.  So, 
consider accepting something like:

   ALIGN(TOSECTOR)
   ALIGN(expr, TOSECTOR)

so that one would write

   . = ALIGN(TOSECTOR)

as usual with alignment of dot.  The 'TOSECTOR' token would be the new 
thing and make it do what you wanted with ALIGN_SECTOR.


Ciao,
Michael.


More information about the Binutils mailing list