aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-mips.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-10-04 16:09:03 +0000
committerAlan Modra <amodra@gmail.com>2001-10-04 16:09:03 +0000
commit58e3d09d2a5873fe862f5d080786a09801cadc7c (patch)
treec816e5f85ca8cd4b9392594c06cf81db8fe8a47e /bfd/elf32-mips.c
parentd828d54ea47bb8809b106011ff59f1e2bfad6305 (diff)
downloadgdb-58e3d09d2a5873fe862f5d080786a09801cadc7c.zip
gdb-58e3d09d2a5873fe862f5d080786a09801cadc7c.tar.gz
gdb-58e3d09d2a5873fe862f5d080786a09801cadc7c.tar.bz2
* elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
copying flags if this is a weakdef.
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r--bfd/elf32-mips.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index fd79bba..6f39d9f 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -8074,7 +8074,8 @@ _bfd_mips_elf_gc_sweep_hook (abfd, info, sec, relocs)
/* Copy data from a MIPS ELF indirect symbol to its direct symbol,
hiding the old indirect symbol. Process additional relocation
- information. */
+ information. Also called for weakdefs, in which case we just let
+ _bfd_elf_link_hach_copy_indirect copy the flags for us. */
static void
_bfd_mips_elf_copy_indirect_symbol (dir, ind)
@@ -8084,6 +8085,9 @@ _bfd_mips_elf_copy_indirect_symbol (dir, ind)
_bfd_elf_link_hash_copy_indirect (dir, ind);
+ if (dir == ind->weakdef)
+ return;
+
dirmips = (struct mips_elf_link_hash_entry *) dir;
indmips = (struct mips_elf_link_hash_entry *) ind;
dirmips->possibly_dynamic_relocs += indmips->possibly_dynamic_relocs;