Subject: Re: 2 BFD questions
To: Bill Studenmund <skippy@macro.Stanford.EDU>
From: Krister Walfridsson <>
List: tech-toolchain
Date: 12/29/1998 02:50:19
On Mon, 28 Dec 1998, Bill Studenmund wrote:

> 1) I'm still sifting through all of the libbfd commands. Is there one to
> rename a symbol? The way crunchide works on elf files is to rename all
> of the to-be-renamed symbols to "__$$hide$$ <progname> <original symbol
> name>" manually. Can I get libbfd to do that? Easily?

There are no function 'bfd_change_symbol_name()', but it is easy
to use libbfd's function for reading in the file, iterate through the
symbols, and writing the file back. So I guess this is essentially
what you do now, but libbfd will hide some details, so you could
probably do everything within 20 lines of code.

Look at the source for objcopy. It has an option --change-leading-char
that is a poor man's version of the functionality you want...