From owner-freebsd-questions@FreeBSD.ORG Wed Jul 12 13:55:47 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3BC1D16A4E2 for ; Wed, 12 Jul 2006 13:55:47 +0000 (UTC) (envelope-from daijo@unixevil.info) Received: from zeus.daijo.org (zeus.daijo.org [85.17.16.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5369443D46 for ; Wed, 12 Jul 2006 13:55:46 +0000 (GMT) (envelope-from daijo@unixevil.info) Received: (qmail 12479 invoked by uid 210); 12 Jul 2006 16:00:31 +0200 Received: from 84.123.228.149 by zeus (envelope-from , uid 201) with qmail-scanner-2.01st (clamdscan: 0.88.2/1592. spamassassin: 3.1.3. perlscan: 2.01st. Clear:RC:1(84.123.228.149):. Processed in 0.025687 secs); 12 Jul 2006 14:00:31 -0000 Received: from unknown (HELO ?192.168.1.5?) (84.123.228.149) by 0 with (DHE-RSA-AES256-SHA encrypted) SMTP; 12 Jul 2006 16:00:31 +0200 Message-ID: <44B4FF5D.3030902@unixevil.info> Date: Wed, 12 Jul 2006 15:55:41 +0200 From: Victor Roman Archidona User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: freebsd-questions@freebsd.org X-Enigmail-Version: 0.94.0.0 OpenPGP: id=A31FA9A0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: GCC binary format output X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jul 2006 13:55:47 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, I'm porting FreeBSD to Gentoo for the Summer of Code project "Gentoo/FreeBSD for Amd64", and I need a little help about gcc binary output when compiling files. I compiled by hand GCC, and when I compile some file the output format is "UNIX - System V". I got this with `readelf -h program`. The problem is that I need the default binary output must be "UNIX - FreeBSD" and for now I can't fix it without help. BTW, If the output is "UNIX - System V" I can't run static compiled files, it shall be fixed changing the output behaviour. For example with the following small C program: #include #include int main(int argc, char *argv[]) { printf("it works!\n"); exit(EXIT_SUCCESS); } root@localhost ~ # gcc -static test.c -o test root@localhost ~ # readelf -h test | grep "OS/ABI" OS/ABI: UNIX - System V root@localhost ~ # ./test ELF binary type "0" not known. - - -su: ./test: cannot execute binary file root@localhost ~ # I asked before in gcc-help mailing list but they point to ask here too. I also provide two links [1] and [2] with previous discussion about this. [1] http://lists.freebsd.org/pipermail/freebsd-hackers/2006-July/017123.html [2] http://gcc.gnu.org/ml/gcc-help/2006-07/msg00134.html Any input in this topic will be very apreciated. Thanks for all in advance, - - -- Victor Roman Archidona -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (MingW32) iD8DBQFEtP9dQ/ddYKMfqaARAlaZAJ9iUkeImjWeSVT+KXyhztA9j1AchACdFurq TOZxQ/e4paCZHDqen4GBNxk= =iMM0 -----END PGP SIGNATURE-----