Sync config.guess and config.sub with GCC
[deliverable/binutils-gdb.git] / gold / mapfile.cc
index 9cec36638bda685290d3898d8b66161a7b3c7388..2062ae4089b94055124edccb321626c07cf836e8 100644 (file)
@@ -202,7 +202,7 @@ Mapfile::print_memory_map_header()
 template<int size, bool big_endian>
 void
 Mapfile::print_input_section_symbols(
-    const Sized_relobj<size, big_endian>* relobj,
+    const Sized_relobj_file<size, big_endian>* relobj,
     unsigned int shndx)
 {
   unsigned int symcount = relobj->symbol_count();
@@ -253,7 +253,7 @@ Mapfile::print_input_section(Relobj* relobj, unsigned int shndx)
     {
       os = relobj->output_section(shndx);
       addr = relobj->output_section_offset(shndx);
-      if (addr != -1U)
+      if (addr != -1ULL)
        addr += os->address();
     }
 
@@ -273,8 +273,8 @@ Mapfile::print_input_section(Relobj* relobj, unsigned int shndx)
 #ifdef HAVE_TARGET_32_LITTLE
        case Parameters::TARGET_32_LITTLE:
          {
-           const Sized_relobj<32, false>* sized_relobj =
-             static_cast<Sized_relobj<32, false>*>(relobj);
+           const Sized_relobj_file<32, false>* sized_relobj =
+             static_cast<Sized_relobj_file<32, false>*>(relobj);
            this->print_input_section_symbols(sized_relobj, shndx);
          }
          break;
@@ -282,8 +282,8 @@ Mapfile::print_input_section(Relobj* relobj, unsigned int shndx)
 #ifdef HAVE_TARGET_32_BIG
        case Parameters::TARGET_32_BIG:
          {
-           const Sized_relobj<32, true>* sized_relobj =
-             static_cast<Sized_relobj<32, true>*>(relobj);
+           const Sized_relobj_file<32, true>* sized_relobj =
+             static_cast<Sized_relobj_file<32, true>*>(relobj);
            this->print_input_section_symbols(sized_relobj, shndx);
          }
          break;
@@ -291,8 +291,8 @@ Mapfile::print_input_section(Relobj* relobj, unsigned int shndx)
 #ifdef HAVE_TARGET_64_LITTLE
        case Parameters::TARGET_64_LITTLE:
          {
-           const Sized_relobj<64, false>* sized_relobj =
-             static_cast<Sized_relobj<64, false>*>(relobj);
+           const Sized_relobj_file<64, false>* sized_relobj =
+             static_cast<Sized_relobj_file<64, false>*>(relobj);
            this->print_input_section_symbols(sized_relobj, shndx);
          }
          break;
@@ -300,8 +300,8 @@ Mapfile::print_input_section(Relobj* relobj, unsigned int shndx)
 #ifdef HAVE_TARGET_64_BIG
        case Parameters::TARGET_64_BIG:
          {
-           const Sized_relobj<64, true>* sized_relobj =
-             static_cast<Sized_relobj<64, true>*>(relobj);
+           const Sized_relobj_file<64, true>* sized_relobj =
+             static_cast<Sized_relobj_file<64, true>*>(relobj);
            this->print_input_section_symbols(sized_relobj, shndx);
          }
          break;
@@ -347,6 +347,12 @@ Mapfile::print_discarded_sections(const Input_objects* input_objects)
        ++p)
     {
       Relobj* relobj = *p;
+      // Lock the object so we can read from it.  This is only called
+      // single-threaded from Layout_task_runner, so it is OK to lock.
+      // Unfortunately we have no way to pass in a Task token.
+      const Task* dummy_task = reinterpret_cast<const Task*>(-1);
+      Task_lock_obj<Object> tl(dummy_task, relobj);
+
       unsigned int shnum = relobj->shnum();
       for (unsigned int i = 0; i < shnum; ++i)
        {
This page took 0.024828 seconds and 4 git commands to generate.