public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Julian Brown <julian@codesourcery.com>
To: Richard Earnshaw <rearnsha@gcc.gnu.org>
Cc: Paul Brook <paul@codesourcery.com>,
	 binutils@sources.redhat.com,
	 Julian Brown <julian@codesourcery.com>
Subject: Re: [PATCH] Fix type and alignment of ARM/Thumb EABI	mapping	symbols
Date: Thu, 31 Mar 2005 02:17:00 -0000	[thread overview]
Message-ID: <424ADC3C.8080004@codesourcery.com> (raw)
In-Reply-To: <1112200646.1680.9.camel@pc960.cambridge.arm.com>

[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]

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.

[-- Attachment #2: patchpatch-1 --]
[-- Type: text/plain, Size: 4315 bytes --]

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.  */

  reply	other threads:[~2005-03-30 17:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-28  8:41 Julian Brown
2005-03-28 10:17 ` Daniel Jacobowitz
2005-03-28 10:36   ` Julian Brown
2005-03-29 16:54 ` Richard Earnshaw
2005-03-29 17:25   ` Daniel Jacobowitz
2005-03-30 15:31   ` Julian Brown
2005-03-30 17:05     ` Richard Earnshaw
2005-03-30 21:08       ` Paul Brook
2005-03-30 21:11         ` Julian Brown
2005-03-31  0:27           ` Richard Earnshaw
2005-03-31  0:34             ` Julian Brown
2005-03-31  0:58               ` Richard Earnshaw
2005-03-31  2:17                 ` Julian Brown [this message]
2005-03-31 15:25                   ` Richard Earnshaw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=424ADC3C.8080004@codesourcery.com \
    --to=julian@codesourcery.com \
    --cc=binutils@sources.redhat.com \
    --cc=paul@codesourcery.com \
    --cc=rearnsha@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).