bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: objcopy can't localize dynamic symbols?


From: Craig Lawson
Subject: RE: objcopy can't localize dynamic symbols?
Date: Mon, 16 Aug 2004 10:42:46 -0700

Thanks Ian and Alan,

I solved my problem without hacking. After receiving your advice, I read
the ld man page for the 50th time and noticed the "--relocateable"
option. I now modify my weak symbols in an intermediate object file
before the final link step.

Thanks again,
Craig.
 

-----Original Message-----
From: Ian Lance Taylor [mailto:address@hidden 
Sent: Friday, August 13, 2004 1:43 PM
To: Craig Lawson
Cc: Alan Modra; address@hidden
Subject: Re: objcopy can't localize dynamic symbols?

"Craig Lawson" <address@hidden> writes:

> OK, so objcopy won't alter the dynamic symbol table. Yet I need a tool
> that will. I need to either change global weak symbols to locals, or
to
> strip specific dynamic symbols. Does anyone know of a tool that will
do
> this?
> 
> If not, then unless there is some fundamental reason which I have not
> yet grasped, I am inclined to add this feature to objcopy. Comments?

In general you can not change the dynamic symbol table of a fully
linked executable or shared library.  This is because they are loaded
into memory, and thus affect the address of other sections.

For specific cases of clobbering dynamic symbols, or changing existing
symbol tables, you might be able to make the changes in place.  There
is no mechanism in BFD to do this.  I think it might make more sense
to write an ELF specific tool.

Ian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]