blueness    14/06/30 13:45:27

  Added:                musl-fix-mips-dynlink.patch
  Log:
  Add fix for mips dynlink, upstream commit 2d8cc92a
  
  (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 
0xF52D4BBA)

Revision  Changes    Path
1.1                  sys-libs/musl/files/musl-fix-mips-dynlink.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/musl/files/musl-fix-mips-dynlink.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/musl/files/musl-fix-mips-dynlink.patch?rev=1.1&content-type=text/plain

Index: musl-fix-mips-dynlink.patch
===================================================================
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<<STT_NOTYPE | 1<<STT_OBJECT | 1<<STT_FUNC | 1<<STT_COMMON 
| 1<<STT_TLS)
 #define OK_BINDS (1<<STB_GLOBAL | 1<<STB_WEAK | 1<<STB_GNU_UNIQUE)
 
+#ifndef ARCH_SYM_REJECT_UND
+#define ARCH_SYM_REJECT_UND(s) 0
+#endif
+
 static struct symdef find_sym(struct dso *dso, const char *s, int need_def)
 {
        uint32_t h = 0, gh = 0;
@@ -249,7 +253,8 @@ static struct symdef find_sym(struct dso *dso, const char 
*s, int need_def)
                }
                if (!sym) continue;
                if (!sym->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)




Reply via email to