objcopy copies not only symbols asked?

Gyurki, Istvan (MED) Istvan.Gyurki@med.ge.com
Mon Feb 24 13:02:00 GMT 2003


Hi,

I have a .o file about 1 meg size. I'd like to extract only one symbol from
it, using:
  objcopy --strip-all -K symbolname from.o to.o

objcopy does the job, however the new file containing only one symbol wil be
about 800k.
I do not think that the symbol takes up that much space, so for me it seems
that objcopy only removes symbol reference, but does not actually eliminate
everything.

My question is; is there a way to create .o file containing only the
required symbol, and not more?

Thanks in advance,

Istvan




More information about the Gcc mailing list