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: combining object files and managing relocatable symbols


On Thu, Sep 21, 2006 at 10:20:02AM +0200, Erik Leunissen wrote:
> H. J. Lu wrote:
> >
> >You need to do it in 2 steps, -L and then -x. You can open a bug
> >report at
> >
> >http://www.sourceware.org/bugzilla/
> >
> >to request that "-L foo -x" will remove foo in one step.
> >
> 
> I have no problem with needing multiple, separate calls to objcopy if it 
> indeed removes the local symbol X from C.o.
> 
> My real problem is that the symbol X remains present as it was before 
> the call to objcopy -x (according to: nm C.o ).
> 
> Is this a flaw in objcopy -x, or are there some requirements for it to 
> work that I don't know of? In case relevant, here's the version of 
> objcopy that I use:
> 
> > objcopy -V
> GNU objcopy 2.14.90.0.5 20030722 (SuSE Linux)

That is very old. It works for me:

sh-3.1$ cat x.c
void
X ()
{
}
bash-3.1$ gcc -c x.c
bash-3.1$ /usr/bin/objcopy -L X x.o
bash-3.1$ nm x.o
0000000000000000 t X
bash-3.1$ /usr/bin/objcopy -x x.o
bash-3.1$ nm x.o
bash-3.1$ /usr/bin/objcopy --version
GNU objcopy 2.16.91.0.6 20060212
bash-3.1$


H.J.


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