using BFD to load and reloc a simple file
Daniel Jacobowitz
drow@false.org
Thu Mar 2 23:31:00 GMT 2006
On Thu, Mar 02, 2006 at 01:54:14PM -0800, thockin@hockin.org wrote:
> I've succeeded in making a static binary that works for a given fixed
> address. Now I need to make it relocateable. Linking with -r seems to
> give me the binary I want (though I am not sure it would catch
> unresolvable references anymore).
>
> Would I be better off using -pie or some other method?
The best way to do this is link it as a shared object, and then
resolve dynamic relocations (of which there are many fewer). You
can avoid BFD entirely.
--
Daniel Jacobowitz
CodeSourcery
More information about the Binutils
mailing list