aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmain.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2001-07-11 14:19:05 +0000
committerJakub Jelinek <jakub@redhat.com>2001-07-11 14:19:05 +0000
commit7333607edefaef9eb0e5f3de1f14574851f6d734 (patch)
tree19647b68f7f8e0c25ea1701539e97ebd9a05e7c0 /ld/ldmain.c
parent82de020385734ba350423d9a6b39696ead090952 (diff)
downloadgdb-7333607edefaef9eb0e5f3de1f14574851f6d734.zip
gdb-7333607edefaef9eb0e5f3de1f14574851f6d734.tar.gz
gdb-7333607edefaef9eb0e5f3de1f14574851f6d734.tar.bz2
2001-07-11 Jakub Jelinek <jakub@redhat.com>
* ldmain.c (main): Disallow -F and -f without -shared.
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r--ld/ldmain.c8
1 files changed, 8 insertions, 0 deletions
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. */