This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Generate DW_AT_ranges for non-contiguous code
- From: Sterling Augustine <sterling at tensilica dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: binutils at sourceware dot org
- Date: Tue, 10 Oct 2006 09:51:11 -0700
- Subject: Re: Generate DW_AT_ranges for non-contiguous code
- References: <44CE90B7.1080002@tensilica.com> <je8xjoxvao.fsf@sykes.suse.de>
Andreas Schwab wrote:
[...] That ain't gonna work.
Thanks for the catch. Enclosed is a patch which should fix.
Sterling
Index: dwarf2dbg.c
===================================================================
RCS file: /cvs/src/src/gas/dwarf2dbg.c,v
retrieving revision 1.87
diff -d -u -r1.87 dwarf2dbg.c
--- dwarf2dbg.c 8 Aug 2006 19:09:33 -0000 1.87
+++ dwarf2dbg.c 10 Oct 2006 16:48:30 -0000
@@ -1591,13 +1591,10 @@
}
else
{
- /* This attributes is emitted if the code is disjoint. */
+ /* This attribute is emitted if the code is disjoint. */
/* DW_AT_ranges */
- expr.X_op = O_symbol;
- expr.X_add_symbol = section_symbol (ranges_seg);
- expr.X_add_number = 0;
- emit_expr (&expr, sizeof_address);
+ TC_DWARF2_EMIT_OFFSET (section_symbol (ranges_seg), sizeof_offset);
}
/* DW_AT_name. We don't have the actual file name that was present