From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18520 invoked by alias); 26 Aug 2009 14:35:52 -0000 Received: (qmail 18510 invoked by uid 22791); 26 Aug 2009 14:35:51 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_22 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 26 Aug 2009 14:35:46 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id AC8C010928; Wed, 26 Aug 2009 14:35:43 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 72D9F1065E; Wed, 26 Aug 2009 14:35:43 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1MgJbC-0005Jb-Jb; Wed, 26 Aug 2009 10:35:42 -0400 Date: Wed, 26 Aug 2009 15:00:00 -0000 From: Daniel Jacobowitz To: Christophe LYON Cc: binutils@sourceware.org Subject: Re: Fix Thumb-2 shared libraries Message-ID: <20090826143542.GA19943@caradoc.them.org> Mail-Followup-To: Christophe LYON , binutils@sourceware.org References: <20090612140642.GA31950@caradoc.them.org> <4A32626C.8090407@st.com> <4A3658C4.3000800@st.com> <20090615175935.GA22200@caradoc.them.org> <4A390CF5.3000505@st.com> <20090617162337.GA9315@caradoc.them.org> <4A3A4DEF.5070704@st.com> <4A3A4E62.8030603@st.com> <20090825185158.GA2712@caradoc.them.org> <4A94F9FB.9070407@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A94F9FB.9070407@st.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes 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: 2009-08/txt/msg00484.txt.bz2 On Wed, Aug 26, 2009 at 11:01:47AM +0200, Christophe LYON wrote: > On 25.08.2009 20:51, Daniel Jacobowitz wrote: > > Unfortunately, this patch breaks Thumb-2 shared libraries. > Would you mind giving an example? Sure. I built glibc as a Thumb-2 binary. Because we change the type of function symbols, calloc was marked as an ARM mode entry point in ld.so's dynamic symbol table. When ld.so resolves its own relocations, it filled in an ARM-mode address in the PLT GOT. So the first call to calloc from ld.so caused us to execute Thumb code in ARM mode. > >Here's a patch I'm testing for this failure. > It seems OK, but I think you forgot to add a test case :-) I think your testcase serves nicely - now that I've fixed it to test for correct behavior :-) I'm going to wait for another internal test run before I commit this, but it looks good so far. -- Daniel Jacobowitz CodeSourcery