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 Enhance the scripts to not use trampoli...
details: https://anonhg.NetBSD.org/src/rev/638a2c1fbc3f
branches: trunk
changeset: 557705:638a2c1fbc3f
user: matt <matt%NetBSD.org@localhost>
date: Fri Jan 16 00:35:48 2004 +0000
description:
Enhance the scripts to not use trampolines for symbols which are internal
to the module.
diffstat:
sys/lkm/arch/powerpc/lkmtramp.awk | 25 ++++++++++++++++++++++---
sys/lkm/arch/powerpc/lkmwrap.awk | 23 +++++++++++++++++++++--
2 files changed, 43 insertions(+), 5 deletions(-)
diffs (71 lines):
diff -r 989b7443b40c -r 638a2c1fbc3f sys/lkm/arch/powerpc/lkmtramp.awk
--- a/sys/lkm/arch/powerpc/lkmtramp.awk Thu Jan 15 20:31:40 2004 +0000
+++ b/sys/lkm/arch/powerpc/lkmtramp.awk Fri Jan 16 00:35:48 2004 +0000
@@ -1,13 +1,32 @@
-# $NetBSD: lkmtramp.awk,v 1.1 2003/02/19 19:04:27 matt Exp $
+# $NetBSD: lkmtramp.awk,v 1.2 2004/01/16 00:35:48 matt Exp $
#
BEGIN {
print "#include <machine/asm.h>"
}
+/^SYMBOL TABLE:/ {
+ doing_symbols = 1;
+ next;
+}
+
+/^RELOCATION RECORDS/ {
+ doing_symbols = 0;
+ doing_relocs = 1;
+ next;
+}
+
+$2 == "*UND*" {
+ if (doing_symbols)
+ x[$4] = "+";
+ next;
+}
+
$2 == "R_PPC_REL24" {
- if (x[$3] != "")
+ if (!doing_relocs)
next;
- print "ENTRY(__wrap_"$3")"
+ if (x[$3] != "+")
+ next;
+ print "\nENTRY(__wrap_"$3")"
print "\tlis\t0,__real_"$3"@h"
print "\tori\t0,0,__real_"$3"@l"
print "\tmtctr\t0"
diff -r 989b7443b40c -r 638a2c1fbc3f sys/lkm/arch/powerpc/lkmwrap.awk
--- a/sys/lkm/arch/powerpc/lkmwrap.awk Thu Jan 15 20:31:40 2004 +0000
+++ b/sys/lkm/arch/powerpc/lkmwrap.awk Fri Jan 16 00:35:48 2004 +0000
@@ -1,7 +1,26 @@
-# $NetBSD: lkmwrap.awk,v 1.1 2003/02/19 19:04:27 matt Exp $
+# $NetBSD: lkmwrap.awk,v 1.2 2004/01/16 00:35:48 matt Exp $
+#
+/^SYMBOL TABLE:/ {
+ doing_symbols = 1;
+ next;
+}
+
+/^RELOCATION RECORDS/ {
+ doing_symbols = 0;
+ doing_relocs = 1;
+ next;
+}
+
+$2 == "*UND*" {
+ if (doing_symbols)
+ x[$4] = "+";
+ next;
+}
$2 == "R_PPC_REL24" {
- if (x[$3] != "")
+ if (!doing_relocs)
+ next;
+ if (x[$3] != "+")
next;
printf " --wrap "$3;
x[$3]=".";
Home |
Main Index |
Thread Index |
Old Index