aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2010-10-11 09:11:34 +0000
committerAlan Modra <amodra@gmail.com>2010-10-11 09:11:34 +0000
commit0d13b9a6337cb3fcc07f38afc9da998e790ea939 (patch)
tree0a6d4245f3bf2a689aaaf72bfecf04dc50189278
parent0bc37e5bfe9a3e6d8d96983eba0ca9020f8e9459 (diff)
downloadgdb-0d13b9a6337cb3fcc07f38afc9da998e790ea939.zip
gdb-0d13b9a6337cb3fcc07f38afc9da998e790ea939.tar.gz
gdb-0d13b9a6337cb3fcc07f38afc9da998e790ea939.tar.bz2
* elf32-frv.c (elf32_frv_relocate_section): Set "name" for global syms.
(elf32_frvfdpic_finish_dynamic_sections): Don't crash on __ROFIXUP_END__ defined in shared lib.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-frv.c9
2 files changed, 12 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index fcfa945..2e18e8c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2010-10-11 Alan Modra <amodra@gmail.com>
+
+ * elf32-frv.c (elf32_frv_relocate_section): Set "name" for global syms.
+ (elf32_frvfdpic_finish_dynamic_sections): Don't crash on
+ __ROFIXUP_END__ defined in shared lib.
+
2010-10-11 Thomas Schwinge <thomas@codesourcery.com>
* elf32-arm.c (elf32_arm_final_link_relocate)
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index 2acc917..f6975f3 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -2770,7 +2770,7 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
struct elf_link_hash_entry *h;
bfd_vma relocation;
bfd_reloc_status_type r;
- const char * name = NULL;
+ const char *name;
int r_type;
asection *osec;
struct frvfdpic_relocs_info *picrel;
@@ -2796,7 +2796,8 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
- name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name;
+ if (name == NULL || name[0] == 0)
+ name = bfd_section_name (input_bfd, sec);
}
else
{
@@ -2808,6 +2809,7 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
h, sec, relocation,
unresolved_reloc, warned);
osec = sec;
+ name = h->root.root.string;
}
if (sec != NULL && elf_discarded_section (sec))
@@ -5896,7 +5898,8 @@ elf32_frvfdpic_finish_dynamic_sections (bfd *output_bfd,
FALSE, FALSE, TRUE);
if (hend
&& (hend->type == bfd_link_hash_defined
- || hend->type == bfd_link_hash_defweak))
+ || hend->type == bfd_link_hash_defweak)
+ && hend->u.def.section->output_section != NULL)
{
bfd_vma value =
frvfdpic_gotfixup_section (info)->output_section->vma