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