aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-12-12 20:53:02 +0000
committerNick Clifton <nickc@redhat.com>2000-12-12 20:53:02 +0000
commitb79e8c786598de8c85416eb3215b1a318fe34048 (patch)
treee973b24726b6fe6cadbc177603278a1c266dd9a8 /ld/lexsup.c
parent8141c27d66d8ce079acfe03abd80cbdb439e1b86 (diff)
downloadgdb-b79e8c786598de8c85416eb3215b1a318fe34048.zip
gdb-b79e8c786598de8c85416eb3215b1a318fe34048.tar.gz
gdb-b79e8c786598de8c85416eb3215b1a318fe34048.tar.bz2
Add link option to allow undefiedn symbols in shared libraries
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 35ed3c0..52a8680 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -127,11 +127,13 @@ int parsing_defsym = 0;
#define OPTION_SECTION_START (OPTION_FINI + 1)
#define OPTION_UNIQUE (OPTION_SECTION_START + 1)
#define OPTION_TARGET_HELP (OPTION_UNIQUE + 1)
+#define OPTION_ALLOW_SHLIB_UNDEFINED (OPTION_TARGET_HELP + 1)
/* The long options. This structure is used for both the option
parsing and the help text. */
-struct ld_option {
+struct ld_option
+{
/* The long option information. */
struct option opt;
/* The short option with the same meaning ('\0' if none). */
@@ -151,7 +153,8 @@ struct ld_option {
} control;
};
-static const struct ld_option ld_options[] = {
+static const struct ld_option ld_options[] =
+{
{ {NULL, required_argument, NULL, '\0'},
'a', N_("KEYWORD"), N_("Shared library control for HP/UX compatibility"),
ONE_DASH },
@@ -298,6 +301,8 @@ static const struct ld_option ld_options[] = {
'\0', NULL, N_("Use less memory and more disk I/O"), TWO_DASHES },
{ {"no-undefined", no_argument, NULL, OPTION_NO_UNDEFINED},
'\0', NULL, N_("Allow no undefined symbols"), TWO_DASHES },
+ { {"allow-shlib-undefined", no_argument, NULL, OPTION_ALLOW_SHLIB_UNDEFINED},
+ '\0', NULL, N_("Allow undefined symbols in shared objects"), TWO_DASHES },
{ {"no-warn-mismatch", no_argument, NULL, OPTION_NO_WARN_MISMATCH},
'\0', NULL, N_("Don't warn about mismatched input files"), TWO_DASHES},
{ {"no-whole-archive", no_argument, NULL, OPTION_NO_WHOLE_ARCHIVE},
@@ -709,6 +714,9 @@ parse_args (argc, argv)
case OPTION_NO_UNDEFINED:
link_info.no_undefined = true;
break;
+ case OPTION_ALLOW_SHLIB_UNDEFINED:
+ link_info.allow_shlib_undefined = true;
+ break;
case OPTION_NO_WARN_MISMATCH:
command_line.warn_mismatch = false;
break;