/* as.c - GAS main program.
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
/* Enable verbose mode. */
int verbose = 0;
+/* Keep the output file. */
+int keep_it = 0;
+
segT reg_section;
segT expr_section;
segT text_section;
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. */
};
,{"a", optional_argument, NULL, 'a'}
/* Handle -al=<FILE>. */
,{"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}
case OPTION_VERSION:
/* This output is intended to follow the GNU standards document. */
printf (_("GNU assembler %s\n"), BFD_VERSION_STRING);
- printf (_("Copyright 2009 Free Software Foundation, Inc.\n"));
+ printf (_("Copyright 2010 Free Software Foundation, Inc.\n"));
printf (_("\
This program is free software; you may redistribute it under the terms of\n\
the GNU General Public License version 3 or later.\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;
close_output_file (void)
{
output_file_close (out_file_name);
+ if (!keep_it)
+ unlink_if_ordinary (out_file_name);
}
/* The interface between the macro code and gas expression handling. */
{
segT s;
char *p;
- addressT addr;
offsetT size;
const char *name;
elf_section_type (s)
= get_elf_backend_data (stdoutput)->obj_attrs_section_type;
bfd_set_section_flags (stdoutput, s, SEC_READONLY | SEC_DATA);
- addr = frag_now_fix ();
+ frag_now_fix ();
p = frag_more (size);
bfd_elf_set_obj_attr_contents (stdoutput, (bfd_byte *)p, size);
}
char ** argv_orig = argv;
int macro_strip_at;
- int keep_it;
start_time = get_run_time ();
if (had_errors () > 0 && ! flag_always_generate_output)
keep_it = 0;
- if (!keep_it)
- unlink_if_ordinary (out_file_name);
-
input_scrub_end ();
END_PROGRESS (myname);