From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23895 invoked by alias); 18 Apr 2006 13:19:34 -0000 Received: (qmail 23847 invoked by uid 22791); 18 Apr 2006 13:19:34 -0000 X-Spam-Check-By: sourceware.org Received: from urano.sidsa.es (HELO urano.sidsa.es) (195.53.86.130) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 18 Apr 2006 13:19:31 +0000 Received: from webmail (naomi.sidsa.es [195.53.86.134]) by urano.sidsa.es (8.13.6/) with ESMTP id k3IDIhqL031338; Tue, 18 Apr 2006 15:18:43 +0200 Received: from 195.53.86.158 (SquirrelMail authenticated user johnmc) by webmail with HTTP; Tue, 18 Apr 2006 15:18:46 +0200 (CEST) Message-ID: <4429.195.53.86.158.1145366326.squirrel@webmail> In-Reply-To: <20060418130617.GA10461@nevyn.them.org> References: <4385.195.53.86.158.1145361498.squirrel@webmail> <20060418130617.GA10461@nevyn.them.org> Date: Tue, 18 Apr 2006 15:14:00 -0000 Subject: Re: plt for arm gnu thumb From: johnmc@sidsa.es To: "Daniel Jacobowitz" Cc: binutils@sources.redhat.com User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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-04/txt/msg00230.txt.bz2 The problem is this. Code in thumb mode calls the plt sequence which is in ARM code with a BX instruction in order to call a function located in a shared library - this part is ok - Next the plt sequence accesses the GOT for the address of the function in the shared library and calls the function - this is the problem the plt is ARM code but the shared library is THUMB and the microprocessor is still in ARM mode when it starts to run the shared library thumb code i.e. I can see the program counter increments in 4 bytes. john mcwhinnie > On Tue, Apr 18, 2006 at 01:58:18PM +0200, johnmc@sidsa.es wrote: >> hello >> >> >> I have just finished a shared library system using the gnu tools for a >> system using arm thumb code but I have found that there is a problem in >> that the plt is produced for arm code and it does not work correctly . >> question - can I force the gnu tools to produce thumb code plt. > > What is the actual problem? > > The PLT will always be in 32-bit instructions, but the linker should > arrange for things to work for PLT calls from Thumb also. > > -- > Daniel Jacobowitz > CodeSourcery >