aboutsummaryrefslogtreecommitdiff
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
commit550bdea6de2e36e9828b0ebbb89a7d436dfefadc (patch)
tree986ae48292815470a77e017ea32bfee3980b2f40 /ld/ldmain.c
parentfbfdf750892dc68c5cbb7954cd95946ef6a64838 (diff)
downloadgdb-550bdea6de2e36e9828b0ebbb89a7d436dfefadc.zip
gdb-550bdea6de2e36e9828b0ebbb89a7d436dfefadc.tar.gz
gdb-550bdea6de2e36e9828b0ebbb89a7d436dfefadc.tar.bz2
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 04672f3..ca53251 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)