From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26495 invoked by alias); 12 Jan 2015 22:04:26 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 26478 invoked by uid 89); 12 Jan 2015 22:04:24 -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,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 12 Jan 2015 22:04:23 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0CM4Kj3005468 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 12 Jan 2015 17:04:21 -0500 Received: from [10.3.113.77] (ovpn-113-77.phx2.redhat.com [10.3.113.77]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0CM4KAZ012560; Mon, 12 Jan 2015 17:04:20 -0500 Message-ID: <54B444E4.1080700@redhat.com> Date: Mon, 12 Jan 2015 22:12:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Magnus Granberg , gcc-patches@gcc.gnu.org Subject: Re: [testsuite] PATCH: Add check_effective_target_pie References: <20150111235837.GA26961@gmail.com> <54B42880.2040800@redhat.com> <2219602.BYtQkL3Scp@laptop1.gw.ume.nu> In-Reply-To: <2219602.BYtQkL3Scp@laptop1.gw.ume.nu> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00766.txt.bz2 On 01/12/15 14:51, Magnus Granberg wrote: > måndag 12 januari 2015 12.11.17 skrev H.J. Lu: >> On Mon, Jan 12, 2015 at 12:03 PM, Jeff Law wrote: >>> On 01/12/15 12:59, H.J. Lu wrote: >>>> I don't know if -pg will work PIE on any targets. For Linux/x86 >>>> the choices of crt1.o are >>>> >>>> %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} >>>> >>>> -shared, -pg and -pie are mutually exclusive. Those crt1 files are >>>> only crt1 files provided by glibc. You can't even try -pg -pie on >>>> Linux without changing glibc. >>> >>> You're totally missing the point. What I care about is *why*. >>> > With -pg it use gcrt1.o object file and that file is not compile with -fPIC. > When you build a shared lib on x86_64 all the objects files need to be buiit > with -fPIC else you get a error like that one abow and it is the same problems > when you build bin with -fPIE and linke with -pie. > Glibc do not provide one that is compile with -fPIC Is there some reason why glibc could not provide gcrt1.o compiled with -fPIC? Jeff