aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmain.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-06-16 19:32:07 +0000
committerIan Lance Taylor <ian@airs.com>1994-06-16 19:32:07 +0000
commit64887de2eee32d2a2e71c40fea51f64914b1b9f2 (patch)
tree31839dcc32d70568a8982641b310ababbe2d6301 /ld/ldmain.c
parent0ff5d3a69a7d61d3cd1550c0c96238c9bbaff197 (diff)
downloadgdb-64887de2eee32d2a2e71c40fea51f64914b1b9f2.zip
gdb-64887de2eee32d2a2e71c40fea51f64914b1b9f2.tar.gz
gdb-64887de2eee32d2a2e71c40fea51f64914b1b9f2.tar.bz2
* lexsup.c (parse_args): Add -shared to longopts, and handle it.
* ldmain.c (main): Initialize link_info.shared to false. Give error if link_info.relocateable and link_info.shared are both set.
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 5b2e370..7ee24f3 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -166,6 +166,7 @@ main (argc, argv)
link_info.callbacks = &link_callbacks;
link_info.relocateable = false;
+ link_info.shared = false;
link_info.strip = strip_none;
link_info.discard = discard_none;
link_info.lprefix_len = 1;
@@ -201,6 +202,8 @@ main (argc, argv)
einfo ("%P%F: -r and -call_shared may not be used together\n");
if (link_info.strip == strip_all)
einfo ("%P%F: -r and -s may not be used together\n");
+ if (link_info.shared)
+ einfo ("%P%F: -r and -shared may not be used together\n");
}
/* This essentially adds another -L directory so this must be done after