Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/i386 fix PIC code.
details: https://anonhg.NetBSD.org/src/rev/64a5cdd6db83
branches: trunk
changeset: 345892:64a5cdd6db83
user: christos <christos%NetBSD.org@localhost>
date: Tue Jun 14 03:05:24 2016 +0000
description:
fix PIC code.
diffstat:
sys/arch/i386/i386/cpu_in_cksum.S | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diffs (42 lines):
diff -r 70d418b90f53 -r 64a5cdd6db83 sys/arch/i386/i386/cpu_in_cksum.S
--- a/sys/arch/i386/i386/cpu_in_cksum.S Mon Jun 13 20:03:07 2016 +0000
+++ b/sys/arch/i386/i386/cpu_in_cksum.S Tue Jun 14 03:05:24 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_in_cksum.S,v 1.5 2016/05/30 22:58:52 christos Exp $ */
+/* $NetBSD: cpu_in_cksum.S,v 1.6 2016/06/14 03:05:24 christos Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_in_cksum.S,v 1.5 2016/05/30 22:58:52 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_in_cksum.S,v 1.6 2016/06/14 03:05:24 christos Exp $");
#include "assym.h"
@@ -329,9 +329,21 @@
ret
.Lout_of_mbufs:
- pushl $1f
+#ifdef __PIC__
+ PIC_PROLOGUE
+ leal PIC_GOTOFF(.Mout_of_mbufs_msg), %eax
+ pushl %eax
call PIC_PLT(_C_LABEL(printf))
leal 4(%esp), %esp
+ PIC_EPILOGUE
+#else
+ pushl .Mout_of_mbufs_msg
+ call _C_LABEL(printf)
+ leal 4(%esp), %esp
+#endif
jmp .Lreturn
-1:
+
+ .section .rodata
+ .type .Mout_of_mbufs_msg, @object
+.Mout_of_mbufs_msg:
.asciz "cksum: out of data\n"
Home |
Main Index |
Thread Index |
Old Index