blob: 5ca834545ed3275685f471dd8914f70ce8e66403 [file] [log] [blame]
Russell King96a8fae2016-10-18 19:57:01 +01001#!/bin/sh
2in="$1"
3out="$2"
4my_abis=`echo "($3)" | tr ',' '|'`
5
6grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
7 while read nr abi name entry compat; do
8 if [ "$abi" = "eabi" -a -n "$compat" ]; then
9 echo "$in: error: a compat entry for an EABI syscall ($name) makes no sense" >&2
10 exit 1
11 fi
12
13 if [ -n "$entry" ]; then
14 if [ -z "$compat" ]; then
15 echo "NATIVE($nr, $entry)"
16 else
17 echo "COMPAT($nr, $entry, $compat)"
18 fi
19 fi
20 done
21) > "$out"