aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2003-07-09 11:51:53 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2003-07-09 11:51:53 +0000
commitfdd07405582d22ef5ceb04fe805e5c32dc9ca12e (patch)
treeb616eac412fde077e93fe0dadd54caf018bf3bca /bfd
parentd2fba50dd9b5c642037b6d12f1a39a28ede61dee (diff)
downloadgdb-fdd07405582d22ef5ceb04fe805e5c32dc9ca12e.zip
gdb-fdd07405582d22ef5ceb04fe805e5c32dc9ca12e.tar.gz
gdb-fdd07405582d22ef5ceb04fe805e5c32dc9ca12e.tar.bz2
* bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
forced-local symbols like other locals. Don't create relocations against STN_UNDEF in irix objects.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elfxx-mips.c16
2 files changed, 16 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b9f0b2e..426c76c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
2003-07-09 Richard Sandiford <rsandifo@redhat.com>
+ * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
+ forced-local symbols like other locals. Don't create relocations
+ against STN_UNDEF in irix objects.
+
+2003-07-09 Richard Sandiford <rsandifo@redhat.com>
+
* bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
compatible objects, add the values of defined external symbols
to the addend.
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 00dc084..bef1c79 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -3893,13 +3893,12 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
in the relocation. */
if (h != NULL
&& (! info->symbolic || (h->root.elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))
- {
- indx = h->root.dynindx;
+ & ELF_LINK_HASH_DEF_REGULAR) == 0)
/* h->root.dynindx may be -1 if this symbol was marked to
become local. */
- if (indx == -1)
- indx = 0;
+ && h->root.dynindx != -1)
+ {
+ indx = h->root.dynindx;
if (SGI_COMPAT (output_bfd))
defined_p = ((h->root.elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) != 0);
@@ -3937,7 +3936,12 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
section-relative relocations. It's not like they're
useful, after all. This should be a bit more efficient
as well. */
- indx = 0;
+ /* ??? Although this behavior is compatible with glibc's ld.so,
+ the ABI says that relocations against STN_UNDEF should have
+ a symbol value of 0. Irix rld honors this, so relocations
+ against STN_UNDEF have no effect. */
+ if (!SGI_COMPAT (output_bfd))
+ indx = 0;
defined_p = TRUE;
}