From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24010 invoked by alias); 30 Mar 2005 09:46:18 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 23956 invoked from network); 30 Mar 2005 09:46:10 -0000 Received: from unknown (HELO cam-admin0.cambridge.arm.com) (193.131.176.58) by sourceware.org with SMTP; 30 Mar 2005 09:46:10 -0000 Received: from pc960.cambridge.arm.com (pc960.cambridge.arm.com [10.1.205.4]) by cam-admin0.cambridge.arm.com (8.12.10/8.12.10) with ESMTP id j2U9jr4G023856; Wed, 30 Mar 2005 10:45:53 +0100 (BST) Received: from pc960.cambridge.arm.com (localhost.localdomain [127.0.0.1]) by pc960.cambridge.arm.com (8.12.8/8.12.8) with ESMTP id j2U9k8IF001643; Wed, 30 Mar 2005 10:46:08 +0100 Received: (from rearnsha@localhost) by pc960.cambridge.arm.com (8.12.8/8.12.8/Submit) id j2U9k751001639; Wed, 30 Mar 2005 10:46:07 +0100 X-Authentication-Warning: pc960.cambridge.arm.com: rearnsha set sender to rearnsha@gcc.gnu.org using -f Subject: Re: [PATCH] Fix type and alignment of ARM/Thumb EABI mapping symbols From: Richard Earnshaw To: Julian Brown Cc: binutils@sources.redhat.com In-Reply-To: <4249C7E9.8000100@codesourcery.com> References: <424716CD.5030909@codesourcery.com> <1112111047.12337.7.camel@pc960.cambridge.arm.com> <4249C7E9.8000100@codesourcery.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: GNU Message-Id: <1112175967.12337.36.camel@pc960.cambridge.arm.com> Mime-Version: 1.0 Date: Wed, 30 Mar 2005 17:05:00 -0000 X-SW-Source: 2005-03/txt/msg00895.txt.bz2 On Tue, 2005-03-29 at 22:26, Julian Brown wrote: > OK, this is a simpler version of the patch which alters the expected > test output instead (only ARM-specific code is now touched). > > Tested with cross to arm-none-eabi and arm-none-symbianelf, and with all > targets on i686-pc-linux-gnu. OK to apply? > > ChangeLog: > > * bfd/elf32-arm.c (arm_elf_find_function): Include STT_NOTYPE in test > for mapping symbols. > * gas/config/tc-arm.c (mapping_state): Update documentation in > function comment. Change type of mapping symbols to BSF_NO_TYPE. > (is_arm_mapping_symbol_name): New function. > (arm_adjust_symtab): Don't change type of mapping symbols here. > * gas/testsuite/gas/arm/mapping.d: Update expected output. > * ld/testsuite/ld-arm/arm-app-abs32.d: Likewise. > * ld/testsuite/ld-arm/arm-app.d: Likewise. > * ld/testsuite/ld-arm/mixed-app.d: Likewise. > > ______________________________________________________________________ > Index: gas/config/tc-arm.c > =================================================================== > RCS file: /cvs/src/src/gas/config/tc-arm.c,v > retrieving revision 1.199 > diff -c -p -r1.199 tc-arm.c > *** gas/config/tc-arm.c 29 Mar 2005 16:54:21 -0000 1.199 > --- gas/config/tc-arm.c 29 Mar 2005 21:13:47 -0000 > *************** validate_offset_imm (unsigned int val, i > *** 1243,1316 **** > --- 1243,1308 ---- > > #ifdef OBJ_ELF > /* This code is to handle mapping symbols as defined in the ARM ELF spec. > ! (This text is taken from version 0.62 RC 2 of the spec): > > ! 4.5.7 Mapping symbols > > ! A section of an ELF file can contain a mixture of ARM code, Thumb code There's no need to quote the entirety of this section in the source file. A cross reference is fine. The correct reference should be to v1.0 of the spec, where the section number is 4.5.5. > *************** arm_frob_label (symbolS * sym) > *** 13678,13683 **** > --- 13670,13685 ---- > } > } > > + /* Recognize short-form or long-form mapping symbol names. */ > + > + static bfd_boolean > + is_arm_mapping_symbol_name (const char* name) > + { > + return name && name[0] == '$' > + && (name[1] == 'a' || name[1] == 'd' || name[1] == 't') > + && (name[2] == '\0' || name[2] == '.'); > + } > + > /* Adjust the symbol table. This marks Thumb symbols as distinct from > ARM ones. */ > It seems silly to duplicate this function here when it also exists in libbfd (though also static). It would make more sense to make the bfd implementation public and call that. I would suggest you move the code to cpu-arm.c. This is ok with the above changes. R.