*** empty log message ***
[deliverable/binutils-gdb.git] / gold / object.cc
index e444ec1ead7fcb568a7696ac0853a01052e214e6..ed7917bf4cf0ec30f430e5f7229f9b71e50818e8 100644 (file)
@@ -1,6 +1,6 @@
 // object.cc -- support for an object file for linking in gold
 
-// Copyright 2006, 2007 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -226,7 +226,7 @@ Sized_relobj<size, big_endian>::check_eh_frame_flags(
 {
   return (shdr->get_sh_size() > 0
          && shdr->get_sh_type() == elfcpp::SHT_PROGBITS
-         && shdr->get_sh_flags() == elfcpp::SHF_ALLOC);
+         && (shdr->get_sh_flags() & elfcpp::SHF_ALLOC) != 0);
 }
 
 // Return whether there is a GNU .eh_frame section, given the section
@@ -275,8 +275,11 @@ Sized_relobj<size, big_endian>::do_read_symbols(Read_symbols_data* sd)
 
   const unsigned char* namesu = sd->section_names->data();
   const char* names = reinterpret_cast<const char*>(namesu);
-  if (this->find_eh_frame(pshdrs, names, sd->section_names_size))
-    this->has_eh_frame_ = true;
+  if (memmem(names, sd->section_names_size, ".eh_frame", 10) != NULL)
+    {
+      if (this->find_eh_frame(pshdrs, names, sd->section_names_size))
+        this->has_eh_frame_ = true;
+    }
 
   sd->symbols = NULL;
   sd->symbols_size = 0;
@@ -951,7 +954,7 @@ Sized_relobj<size, big_endian>::do_finalize_local_symbols(unsigned int index,
       
       if (shndx >= elfcpp::SHN_LORESERVE)
        {
-         if (shndx == elfcpp::SHN_ABS)
+         if (shndx == elfcpp::SHN_ABS || shndx == elfcpp::SHN_COMMON)
            lv.set_output_value(lv.input_value());
          else
            {
@@ -1049,17 +1052,6 @@ Sized_relobj<size, big_endian>::do_set_local_dynsym_offset(off_t off)
   return this->output_local_dynsym_count_;
 }
 
-// Return the value of the local symbol symndx.
-template<int size, bool big_endian>
-typename elfcpp::Elf_types<size>::Elf_Addr
-Sized_relobj<size, big_endian>::local_symbol_value(unsigned int symndx) const
-{
-  gold_assert(symndx < this->local_symbol_count_);
-  gold_assert(symndx < this->local_values_.size());
-  const Symbol_value<size>& lv(this->local_values_[symndx]);
-  return lv.value(this, 0);
-}
-
 // Write out the local symbols.
 
 template<int size, bool big_endian>
This page took 0.025011 seconds and 4 git commands to generate.