aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2003-07-09 11:48:17 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2003-07-09 11:48:17 +0000
commit6eaa6adc99a33e9961fa926ad08430a59cc953cd (patch)
tree8216a11aa6c9abd9c78cfe992c0ed3e93d8ebc58 /bfd/elfxx-mips.c
parent115695a81d0bdf18ff318951cdddfa6153782268 (diff)
downloadgdb-6eaa6adc99a33e9961fa926ad08430a59cc953cd.zip
gdb-6eaa6adc99a33e9961fa926ad08430a59cc953cd.tar.gz
gdb-6eaa6adc99a33e9961fa926ad08430a59cc953cd.tar.bz2
* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
initialize a GOT entry to the symbol's st_value.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 801903f..986ba69 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -6732,22 +6732,7 @@ _bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
bfd_vma offset;
bfd_vma value;
- if (sym->st_value)
- value = sym->st_value;
- else
- {
- /* For an entity defined in a shared object, this will be
- NULL. (For functions in shared objects for
- which we have created stubs, ST_VALUE will be non-NULL.
- That's because such the functions are now no longer defined
- in a shared object.) */
-
- if ((info->shared && h->root.type == bfd_link_hash_undefined)
- || h->root.type == bfd_link_hash_undefweak)
- value = 0;
- else
- value = h->root.u.def.value;
- }
+ value = sym->st_value;
offset = mips_elf_global_got_index (dynobj, output_bfd, h);
MIPS_ELF_PUT_WORD (output_bfd, value, sgot->contents + offset);
}