Diab C-Compiler-Suite and GNU objcopy problem
Nick Clifton
nickc@redhat.com
Mon Oct 21 03:32:00 GMT 2002
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
More information about the Binutils
mailing list