From 6b9a135d72c3826b9b5e2a5d35acfb777ec18dcd Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 3 Aug 2020 22:02:24 +0200 Subject: gas: Use udata for DW_AT_high_pc when emitting DWARF4 For DWARF4 DW_AT_high_pc can be expressed as constant offset from DW_AT_low_pc which saves a relocation. Use DW_FORM_udate (uleb128) to keep the constant value as small as possible. gas/ChangeLog: * 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. --- gas/read.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gas/read.c') diff --git a/gas/read.c b/gas/read.c index 8f93c2b..f192cc1 100644 --- a/gas/read.c +++ b/gas/read.c @@ -5138,7 +5138,7 @@ output_big_leb128 (char *p, LITTLENUM_TYPE *bignum, unsigned int size, int sign) /* 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; -- cgit v1.1