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