This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Problems linking on PPC
- From: Jacob Gorm Hansen <jg at ioi dot dk>
- To: binutils at sources dot redhat dot com
- Date: 15 Jan 2003 18:04:08 +0100
- Subject: Problems linking on PPC
- Organization: Io Interactive
Hi,
I am trying to create a cross-compiler setup for the Nintendo Gamecube
(powerpc 750 'Gekko') on i386 Linux. I've compiled my own GCC 3.2 and
binutils 2.12.
Nintendo have provided me with static libraries, one of them containing
a weak symbol __start. I have a linker script which asks for
ENTRY(__start), but when I link my hello world app with this lib as in:
$ powerpc-linux-ld -T linker.ld ib.o os.a
I get:
powerpc-linux-ld: warning: cannot find entry symbol __start; defaulting
to 00000040
powerpc-linux-ld: a.out: Not enough room for program headers, try
linking with -N
powerpc-linux-ld: final link failed: Bad value
or:
$ powerpc-linux-ld -e __start ib.o os.a
powerpc-linux-ld: warning: cannot find entry symbol __start; defaulting
to 10000074
$ nm os.a |grep __start
__start.o:
00000040 W __start
$ e$ objdump -d os.a |grep __start
__start.o: file format elf32-powerpc
00000040 <__start>:
40: (lots of code which I cannot show you due to my NDA).
My understanding is that this symbol should be included, even though it
is weak, is that correct? Can I force its inclusion somehow? Can the
problem be that os.a has probably been compiled with gcc2.95?
Any help would be appreciated.
thanks,
Jacob