aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-10-22 13:33:49 +0000
committerAlan Modra <amodra@gmail.com>2012-10-22 13:33:49 +0000
commit0e86e20e046ab38f95fb405f91a7b3a1ec7d7aba (patch)
treec2a68a3c1a476de3ae7a0aed1995bac6e3bed1ec /ld/lexsup.c
parentef8e09a0817e4636f5523afc2feac00a4f173977 (diff)
downloadgdb-0e86e20e046ab38f95fb405f91a7b3a1ec7d7aba.zip
gdb-0e86e20e046ab38f95fb405f91a7b3a1ec7d7aba.tar.gz
gdb-0e86e20e046ab38f95fb405f91a7b3a1ec7d7aba.tar.bz2
include/
PR ld/14426 * bfdlink.h (bfd_link_info): Add ignore_hash. ld/ PR ld/14426 * ldlex.h (option_values): Add OPTION_IGNORE_UNRESOLVED_SYMBOL. * lexsup.c (parse_args): Likewise. (ld_options): Describe --ignore-unresolved-symbol. * ldmain.h (add_ignoresym): Declare. * ldmain.c (add_ignoresym): New function, extracted from.. (undefined_symbol): ..here. Return if the symbol is in ignore_hash. (constructor_callback): Don't use global link_info here. (reloc_overflow): Likewise.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c
index fc410c9..c6baebe 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -496,6 +496,10 @@ static const struct ld_option ld_options[] =
TWO_DASHES },
{ {"wrap", required_argument, NULL, OPTION_WRAP},
'\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES },
+ { {"ignore-unresolved-symbol", required_argument, NULL,
+ OPTION_IGNORE_UNRESOLVED_SYMBOL},
+ '\0', N_("SYMBOL"),
+ N_("Unresolved SYMBOL will not cause an error or warning"), TWO_DASHES },
};
#define OPTION_COUNT ARRAY_SIZE (ld_options)
@@ -1341,6 +1345,9 @@ parse_args (unsigned argc, char **argv)
case OPTION_WRAP:
add_wrap (optarg);
break;
+ case OPTION_IGNORE_UNRESOLVED_SYMBOL:
+ add_ignoresym (&link_info, optarg);
+ break;
case OPTION_DISCARD_NONE:
link_info.discard = discard_none;
break;