This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: Problems linking PSIM programs
- From: "Wealand, Barry" <barry dot wealand at lmco dot com>
- To: Joel Sherrill <joel dot sherrill at oarcorp dot com>, "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sourceware dot org
- Date: Fri, 11 Aug 2006 18:27:56 -0700
- Subject: 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 [mailto:joel.sherrill@oarcorp.com]
Sent: Friday, August 11, 2006 12:41 PM
To: H. J. Lu
Cc: Wealand, Barry; binutils@sourceware.org
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,
need
>> 3)
>>
/u00/users/bwealand/GCC/tools/v2.95.3/H-sparc-sun-solaris2.8/powerpc-eab
>> 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.
>