From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19327 invoked by alias); 23 Jun 2006 17:34:58 -0000 Received: (qmail 19316 invoked by uid 22791); 23 Jun 2006 17:34:57 -0000 X-Spam-Check-By: sourceware.org Received: from smtp106.sbc.mail.mud.yahoo.com (HELO smtp106.sbc.mail.mud.yahoo.com) (68.142.198.205) by sourceware.org (qpsmtpd/0.31) with SMTP; Fri, 23 Jun 2006 17:34:55 +0000 Received: (qmail 64990 invoked from network); 23 Jun 2006 17:34:53 -0000 Received: from unknown (HELO lucon.org) (hjjean@sbcglobal.net@71.146.67.96 with login) by smtp106.sbc.mail.mud.yahoo.com with SMTP; 23 Jun 2006 17:34:53 -0000 Received: by lucon.org (Postfix, from userid 1000) id 2EB8C63EEC; Fri, 23 Jun 2006 10:34:52 -0700 (PDT) Date: Fri, 23 Jun 2006 18:12:00 -0000 From: "H. J. Lu" To: "CARTER-HITCHIN, David, GBM" Cc: "'binutils@sourceware.org'" Subject: Re: Compiling and linking 32 bit code on a 64 machine (AMD Optero n) Message-ID: <20060623173452.GA379@lucon.org> References: <3B4C77997DD0254B86D3C9454476B6BC057A94@lonms00812.fm.rbsgrp.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3B4C77997DD0254B86D3C9454476B6BC057A94@lonms00812.fm.rbsgrp.net> User-Agent: Mutt/1.4.2.1i Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00364.txt.bz2 On Fri, Jun 23, 2006 at 06:21:08PM +0100, CARTER-HITCHIN, David, GBM wrote: > Hi, > > > Please post it here. > > Here is is: > > []-> uname -a > Linux lon3315xus 2.4.21-32.0.1.ELsmp #1 SMP Tue May 17 17:46:36 EDT 2005 > x86_64 x86_64 x86_64 GNU/Linux > []-> cat /etc/redhat-release > Red Hat Enterprise Linux AS release 3 (Taroon Update 7) > > []-> g++ -v > Reading specs from > /apps/IRDtools/pkgs/pd/gcc/3.4.1/p4/bin/../lib/gcc/i686-pc-linux-gnu/3.4.1/s > pecs > Configured with: /usr/local/build/gcc-3.4.1/configure > --prefix=/opt/GDStools/pkgs/pd/gcc/3.4.1/p4 --enable-threads > --enable-languages=c,c++ > Thread model: posix > gcc version 3.4.1 > [lon3315xus]-> ld --version > GNU ld version 2.16 > Copyright 2005 Free Software Foundation, Inc. > This program is free software; you may redistribute it under the terms of > the GNU General Public License. This program has absolutely no warranty. > > > []-> cat hello.cpp > #include > > int main () { > std::cout << "hello, world\n"; > } > > > []-> cat Makefile > hello: hello.o > g++ -Wl,--verbose -Wl,-L,/usr/lib -Wl,--format,elf32-i386 > -Wl,-m,elf_i386 -o hello > -L/apps/IRDtools/pkgs/pd/gcc/3.4.6/o1/lib/gcc/x86_64-unknown-linux-gnu/3.4.6 > /32 -L/usr/lib > Please use g++ -Wl,--verbose -m32 -o hello hello.o H.J.