aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2001-08-30 21:26:26 +0000
committerH.J. Lu <hjl.tools@gmail.com>2001-08-30 21:26:26 +0000
commit2bab97856da7437912bee19ffaf296cccc14ab04 (patch)
tree81eb642316554a0ba91e8663d1611d2301f07878
parentf41e352811dd407e8acc3dc2d95a2e7c9e147178 (diff)
downloadgdb-2bab97856da7437912bee19ffaf296cccc14ab04.zip
gdb-2bab97856da7437912bee19ffaf296cccc14ab04.tar.gz
gdb-2bab97856da7437912bee19ffaf296cccc14ab04.tar.bz2
2001-08-30 H.J. Lu <hjl@gnu.org>
* elf32-mips.c (mips_elf_calculate_relocation): Revert the last 2 changes. (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic relocations for weak definitions.
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf32-mips.c10
2 files changed, 12 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index afbae91..1eba7a8 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,12 @@
2001-08-30 H.J. Lu <hjl@gnu.org>
+ * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
+ 2 changes.
+ (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
+ relocations for weak definitions.
+
+2001-08-30 H.J. Lu <hjl@gnu.org>
+
* Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
(BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
* Makefile.in: Rebuild.
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 4d224df..6eecd55 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -6332,10 +6332,8 @@ mips_elf_calculate_relocation (abfd,
if ((info->shared
|| (elf_hash_table (info)->dynamic_sections_created
&& h != NULL
- && h->root.root.type != bfd_link_hash_undefweak
- && (h->root.root.type == bfd_link_hash_defweak
- || (h->root.elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)))
+ && ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)
+ != 0)))
&& (input_section->flags & SEC_ALLOC) != 0)
{
/* If we're creating a shared library, or this relocation is
@@ -8135,7 +8133,9 @@ _bfd_mips_elf_adjust_dynamic_symbol (info, h)
hmips = (struct mips_elf_link_hash_entry *) h;
if (! info->relocateable
&& hmips->possibly_dynamic_relocs != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && (h->root.type == bfd_link_hash_defweak
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))
{
mips_elf_allocate_dynamic_relocations (dynobj,
hmips->possibly_dynamic_relocs);