summaryrefslogtreecommitdiff
path: root/gas/as.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2013-04-29 13:38:57 +0000
committerNick Clifton <nickc@redhat.com>2013-04-29 13:38:57 +0000
commit4aeab24fbfecac381c5cd91be5f68a77733a3943 (patch)
tree40a427292f6646503ae2cbd4ed62f62a820927b5 /gas/as.c
parentb048d22f15d264c7aa55ccf8ae7fa050e22ad8eb (diff)
downloadbinutils-redhat-4aeab24fbfecac381c5cd91be5f68a77733a3943.tar.gz
* elflink.c (_bfd_elf_gc_mark_extra_sections): Remove mark from
fragmented .debug_line sections associated with unmarked code sections. * dwarf.c (read_debug_line_header): New function. Reads in a header in a .debug_line section. (display_debug_lines_raw): Use new function. Handle fragmentary .debug_line sections. (display_debug_lines_decoded): Likewise. * readelf.c (process_section_headers): Handle fragmenatry .debug_line sections. (display_debug_section): Likewise. * as.c (Options): Add -gdwarf-sections. (parse_args): Likewise. * as.h (flag_dwarf_sections): Declare. * dwarf2dbg.c (emit_fixed_inc_line_addr): Skip section changes. (process_entries): When -gdwarf-sections is enabled generate fragmentary .debug_line sections. (out_debug_line): Set the section for the .debug_line section end symbol. * doc/as.texinfo: Document -gdwarf-sections. * NEWS: Mention -gdwarf-sections. * gas/elf/dwarf2-3.d: Fix expected readelf output. * scripttempl/DWARF.sc: Add support for .debug_line.* and .debug_line_end.
Diffstat (limited to 'gas/as.c')
-rw-r--r--gas/as.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gas/as.c b/gas/as.c
index 2caca70e5f..1b1d34e3cb 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -1,8 +1,5 @@
/* 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,
- 2010, 2011, 2012, 2013
- Free Software Foundation, Inc.
+ Copyright 1987-2013 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -302,6 +299,8 @@ Options:\n\
fprintf (stream, _("\
--gdwarf-2 generate DWARF2 debugging information\n"));
fprintf (stream, _("\
+ --gdwarf-sections generate per-function section names for DWARF line information\n"));
+ fprintf (stream, _("\
--hash-size=<value> set the hash table size close to <value>\n"));
fprintf (stream, _("\
--help show this message and exit\n"));
@@ -443,6 +442,7 @@ parse_args (int * pargc, char *** pargv)
OPTION_GSTABS,
OPTION_GSTABS_PLUS,
OPTION_GDWARF2,
+ OPTION_GDWARF_SECTIONS,
OPTION_STRIP_LOCAL_ABSOLUTE,
OPTION_TRADITIONAL_FORMAT,
OPTION_WARN,
@@ -490,6 +490,7 @@ parse_args (int * pargc, char *** pargv)
/* GCC uses --gdwarf-2 but GAS uses to use --gdwarf2,
so we keep it here for backwards compatibility. */
,{"gdwarf2", no_argument, NULL, OPTION_GDWARF2}
+ ,{"gdwarf-sections", no_argument, NULL, OPTION_GDWARF_SECTIONS}
,{"gen-debug", no_argument, NULL, 'g'}
,{"gstabs", no_argument, NULL, OPTION_GSTABS}
,{"gstabs+", no_argument, NULL, OPTION_GSTABS_PLUS}
@@ -753,6 +754,10 @@ This program has absolutely no warranty.\n"));
debug_type = DEBUG_DWARF2;
break;
+ case OPTION_GDWARF_SECTIONS:
+ flag_dwarf_sections = TRUE;
+ break;
+
case 'J':
flag_signed_overflow_ok = 1;
break;