summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authormatt <matt@NetBSD.org>2000-11-02 16:14:37 +0000
committermatt <matt@NetBSD.org>2000-11-02 16:14:37 +0000
commitd87584c459718786d50eecd9239cffd173d3fe6a (patch)
treef3971fbfde3c2ae257a0a43e7c467d63ee67c352 /gnu
parent746166e492a22bda56474be0e4f66cbfe1963f64 (diff)
On VAX, JMPTAB reloc use EXTERN as a type bit. However, they are always
EXTERN so we always need to emit them. This fixes various problem with using JMP instruction in libc and libm.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/ld/ld/ld.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gnu/usr.bin/ld/ld/ld.c b/gnu/usr.bin/ld/ld/ld.c
index e62d8a3037a..da2b82d5030 100644
--- a/gnu/usr.bin/ld/ld/ld.c
+++ b/gnu/usr.bin/ld/ld/ld.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ld.c,v 1.71 2000/10/27 01:05:30 mycroft Exp $ */
+/* $NetBSD: ld.c,v 1.72 2000/11/02 16:14:37 matt Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -88,7 +88,7 @@
#ifndef lint
/* from: "@(#)ld.c 6.10 (Berkeley) 5/22/91"; */
-__RCSID("$NetBSD: ld.c,v 1.71 2000/10/27 01:05:30 mycroft Exp $");
+__RCSID("$NetBSD: ld.c,v 1.72 2000/11/02 16:14:37 matt Exp $");
#endif /* not lint */
#define GNU_BINUTIL_COMPAT /* forwards compatiblity with binutils 2.x */
@@ -3158,6 +3158,12 @@ perform_relocation(data, data_size, reloc, nreloc, entry, dataseg)
} else if (!RELOC_EXTERN_P(r)) {
#if JMPSLOT_NONEXTERN_ARE_INTERMODULE
relocation = addend + sp->value;
+#ifdef DEBUG
+ printf("perform_relocation: jmpslot: %#x=%#lx (addend=%#lx %s=%#lx)\n",
+ pc_relocation + addr,
+ relocation - pc_relocation,
+ addend, sp->name, sp->value);
+#endif
#else
relocation = addend +
data_relocation - text_relocation;
@@ -3464,7 +3470,7 @@ coptxtrel(entry)
symindex = RELOC_SYMBOL(r);
lsp = &entry->symbols[symindex];
- if (!RELOC_EXTERN_P(r)) {
+ if (!RELOC_EXTERN_P(r) && !RELOC_JMPTAB_P(r)) {
if (!pic_code_seen)
continue;
if (RELOC_BASEREL_P(r))