forked from Imagelibrary/binutils-gdb
gas:LoongArch: Fix wrong line number in .debug_line
The dwarf2_emit_insn() can create debuginfo of line. But it is called
too late in append_fixp_and_insn. It causes extra offs when debuginfo
of line sets address.
gas/config/
* tc-loongarch.c
This commit is contained in:
@@ -877,6 +877,8 @@ append_fixp_and_insn (struct loongarch_cl_insn *ip)
|
||||
struct reloc_info *reloc_info = ip->reloc_info;
|
||||
size_t i;
|
||||
|
||||
dwarf2_emit_insn (0);
|
||||
|
||||
for (i = 0; i < ip->reloc_num; i++)
|
||||
{
|
||||
reloc_type = reloc_info[i].type;
|
||||
@@ -893,8 +895,6 @@ append_fixp_and_insn (struct loongarch_cl_insn *ip)
|
||||
as_fatal (_("Internal error: not support relax now"));
|
||||
else
|
||||
append_fixed_insn (ip);
|
||||
|
||||
dwarf2_emit_insn (0);
|
||||
}
|
||||
|
||||
/* Ask helper for returning a malloced c_str or NULL. */
|
||||
|
||||
Reference in New Issue
Block a user