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: objcopy - redefine dynamic symbols


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




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