From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4762 invoked by alias); 30 Mar 2005 17:05:20 -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 4689 invoked from network); 30 Mar 2005 17:05:11 -0000 Received: from unknown (HELO mail.codesourcery.com) (65.74.133.9) by sourceware.org with SMTP; 30 Mar 2005 17:05:11 -0000 Received: (qmail 31824 invoked from network); 30 Mar 2005 17:05:10 -0000 Received: from localhost (HELO ?10.1.1.125?) (julian@127.0.0.1) by mail.codesourcery.com with SMTP; 30 Mar 2005 17:05:10 -0000 Message-ID: <424ADC3C.8080004@codesourcery.com> Date: Thu, 31 Mar 2005 02:17:00 -0000 From: Julian Brown User-Agent: Debian Thunderbird 1.0 (X11/20050116) MIME-Version: 1.0 To: Richard Earnshaw CC: Paul Brook , binutils@sources.redhat.com, Julian Brown Subject: Re: [PATCH] Fix type and alignment of ARM/Thumb EABI mapping symbols References: <424716CD.5030909@codesourcery.com> <4249C7E9.8000100@codesourcery.com> <1112175967.12337.36.camel@pc960.cambridge.arm.com> <200503301527.50626.paul@codesourcery.com> <424AC63F.7000706@codesourcery.com> <1112200206.1680.6.camel@pc960.cambridge.arm.com> <424AD518.9000101@codesourcery.com> <1112200646.1680.9.camel@pc960.cambridge.arm.com> In-Reply-To: <1112200646.1680.9.camel@pc960.cambridge.arm.com> Content-Type: multipart/mixed; boundary="------------090701010402090104080108" X-SW-Source: 2005-03/txt/msg00906.txt.bz2 This is a multi-part message in MIME format. --------------090701010402090104080108 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1174 Richard Earnshaw wrote: > On Wed, 2005-03-30 at 17:34, Julian Brown wrote: >>Richard Earnshaw wrote: >>>This function isn't elf specific, which is one of the reasons I >>>suggested moving it to cpu-arm.c. So why have you put elf32 in the >>>name? >> >>Doh, sorry. I was confused by the mapping symbols being defined by the >>AAELF spec, and didn't realise they would be used elsewhere too. > > True, but we don't define a coff spec. However, I suspect that if we > did, we'd probably put mapping symbols in there too. OK, here is a further patch to rename the function. ChangeLog: bfd: * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from bfd_elf32_is_arm_mapping_symbol_name. * bfd-in2.h: Regenerate. * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from bfd_elf32_is_arm_mapping_symbol_name. * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name. (arm_elf_find_function): Likewise. (elf32_arm_output_symbol_hook): Likewise. gas: * config/tc-arm.c (arm_adjust_symtab): Rename bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name. --------------090701010402090104080108 Content-Type: text/plain; name="patchpatch-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patchpatch-1" Content-length: 4315 Index: bfd/bfd-in.h =================================================================== RCS file: /cvs/src/src/bfd/bfd-in.h,v retrieving revision 1.96 diff -c -p -r1.96 bfd-in.h *** bfd/bfd-in.h 30 Mar 2005 16:21:58 -0000 1.96 --- bfd/bfd-in.h 30 Mar 2005 17:02:07 -0000 *************** extern bfd_boolean bfd_elf32_arm_add_glu *** 825,831 **** (bfd *, struct bfd_link_info *); /* ELF ARM mapping symbol support */ ! extern bfd_boolean bfd_elf32_is_arm_mapping_symbol_name (const char * name); /* ARM Note section processing. */ --- 825,831 ---- (bfd *, struct bfd_link_info *); /* ELF ARM mapping symbol support */ ! extern bfd_boolean bfd_is_arm_mapping_symbol_name (const char * name); /* ARM Note section processing. */ Index: bfd/cpu-arm.c =================================================================== RCS file: /cvs/src/src/bfd/cpu-arm.c,v retrieving revision 1.16 diff -c -p -r1.16 cpu-arm.c *** bfd/cpu-arm.c 30 Mar 2005 16:21:59 -0000 1.16 --- bfd/cpu-arm.c 30 Mar 2005 17:02:07 -0000 *************** bfd_arm_get_mach_from_notes (bfd *abfd, *** 402,408 **** } bfd_boolean ! bfd_elf32_is_arm_mapping_symbol_name (const char * name) { return (name != NULL) && (name[0] == '$') --- 402,408 ---- } bfd_boolean ! bfd_is_arm_mapping_symbol_name (const char * name) { return (name != NULL) && (name[0] == '$') Index: bfd/elf32-arm.c =================================================================== RCS file: /cvs/src/src/bfd/elf32-arm.c,v retrieving revision 1.29 diff -c -p -r1.29 elf32-arm.c *** bfd/elf32-arm.c 30 Mar 2005 16:21:59 -0000 1.29 --- bfd/elf32-arm.c 30 Mar 2005 17:02:08 -0000 *************** elf32_arm_check_relocs (bfd *abfd, struc *** 4710,4716 **** static bfd_boolean elf32_arm_is_target_special_symbol (bfd * abfd ATTRIBUTE_UNUSED, asymbol * sym) { ! return bfd_elf32_is_arm_mapping_symbol_name (sym->name); } /* This is a copy of elf_find_function() from elf.c except that --- 4710,4716 ---- static bfd_boolean elf32_arm_is_target_special_symbol (bfd * abfd ATTRIBUTE_UNUSED, asymbol * sym) { ! return bfd_is_arm_mapping_symbol_name (sym->name); } /* This is a copy of elf_find_function() from elf.c except that *************** arm_elf_find_function (bfd * abf *** 4748,4754 **** case STT_NOTYPE: /* Skip $a and $t symbols. */ if ((q->symbol.flags & BSF_LOCAL) ! && bfd_elf32_is_arm_mapping_symbol_name (q->symbol.name)) continue; /* Fall through. */ if (bfd_get_section (&q->symbol) == section --- 4748,4754 ---- case STT_NOTYPE: /* Skip $a and $t symbols. */ if ((q->symbol.flags & BSF_LOCAL) ! && bfd_is_arm_mapping_symbol_name (q->symbol.name)) continue; /* Fall through. */ if (bfd_get_section (&q->symbol) == section *************** elf32_arm_output_symbol_hook (struct bfd *** 6077,6083 **** return TRUE; /* We only want mapping symbols. */ ! if (! bfd_elf32_is_arm_mapping_symbol_name (name)) return TRUE; mapcount = ++(elf32_arm_section_data (input_sec)->mapcount); --- 6077,6083 ---- return TRUE; /* We only want mapping symbols. */ ! if (! bfd_is_arm_mapping_symbol_name (name)) return TRUE; mapcount = ++(elf32_arm_section_data (input_sec)->mapcount); Index: gas/config/tc-arm.c =================================================================== RCS file: /cvs/src/src/gas/config/tc-arm.c,v retrieving revision 1.200 diff -c -p -r1.200 tc-arm.c *** gas/config/tc-arm.c 30 Mar 2005 16:22:02 -0000 1.200 --- gas/config/tc-arm.c 30 Mar 2005 17:02:08 -0000 *************** arm_adjust_symtab (void) *** 13669,13675 **** elf_sym = elf_symbol (symbol_get_bfdsym (sym)); bind = ELF_ST_BIND (elf_sym->internal_elf_sym.st_info); ! if (! bfd_elf32_is_arm_mapping_symbol_name (elf_sym->symbol.name)) { /* If it's a .thumb_func, declare it as so, otherwise tag label as .code 16. */ --- 13669,13675 ---- elf_sym = elf_symbol (symbol_get_bfdsym (sym)); bind = ELF_ST_BIND (elf_sym->internal_elf_sym.st_info); ! if (! bfd_is_arm_mapping_symbol_name (elf_sym->symbol.name)) { /* If it's a .thumb_func, declare it as so, otherwise tag label as .code 16. */ --------------090701010402090104080108--