public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Magnus Granberg <zorry@gentoo.org>
To: gcc-patches@gcc.gnu.org
Subject: Re: [testsuite] PATCH: Add check_effective_target_pie
Date: Mon, 12 Jan 2015 22:01:00 -0000	[thread overview]
Message-ID: <2219602.BYtQkL3Scp@laptop1.gw.ume.nu> (raw)
In-Reply-To: <CAMe9rOq4mS7MtgrfLAKg2htp99rbZVcY8enGGiVSU5c9xG+3eQ@mail.gmail.com>

måndag 12 januari 2015 12.11.17 skrev  H.J. Lu:
> On Mon, Jan 12, 2015 at 12:03 PM, Jeff Law <law@redhat.com> 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

> > Showing me spec file fragments is totally unhelpful.  What is the
> > technical
> > reason why pg and pie are mutually exclusive?
> 
> What kind of "technical" reason are you looking for?  glibc doesn't
> provide the right crt1 file for GCC to support this combination.  You
> can't define GNU_USER_TARGET_STARTFILE_SPEC to support
> -pg and -pie.
> 
> If you are asking "why" glibc doesn't provide one, my guess is no
> one has requested one before.

  reply	other threads:[~2015-01-12 21:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-12  0:25 H.J. Lu
2015-01-12 18:28 ` Jeff Law
2015-01-12 19:58   ` H.J. Lu
2015-01-12 19:59     ` Jeff Law
     [not found]       ` <CAMe9rOp1R-FewC1D9fODCe3ia82Ve8YxvfzHPBCaSa9zn4xi+Q@mail.gmail.com>
     [not found]         ` <54B42880.2040800@redhat.com>
2015-01-12 20:16           ` H.J. Lu
2015-01-12 22:01             ` Magnus Granberg [this message]
2015-01-12 22:12               ` Jeff Law
2015-01-13 13:03                 ` H.J. Lu
2015-01-13 19:45                   ` Jeff Law
2015-02-10 23:11                     ` Rainer Orth
2015-02-11 14:04                       ` H.J. Lu
2015-02-11 14:11                         ` Rainer Orth
2015-02-11 14:20                           ` H.J. Lu
2015-02-11 15:19                             ` Rainer Orth
2015-02-11 15:45                               ` H.J. Lu
2015-02-11 16:16                                 ` Rainer Orth
2015-02-11 16:45                                   ` H.J. Lu
2015-01-13 13:04                 ` [testsuite] PATCH: Check if -pg available H.J. Lu
2015-01-13 13:15                   ` H.J. Lu
2015-01-13 19:49                   ` Jeff Law
2015-01-13 20:47                     ` H.J. Lu
2015-01-13 21:14                       ` Jeff Law
2015-01-13 14:56                 ` [testsuite] PATCH: Add check_effective_target_pie H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2219602.BYtQkL3Scp@laptop1.gw.ume.nu \
    --to=zorry@gentoo.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).