From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18813 invoked by alias); 14 Aug 2007 12:48:06 -0000 Received: (qmail 18771 invoked by uid 22791); 14 Aug 2007 12:48:04 -0000 X-Spam-Check-By: sourceware.org Received: from alnrmhc16.comcast.net (HELO alnrmhc16.comcast.net) (206.18.177.56) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 14 Aug 2007 12:47:50 +0000 Received: from lucon.org ([24.6.230.138]) by comcast.net (alnrmhc16) with ESMTP id <20070814124747b1600qkgske>; Tue, 14 Aug 2007 12:47:47 +0000 Received: by lucon.org (Postfix, from userid 500) id 51C17F8243; Tue, 14 Aug 2007 05:47:47 -0700 (PDT) Date: Tue, 14 Aug 2007 12:48:00 -0000 From: "H.J. Lu" To: Greg Schafer Cc: binutils@sourceware.org Subject: Re: GNU hash-style compatibility problem on x86_64 Message-ID: <20070814124747.GA22418@lucon.org> References: <20070814072231.GA1370@eyo32.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070814072231.GA1370@eyo32.local> User-Agent: Mutt/1.5.14 (2007-02-12) Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00200.txt.bz2 On Tue, Aug 14, 2007 at 05:22:31PM +1000, Greg Schafer wrote: > Hi, > > Host platform is current x86_64: > > HJL binutils-2.17.50.0.18 > gcc-4.2.1 > glibc-2.6.1 (glibc defaults to compiling with --hash-style=both) > > The problem strikes on this host when attempting to natively bootstrap an > older toolchain (eg: with FSF binutils-2.17): > > $ echo 'main(){}' | stage1/xgcc -Bstage1/ -xc -o /dev/null - > /lib64/libc.so.6: file not recognized: File format not recognized > collect2: ld returned 1 exit status > > Essentially, the older ld chokes on the newer libc ie: the one compiled with > --hash-style=both (it affects any dso with --hash-style=gnu actually). > > The weird thing is, it only happens on x86_64. I've tested the exact same > scenario on x86 and ppc and those arches both work fine. Why should x86_64 > behave any differently here? This is all above my head so I would really > appreciate your help in understanding the root cause. > > You should be able to easily reproduce this if your x86_64 host has a libc > that was compiled with --hash-style=both (latest Fedora, Debian lenny etc), > just build binutils-2.17 then try to link using its ld. Note: you might have > to fiddle with gcc specs if your host gcc is hardwired for --hash-style=gnu > Well, it sounds like a bug in binutils 2.17. There are so many of them and they have been fixed in the current binutils. I don't want to spend time on it unless it is reproducible in the current binutils. H.J.