This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: portable method to add a new output section?
- From: Gary Funck <gary at intrepid dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: GNU binutils <binutils at sourceware dot org>
- Date: Fri, 1 Feb 2008 09:28:00 -0800
- Subject: Re: portable method to add a new output section?
- References: <20080201045416.GA6423@intrepid.com> <47A2F813.90308@redhat.com>
On 02/01/08 10:44:35, Nick Clifton wrote:
>
> Have you tried just adding this partial script to the linker command line ?
> If the linker sees a file specified on the command line in a format that
> it does not recognise it assumes that it is a linker script and it uses
> this script to augment the current linker script.
Nick, thanks. I was going to try that, but the manual,
http://www.gnu.org/software/binutils/manual/ld-2.9.1/html_mono/ld.html#SEC17
says "You may use at most one SECTIONS command in a script file ...".
I just tried adding a text file to the link line with the
following contents:
SECTIONS {
.upc_shared 0x10000 (NOLOAD) : { *(upc_shared) }
}
And it seemed to work as expected, still procesing the default
linker spec. as well. The only small glitch is that this special
section came first in the file, where I was hoping it might
be placed just after the .data section (for no particular
technical reason) which is where the other named sections appear.