aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-m10300.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf-m10300.c')
-rw-r--r--bfd/elf-m10300.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index bb86497..498f538 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -849,7 +849,7 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
{
struct elf32_mn10300_link_hash_entry *hash;
Elf_Internal_Sym *sym;
- asection *sym_sec;
+ asection *sym_sec = NULL;
const char *sym_name;
char *new_name;
@@ -930,7 +930,7 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
sym_sec = bfd_abs_section_ptr;
else if (isym.st_shndx == SHN_COMMON)
sym_sec = bfd_com_section_ptr;
-
+
sym_name = bfd_elf_string_from_elf_section (input_bfd,
symtab_hdr->sh_link,
isym.st_name);
@@ -1193,7 +1193,7 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
{
Elf_Internal_Sym isym;
struct elf32_mn10300_link_hash_entry *sym_hash;
- asection *sym_sec;
+ asection *sym_sec = NULL;
const char *sym_name;
char *new_name;
@@ -1211,7 +1211,9 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
sym_sec = bfd_abs_section_ptr;
else if (isym.st_shndx == SHN_COMMON)
sym_sec = bfd_com_section_ptr;
-
+ else
+ abort ();
+
sym_name = bfd_elf_string_from_elf_section (input_bfd,
symtab_hdr->sh_link,
isym.st_name);
@@ -1461,7 +1463,7 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
{
Elf_Internal_Sym isym;
- asection *sym_sec;
+ asection *sym_sec = NULL;
const char *sym_name;
char *new_name;
@@ -1478,7 +1480,9 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
sym_sec = bfd_abs_section_ptr;
else if (isym.st_shndx == SHN_COMMON)
sym_sec = bfd_com_section_ptr;
-
+ else
+ abort ();
+
symval = (isym.st_value
+ sym_sec->output_section->vma
+ sym_sec->output_offset);