diff options
author | obrien <obrien@FreeBSD.org> | 2002-10-11 06:01:20 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-10-11 06:01:20 +0000 |
commit | aae950e69caf1dc3f308b74fe6d066a645a7ed09 (patch) | |
tree | fc657a1fb5e0ceeb952b5e5ad8744fec0332849c /contrib/binutils/ld/lexsup.c | |
parent | dcf134d53b2ddea66d0fe9fba4e8950a7c07b312 (diff) | |
download | FreeBSD-src-aae950e69caf1dc3f308b74fe6d066a645a7ed09.zip FreeBSD-src-aae950e69caf1dc3f308b74fe6d066a645a7ed09.tar.gz |
Import of Binutils from the FSF 2.13 branch (just pre-.1 release).
These bits are taken from the FSF anoncvs repo on 11-Oct-2002 22:39:35 PDT.
Diffstat (limited to 'contrib/binutils/ld/lexsup.c')
-rw-r--r-- | contrib/binutils/ld/lexsup.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/contrib/binutils/ld/lexsup.c b/contrib/binutils/ld/lexsup.c index 230dd6b..4acb4fd 100644 --- a/contrib/binutils/ld/lexsup.c +++ b/contrib/binutils/ld/lexsup.c @@ -126,7 +126,9 @@ int parsing_defsym = 0; #define OPTION_UNIQUE (OPTION_SECTION_START + 1) #define OPTION_TARGET_HELP (OPTION_UNIQUE + 1) #define OPTION_ALLOW_SHLIB_UNDEFINED (OPTION_TARGET_HELP + 1) -#define OPTION_DISCARD_NONE (OPTION_ALLOW_SHLIB_UNDEFINED + 1) +#define OPTION_ALLOW_MULTIPLE_DEFINITION (OPTION_ALLOW_SHLIB_UNDEFINED + 1) +#define OPTION_NO_UNDEFINED_VERSION (OPTION_ALLOW_MULTIPLE_DEFINITION + 1) +#define OPTION_DISCARD_NONE (OPTION_NO_UNDEFINED_VERSION + 1) #define OPTION_SPARE_DYNAMIC_TAGS (OPTION_DISCARD_NONE + 1) #define OPTION_NO_DEFINE_COMMON (OPTION_SPARE_DYNAMIC_TAGS + 1) #define OPTION_NOSTDLIB (OPTION_NO_DEFINE_COMMON + 1) @@ -319,6 +321,10 @@ static const struct ld_option ld_options[] = '\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 }, + { {"allow-multiple-definition", no_argument, NULL, OPTION_ALLOW_MULTIPLE_DEFINITION}, + '\0', NULL, N_("Allow multiple definitions"), TWO_DASHES }, + { {"no-undefined-version", no_argument, NULL, OPTION_NO_UNDEFINED_VERSION}, + '\0', NULL, N_("Disallow undefined version"), 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}, @@ -761,6 +767,12 @@ parse_args (argc, argv) case OPTION_ALLOW_SHLIB_UNDEFINED: link_info.allow_shlib_undefined = true; break; + case OPTION_ALLOW_MULTIPLE_DEFINITION: + link_info.allow_multiple_definition = true; + break; + case OPTION_NO_UNDEFINED_VERSION: + link_info.allow_undefined_version = false; + break; case OPTION_NO_WARN_MISMATCH: command_line.warn_mismatch = false; break; @@ -804,7 +816,7 @@ parse_args (argc, argv) increment optind, and continue because getopt is too confused and will seg-fault the next time around. */ einfo(_("%P%F: bad -rpath option\n")); - + link_info.relocateable = true; config.build_constructors = false; config.magic_demand_paged = false; @@ -954,8 +966,8 @@ parse_args (argc, argv) break; case OPTION_TARGET_HELP: /* Mention any target specific options. */ - ldemul_list_emulation_options (stdout); - exit (0); + ldemul_list_emulation_options (stdout); + exit (0); case OPTION_TBSS: set_section_start (".bss", optarg); break; @@ -1009,7 +1021,7 @@ parse_args (argc, argv) version information. Read it, but don't assume that we've seen a linker script. */ { - FILE * hold_script_handle; + FILE *hold_script_handle; hold_script_handle = saved_script_handle; ldfile_open_command_file (optarg); @@ -1225,7 +1237,7 @@ help () int two_dashes = (ld_options[j].control == TWO_DASHES || ld_options[j].control == EXACTLY_TWO_DASHES); - + printf ("%s-%s%s", comma ? ", " : "", two_dashes ? "-" : "", |