Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/ld.elf_so/arch/mips Temporary workaround for some bi...
details: https://anonhg.NetBSD.org/src/rev/0c341c6e0924
branches: trunk
changeset: 552383:0c341c6e0924
user: mycroft <mycroft%NetBSD.org@localhost>
date: Wed Sep 24 09:55:35 2003 +0000
description:
Temporary workaround for some binutils/ld lossage. See the comment for more
information.
diffstat:
libexec/ld.elf_so/arch/mips/mips_reloc.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r 388f782f2036 -r 0c341c6e0924 libexec/ld.elf_so/arch/mips/mips_reloc.c
--- a/libexec/ld.elf_so/arch/mips/mips_reloc.c Wed Sep 24 07:15:52 2003 +0000
+++ b/libexec/ld.elf_so/arch/mips/mips_reloc.c Wed Sep 24 09:55:35 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_reloc.c,v 1.40 2003/07/26 15:04:41 mrg Exp $ */
+/* $NetBSD: mips_reloc.c,v 1.41 2003/09/24 09:55:35 mycroft Exp $ */
/*
* Copyright 1997 Michael L. Hitch <mhitch%montana.edu@localhost>
@@ -201,11 +201,21 @@
} else
#endif
if (ELF_ST_TYPE(sym->st_info) == STT_FUNC &&
- sym->st_value != 0) {
+ sym->st_value != 0 && sym->st_shndx == SHN_UNDEF) {
/*
* If there are non-PLT references to the function,
* st_value should be 0, forcing us to resolve the
* address immediately.
+ *
+ * XXX DANGER WILL ROBINSON!
+ * The linker is not outputting PLT slots for calls to
+ * functions that are defined in the same shared
+ * library. This is a bug. For now, if there is a
+ * definition, we fail the test above and do not do
+ * lazy binding for this GOT slot. Unfortunately, a
+ * similar problem also seems to happen with references
+ * to data items, and we can't fix that here.
+ * - mycroft, 2003/09/24
*/
*got = sym->st_value + (Elf_Addr)obj->relocbase;
} else if (sym->st_info == ELF_ST_INFO(STB_GLOBAL, STT_SECTION)) {
Home |
Main Index |
Thread Index |
Old Index