aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-04-08 16:04:50 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-04-08 16:04:50 +0000
commita0c402a5641d9229b552066d526190252b0ee968 (patch)
treee2d2a23e62ddb2914cab9349e07ef2f0b52ea700 /ld/lexsup.c
parent143260c9bf2058b768d4d04cd4518054104dafd4 (diff)
downloadgdb-a0c402a5641d9229b552066d526190252b0ee968.zip
gdb-a0c402a5641d9229b552066d526190252b0ee968.tar.gz
gdb-a0c402a5641d9229b552066d526190252b0ee968.tar.bz2
bfd/
2009-04-08 H.J. Lu <hongjiu.lu@intel.com> * elflink.c (elf_link_add_object_symbols): Warn alternate ELF machine code. include/ 2009-04-08 H.J. Lu <hongjiu.lu@intel.com> * bfdlink.h (bfd_link_info): Add warn_alternate_em. ld/ 2009-04-08 H.J. Lu <hongjiu.lu@intel.com> * lexsup.c (option_values): Add OPTION_WARN_ALTERNATE_EM. (ld_options): Likewise. (parse_args): Likewise. * ld.texinfo: Document --warn-alternate-em. * NEWS: Mention --warn-alternate-em.
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 3ddde61..f1b5b4c 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -163,6 +163,7 @@ enum option_values
OPTION_WARN_UNRESOLVED_SYMBOLS,
OPTION_ERROR_UNRESOLVED_SYMBOLS,
OPTION_WARN_SHARED_TEXTREL,
+ OPTION_WARN_ALTERNATE_EM,
OPTION_REDUCE_MEMORY_OVERHEADS,
OPTION_DEFAULT_SCRIPT
};
@@ -555,6 +556,9 @@ static const struct ld_option ld_options[] =
{ {"warn-shared-textrel", no_argument, NULL, OPTION_WARN_SHARED_TEXTREL},
'\0', NULL, N_("Warn if shared object has DT_TEXTREL"),
TWO_DASHES },
+ { {"warn-alternate-em", no_argument, NULL, OPTION_WARN_ALTERNATE_EM},
+ '\0', NULL, N_("Warn if an object has alternate ELF machine code"),
+ TWO_DASHES },
{ {"warn-unresolved-symbols", no_argument, NULL,
OPTION_WARN_UNRESOLVED_SYMBOLS},
'\0', NULL, N_("Report unresolved symbols as warnings"), TWO_DASHES },
@@ -1359,6 +1363,9 @@ parse_args (unsigned argc, char **argv)
case OPTION_WARN_SHARED_TEXTREL:
link_info.warn_shared_textrel = TRUE;
break;
+ case OPTION_WARN_ALTERNATE_EM:
+ link_info.warn_alternate_em = TRUE;
+ break;
case OPTION_WHOLE_ARCHIVE:
whole_archive = TRUE;
break;