From patchwork Tue Mar 25 11:23:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 267 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (caibbdcaaahb.dreamhost.com [208.113.200.71]) by wilcox.dreamhost.com (Postfix) with ESMTP id 57C1E360166 for ; Tue, 25 Mar 2014 04:23:14 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14307373) id 02BE0D2E574; Tue, 25 Mar 2014 04:23:13 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx21.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id C9736DB1B14 for ; Tue, 25 Mar 2014 04:23:13 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; q=dns; s=default; b=LAFvD 55EJ7ZGIfVWb0pWeF/fGTrL++xmj0106QTg0HH7Z7Mu2sdZpnOYe0Ev+4lwwnOqD 8YTfAL9/gC9LkvVn1ap90VDJMLd76JSXbIMy2aZi13pp+4T5iZ1z6Goqu+wwne5U 4JlGaWfjVlPUFCffphY1Ja80qaSVUk1YKFoVoY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; s=default; bh=eyAc5GcxRWy ErI230kivqZsez+s=; b=KSXPWQMZ3AhIofcgF4YYn0gfKTFyhZhRCKnp5EcxA0i mn0jJOvPqHVEpXYVjtEaLmt8RcsOUpI7bDMgRjB/zfL6MfPfb8jblqG4IIQNOdqV YI/Eq3m1TtomI6WScTzmd6Ac/iGIj47N1iDJbd4Ti8a292ZTSVTQBzJYIX/+cBPo = Received: (qmail 27264 invoked by alias); 25 Mar 2014 11:23:11 -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 27245 invoked by uid 89); 25 Mar 2014 11:23:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx2.suse.de From: Andreas Schwab To: Roland McGrath Cc: Mike Frysinger , libc-alpha@sourceware.org Subject: Re: [RFC] killing remaining USE___THREAD use References: <4096104.BXBWkszvSk@vapier> <20140324224059.737BC74484@topped-with-meat.com> X-Yow: They don't hire PERSONAL PINHEADS, Mr. Toad! Date: Tue, 25 Mar 2014 12:23:04 +0100 In-Reply-To: (Andreas Schwab's message of "Tue, 25 Mar 2014 09:09:08 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-DH-Original-To: glibc@patchwork.siddhesh.in If you go that route you have to apply this patch, though I have no idea why this code may be needed. Andreas. diff --git a/elf/rtld.c b/elf/rtld.c index 16e7f7a..ba92a2a 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -467,15 +467,16 @@ _dl_start (void *arg) /* Initialize the TLS block. */ #if TLS_TCB_AT_TP - initdtv[2].pointer = tlsblock; + initdtv[2].pointer.val = tlsblock; #elif TLS_DTV_AT_TP bootstrap_map.l_tls_offset = roundup (TLS_INIT_TCB_SIZE, bootstrap_map.l_tls_align); - initdtv[2].pointer = (char *) tlsblock + bootstrap_map.l_tls_offset; + initdtv[2].pointer.val = (char *) tlsblock + bootstrap_map.l_tls_offset; #else # error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined" #endif - p = __mempcpy (initdtv[2].pointer, bootstrap_map.l_tls_initimage, + initdtv[2].pointer.is_static = true; + p = __mempcpy (initdtv[2].pointer.val, bootstrap_map.l_tls_initimage, bootstrap_map.l_tls_initimage_size); #ifdef HAVE_BUILTIN_MEMSET __builtin_memset (p, '\0', (bootstrap_map.l_tls_blocksize