]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: DW_FORM_ref_addr doesn't have to be relocated
authorPetr Machata <pmachata@redhat.com>
Mon, 30 Mar 2009 17:43:46 +0000 (19:43 +0200)
committerPetr Machata <pmachata@redhat.com>
Wed, 1 Apr 2009 12:47:58 +0000 (14:47 +0200)
src/dwarflint.c

index 07e30bc75cbf4ed4d93bb05109c6b680a84a9bf6..4cea78debc19e7e50bd4efbd273c1dbfe42c170e 100644 (file)
@@ -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));