Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amd64/amd64 handle PIC compilation (if we are build...



details:   https://anonhg.NetBSD.org/src/rev/2a49a8c6ffdd
branches:  trunk
changeset: 339164:2a49a8c6ffdd
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jun 30 21:08:24 2015 +0000

description:
handle PIC compilation (if we are building a PIE system; this is used by tests)

diffstat:

 sys/arch/amd64/amd64/cpu_in_cksum.S |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r 9f76752f3516 -r 2a49a8c6ffdd sys/arch/amd64/amd64/cpu_in_cksum.S
--- a/sys/arch/amd64/amd64/cpu_in_cksum.S       Tue Jun 30 17:18:13 2015 +0000
+++ b/sys/arch/amd64/amd64/cpu_in_cksum.S       Tue Jun 30 21:08:24 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_in_cksum.S,v 1.2 2013/06/22 05:56:32 uebayasi Exp $ */
+/* $NetBSD: cpu_in_cksum.S,v 1.3 2015/06/30 21:08:24 christos Exp $ */
 
 /*-
  * Copyright (c) 2008 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -285,9 +285,13 @@
        ret
 
 .Mout_of_mbufs:
+#ifdef __PIC__
+       leaq    .Mout_of_mbufs_msg(%rip), %rdi
+#else
        movq    $.Mout_of_mbufs_msg, %rdi
+#endif
        movl    $0, %eax
-       call    _C_LABEL(printf)
+       call    PIC_PLT(_C_LABEL(printf))
        jmp     .Mreturn
 END(cpu_in_cksum)
 



Home | Main Index | Thread Index | Old Index