Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc/sparc sparc relative reloctions are busted he...



details:   https://anonhg.NetBSD.org/src/rev/3dca0d4a0a46
branches:  trunk
changeset: 765949:3dca0d4a0a46
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Jun 12 01:29:58 2011 +0000

description:
sparc relative reloctions are busted here; copy the sparc64 style
which seems to make things work fine, and also seems to follow what
ld.elf_so does.

this makes modules work in my limited testing.

diffstat:

 sys/arch/sparc/sparc/kobj_machdep.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 451af2f01a39 -r 3dca0d4a0a46 sys/arch/sparc/sparc/kobj_machdep.c
--- a/sys/arch/sparc/sparc/kobj_machdep.c       Sun Jun 12 01:28:29 2011 +0000
+++ b/sys/arch/sparc/sparc/kobj_machdep.c       Sun Jun 12 01:29:58 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kobj_machdep.c,v 1.2 2008/04/28 20:23:36 martin Exp $  */
+/*     $NetBSD: kobj_machdep.c,v 1.3 2011/06/12 01:29:58 mrg Exp $     */
 
 /*-
  * Copyright (c) 1999, 2002, 2008 The NetBSD Foundation, Inc.
@@ -160,7 +160,7 @@
                addr = kobj_sym_lookup(ko, symidx);
                if (addr == 0)
                        return -1;
-               value += (Elf_Word)(relocbase + addr);
+               value += addr;
        }
 
        if (RELOC_PC_RELATIVE(type)) {



Home | Main Index | Thread Index | Old Index