This is the mail archive of the binutils@sources.redhat.com 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 renaming dynamic symbols


Vladimir Vassilev <vl_vassilev@yahoo.com> writes:

> I am trying to rename symbol names of shared object.
> Obviously objcopy only works for static symbols. Are
> there any new developments related to this topic.
> Otherwise what are the problems with implementing this
> feature ... I would like to do it and contribute, but
> just give me a hint if you know a reason this cannot
> be done so that I don't waste time on research.

It's a tough problem, because the dynamic symbol names are loaded into
memory.  If you increase the length of the name, the result may not
fit in the same memory location.  That would mean that you would have
to find some different loadable memory space for the symbols, you
would have to add a new program header for it, and you would have to
adjust everything accordingly.  Quite a pain.

Other than that, you basically just have the change the entry in
.dynstr and recompute the hash table in .hash.  If you want the
debugging information to work correctly, you might have to adjust that
as well, though the details would depend upon the type of debugging
information being used.

Ian


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