mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 22:48:57 +08:00
* elf32-score.c (_bfd_score_elf_relocate_section): Move assignment
to "name" so that compiler realizes it is never uninitialized. Use bfd_elf_sym_name.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2006-09-27 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* elf32-score.c (_bfd_score_elf_relocate_section): Move assignment
|
||||||
|
to "name" so that compiler realizes it is never uninitialized.
|
||||||
|
Use bfd_elf_sym_name.
|
||||||
|
|
||||||
2006-09-26 H.J. Lu <hongjiu.lu@intel.com>
|
2006-09-26 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR binutils/3262
|
PR binutils/3262
|
||||||
|
@ -2308,9 +2308,13 @@ _bfd_score_elf_relocate_section (bfd *output_bfd,
|
|||||||
{
|
{
|
||||||
sym = local_syms + r_symndx;
|
sym = local_syms + r_symndx;
|
||||||
sec = local_sections[r_symndx];
|
sec = local_sections[r_symndx];
|
||||||
relocation = (sec->output_section->vma + sec->output_offset + sym->st_value);
|
relocation = (sec->output_section->vma
|
||||||
|
+ sec->output_offset
|
||||||
|
+ sym->st_value);
|
||||||
|
name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym, sec);
|
||||||
|
|
||||||
if ((sec->flags & SEC_MERGE) && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
|
if ((sec->flags & SEC_MERGE)
|
||||||
|
&& ELF_ST_TYPE (sym->st_info) == STT_SECTION)
|
||||||
{
|
{
|
||||||
asection *msec;
|
asection *msec;
|
||||||
bfd_vma addend, value;
|
bfd_vma addend, value;
|
||||||
@ -2432,13 +2436,6 @@ _bfd_score_elf_relocate_section (bfd *output_bfd,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (h == NULL)
|
|
||||||
{
|
|
||||||
name = (bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link, sym->st_name));
|
|
||||||
if (name == NULL || *name == '\0')
|
|
||||||
name = bfd_section_name (input_bfd, sec);
|
|
||||||
}
|
|
||||||
|
|
||||||
r = score_elf_final_link_relocate (howto, input_bfd, output_bfd,
|
r = score_elf_final_link_relocate (howto, input_bfd, output_bfd,
|
||||||
input_section, contents, rel, relocs,
|
input_section, contents, rel, relocs,
|
||||||
relocation, info, sec, name,
|
relocation, info, sec, name,
|
||||||
|
Reference in New Issue
Block a user