This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Diab C-Compiler-Suite and GNU objcopy problem
- From: Nick Clifton <nickc at redhat dot com>
- To: Frank Oltmanns <frank dot oltmanns dot ml at gmx dot de>
- Cc: binutils at sources dot redhat dot com
- Date: 21 Oct 2002 11:33:52 +0100
- Subject: Re: Diab C-Compiler-Suite and GNU objcopy problem
- References: <28261.1035195361@www63.gmx.net>
Hi Frank,
> I'm using the diab C-Compiler-Suite 4.4b for compiling and
> linking. I want to rename the .text sections in my object-files
> (ELF). I thought of using GNU objcopy 2.12 for this. Afterwards I
> realized, that all the files shrinked, even if I just copy the files
> without renaming (i.e. without using the
> "--rename-section"-flag). Which parts does objcopy remove, while
> copying the files?
In general objcopy without specific parameters will not remove
anything. What it does do is read in the input file, convert it into
an internal format, and then write it out again, converting back into
the external format.
It would appear that this two way conversion process is shrinking your
file, but without further information we cannot really say what is
happening. Some things you might like to look at are:
* Does the copied file still produce a working executable ?
* Are there differences in the section headers between the
pre and post copied files ? (Use readelf -S to display the
headers).
* Are the symbol tables the same ? (readelf -s)
Cheers
Nick