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: partial linking that resolves relocations


On 05/18/2011 12:50 AM, Yni Mous wrote:

> Is there a way to combine object files (1.o and 2.o) to produce another
> object file (similar to ld -i) with the relocations "resolved"?

There is no direct way, although there should be: for instance,
some additional flag such that "ld -r" would resolve what it could,
instead of just accumulating the relocations for later resolution.

There might be a work-around, however.  Run "ld -r", then run
"objcopy --strip-symbol=foo".  If objcopy interprets this favorably,
then objcopy must resolve the relocations that depend on 'foo'.

-- 


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