[Top][All Lists]

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

Re: ld blocking patch

From: Nick Clifton
Subject: Re: ld blocking patch
Date: Thu, 16 Dec 2004 16:24:28 +0000
User-agent: Mozilla Thunderbird 1.0RC1 (X11/20041201)

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.

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 ?


RCS file: /cvs/src/src/ld/ldmain.c,v
retrieving revision 1.89
diff -c -3 -p -r1.89 ldmain.c
*** ld/ldmain.c 15 Nov 2004 23:21:27 -0000      1.89
--- ld/ldmain.c 16 Dec 2004 16:14:50 -0000
*************** main (int argc, char **argv)
*** 370,375 ****
--- 370,378 ----
        einfo (_("%P%F: -r and -shared may not be used together\n"));

+   if (!config.dynamic_link && link_info.shared)
+     einfo (_("%P%F: -static and -shared may not be used together\n"));
    if (! link_info.shared)
        if (command_line.filter_shlib)

reply via email to

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