diff --git a/arch/mips/reloc.h b/arch/mips/reloc.h index 91fa097..4b81d32 100644 --- a/arch/mips/reloc.h +++ b/arch/mips/reloc.h @@ -86,3 +86,4 @@ static void do_arch_relocs(struct dso *this, struct dso *head) #define NEED_ARCH_RELOCS 1 #define DYNAMIC_IS_RO 1 +#define ARCH_SYM_REJECT_UND(s) (!((s)->st_other & STO_MIPS_PLT)) diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index a08300d..55124ff 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c @@ -233,6 +233,10 @@ static Sym *gnu_lookup(const char *s, uint32_t h1, struct dso *dso) #define OK_TYPES (1<st_shndx) - if (need_def || (sym->st_info&0xf) == STT_TLS) + if (need_def || (sym->st_info&0xf) == STT_TLS + || ARCH_SYM_REJECT_UND(sym)) continue; if (!sym->st_value) if ((sym->st_info&0xf) != STT_TLS)