From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21057 invoked by alias); 17 Jun 2003 11:56:18 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 21032 invoked from network); 17 Jun 2003 11:56:17 -0000 Received: from unknown (HELO localhost.localdomain) (195.113.19.66) by sources.redhat.com with SMTP; 17 Jun 2003 11:56:17 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id h5HBuFqO020934; Tue, 17 Jun 2003 13:56:15 +0200 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id h5HBuFxa020930; Tue, 17 Jun 2003 13:56:15 +0200 Date: Tue, 17 Jun 2003 11:56:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Avoid ld.so segfaults on R_PPC64_DTPREL64 relocations Message-ID: <20030617115615.GI20507@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2003-06/txt/msg00031.txt.bz2 Hi! Found during prelink testing on ppc64. 2003-06-17 Jakub Jelinek * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela) : Don't segfault on undefined symbols. --- libc/sysdeps/powerpc/powerpc64/dl-machine.h.jj 2003-06-16 14:26:29.000000000 -0400 +++ libc/sysdeps/powerpc/powerpc64/dl-machine.h 2003-06-17 05:42:16.000000000 -0400 @@ -653,7 +653,8 @@ elf_machine_rela (struct link_map *map, /* During relocation all TLS symbols are defined and used. Therefore the offset is already correct. */ # ifndef RTLD_BOOTSTRAP - *reloc_addr = TLS_DTPREL_VALUE (sym, reloc); + if (sym_map != NULL) + *reloc_addr = TLS_DTPREL_VALUE (sym, reloc); # endif return; Jakub