This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to correct LINK_PIE_SPEC


On Mon, 15 Nov 2004, Jakub Jelinek wrote:

> On Mon, Nov 15, 2004 at 01:52:10PM +0100, Peter S. Mazinger wrote:
> > > Why should it? GCC -pie option means:
> > > 1) pass -pie to the linker if it supports it
> > > 2) user appropriate startfiles and/or libraries for PIE generation
> > 
> > yes, that's it, use appropiate startfiles (and this appropiate startfile 
> > should provide also path for Scrt1.o because the normal startfile 
> > definition won't be used)
> 
> So, can you summarize why do you think your patch is an improvement
> over current situation?
> If you use gcc -shared -nostartfiles -nostdlibs, it doesn't mean gcc
> doesn't pass -shared to ld either, and -pie should certainly behave
> consistently with that.

there is quite a difference between -shared -nostdlib and -pie -nostdlib.
a library can be built like this if it does not use constructors (so they 
do not need crti.o and crtn.o either), a -pie exec can't be built w/o 
Scrt1.o, unless glibc would provide a version that works w/o crti.o/crtn.o.

Peter

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]