This is the mail archive of the
mailing list for the GCC project.
Re: Patch to correct LINK_PIE_SPEC
- From: "Peter S. Mazinger" <ps dot m at gmx dot net>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: Jakub Jelinek <jakub at redhat dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 15 Nov 2004 17:38:44 +0100 (CET)
- Subject: Re: Patch to correct LINK_PIE_SPEC
On Mon, 15 Nov 2004, Daniel Jacobowitz wrote:
> On Mon, Nov 15, 2004 at 01:52:10PM +0100, Peter S. Mazinger wrote:
> > On Mon, 15 Nov 2004, Jakub Jelinek wrote:
> > > On Mon, Nov 15, 2004 at 01:30:36PM +0100, Peter S. Mazinger wrote:
> > > > > This is incorrect.
> > > > > When you specify -nostdlib or -nostartfiles, you certainly want -pie
> > > > > being passed down to ld if given to gcc. These options tell the compiler
> > > >
> > > > No I certainly don't want to, and if I want to, then I'll provide a way
> > > > for it.
> > > >
> > > > > that you are taking care of using the appropriate start files and/or libraries.
> > > > > Not passing -pie here would be very surprising and likely breaks
> > > > > e.g. glibc which heavily uses -nostdlib and -nostartfiles and uses -pie
> > > > > too.
> BTW, Jakub, I noticed recently that -nostartfiles is redundant in this
> case. It has been as far back as I checked in GCC; it's implied by
> -nostdlib. So if you feel like shortening those command lines...
> > > >
> > > > that is really glibc's problem ;)
> > >
> > > No, it is a bug introduced by your patch.
> > well, if only glibc is involved, I don't understand why it should be my
> > patch's bug
> Please read the documentation of the options whose behavior you are
> Do not use the standard system startup files when linking. The
> standard system libraries are used normally, unless `-nostdlib' or
> `-nodefaultlibs' is used.
> Do not use the standard system startup files or libraries when
> linking. No startup files and only the libraries you specify will
> be passed to the linker.
> Where do you see any justification for these options affecting the
> linker arguments, other than libraries or startfiles?
Sorry, I do not change nostdlib/nostartfiles behaviour, I use these as
exclusion for -pie. If we provide -nostartfiles, the Scrt1.o file won't be
provided and a PIE executable can't be built
Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2