Skip to content

Commit c196c44

Browse files
committed
ci: name the object that references a symbol it must not
1 parent 40094fc commit c196c44

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,19 @@ jobs:
124124
# a frame it protects; supplied by the program, not called by this
125125
# implementation.
126126
permitted='^_?(memcpy|memmove|memset|memcmp|bzero|clock_gettime_nsec_np|pthread_create_from_mach_thread|pthread_create|pthread_join|__libc_start_main|main|kal_[a-z_]+|__stack_chk_guard|__stack_chk_fail|GCC_except_table.*|_ZN3okm.*|__Unwind_Resume)$'
127+
# Reported with the object that references it. A symbol without the
128+
# object it came from names a fault and not a place, and the first
129+
# time this check fired the answer was in the object rather than in
130+
# the symbol.
127131
bad=0
128-
for s in $(nm -u $objs | sed 's/^ *//' | grep -v ':$' | sort -u); do
129-
[ -n "$s" ] || continue
130-
printf '%s\n' "$s" | grep -qE "$permitted" || {
131-
echo "the implementation references a symbol it must not: $s" >&2
132-
bad=1
133-
}
132+
for o in $objs; do
133+
for s in $(nm -u "$o" | sed 's/^ *//' | grep -v ':$' | sort -u); do
134+
[ -n "$s" ] || continue
135+
printf '%s\n' "$s" | grep -qE "$permitted" || {
136+
echo "$o references a symbol it must not: $s" >&2
137+
bad=1
138+
}
139+
done
134140
done
135141
test "$bad" -eq 0
136142
echo "the implementation reaches nothing of a C library but the two names that are named"

0 commit comments

Comments
 (0)