From 550bdea6de2e36e9828b0ebbb89a7d436dfefadc Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 20 Dec 2004 15:16:06 +0000 Subject: [PATCH] Issue an error message if -static and -shared are used together. --- ld/ChangeLog | 5 +++++ ld/ldmain.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ld/ChangeLog b/ld/ChangeLog index f5ef3a7a026..b8a5e7d1ef3 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2004-12-20 Nick Clifton + + * ldmain.c (main): Issue an error message if -static and -shared + are used together. + 2004-12-17 Jakub Jelinek * ldexp.h (exp_data_seg): Add min_base and maxpagesize fields. diff --git a/ld/ldmain.c b/ld/ldmain.c index 04672f3b5d3..ca532515a46 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) -- 2.30.2