1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
Delivered-To: natanael.copa@gmail.com
Received: by 10.204.57.144 with SMTP id c16cs140877bkh;
Tue, 27 Apr 2010 04:45:38 -0700 (PDT)
Received: by 10.115.117.31 with SMTP id u31mr2295920wam.70.1272368736591;
Tue, 27 Apr 2010 04:45:36 -0700 (PDT)
Return-Path: <uclibc-bounces@uclibc.org>
Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133])
by mx.google.com with ESMTP id c19si12462637wam.6.2010.04.27.04.45.35;
Tue, 27 Apr 2010 04:45:36 -0700 (PDT)
Received-SPF: neutral (google.com: 140.211.166.133 is neither permitted nor denied by best guess record for domain of uclibc-bounces@uclibc.org) client-ip=140.211.166.133;
Authentication-Results: mx.google.com; spf=neutral (google.com: 140.211.166.133 is neither permitted nor denied by best guess record for domain of uclibc-bounces@uclibc.org) smtp.mail=uclibc-bounces@uclibc.org
Received: from localhost (localhost [127.0.0.1])
by hemlock.osuosl.org (Postfix) with ESMTP id B6302A01E3;
Tue, 27 Apr 2010 11:45:35 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from hemlock.osuosl.org ([127.0.0.1])
by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id kiaCRkQJ5gmf; Tue, 27 Apr 2010 11:45:35 +0000 (UTC)
Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34])
by hemlock.osuosl.org (Postfix) with ESMTP id A0771A0163;
Tue, 27 Apr 2010 11:45:33 +0000 (UTC)
X-Original-To: uclibc@lists.busybox.net
Delivered-To: uclibc@osuosl.org
Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133])
by ash.osuosl.org (Postfix) with ESMTP id E803C8FB08
for <uclibc@lists.busybox.net>; Tue, 27 Apr 2010 11:45:32 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by hemlock.osuosl.org (Postfix) with ESMTP id E0E39A0155
for <uclibc@lists.busybox.net>; Tue, 27 Apr 2010 11:45:32 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from hemlock.osuosl.org ([127.0.0.1])
by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id HY2RZ4thZB+H for <uclibc@lists.busybox.net>;
Tue, 27 Apr 2010 11:45:32 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from office.altell.ru (office.altell.ru [80.246.246.162])
by hemlock.osuosl.org (Postfix) with ESMTP id 01EC9A0067
for <uclibc@uclibc.org>; Tue, 27 Apr 2010 11:45:32 +0000 (UTC)
Received: from localhost.localdomain (build2.altell.local [192.168.1.26])
by mail.altell.local (Postfix) with ESMTP id A39ED68413;
Tue, 27 Apr 2010 15:44:50 +0400 (MSD)
From: Roman I Khimov <khimov@altell.ru>
To: uclibc@uclibc.org
Subject: [PATCH] ldso/x86_64: support protected symbols
Date: Tue, 27 Apr 2010 15:43:14 +0400
Message-Id: <1272368594-30939-1-git-send-email-khimov@altell.ru>
X-Mailer: git-send-email 1.5.6.5
X-Altell-MailScanner-ID: A39ED68413.B8040
X-Altell-MailScanner: Found to be clean
X-Altell-MailScanner-From: khimov@altell.ru
X-BeenThere: uclibc@uclibc.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: "Discussion and development of uClibc \(the embedded C library\)"
<uclibc.uclibc.org>
List-Unsubscribe: <http://lists.busybox.net/mailman/options/uclibc>,
<mailto:uclibc-request@uclibc.org?subject=unsubscribe>
List-Archive: <http://lists.busybox.net/pipermail/uclibc>
List-Post: <mailto:uclibc@uclibc.org>
List-Help: <mailto:uclibc-request@uclibc.org?subject=help>
List-Subscribe: <http://lists.busybox.net/mailman/listinfo/uclibc>,
<mailto:uclibc-request@uclibc.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: uclibc-bounces@uclibc.org
Errors-To: uclibc-bounces@uclibc.org
Fixes dltest with NPTL.
Signed-off-by: Roman I Khimov <khimov@altell.ru>
---
ldso/ldso/x86_64/elfinterp.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ldso/ldso/x86_64/elfinterp.c b/ldso/ldso/x86_64/elfinterp.c
index 54528d3..ec53c48 100644
--- a/ldso/ldso/x86_64/elfinterp.c
+++ b/ldso/ldso/x86_64/elfinterp.c
@@ -172,7 +172,9 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct dyn_elf *scope,
symbol_addr = 0;
symname = strtab + sym->st_name;
- if (symtab_index) {
+ if (symtab_index &&
+ (ELF64_ST_VISIBILITY(symtab[symtab_index].st_other)
+ != STV_PROTECTED)) {
symbol_addr = (ElfW(Addr))_dl_find_hash(symname, scope, tpnt,
elf_machine_type_class(reloc_type), &tls_tpnt);
/*
@@ -189,7 +191,11 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct dyn_elf *scope,
/* Relocs against STN_UNDEF are usually treated as using a
* symbol value of zero, and using the module containing the
* reloc itself. */
- symbol_addr = sym->st_value;
+ if (symtab_index)
+ symbol_addr = DL_FIND_HASH_VALUE(tpnt, elf_machine_type_class(reloc_type),
+ sym);
+ else
+ symbol_addr = sym->st_value;
tls_tpnt = tpnt;
}
--
1.5.6.5
_______________________________________________
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc
|