From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25303 invoked by alias); 1 Sep 2006 15:51:40 -0000 Received: (qmail 25265 invoked by uid 22791); 1 Sep 2006 15:51:39 -0000 X-Spam-Check-By: sourceware.org Received: from cam-admin0.cambridge.arm.com (HELO cam-admin0.cambridge.arm.com) (193.131.176.58) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 01 Sep 2006 15:51:38 +0000 Received: from cam-owa1.Emea.Arm.com (cam-owa1.emea.arm.com [10.1.255.62]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id k81FpTGf007922; Fri, 1 Sep 2006 16:51:29 +0100 (BST) Received: from pc960.cambridge.arm.com ([10.1.255.211]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 1 Sep 2006 16:51:29 +0100 Subject: Re: [PATCH] Thumb-2 BL support for bfd From: Richard Earnshaw To: Mark Shinwell Cc: binutils@sourceware.org In-Reply-To: <44EDC478.2090103@codesourcery.com> References: <44EDC478.2090103@codesourcery.com> Content-Type: text/plain Message-Id: <1157125888.1429.21.camel@pc960.cambridge.arm.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Fri, 01 Sep 2006 15:51:00 -0000 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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-09/txt/msg00004.txt.bz2 On Thu, 2006-08-24 at 16:23, Mark Shinwell wrote: > Hello, > > Here is the necessary bfd support for the exploitation of the extra > offset available when dealing with Thumb-2 BL instructions. The > assembler does not require any further modifications to enable this > to be used, as can be seen from the testcases. (A colleague commented > earlier that the sources of some of the test cases are very similar, but > I'd prefer to keep them separate so as to not mix up dump tests and the > other ones with explicit rules in arm-elf.exp.) > > Tested on arm-none-linux-gnueabi. OK? > This is ok except for: > +/* Determine if we're dealing with a Thumb-2 object. */ > + > +static int using_thumb2 (struct elf32_arm_link_hash_table *globals) > +{ > + int arch = elf32_arm_get_eabi_attr_int (globals->obfd, Tag_CPU_arch); > + return arch == 8 || arch >= 10; > +} Don't use manifest constants here. Define some macros for the constants and use those instead. R.