summaryrefslogtreecommitdiff
path: root/sys/modules/arch/arm/kmodtramp.awk
blob: 2c2261bb4e41f54f9b1a8b4d05cdbe9c10fc9b24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#	$NetBSD: kmodtramp.awk,v 1.1 2013/08/07 17:06:22 matt Exp $
#
BEGIN {
	print "#include <machine/asm.h>"
}

$2 == "R_ARM_PC24" || $2 == "R_ARM_CALL" || $2 == "R_ARM_JUMP24" {
	if (x[$3] != "")
		next;
	if (index($3, ".text") > 0)
		next;
	fn=$3
	sub("__wrap_", "", fn)
	if (fn == $3)
		next;
	print "KMODTRAMPOLINE("fn")"
	x[$3]=".";
}