This is the mail archive of the binutils@sources.redhat.com 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: Diab C-Compiler-Suite and GNU objcopy problem


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


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