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: using BFD to load and reloc a simple file


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


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