^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) #!/bin/sh
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) # SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) nm="$1"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) file="$2"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) $nm "$file" | grep '^ *U' > /dev/null 2>&1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) if [ $? -eq 1 ]; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) exit 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) echo "$file: undefined symbols found" >&2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) exit 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) fi