This is the mail archive of the 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: Problems linking PSIM programs

Thanks, folks.  I've had better luck with later versions of the compiler
too, as I mentioned (gcc 3.4.4 with binutils 2.14 works fine).  There
just seems to be something about gcc 2.95.3 that somehow leads to this.
I've even moved everything to a Linux host platform - this produces the
same results.

For sake of completeness, I've attempted to build binutils 2.17 as
suggested, also for a Linux host and powerpc-eabi target.  This does not
build (using native gcc 3.3.4 on the Linux machine).  A whole slew of
errors are reported when building bfd, compiling module elf32-ppc.c.
The errors seem to occur in an include file, elf32-target.h, the first
from line 468:

elf32-target.h:468: error: `false' undeclared (not in a function)

Have I missed any new required steps for configuring and building
binutils-2.17?  (2.12 configures and builds on this machine just fine.)

I failed to mention that the interest in the older compiler comes from a
desire for (as near as possible) code generation that's similar to a
WindRiver GNU compiler we're using (they call it 2.96, apparently based
on 2.95.3).  That's where all the older version numbers come from.

Thanks again!

-----Original Message-----
From: Joel Sherrill [] 
Sent: Friday, August 11, 2006 12:41 PM
To: H. J. Lu
Cc: Wealand, Barry;
Subject: Re: Problems linking PSIM programs

H. J. Lu wrote:
> On Fri, Aug 11, 2006 at 11:44:24AM -0700, Wealand, Barry wrote:
>> Hello -
>> I'm trying to use gcc 2.95.3 with binutils 2.14 and newlib 1.9.0 to 
>> build a simple hello.c for use with the PowerPC simulator.  Compiler,

>> binutils, and newlib were all configured with --target=powerpc-eabi 
>> for a sparc-sun-solaris2.8 host.  I attempt to compile hello.c with:
>> powerpc-eabi-gcc -msim -o hello hello.c
>> The response is:
>> /u00/users/bwealand/GCC/tools/v2.95.3/H-sparc-sun-solaris2.8/powerpc-
>> eab
>> i/bin/ld: hello: Not enough room for program headers (allocated 2,
>> 3)
>> i/bin/ld: final link failed: Bad value
>> In the bug-binutils archive, I notice that this problem has appeared 
>> in a number of different situations.  One recommended solution has 
>> been to use later versions of binutils.  I have tried 3 separate 
>> versions: 2.11.2, 2.12, and 2.14.  All produce the same result.
> You tried 3 very OLD binutils. The current one is 2.17.

psim is one of the platforms we regularly test RTEMS on.  But we use
much more recent tools than that.  gcc 2.95.3 is quote old also.

gcc 4.1.1 + binutils 2.17 works great.

--joel sherrill
> H.J.

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