[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ld blocking patch

From: Peter S. Mazinger
Subject: Re: ld blocking patch
Date: Thu, 16 Dec 2004 18:53:30 +0100 (CET)

On Thu, 16 Dec 2004, Nick Clifton wrote:

> Hi Peter,
> > The attached patch is a correction of the earlier sent patch and blocks 
> > only -shared -static (link_info.shared is also set if link_info.pie is 
> > used, so no need to block -pie -static, -r -pie and it is not possible to 
> > block -pie -shared)
> Unfortunately your patch does not compile.  (It is missing a set of 
> parentheses around the expression for the if-statement).  Also it does 
> not work because the -static linker switch does not set 
> link_info.static_link flag.  In fact as far as I can tell this flag is 
> only ever set to TRUE by the AIX ports when handling the -bnoautoimp switch.

you are completely right, even if I correct the parentheses, it does not 
block at all ;-(

> I am attaching a revised patch which might achieve what you want. 
> Please could have a look at it and see if it fits the bill ?

It works fine, exactly as expected. Consider adding this upstream if 
It also catches -static -pie combination, that is also correct.

I would have an additional wish: to block the combination of
-shared -pie (currently pie's linker script will take precedence)
the problem w/ this one that link_info.shared and pie are both enabled. 
Somehow the command-line has to be checked probably for this.

Both blockers would allow to remove many ifdefs in gcc specs creation, if 
such an addition is in binutils, constructs like:
%{!shared: ... %{static: ... %{pie: ...}}}

Thanks doing it though, I will use it, 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]