summaryrefslogtreecommitdiff
path: root/bfd/elf-m10300.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-03-01 20:39:07 +0000
committerNick Clifton <nickc@redhat.com>2000-03-01 20:39:07 +0000
commit6411b473f191088dafb03c3ebe958974a0ea7953 (patch)
tree003e87ba1459939f3a129b3f08bb15a40952d6cf /bfd/elf-m10300.c
parent77f9ff74cdb7619352fd286b90fbd31293a58f2b (diff)
downloadbinutils-redhat-6411b473f191088dafb03c3ebe958974a0ea7953.tar.gz
Fix building with --enable-targets=all
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 bb86497bc9..498f538a77 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);