diff options
Diffstat (limited to 'gas/as.c')
-rw-r--r-- | gas/as.c | 28 |
1 files changed, 24 insertions, 4 deletions
@@ -246,7 +246,7 @@ Options:\n\ fprintf (stream, _("\ --alternate initially turn on alternate macro syntax\n")); fprintf (stream, _("\ - --compress-debug-sections\n\ + --compress-debug-sections[={none|zlib|zlib-gnu|zlib-gabi}]\n\ compress DWARF debug sections using zlib\n")); fprintf (stream, _("\ --nocompress-debug-sections\n\ @@ -471,7 +471,7 @@ parse_args (int * pargc, char *** pargv) ,{"a", optional_argument, NULL, 'a'} /* Handle -al=<FILE>. */ ,{"al", optional_argument, NULL, OPTION_AL} - ,{"compress-debug-sections", no_argument, NULL, OPTION_COMPRESS_DEBUG} + ,{"compress-debug-sections", optional_argument, NULL, OPTION_COMPRESS_DEBUG} ,{"nocompress-debug-sections", no_argument, NULL, OPTION_NOCOMPRESS_DEBUG} ,{"debug-prefix-map", required_argument, NULL, OPTION_DEBUG_PREFIX_MAP} ,{"defsym", required_argument, NULL, OPTION_DEFSYM} @@ -655,11 +655,31 @@ This program has absolutely no warranty.\n")); exit (EXIT_SUCCESS); case OPTION_COMPRESS_DEBUG: - flag_compress_debug = 1; + if (optarg) + { +#if defined OBJ_ELF || defined OBJ_MAYBE_ELF + if (strcasecmp (optarg, "none") == 0) + flag_compress_debug = COMPRESS_DEBUG_NONE; + else if (strcasecmp (optarg, "zlib") == 0) + flag_compress_debug = COMPRESS_DEBUG_ZLIB; + else if (strcasecmp (optarg, "zlib-gnu") == 0) + flag_compress_debug = COMPRESS_DEBUG_GNU_ZLIB; + else if (strcasecmp (optarg, "zlib-gabi") == 0) + flag_compress_debug = COMPRESS_DEBUG_GABI_ZLIB; + else + as_fatal (_("Invalid --compress-debug-sections option: `%s'"), + optarg); +#else + as_fatal (_("--compress-debug-sections=%s is unsupported"), + optarg); +#endif + } + else + flag_compress_debug = COMPRESS_DEBUG; break; case OPTION_NOCOMPRESS_DEBUG: - flag_compress_debug = 0; + flag_compress_debug = COMPRESS_DEBUG_NONE; break; case OPTION_DEBUG_PREFIX_MAP: |