This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: [PATCH] linker BLOCK/ALIGN/LMA memory region functions
- To: twall at alum dot mit dot edu
- Subject: Re: [PATCH] linker BLOCK/ALIGN/LMA memory region functions
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 13 Feb 2000 14:52:16 -0500
- CC: binutils at sourceware dot cygnus dot com, nickc at cygnus dot com
- References: <38A18E54.82BB58A0@alum.mit.edu>
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