This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linker script to duplicate input sections


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]