0

I want to add a prefix to every symbol in an elf object file, how do you do that using Linux (eg debian)? I need the debug information to still work (ie, gdb can still debug effectively albeit using the new names for all the symbols).

The elf object is relocatable. A solution for a non-relocatable object would also be welcome. A solution for which code-coverage stats continues to work would also be welcome but is not necessary.

codeshot
  • 1,183
  • 1
  • 9
  • 20

1 Answers1

0

I don't know of any canned way to do this.

I think it could be done by rewriting the ELF symbol table and the DWARF information as well. This is not trivial, though perhaps you could implement it using the various libraries in elfutils.

Tom Tromey
  • 21,507
  • 2
  • 45
  • 63