+2020-08-04 Mark Wielaard <mark@klomp.org>
+
+ * dwarf2dbg.c (out_debug_abbrev): When DWARF2_VERSION >= 4, use
+ DW_FORM_udata for DW_AT_high_pc.
+ (out_debug_info): Use emit_leb128_expr for DW_AT_high_pc, when
+ DWARF2_VERSION >= 4.
+ * read.c (emit_leb128_exp): No longer static.
+ * read.h (emit_leb128_exp): Define.
+
2020-08-02 Mark Wielaard <mark@klomp.org>
* gas/dwarf2dbg.c (out_dir_and_file_list): For DWARF5 emit at
if (DWARF2_VERSION < 4)
out_abbrev (DW_AT_high_pc, DW_FORM_addr);
else
- out_abbrev (DW_AT_high_pc, (sizeof_address == 4
- ? DW_FORM_data4 : DW_FORM_data8));
+ out_abbrev (DW_AT_high_pc, DW_FORM_udata);
}
else
{
}
exp.X_add_symbol = all_segs->text_end;
exp.X_add_number = 0;
- emit_expr (&exp, sizeof_address);
+ if (DWARF2_VERSION < 4)
+ emit_expr (&exp, sizeof_address);
+ else
+ emit_leb128_expr (&exp, 0);
}
else
{
/* Generate the appropriate fragments for a given expression to emit a
leb128 value. SIGN is 1 for sleb, 0 for uleb. */
-static void
+void
emit_leb128_expr (expressionS *exp, int sign)
{
operatorT op = exp->X_op;
TC_PARSE_CONS_RETURN_TYPE);
extern void emit_expr_fix (expressionS *, unsigned int, fragS *, char *,
TC_PARSE_CONS_RETURN_TYPE);
+extern void emit_leb128_expr (expressionS *, int);
extern void equals (char *, int);
extern void float_cons (int);
extern void ignore_rest_of_line (void);