From b0b499c4d40a6329b30f41cc40ac9c7880f74a62 Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Sat, 3 Jul 2010 20:52:22 +0000 Subject: bfd/ChangeLog: * compress.c (bfd_uncompress_section_contents): Add ATTRIBUTE_UNUSED. * dwarf2.c (read_and_uncompress_section): New function. (read_section): Call it. (find_line): Likewise. binutils/ChangeLog: * objdump.c (load_specific_debug_section): Decompress section contents before applying relocations. * readelf.c (load_specific_debug_section): Update section size after decompression. gas/ChangeLog: * Makefile.am: Add compress-debug.c and compress-debug.h. * Makefile.in: Regenerate. * config.in: Add HAVE_ZLIB_H. * configure.in: Check for zlib.h. * configure: Regenerate. * as.c (parse_args): Add --compress-debug-sections and --nocompress-debug-sections. * as.h (flag_compress_debug): New variable. * compress-debug.c: New file. * compress-debug.h: New file. * write.c: Include compress-debug.h. (compress_frag): New function. (compress_debug): New function. (write_object_file): Compress debug sections if requested. --- gas/as.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'gas/as.c') diff --git a/gas/as.c b/gas/as.c index d617b3398d..e494fa5fe1 100644 --- a/gas/as.c +++ b/gas/as.c @@ -437,7 +437,9 @@ parse_args (int * pargc, char *** pargv) OPTION_AL, OPTION_HASH_TABLE_SIZE, OPTION_REDUCE_MEMORY_OVERHEADS, - OPTION_WARN_FATAL + OPTION_WARN_FATAL, + OPTION_COMPRESS_DEBUG, + OPTION_NOCOMPRESS_DEBUG /* When you add options here, check that they do not collide with OPTION_MD_BASE. See as.h. */ }; @@ -455,6 +457,8 @@ parse_args (int * pargc, char *** pargv) ,{"a", optional_argument, NULL, 'a'} /* Handle -al=. */ ,{"al", optional_argument, NULL, OPTION_AL} + ,{"compress-debug-sections", no_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} ,{"dump-config", no_argument, NULL, OPTION_DUMPCONFIG} @@ -634,6 +638,14 @@ This program has absolutely no warranty.\n")); #endif exit (EXIT_SUCCESS); + case OPTION_COMPRESS_DEBUG: + flag_compress_debug = 1; + break; + + case OPTION_NOCOMPRESS_DEBUG: + flag_compress_debug = 0; + break; + case OPTION_DEBUG_PREFIX_MAP: add_debug_prefix_map (optarg); break; -- cgit v1.2.1