X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=ld%2Flexsup.c;h=d1955b9afaba8c94055617e741ff798cf24792ba;hb=54975ae91f6645bea4b57038e7b812cb9ceade29;hp=2597e2d6304a3414f63c8d87d152976eeb3f635e;hpb=abf874aafe3d717573e4a48bf0e3c6334e666a55;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/lexsup.c b/ld/lexsup.c index 2597e2d630..d1955b9afa 100644 --- a/ld/lexsup.c +++ b/ld/lexsup.c @@ -569,7 +569,6 @@ parse_args (unsigned argc, char **argv) struct option *longopts; struct option *really_longopts; int last_optind; - enum report_method how_to_report_unresolved_symbols = RM_GENERATE_ERROR; enum symbolic_enum { symbolic_unset = 0, @@ -938,6 +937,7 @@ parse_args (unsigned argc, char **argv) Use --call-shared or -Bdynamic for this. */ break; case 'n': + config.text_read_only = TRUE; config.magic_demand_paged = FALSE; input_flags.dynamic = FALSE; break; @@ -957,15 +957,13 @@ parse_args (unsigned argc, char **argv) link_info.keep_memory = FALSE; break; case OPTION_NO_UNDEFINED: - link_info.unresolved_syms_in_objects - = how_to_report_unresolved_symbols; + link_info.unresolved_syms_in_objects = RM_DIAGNOSE; break; case OPTION_ALLOW_SHLIB_UNDEFINED: link_info.unresolved_syms_in_shared_libs = RM_IGNORE; break; case OPTION_NO_ALLOW_SHLIB_UNDEFINED: - link_info.unresolved_syms_in_shared_libs - = how_to_report_unresolved_symbols; + link_info.unresolved_syms_in_shared_libs = RM_DIAGNOSE; break; case OPTION_UNRESOLVED_SYMBOLS: if (strcmp (optarg, "ignore-all") == 0) @@ -975,40 +973,27 @@ parse_args (unsigned argc, char **argv) } else if (strcmp (optarg, "report-all") == 0) { - link_info.unresolved_syms_in_objects - = how_to_report_unresolved_symbols; - link_info.unresolved_syms_in_shared_libs - = how_to_report_unresolved_symbols; + link_info.unresolved_syms_in_objects = RM_DIAGNOSE; + link_info.unresolved_syms_in_shared_libs = RM_DIAGNOSE; } else if (strcmp (optarg, "ignore-in-object-files") == 0) { link_info.unresolved_syms_in_objects = RM_IGNORE; - link_info.unresolved_syms_in_shared_libs - = how_to_report_unresolved_symbols; + link_info.unresolved_syms_in_shared_libs = RM_DIAGNOSE; } else if (strcmp (optarg, "ignore-in-shared-libs") == 0) { - link_info.unresolved_syms_in_objects - = how_to_report_unresolved_symbols; + link_info.unresolved_syms_in_objects = RM_DIAGNOSE; link_info.unresolved_syms_in_shared_libs = RM_IGNORE; } else einfo (_("%F%P: bad --unresolved-symbols option: %s\n"), optarg); break; case OPTION_WARN_UNRESOLVED_SYMBOLS: - how_to_report_unresolved_symbols = RM_GENERATE_WARNING; - if (link_info.unresolved_syms_in_objects == RM_GENERATE_ERROR) - link_info.unresolved_syms_in_objects = RM_GENERATE_WARNING; - if (link_info.unresolved_syms_in_shared_libs == RM_GENERATE_ERROR) - link_info.unresolved_syms_in_shared_libs = RM_GENERATE_WARNING; + link_info.warn_unresolved_syms = TRUE; break; - case OPTION_ERROR_UNRESOLVED_SYMBOLS: - how_to_report_unresolved_symbols = RM_GENERATE_ERROR; - if (link_info.unresolved_syms_in_objects == RM_GENERATE_WARNING) - link_info.unresolved_syms_in_objects = RM_GENERATE_ERROR; - if (link_info.unresolved_syms_in_shared_libs == RM_GENERATE_WARNING) - link_info.unresolved_syms_in_shared_libs = RM_GENERATE_ERROR; + link_info.warn_unresolved_syms = FALSE; break; case OPTION_ALLOW_MULTIPLE_DEFINITION: link_info.allow_multiple_definition = TRUE; @@ -1638,11 +1623,11 @@ parse_args (unsigned argc, char **argv) if (link_info.unresolved_syms_in_objects == RM_NOT_YET_SET) /* FIXME: Should we allow emulations a chance to set this ? */ - link_info.unresolved_syms_in_objects = how_to_report_unresolved_symbols; + link_info.unresolved_syms_in_objects = RM_DIAGNOSE; if (link_info.unresolved_syms_in_shared_libs == RM_NOT_YET_SET) /* FIXME: Should we allow emulations a chance to set this ? */ - link_info.unresolved_syms_in_shared_libs = how_to_report_unresolved_symbols; + link_info.unresolved_syms_in_shared_libs = RM_DIAGNOSE; if (bfd_link_relocatable (&link_info) && command_line.check_section_addresses < 0)