Bug 727959 - Add symbol name to relocation errors in the linker. r=tglek
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 21 Feb 2012 08:10:43 +0100
changeset 88793 e18282cd5f616d4b613cadf4b474de05c7728e6a
parent 88792 4c2c6e1e54336bee0eb9c0f39152a997aa04030a
child 88794 4b2b0f2b92b8d2035242b3c1bd068106d8042fbc
push id975
push userffxbld
push dateTue, 13 Mar 2012 21:39:16 +0000
treeherdermozilla-aurora@99faebf9dc36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstglek
bugs727959
milestone13.0a1
Bug 727959 - Add symbol name to relocation errors in the linker. r=tglek
mozglue/linker/CustomElf.cpp
--- a/mozglue/linker/CustomElf.cpp
+++ b/mozglue/linker/CustomElf.cpp
@@ -623,17 +623,18 @@ CustomElf::RelocateJumps()
     const Sym sym = symtab[ELF_R_SYM(rel->r_info)];
     void *symptr;
     if (sym.st_shndx != SHN_UNDEF)
       symptr = GetPtr(sym.st_value);
     else
       symptr = GetSymbolPtrInDeps(strtab.GetStringAt(sym.st_name));
 
     if (symptr == NULL) {
-      log("%s: Error: relocation to NULL @0x%08" PRIxAddr, GetPath(), rel->r_offset);
+      log("%s: Error: relocation to NULL @0x%08" PRIxAddr " for symbol \"%s\"",
+          GetPath(), rel->r_offset, strtab.GetStringAt(sym.st_name));
       return false;
     }
     /* Apply relocation */
     *(void **) ptr = symptr;
   }
   return true;
 }