PR 6048
[binutils-gdb.git] / gold / mapfile.cc
index e053419c092698e283b710d25c15fbf7ae30ef1c..3f1fe285cf48e40380d61f40948194aa0130534a 100644 (file)
@@ -256,12 +256,10 @@ Mapfile::print_input_section(Relobj* relobj, unsigned int shndx)
     }
   else
     {
-      section_offset_type offset;
-      os = relobj->output_section(shndx, &offset);
-      if (offset == -1)
-       addr = ~0ULL;
-      else
-       addr = os->address() + offset;
+      os = relobj->output_section(shndx);
+      addr = relobj->output_section_offset(shndx);
+      if (addr != -1U)
+       addr += os->address();
     }
 
   char sizebuf[50];