From: "Peter Sassone" <pete@play.com>
Subject: Re: Redhat linux -> ecoff binaries?
Date: Fri, 20 Feb 2004 13:42:50 -0500 [thread overview]
Message-ID: <c15k00$1ek$1@news-int.gatech.edu> (raw)
In-Reply-To: c117pq$38g$1@news-int.gatech.edu
Thank you to everyone who's contributed suggestions. Things still aren't
working, but I feel close to the solution. Boy am I learning a lot about
object formats and linkers! Here's the stuff I've tried:
1. After applying for the free test drive that Alan suggested, I was able to
log into an Alpha OSF 5.1 machine and borrow the crt0.o file. Unfortuntely,
using it to link a simple program (main() return 0;) on my alpha with the
cross compiler still gives errors:
[sassone@alpha]$ alpha-dec-osf4-gcc test.c
/opt/alpha-dec-osf4/lib/crt0.o: In function `__start':
/opt/alpha-dec-osf4/lib/crt0.o:345: undefined reference to `exit'
/opt/alpha-dec-osf4/lib/crt0.o: In function `__eprol':
/opt/alpha-dec-osf4/lib/crt0.o:480: undefined reference to `exit'
collect2: ld returned 1 exit status
Not sure why the crt0.o file doesn't work, but it's possible that __start,
exit, and __eprol don't come from crt0.o, but from some other object file on
OSF systems. I am planning to hunt through the lib directories on the
testdrive alpha to find where they come from. If anyone knows, that would
save me some hunting :)
2. I also tried using the cross compiler with the existing ld (since it
technically supports both formats), and it does create an executable with
the warning:
/usr/bin/ld: warning: cannot find entry symbol _start;
defaulting to 00000001200001b0
but the exectutable segfaults upon running.
3. I also tried to make glibc with the cross compiler (since it *can*
create object files fine) to possibly make a crt0 file, but the configure
script throws errors left and right about a bad compiler since it can't make
executables. I guess I could modify the configure script to ignore those
errors, but it might be telling me the truth: that I will need to build an
executable during the process and my cross compiler can't do that right now.
4. Juhana suggested -fpic or -fPIC, but neither has an effect.
5. Dooley suggested I read:
http://sources.redhat.com/ml/crossgcc/2003-09/msg00110.html
Which was one of the first websites I came across in the quest to make this
work. It was this website that convinced me to cross target gcc to
alpha-dec-osf4, since it is still supported in the latest gcc and binutils.
I don't know if cross targeting gcc to alpha-*-linux-ecoff would produce
linkable binaries, but I'm concerned about compatibility with my
architecture simulator, which requires alpha coff binaries like the ones
that CCC on OSF would produce.
I'm still open to the idea that I'm really barking up the wrong tree to make
COFF binaries on alpha linux. It's a shame that newlib doesn't support
alpha, because I know that it creates a working crt0.o file.
Thanks for any more suggestions,
--
Peter Sassone
prev parent reply other threads:[~2004-02-20 18:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-19 2:49 Redhat linux -> ecoff binaries? Peter Sassone
2004-02-19 2:51 ` Jafir Elkurd
2004-02-19 3:34 ` Peter Sassone
2004-02-20 3:22 ` fybar
2004-02-19 6:52 ` Peter Sassone
2004-02-19 14:10 ` Followup
2004-02-19 14:03 ` Juhana Paavola
2004-02-20 6:11 ` dooley
2004-02-20 18:42 ` Peter Sassone [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox