diff options
author | Nick Clifton <nickc@redhat.com> | 2002-12-23 10:45:03 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2002-12-23 10:45:03 +0000 |
commit | 312b768e2f1579346e7ffe978202fda06cb37224 (patch) | |
tree | 3322c12eef2b97a147b0754f4d65aba2483f77a9 /ld/lexsup.c | |
parent | 8745eafadc9d43dbd9f9a0d2cc33e12f11ca1cd6 (diff) | |
download | gdb-312b768e2f1579346e7ffe978202fda06cb37224.zip gdb-312b768e2f1579346e7ffe978202fda06cb37224.tar.gz gdb-312b768e2f1579346e7ffe978202fda06cb37224.tar.bz2 |
Change linker's default behaviour - it will now reject binary files whoes
architecture it does not recognise, unless it has explicitly told to accept
them.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r-- | ld/lexsup.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c index 8ce8f18..ce4cf30 100644 --- a/ld/lexsup.c +++ b/ld/lexsup.c @@ -133,6 +133,8 @@ int parsing_defsym = 0; #define OPTION_NO_DEFINE_COMMON (OPTION_SPARE_DYNAMIC_TAGS + 1) #define OPTION_NOSTDLIB (OPTION_NO_DEFINE_COMMON + 1) #define OPTION_NO_OMAGIC (OPTION_NOSTDLIB + 1) +#define OPTION_ACCEPT_UNKNOWN_INPUT_ARCH (OPTION_NO_OMAGIC + 1) +#define OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH (OPTION_ACCEPT_UNKNOWN_INPUT_ARCH + 1) /* The long options. This structure is used for both the option parsing and the help text. */ @@ -267,6 +269,10 @@ static const struct ld_option ld_options[] = '(', NULL, N_("Start a group"), TWO_DASHES }, { {"end-group", no_argument, NULL, ')'}, ')', NULL, N_("End a group"), TWO_DASHES }, + { {"accept-unknown-input-arch", no_argument, NULL, OPTION_ACCEPT_UNKNOWN_INPUT_ARCH}, + '\0', NULL, N_("Accept input files whose architecture cannot be determined"), TWO_DASHES }, + { {"no-accept-unknown-input-arch", no_argument, NULL, OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH}, + '\0', NULL, N_("Reject input files whose architecture is unknown"), TWO_DASHES }, { {"assert", required_argument, NULL, OPTION_ASSERT}, '\0', N_("KEYWORD"), N_("Ignored for SunOS compatibility"), ONE_DASH }, { {"Bdynamic", no_argument, NULL, OPTION_CALL_SHARED}, @@ -1107,6 +1113,12 @@ parse_args (argc, argv) case OPTION_NO_CHECK_SECTIONS: command_line.check_section_addresses = FALSE; break; + case OPTION_ACCEPT_UNKNOWN_INPUT_ARCH: + command_line.accept_unknown_input_arch = TRUE; + break; + case OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH: + command_line.accept_unknown_input_arch = FALSE; + break; case '(': if (ingroup) einfo (_("%P%F: may not nest groups (--help for usage)\n")); |