From patchwork Wed Jul 15 11:55:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 7689 X-Patchwork-Delegate: vapier@gentoo.org Received: (qmail 4962 invoked by alias); 15 Jul 2015 11:55:51 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 4686 invoked by uid 89); 15 Jul 2015 11:55:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, KAM_STOCKGEN, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: smtp.gentoo.org From: Mike Frysinger To: libc-alpha@sourceware.org Subject: [PATCH 1/2] hppa/ia64: _dl_symbol_address: add PLT bypass for rtld Date: Wed, 15 Jul 2015 07:55:42 -0400 Message-Id: <1436961343-4773-1-git-send-email-vapier@gentoo.org> This symbol is defined in the ldso, and is used both there and libc.so. There is no hidden symbol for it though which leads to relocations in the ldso and the elf/check-localplt test failing. Add a hidden def for rtld to fix all of that. This function/file is only used by hppa & ia64, so no testing is needed for other arches. 2015-07-15 Mike Frysinger * elf/dl-symaddr.c (_dl_symbol_address): Add rtld_hidden_def. * sysdeps/hppa/dl-lookupcfg.h (_dl_symbol_address): Add rtld_hidden_proto. * sysdeps/ia64/dl-lookupcfg.h (_dl_symbol_address): Likewise. --- elf/dl-symaddr.c | 1 + sysdeps/hppa/dl-lookupcfg.h | 1 + sysdeps/ia64/dl-lookupcfg.h | 1 + 3 files changed, 3 insertions(+) diff --git a/elf/dl-symaddr.c b/elf/dl-symaddr.c index 1785382..e18a203 100644 --- a/elf/dl-symaddr.c +++ b/elf/dl-symaddr.c @@ -30,3 +30,4 @@ _dl_symbol_address (struct link_map *map, const ElfW(Sym) *ref) else return (void *) value; } +rtld_hidden_def (_dl_symbol_address) diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h index 8fcdebd..cd0d6b1 100644 --- a/sysdeps/hppa/dl-lookupcfg.h +++ b/sysdeps/hppa/dl-lookupcfg.h @@ -25,6 +25,7 @@ struct link_map; void *_dl_symbol_address (struct link_map *map, const ElfW(Sym) *ref); +rtld_hidden_proto (_dl_symbol_address) #define DL_SYMBOL_ADDRESS(map, ref) _dl_symbol_address(map, ref) diff --git a/sysdeps/ia64/dl-lookupcfg.h b/sysdeps/ia64/dl-lookupcfg.h index 8796a71..edf2635 100644 --- a/sysdeps/ia64/dl-lookupcfg.h +++ b/sysdeps/ia64/dl-lookupcfg.h @@ -28,6 +28,7 @@ struct link_map; extern void *_dl_symbol_address (struct link_map *map, const Elf64_Sym *ref); +rtld_hidden_proto (_dl_symbol_address) #define DL_SYMBOL_ADDRESS(map, ref) _dl_symbol_address(map, ref)