daily update
[deliverable/binutils-gdb.git] / gold / ehframe.cc
index 4ec29f6b97f7694b7762dbe7198ad7d6e33bdd07..2c470b060c818466965740eebc67082dfad66566 100644 (file)
@@ -1,6 +1,6 @@
 // ehframe.cc -- handle exception frame sections for gold
 
-// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -104,7 +104,7 @@ Eh_frame_hdr::set_final_data_size()
   this->set_data_size(data_size);
 }
 
-// Write the data to the flie.
+// Write the data to the file.
 
 void
 Eh_frame_hdr::do_write(Output_file* of)
@@ -557,7 +557,8 @@ Eh_frame::add_ehframe_input_section(
                                          reloc_type, pcontents,
                                          contents_len, &new_cies))
     {
-      this->eh_frame_hdr_->found_unrecognized_eh_frame_section();
+      if (this->eh_frame_hdr_ != NULL)
+       this->eh_frame_hdr_->found_unrecognized_eh_frame_section();
 
       for (New_cies::iterator p = new_cies.begin();
           p != new_cies.end();
@@ -682,7 +683,7 @@ Eh_frame::read_cie(Sized_relobj<size, big_endian>* object,
                   section_size_type symbol_names_size,
                   const unsigned char* pcontents,
                   const unsigned char* pcie,
-                  const unsigned char *pcieend,
+                  const unsigned charpcieend,
                   Track_relocs<size, big_endian>* relocs,
                   Offsets_to_cie* cies,
                   New_cies* new_cies)
@@ -935,7 +936,7 @@ Eh_frame::read_fde(Sized_relobj<size, big_endian>* object,
                   const unsigned char* pcontents,
                   unsigned int offset,
                   const unsigned char* pfde,
-                  const unsigned char *pfdeend,
+                  const unsigned charpfdeend,
                   Track_relocs<size, big_endian>* relocs,
                   Offsets_to_cie* cies)
 {
@@ -971,9 +972,12 @@ Eh_frame::read_fde(Sized_relobj<size, big_endian>* object,
   if (symndx >= symbols_size / sym_size)
     return false;
   elfcpp::Sym<size, big_endian> sym(symbols + symndx * sym_size);
-  fde_shndx = sym.get_st_shndx();
+  bool is_ordinary;
+  fde_shndx = object->adjust_sym_shndx(symndx, sym.get_st_shndx(),
+                                      &is_ordinary);
 
-  if (fde_shndx != elfcpp::SHN_UNDEF
+  if (is_ordinary
+      && fde_shndx != elfcpp::SHN_UNDEF
       && fde_shndx < object->shnum()
       && !object->is_section_included(fde_shndx))
     {
This page took 0.024739 seconds and 4 git commands to generate.