diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2013-01-20 23:00:23 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2013-01-20 23:00:23 +0000 |
commit | 13726355595f5d0c6ee8bb3f6afee91ccc824d8f (patch) | |
tree | efb08e84c98c63e828457950c0306931c9275b19 | |
parent | 898f878c3cb865afba2b35750d625f80fdb8e9b7 (diff) |
Fix PIC_LOAD and PIC_STORE macros to really access the variable, instead of
the GOT pointer. Oops.
-rw-r--r-- | lib/libc/arch/m88k/SYS.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/libc/arch/m88k/SYS.h b/lib/libc/arch/m88k/SYS.h index 266bb99d301..be6e15a3939 100644 --- a/lib/libc/arch/m88k/SYS.h +++ b/lib/libc/arch/m88k/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.14 2013/01/11 21:21:48 miod Exp $*/ +/* $OpenBSD: SYS.h,v 1.15 2013/01/20 23:00:22 miod Exp $*/ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -61,17 +61,19 @@ #if __PIC__ > 1 #define PIC_LOAD(reg,sym) \ or.u %r11, %r0, %hi16(__CONCAT(sym,#got_rel)); \ - or %r11, %r11, %lo16(__CONCAT(sym,#got_rel)); \ + ld %r11, %r11, %lo16(__CONCAT(sym,#got_rel)); \ ld reg, %r25, %r11 #define PIC_STORE(reg,sym) \ or.u %r11, %r0, %hi16(__CONCAT(sym,#got_rel)); \ - or %r11, %r11, %lo16(__CONCAT(sym,#got_rel)); \ + ld %r11, %r11, %lo16(__CONCAT(sym,#got_rel)); \ st reg, %r25, %r11 #else /* -fpic */ #define PIC_LOAD(reg,sym) \ - ld reg, %r25, __CONCAT(sym,#got_rel) + ld %r11, %r25, __CONCAT(sym,#got_rel); \ + ld reg, %r11, %r0 #define PIC_STORE(reg,sym) \ - st reg, %r25, __CONCAT(sym,#got_rel) + ld %r11, %r25, __CONCAT(sym,#got_rel); \ + st reg, %r11, %r0 #endif #else #define CERROR __cerror |