[PATCH] linker BLOCK/ALIGN/LMA memory region functions

Ian Lance Taylor ian@zembu.com
Sun Feb 13 11:52:00 GMT 2000


   Date: Wed, 09 Feb 2000 10:57:08 -0500
   From: Timothy Wall <twall@alum.mit.edu>

   This patch adds the following functions to the linker:

   1) Blocking: a weak sort of alignment.  Insist that a section fit within
   the blocking size, or be aligned to the blocking size if it doesn't.
   2) Alignment into a memory region.  Allow specification of an alignment
   boundary for a section output into a memory region.
   NOTE: reviewing the docs, it looks like NEXT(EXP) may already do this.
   Please comment if you're familiar with this area.  If NEXT(EXP) does the
   same job, this section would be removed.
   3) Load-time memory regions.  Allow linking into a load-time memory
   region instead of a specific load-time address.

You seem to be putting blocking and alignment after the output section
definition.  I don't see why.  The output section address normally
goes at the start of the output section definition.

Both BLOCK and ALIGN at the end of a output section definition are
already supported by existing linker script structures.  You can
already use an expression to set the output section address.  As you
suggest, either ALIGN or NEXT may be used to align the output section
to a particular address.  I believe BLOCK can be handled via more
complex expression--pretty much the expression you wrote in your
BLOCK_N macro.

The load-time memory region stuff looks good.  Can you separate out
that part?  It does not appear to be related to the other bits.

Your patch assumes ANSI C string concatenation--do not assume that in
the binutils.

Thanks.

Ian


More information about the Binutils mailing list