Gentoo Archives: gentoo-commits

From: "Anthony G. Basile (blueness)" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/musl/files: musl-fix-mips-dynlink.patch
Date: Mon, 30 Jun 2014 13:45:35
Message-Id: 20140630134527.4A5212004E@flycatcher.gentoo.org
1 blueness 14/06/30 13:45:27
2
3 Added: musl-fix-mips-dynlink.patch
4 Log:
5 Add fix for mips dynlink, upstream commit 2d8cc92a
6
7 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)
8
9 Revision Changes Path
10 1.1 sys-libs/musl/files/musl-fix-mips-dynlink.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/musl/files/musl-fix-mips-dynlink.patch?rev=1.1&view=markup
13 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
14
15 Index: musl-fix-mips-dynlink.patch
16 ===================================================================
17 diff --git a/arch/mips/reloc.h b/arch/mips/reloc.h
18 index 91fa097..4b81d32 100644
19 --- a/arch/mips/reloc.h
20 +++ b/arch/mips/reloc.h
21 @@ -86,3 +86,4 @@ static void do_arch_relocs(struct dso *this, struct dso *head)
22
23 #define NEED_ARCH_RELOCS 1
24 #define DYNAMIC_IS_RO 1
25 +#define ARCH_SYM_REJECT_UND(s) (!((s)->st_other & STO_MIPS_PLT))
26 diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c
27 index a08300d..55124ff 100644
28 --- a/src/ldso/dynlink.c
29 +++ b/src/ldso/dynlink.c
30 @@ -233,6 +233,10 @@ static Sym *gnu_lookup(const char *s, uint32_t h1, struct dso *dso)
31 #define OK_TYPES (1<<STT_NOTYPE | 1<<STT_OBJECT | 1<<STT_FUNC | 1<<STT_COMMON | 1<<STT_TLS)
32 #define OK_BINDS (1<<STB_GLOBAL | 1<<STB_WEAK | 1<<STB_GNU_UNIQUE)
33
34 +#ifndef ARCH_SYM_REJECT_UND
35 +#define ARCH_SYM_REJECT_UND(s) 0
36 +#endif
37 +
38 static struct symdef find_sym(struct dso *dso, const char *s, int need_def)
39 {
40 uint32_t h = 0, gh = 0;
41 @@ -249,7 +253,8 @@ static struct symdef find_sym(struct dso *dso, const char *s, int need_def)
42 }
43 if (!sym) continue;
44 if (!sym->st_shndx)
45 - if (need_def || (sym->st_info&0xf) == STT_TLS)
46 + if (need_def || (sym->st_info&0xf) == STT_TLS
47 + || ARCH_SYM_REJECT_UND(sym))
48 continue;
49 if (!sym->st_value)
50 if ((sym->st_info&0xf) != STT_TLS)