partial linking that resolves relocations

John Reiser
Thu May 19 17:50:00 GMT 2011

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

This succeeds, and works in some cases: "objcopy --localize-symbo=foo".
Someone who is really desperate might take the output of "ld -r", then
change the string name of 'foo' to (gensym), such as by over-writing
the last two characters with "non-printable" bytes.


More information about the Binutils mailing list