This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Linker script to duplicate input sections
- From: Michael Hennebry <hennebry at web dot cs dot ndsu dot nodak dot edu>
- To: Dobes <bdobry at udel dot edu>
- Cc: binutils at sourceware dot org
- Date: Thu, 27 Aug 2009 14:46:01 -0500 (CDT)
- Subject: Re: Linker script to duplicate input sections
- References: <25178106.post@talk.nabble.com>
On Thu, 27 Aug 2009, Dobes wrote:
I am trying to determine if there is something I can do in my linker script
to cause the linker to duplicate an input section into multiple output
sections. For example, I want the .data section from file.o to be included
in both outputsections, .data0 and .data1. Is this possible using the
linker script and without making changes to the linker itself?
You might need to use objcopy to produce another file to link.
What I would like to do:
.data0 : {
...
file.o(.data)
...
}
.data1 : {
...
file.o(.data)
...
}
But this only puts file.o's .data section into .data0 since it used it
first.
--
Michael hennebry@web.cs.ndsu.NoDak.edu
"Pessimist: The glass is half empty.
Optimist: The glass is half full.
Engineer: The glass is twice as big as it needs to be."