when resolving symbols with only weak defs, use first def, not last def
[musl] / src / regex /
drwxr-xr-x   ..
-rw-r--r-- 3119 fnmatch.c
-rw-r--r-- 5080 glob.c
-rw-r--r-- 86216 regcomp.c
-rw-r--r-- 2049 regerror.c
-rw-r--r-- 31180 regexec.c
-rw-r--r-- 3739 tre-mem.c
-rw-r--r-- 7691 tre.h