Patch to correct LINK_PIE_SPEC
Daniel Jacobowitz
drow@false.org
Mon Nov 15 16:54:00 GMT 2004
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
changing.
`-nostartfiles'
Do not use the standard system startup files when linking. The
standard system libraries are used normally, unless `-nostdlib' or
`-nodefaultlibs' is used.
`-nostdlib'
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?
--
Daniel Jacobowitz
More information about the Gcc-patches
mailing list