This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Fix type and alignment of ARM/Thumb EABI mapping symbols
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.
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. */