aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2007-09-02 13:29:20 +0000
committerH.J. Lu <hjl.tools@gmail.com>2007-09-02 13:29:20 +0000
commitaff90a5f25f7874abe0e27b5575e2dd3e11484c7 (patch)
tree221c779591622211928d8349ac4ccb3e44ce7c75 /bfd
parent84a63fd9d939e44dba37a1c084ea74f454209519 (diff)
downloadbinutils-aff90a5f25f7874abe0e27b5575e2dd3e11484c7.zip
binutils-aff90a5f25f7874abe0e27b5575e2dd3e11484c7.tar.gz
binutils-aff90a5f25f7874abe0e27b5575e2dd3e11484c7.tar.bz2
bfd/
2007-09-02 H.J. Lu <hongjiu.lu@intel.com> PR ld/4986 * dwarf2.c (new_line_sorts_after): Undo the last change. (add_line_info): Only keep the last entry with the same address and end sequence. ld/testsuite/ 2007-09-02 H.J. Lu <hongjiu.lu@intel.com> PR ld/4986 * ld-ia64/line.exp: New. * ld-ia64/undefined.s: Likewise. * ld-x86-64/line.exp: Don't check CC.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/dwarf2.c16
2 files changed, 20 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 26508d8..1a08ba9 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2007-09-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/4986
+ * dwarf2.c (new_line_sorts_after): Undo the last change.
+ (add_line_info): Only keep the last entry with the same address
+ and end sequence.
+
2007-08-31 H.J. Lu <hongjiu.lu@intel.com>
PR ld/4986
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 7f5f397..e873e8c 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -917,8 +917,7 @@ new_line_sorts_after (struct line_info *new_line, struct line_info *line)
{
return (new_line->address > line->address
|| (new_line->address == line->address
- && (new_line->line > line->line
- || new_line->end_sequence < line->end_sequence)));
+ && new_line->end_sequence < line->end_sequence));
}
@@ -968,7 +967,18 @@ add_line_info (struct line_info_table *table,
Note: we may receive duplicate entries from 'decode_line_info'. */
- if (!table->last_line
+ if (table->last_line
+ && table->last_line->address == address
+ && table->last_line->end_sequence == end_sequence)
+ {
+ /* We only keep the last entry with the same address and end
+ sequence. See PR ld/4986. */
+ if (table->lcl_head == table->last_line)
+ table->lcl_head = info;
+ info->prev_line = table->last_line->prev_line;
+ table->last_line = info;
+ }
+ else if (!table->last_line
|| new_line_sorts_after (info, table->last_line))
{
/* Normal case: add 'info' to the beginning of the list */