Source-Changes-HG archive

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

[src/trunk]: src/sys/lkm/arch/powerpc Add helper awk scripts for generating t...



details:   https://anonhg.NetBSD.org/src/rev/59382868bf9f
branches:  trunk
changeset: 543224:59382868bf9f
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Feb 19 19:04:27 2003 +0000

description:
Add helper awk scripts for generating trampolines for PowerPC LKMs.

diffstat:

 sys/lkm/arch/powerpc/lkmtramp.awk |  16 ++++++++++++++++
 sys/lkm/arch/powerpc/lkmwrap.awk  |   8 ++++++++
 2 files changed, 24 insertions(+), 0 deletions(-)

diffs (32 lines):

diff -r c3fbf2668354 -r 59382868bf9f sys/lkm/arch/powerpc/lkmtramp.awk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/lkm/arch/powerpc/lkmtramp.awk Wed Feb 19 19:04:27 2003 +0000
@@ -0,0 +1,16 @@
+#      $NetBSD: lkmtramp.awk,v 1.1 2003/02/19 19:04:27 matt Exp $
+#
+BEGIN {
+       print "#include <machine/asm.h>"
+}
+
+$2 == "R_PPC_REL24" {
+       if (x[$3] != "")
+               next;
+       print "ENTRY(__wrap_"$3")"
+       print "\tlis\t0,__real_"$3"@h"
+       print "\tori\t0,0,__real_"$3"@l"
+       print "\tmtctr\t0"
+       print "\tbctr"
+       x[$3]=".";
+}
diff -r c3fbf2668354 -r 59382868bf9f sys/lkm/arch/powerpc/lkmwrap.awk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/lkm/arch/powerpc/lkmwrap.awk  Wed Feb 19 19:04:27 2003 +0000
@@ -0,0 +1,8 @@
+#      $NetBSD: lkmwrap.awk,v 1.1 2003/02/19 19:04:27 matt Exp $
+
+$2 == "R_PPC_REL24" {
+       if (x[$3] != "")
+               next;
+       printf " --wrap "$3;
+       x[$3]=".";
+}



Home | Main Index | Thread Index | Old Index