1 1.1 matt # $NetBSD: kmodtramp.awk,v 1.1 2013/08/07 17:06:22 matt Exp $ 2 1.1 matt # 3 1.1 matt BEGIN { 4 1.1 matt print "#include <machine/asm.h>" 5 1.1 matt } 6 1.1 matt 7 1.1 matt $2 == "R_ARM_PC24" || $2 == "R_ARM_CALL" || $2 == "R_ARM_JUMP24" { 8 1.1 matt if (x[$3] != "") 9 1.1 matt next; 10 1.1 matt if (index($3, ".text") > 0) 11 1.1 matt next; 12 1.1 matt fn=$3 13 1.1 matt sub("__wrap_", "", fn) 14 1.1 matt if (fn == $3) 15 1.1 matt next; 16 1.1 matt print "KMODTRAMPOLINE("fn")" 17 1.1 matt x[$3]="."; 18 1.1 matt } 19