#include <link.h>
#include <assert.h>
-/* Search loaded objects' symbol tables for a definition of
+/* Search loaded objects' symbol tables for a definition of
the symbol UNDEF_NAME. If NOSELF is nonzero, then *REF
cannot satisfy the reference itself; some different binding
must be found. */
}
}
- if (weak_value.s == NULL)
+ if (weak_value.s == NULL && ELF32_ST_BIND ((*ref)->st_info) != STB_WEAK)
{
const char msg[] = "undefined symbol: ";
char buf[sizeof msg + strlen (undef_name)];