This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

How should gcc handle "-shared -pie" and "-pie -shared"?


On Tue, Jul 03, 2007 at 08:50:29PM +0200, Andreas Schwab wrote:
> "H.J. Lu" <hjl@lucon.org> writes:
> 
> > Where is it documented.
> 
> Nowhere.
> 
> > Gcc 4.3 just passes "-shared -pie" to linker. I don't see gcc driver
> > remove -pie.
> 
> Look at the use of Scrt1.o.  It's much of a mess.
> 

Gcc currently ignores -pie when there is a -shared due to treatment
of Scrt1.o.  However, this behavior is undocumted.  We like to
match the linker behavior with gcc.

Is this gcc behavior intentional? Will this gcc behavior ever
change? Can we document this gcc behavior?

BTW, this is another problem which can be handled like:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26885


H.J.


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