aboutsummaryrefslogtreecommitdiff
path: root/bfd/dwarf2.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/dwarf2.c')
-rw-r--r--bfd/dwarf2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 40a187a..856c963 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -2096,12 +2096,12 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
offset_size = 8;
}
- if (lh.total_length > stash->dwarf_line_size)
+ if (unit->line_offset + lh.total_length > stash->dwarf_line_size)
{
_bfd_error_handler
/* xgettext: c-format */
- (_("Dwarf Error: Line info data is bigger (%#Lx) than the section (%#Lx)"),
- lh.total_length, stash->dwarf_line_size);
+ (_("Dwarf Error: Line info data is bigger (%#Lx) than the space remaining in the section (%#Lx)"),
+ lh.total_length, stash->dwarf_line_size - unit->line_offset);
bfd_set_error (bfd_error_bad_value);
return NULL;
}