summaryrefslogtreecommitdiff
path: root/ld/ldmain.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-12-20 15:16:06 +0000
committerNick Clifton <nickc@redhat.com>2004-12-20 15:16:06 +0000
commit4322b659eabdf278f399bbfe19de6ba43cd37755 (patch)
tree03948da6fd8aa378758236aba9a5f24218b8bfe8 /ld/ldmain.c
parent3fe9a6f36eaa19e43ea9abe529d3f5825b0b8b81 (diff)
downloadbinutils-redhat-4322b659eabdf278f399bbfe19de6ba43cd37755.tar.gz
Issue an error message if -static and -shared are used together.
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r--ld/ldmain.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 04672f3b5d..ca532515a4 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -370,6 +370,9 @@ main (int argc, char **argv)
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)