forked from Imagelibrary/binutils-gdb
* bfd/bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
* bfd/bfd-in2.h: Regenerate. * bfd/elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to bfd_elf32_is_arm_mapping_symbol_name. (elf32_arm_output_symbol_hook): Likewise. (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for mapping symbols. (is_arm_mapping_symbol_name): Function moved from here... * bfd/cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed and made global. * gas/config/tc-arm.c (mapping_state): Change documentation in function comment to cross-reference spec instead. Change type of mapping symbols to BSF_NO_TYPE. (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.
This commit is contained in:
@@ -4705,21 +4705,12 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
is_arm_mapping_symbol_name (const char * name)
|
||||
{
|
||||
return (name != NULL)
|
||||
&& (name[0] == '$')
|
||||
&& ((name[1] == 'a') || (name[1] == 't') || (name[1] == 'd'))
|
||||
&& (name[2] == 0);
|
||||
}
|
||||
|
||||
/* Treat mapping symbols as special target symbols. */
|
||||
|
||||
static bfd_boolean
|
||||
elf32_arm_is_target_special_symbol (bfd * abfd ATTRIBUTE_UNUSED, asymbol * sym)
|
||||
{
|
||||
return is_arm_mapping_symbol_name (sym->name);
|
||||
return bfd_elf32_is_arm_mapping_symbol_name (sym->name);
|
||||
}
|
||||
|
||||
/* This is a copy of elf_find_function() from elf.c except that
|
||||
@@ -4754,12 +4745,12 @@ arm_elf_find_function (bfd * abfd ATTRIBUTE_UNUSED,
|
||||
break;
|
||||
case STT_FUNC:
|
||||
case STT_ARM_TFUNC:
|
||||
case STT_NOTYPE:
|
||||
/* Skip $a and $t symbols. */
|
||||
if ((q->symbol.flags & BSF_LOCAL)
|
||||
&& is_arm_mapping_symbol_name (q->symbol.name))
|
||||
&& bfd_elf32_is_arm_mapping_symbol_name (q->symbol.name))
|
||||
continue;
|
||||
/* Fall through. */
|
||||
case STT_NOTYPE:
|
||||
if (bfd_get_section (&q->symbol) == section
|
||||
&& q->symbol.value >= low_func
|
||||
&& q->symbol.value <= offset)
|
||||
@@ -6086,7 +6077,7 @@ elf32_arm_output_symbol_hook (struct bfd_link_info *info,
|
||||
return TRUE;
|
||||
|
||||
/* We only want mapping symbols. */
|
||||
if (! is_arm_mapping_symbol_name (name))
|
||||
if (! bfd_elf32_is_arm_mapping_symbol_name (name))
|
||||
return TRUE;
|
||||
|
||||
mapcount = ++(elf32_arm_section_data (input_sec)->mapcount);
|
||||
|
||||
Reference in New Issue
Block a user