aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-08-03 16:58:26 +0000
committerMark Mitchell <mark@codesourcery.com>1999-08-03 16:58:26 +0000
commit3811169e5f5d8001a26886e2f04f46e188a275ec (patch)
tree82f2d06f771fd46e3f470965df7cd789bb8a53cc
parent18069efc88a146c810d69cf0d3f28e108684d597 (diff)
downloadgdb-3811169e5f5d8001a26886e2f04f46e188a275ec.zip
gdb-3811169e5f5d8001a26886e2f04f46e188a275ec.tar.gz
gdb-3811169e5f5d8001a26886e2f04f46e188a275ec.tar.bz2
* elf32-mips.c (mips_elf_calculate_relocation): Restore
_DYNAMIC_LINK handling and handling of undefined symbols in shared libraries.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-mips.c13
2 files changed, 19 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 487589a..980c633 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+1999-08-03 Mark Mitchell <mark@codesourcery.com>
+
+ * elf32-mips.c (mips_elf_calculate_relocation): Restore
+ _DYNAMIC_LINK handling and handling of undefined symbols in shared
+ libraries.
+
1999-08-03 Ian Lance Taylor <ian@zembu.com>
* elf32-ppc.c (ppc_elf_relocate_section): Don't use the relocation
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 945d3a5..dd2c55c 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -5877,6 +5877,19 @@ mips_elf_calculate_relocation (abfd,
and check to see if they exist by looking at their
addresses. */
symbol = 0;
+ else if (info->shared && !info->symbolic && !info->no_undefined)
+ relocation = 0;
+ else if (strcmp (h->root.root.root.string, "_DYNAMIC_LINK") == 0)
+ {
+ /* If this is a dynamic link, we should have created a
+ _DYNAMIC_LINK symbol in mips_elf_create_dynamic_sections.
+ Otherwise, we should define the symbol with a value of 0.
+ FIXME: It should probably get into the symbol table
+ somehow as well. */
+ BFD_ASSERT (! info->shared);
+ BFD_ASSERT (bfd_get_section_by_name (abfd, ".dynamic") == NULL);
+ relocation = 0;
+ }
else
{
(*info->callbacks->undefined_symbol)