objcopy - redefine dynamic symbols

Nick Clifton nickc@redhat.com
Fri Mar 3 14:56:00 GMT 2006


Hi Thomas,

> I am currently in the situation that I need a tool for redefining
> dynamic symbols of a (stripped) ELF file.

> Should I implement this feature in objcopy,
> through modifying .dynstr/.dynsym/.hash ?

Yes.

> Any ideas where to start?

Read the ELF spec.  Work out what you are going to have to do in order 
to rename the symbols.  Have a look at the code in bfd/elfcode.h.  You 
will find functions here that work with the dynamic symbol table.  You 
may be able to use them, or you may have to modify them to allow you to 
do what you need to do.  Also look at the code in binutils/objcopy.c and 
see how it renames ordinary symbols.

Cheers
   Nick





More information about the Binutils mailing list