From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23520 invoked by alias); 13 Jul 2006 12:45:10 -0000 Received: (qmail 23491 invoked by uid 22791); 13 Jul 2006 12:45:10 -0000 X-Spam-Check-By: sourceware.org Received: from pne-smtpout3-sn1.fre.skanova.net (HELO pne-smtpout3-sn1.fre.skanova.net) (81.228.11.120) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 13 Jul 2006 12:45:07 +0000 Received: from [10.0.0.3] (84.248.179.139) by pne-smtpout3-sn1.fre.skanova.net (7.2.075) id 44A1309900083324; Thu, 13 Jul 2006 14:44:55 +0200 Message-ID: <44B64336.1040107@mbnet.fi> Date: Thu, 13 Jul 2006 12:45:00 -0000 From: Kai Ruottu User-Agent: Thunderbird 1.5.0.4 (X11/20060516) MIME-Version: 1.0 To: Victor Roman Archidona CC: gcc-help@gcc.gnu.org Subject: Re: gcc binary format output References: <44B4500F.4010406@unixevil.info> In-Reply-To: <44B4500F.4010406@unixevil.info> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-07/txt/msg00162.txt.bz2 Victor Roman Archidona wrote: > 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`. > root@localhost ~ # gcc -static test.c -o test > root@localhost ~ # readelf -h test | grep "OS/ABI" > OS/ABI: UNIX - System V I tried a crosscompiler from 'i686-linux-gnu' to the 'x86_64-freebsd6.1' and got just the same result: kai@Dell:/data1/home/kai-old/test/tprintf> readelf -h tst_freebsd64.x | grep OS/ABI OS/ABI: UNIX - System V while the binaries in the FreeBSD6.1/amd64 install CD like it's 'gcc' and 'libc.so.6' had: kai@Dell:/media/cdrecorder/usr/bin> readelf -h gcc | grep OS/ABI OS/ABI: UNIX - FreeBSD kai@Dell:/media/cdrecorder/lib> readelf -h libc.so.6 | grep OS/ABI OS/ABI: UNIX - FreeBSD So the executables produced have this wrong type... I would guess GCC or the GNU 'as' should be sued for this thing because: kai@Dell:/data1/home/kai-old/test/tprintf> readelf -h tst_freebsd64.o | grep OS/ABI OS/ABI: UNIX - System V The binutils I used were the latest '2.17.50.0.2' Linux ones from: ftp.kernel.org/pub/linux/devel/binutils The GCC version tried was '4.0.3'... I will try gcc-4.1.1 still but getting this bug fixed also in gcc-4.0.x could be nice. Anyone knowing this much about binutils and GCC, which config etc. setting could cause the 'bad magic'? The right FreeBSD bins have: Magic: 7f 45 4c 46 02 01 01 09 00 00 00 00 00 00 00 00 but the wrong ones have: Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00