From: Jakub Jelinek Date: Wed, 11 Jul 2001 14:19:05 +0000 (+0000) Subject: 2001-07-11 Jakub Jelinek X-Git-Tag: gdb_5_1-2001-07-29-branchpoint~221 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7333607edefaef9eb0e5f3de1f14574851f6d734;p=external%2Fbinutils.git 2001-07-11 Jakub Jelinek * ldmain.c (main): Disallow -F and -f without -shared. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index dd4585e..0e64d1b 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,7 @@ +2001-07-11 Jakub Jelinek + + * ldmain.c (main): Disallow -F and -f without -shared. + 2001-07-11 Nick Clifton * emultempl/pe.em (after_open): Check for the output_bfd not diff --git a/ld/ldmain.c b/ld/ldmain.c index 62d891c..ed0abd6 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -273,6 +273,14 @@ main (argc, argv) einfo (_("%P%F: -r and -shared may not be used together\n")); } + if (! link_info.shared) + { + if (command_line.filter_shlib) + einfo ("%P%F: -F may not be used without -shared\n")); + if (command_line.auxiliary_filters) + einfo ("%P%F: -f may not be used without -shared\n")); + } + /* Treat ld -r -s as ld -r -S -x (i.e., strip all local symbols). I don't see how else this can be handled, since in this case we must preserve all externally visible symbols. */