pipe command completer
[deliverable/binutils-gdb.git] / gold / object.cc
index 374340fa16c0ce63ed79e7c82c9020ca46a92544..689448f50c8a784d1142032875203ffc1d28661f 100644 (file)
@@ -1,6 +1,6 @@
 // object.cc -- support for an object file for linking in gold
 
-// Copyright (C) 2006-2018 Free Software Foundation, Inc.
+// Copyright (C) 2006-2019 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -751,11 +751,13 @@ build_compressed_section_map(
              const unsigned char* contents =
                  obj->section_contents(i, &len, false);
              uint64_t uncompressed_size;
+             Compressed_section_info info;
              if (is_zcompressed)
                {
                  // Skip over the ".zdebug" prefix.
                  name += 7;
                  uncompressed_size = get_uncompressed_size(contents, len);
+                 info.addralign = shdr.get_sh_addralign();
                }
              else
                {
@@ -763,8 +765,8 @@ build_compressed_section_map(
                  name += 6;
                  elfcpp::Chdr<size, big_endian> chdr(contents);
                  uncompressed_size = chdr.get_ch_size();
+                 info.addralign = chdr.get_ch_addralign();
                }
-             Compressed_section_info info;
              info.size = convert_to_section_size_type(uncompressed_size);
              info.flag = shdr.get_sh_flags();
              info.contents = NULL;
@@ -1742,9 +1744,13 @@ Sized_relobj_file<size, big_endian>::do_layout(Symbol_table* symtab,
                  out_section_offsets[i] = invalid_address;
                }
              else if (this->is_deferred_layout())
-               this->deferred_layout_.push_back(
-                   Deferred_layout(i, name, sh_type, pshdrs,
-                                   reloc_shndx[i], reloc_type[i]));
+               {
+                 out_sections[i] = reinterpret_cast<Output_section*>(2);
+                 out_section_offsets[i] = invalid_address;
+                 this->deferred_layout_.push_back(
+                     Deferred_layout(i, name, sh_type, pshdrs,
+                                     reloc_shndx[i], reloc_type[i]));
+               }
              else
                eh_frame_sections.push_back(i);
              continue;
@@ -2947,7 +2953,7 @@ Sized_relobj_file<size, big_endian>::map_to_kept_section(
              // Since we're using this mapping for relocation processing,
              // we don't want to match sections unless they have the same
              // size.
-             uint64_t kept_size;
+             uint64_t kept_size = 0;
              if (kept_section->find_comdat_section(section_name, &kept_shndx,
                                                    &kept_size))
                {
@@ -2957,7 +2963,7 @@ Sized_relobj_file<size, big_endian>::map_to_kept_section(
            }
          else
            {
-             uint64_t kept_size;
+             uint64_t kept_size = 0;
              if (kept_section->find_single_comdat_section(&kept_shndx,
                                                           &kept_size)
                  && sh_size == kept_size)
@@ -3060,7 +3066,8 @@ const unsigned char*
 Object::decompressed_section_contents(
     unsigned int shndx,
     section_size_type* plen,
-    bool* is_new)
+    bool* is_new,
+    uint64_t* palign)
 {
   section_size_type buffer_size;
   const unsigned char* buffer = this->do_section_contents(shndx, &buffer_size,
@@ -3087,6 +3094,8 @@ Object::decompressed_section_contents(
     {
       *plen = uncompressed_size;
       *is_new = false;
+      if (palign != NULL)
+       *palign = p->second.addralign;
       return p->second.contents;
     }
 
@@ -3108,6 +3117,8 @@ Object::decompressed_section_contents(
   // once in this pass.
   *plen = uncompressed_size;
   *is_new = true;
+  if (palign != NULL)
+    *palign = p->second.addralign;
   return uncompressed_data;
 }
 
This page took 0.036464 seconds and 4 git commands to generate.