From 7b7e22db838c180520937a7cf1d75f8384e40cc5 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Mon, 30 Mar 2009 19:43:46 +0200 Subject: [PATCH] dwarflint: DW_FORM_ref_addr doesn't have to be relocated --- src/dwarflint.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/dwarflint.c b/src/dwarflint.c index 07e30bc75..4cea78deb 100644 --- a/src/dwarflint.c +++ b/src/dwarflint.c @@ -3165,9 +3165,11 @@ read_die_chain (struct read_ctx *ctx, &where, skip_mismatched))) relocate_one (reloc, rel, addr_64 ? 8 : 4, &addr, &where, reloc_target (form, it), NULL); - else if ((type_is_rel - || form == DW_FORM_ref_addr) - && addr != 0) + else if (type_is_rel && addr != 0) + /* In non-rel files, neither addr, nor ref_addr + /need/ a relocation. We at least check that + ref_addr points to sensible datum by recording + the reference below. */ wr_message (mc_impact_2 | mc_die_rel | mc_reloc, &where, PRI_LACK_RELOCATION, dwarf_form_string (form)); -- 2.47.2