]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Nit in __libdw_relocatable.
authorRoland McGrath <roland@redhat.com>
Tue, 22 Jun 2010 19:59:54 +0000 (12:59 -0700)
committerRoland McGrath <roland@redhat.com>
Tue, 22 Jun 2010 19:59:54 +0000 (12:59 -0700)
libdw/relocate.c

index 298042acb901953fb4bfc66a11a729f4011f7b91..1a27a71aada7c9d89a80a35339ce47925bfee268 100644 (file)
@@ -552,7 +552,8 @@ __libdw_relocatable (Dwarf *dbg, int sec_idx,
                     GElf_Sym *sym, const char **name, GElf_Sxword *addend,
                     GElf_Sxword offset, const char **secname)
 {
-  struct dwarf_section_reloc *const r = dbg->relocate->sectionrel[sec_idx];
+  struct dwarf_section_reloc *const r
+    = dbg->relocate != NULL ? dbg->relocate->sectionrel[sec_idx] : NULL;
   int symndx;
   int result = relocatable_datum (dbg, sec_idx, r, valp, width,
                                  &symndx, addend);