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 (quoted ooo):

Michael Hennebry wrote:

You might need to use objcopy to produce another file to link.

But then how do I avoid the multiple definition errors?

What would you want to happen? You seem to want them defined twice.

For symbols not referenced from outside,
you might be able to localize the symbols.
objcopy's --localize-symbol will do it for one symbol.
I don't know how to do it en masse.
There is also a --globalize-symbol .

For references to the duplicated section from outside,
there is no obvious right thing.
For each symbol, you will need to pick one.

--
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]