failure of pructl (atexit/_Block_copy/--no-allow-shlib-undefined)

From: John-Mark Gurney <jmg_at_funkthat.com>
Date: Thu, 02 Dec 2021 02:03:26 UTC
Hello,

It seems like the recent changes to make --no-allow-shlib-undefined
broke pructl.

lib/libc/stdlib/atexit.c uses a weak _Block_copy symbol, but
pructl does not use atexit_b, and yet gets the following error:
: && /usr/bin/cc -Werror -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -std=c99 -fstack-protector-strong CMakeFiles/pructl.dir/pructl.c.o -o pructl  -Wl,-rpath,/usr/local/lib:  /usr/local/lib/libpru.so && :
ld: error: /lib/libc.so.7: undefined reference to _Block_copy [--no-allow-shlib-undefined]
cc: error: linker command failed with exit code 1 (use -v to see invocation)

What is the correct fix?  It seems like atexit.c or the linker should
be fixed, as pructl doesn't use atexit_b at all.

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."