From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,e1d00d1219dd9e35 X-Google-Attributes: gid111c93,public X-Google-ArrivalTime: 2004-02-20 10:35:06 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!logbridge.uoregon.edu!arclight.uoregon.edu!news-ext.gatech.edu!news-int.gatech.edu!not-for-mail From: "Peter Sassone" Newsgroups: comp.os.linux.alpha Subject: Re: Redhat linux -> ecoff binaries? Date: Fri, 20 Feb 2004 13:42:50 -0500 Organization: Georgia Institute of Technology Sender: gt7146b@user-11212gl.dsl.mindspring.com Message-ID: References: NNTP-Posting-Host: user-11212gl.dsl.mindspring.com X-Trace: news-int.gatech.edu 1077302080 1492 66.32.138.21 (20 Feb 2004 18:34:40 GMT) X-Complaints-To: usenet@news-int.gatech.edu NNTP-Posting-Date: Fri, 20 Feb 2004 18:34:40 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Xref: archiver1.google.com comp.os.linux.alpha:509 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