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]

Help! Code bloat with ld 2.11.2 (but newer one doesn't work)


binutils support:

I'm trying to work through a code bloat problem involving ld.
We're in the process of migration to a development environment
that uses gcc 2.95 and GNU ld 2.11.2.  The image sizes are
significantly larger with the newer compiler/linker.  I posted
an open question to a few newsgroups.  One of the responses
stated the following:

"Well, more efficient can mean a number of things. In particular, gcc
tends to optimise for performance over size in general (and that can
mean additional inlining and loop unrolling that expands the footprint
but makes the code run faster - hopefully). Where you should have
noticed a difference is in C++ code since the newer C++ compiler has a
number of new features to help reduce the bloat (e.g. link once
section support). You will need to link your modules on your host
though as the [2.11.2] loader does not know how to collapse link once
sections..."

OK, so I tried changing the makefiles to point to the more up-to-date
linker, GNU ld 2.14.  The problem is that when using this linker, I
get the following error:

/usr/add-on/exptools/gnu/bin/ld: cpuOcc.o: Relocations in generic ELF (EM: 20)
cpuOcc.o: could not read symbols: File in wrong format

An objdump on the .o file results in:

cpuOcc.o:     file format elf32-big

I also tried using '-b elf32-big' in the ld options, but it didn't help.

What do I need to use to get the new linker to work?

Can you confirm that there is some problem in the 2.11.2 linker that
could lead to larger image size?

This is for a PPC target.

Thanks!

- John


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