Relocation sections in an ELF executable?

Chris Smith cdsmith@twu.net
Sat Sep 11 15:32:00 GMT 2004


Good morning:

I need to be able to relocate pointer in an executable file from the runtime
loader -- the executable is not placed at a fixed location on the platform I'm
using.  However, I can't tell seem to tell from the ELF executable which
variables are pointers and thus need to be relocated.

As far as I can tell, the exact information I need is stored in the .o files,
in a section called .rel.text.  Is there an easy way to tell the linker to
emit relocation sections into the executable output file, so that its contents
can be used to fix up the binary in the runtime loader?

If not, then how would you do this?

Thanks,

-- 
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation



More information about the Binutils mailing list