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: 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 ; 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 ; 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 ; 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 ; 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 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\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 --- 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