From patchwork Wed Apr 18 12:35:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve McIntyre X-Patchwork-Id: 153488 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 4E311B72E8 for ; Wed, 18 Apr 2012 22:38:11 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1335357493; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To:User-Agent: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=SqpxnqP4m+QuW/oJmapG fhSOj2o=; b=HBojIT1PXbC/c1CsP/I9ATDhkSz8bd/mUrqaiplPCRzKJlHlTMpO VaBoL00CijpeLvRm5TDTjS4A4+amfXZ2E3Q0jdliCheghzHXjTKmu6+7rRdC2G+b bAceoZcJVXgyvW9Ud9hKzvMqe60WLmYT44mDyKLrxfWUs8KkqMtgEzc= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:X-attached:User-Agent:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=vhl5z/P/b+/Sbb4J8QUNkjjRPFp9vcGIp6rBURJ1geVWGo74QJ7S0Rp+Va+sCK LWtcAqPrcxB8Iy+Ex7Dle3O8a841qdYdxvlnbnUYk4mWclFGL2q9YCNTfmC1PIdQ gHYaH5EIIFBCqUIsusNDexJf7HyiTd6z0E/m+roW8HL0Y=; Received: (qmail 7182 invoked by alias); 18 Apr 2012 12:37:10 -0000 Received: (qmail 6977 invoked by uid 22791); 18 Apr 2012 12:37:05 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from cheddar.halon.org.uk (HELO cheddar.halon.org.uk) (217.10.144.130) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 18 Apr 2012 12:36:03 +0000 Received: from bsmtp by cheddar.halon.org.uk with local-bsmtp (Exim 4.72) (envelope-from ) id 1SKU77-0005QY-EK; Wed, 18 Apr 2012 13:36:01 +0100 Received: from stemci01 by e102122-lin with local (Exim 4.76) (envelope-from ) id 1SKU6w-0007Va-L0; Wed, 18 Apr 2012 13:35:50 +0100 Date: Wed, 18 Apr 2012 13:35:50 +0100 From: Steve McIntyre To: cross-distro@lists.linaro.org Cc: libc-ports@sourceware.org, gcc-patches@gcc.gnu.org Subject: Re: ARM hard-float linker path - consensus Message-ID: <20120418123542.GL2880@linaro.org> References: <20120413173704.GG2880@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20120413173704.GG2880@linaro.org> X-attached: none User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Fri, Apr 13, 2012 at 06:37:11PM +0100, Steve McIntyre wrote: >Hi folks, > >As promised, here's minutes from the call we had this >afternoon. Spoiler: the result we've agreed is > > /lib/ld-linux-armhf.so.3 > >And here's a transcription of the minutes from > > https://wiki.linaro.org/OfficeofCTO/HardFloat/LinkerPathCallApr2012 And there's a slight wrinkle we've found (of course). The change of the filename equates to a change of soname for the linker too. Adam found this a couple of days back when doing rebuilds of the glibc and toolchain packages in Ubuntu, and between us we've come up with a (hacky, ugly, *never* to be upstreamed) solution. It seems to work fine for us, to at least allow for supporting old binaries until packages are all rebuilt to use the new linker path/soname. Just talking to Andreas, the openSUSE folks are running with this too. /me waits for the barrage of rotten fruit... Cheers, ============================ For backward compatibility with armhf binaries built with the old linker SONAME, we need to fake out the linker to believe the new is the old, until such a point as everything is rebuilt --- eglibc-2.15.orig/elf/dl-load.c 2012-04-14 12:11:37.000000000 +0000 +++ eglibc-2.15/elf/dl-load.c 2012-04-15 00:39:36.558765502 +0000 @@ -2303,10 +2303,13 @@ soname = ((const char *) D_PTR (l, l_info[DT_STRTAB]) + l->l_info[DT_SONAME]->d_un.d_val); if (strcmp (name, soname) != 0) +#ifdef __arm__ + if (strcmp(name, "ld-linux.so.3") || strcmp(soname, "ld-linux-armhf.so.3")) +#endif continue; /* We have a match on a new name -- cache it. */ - add_name_to_object (l, soname); + add_name_to_object (l, name); l->l_soname_added = 1; }