Remove a white space.
[deliverable/binutils-gdb.git] / gold / copy-relocs.cc
index 1e9705ef3490eb1d03643780b0c01f13d59e90e4..80b50df8838ca8a4bc3863f42a06a063bd9401a4 100644 (file)
@@ -58,7 +58,7 @@ Copy_relocs<sh_type, size, big_endian>::copy_reloc(
     Symbol_table* symtab,
     Layout* layout,
     Sized_symbol<size>* sym,
-    Relobj* object,
+    Sized_relobj<size, big_endian>* object,
     unsigned int shndx,
     Output_section *output_section,
     const Reloc& rel,
@@ -81,7 +81,7 @@ template<int sh_type, int size, bool big_endian>
 bool
 Copy_relocs<sh_type, size, big_endian>::need_copy_reloc(
     Sized_symbol<size>* sym,
-    Relobj* object,
+    Sized_relobj<size, big_endian>* object,
     unsigned int shndx) const
 {
   // FIXME: Handle -z nocopyrelocs.
@@ -118,8 +118,11 @@ Copy_relocs<sh_type, size, big_endian>::emit_copy_reloc(
   // that.  Then we reduce that alignment if the symbol is not aligned
   // within the section.
   gold_assert(sym->is_from_dynobj());
+  bool is_ordinary;
+  unsigned int shndx = sym->shndx(&is_ordinary);
+  gold_assert(is_ordinary);
   typename elfcpp::Elf_types<size>::Elf_WXword addralign =
-    sym->object()->section_addralign(sym->shndx());
+    sym->object()->section_addralign(shndx);
 
   typename Sized_symbol<size>::Value_type value = sym->value();
   while ((value & (addralign - 1)) != 0)
@@ -127,7 +130,7 @@ Copy_relocs<sh_type, size, big_endian>::emit_copy_reloc(
 
   if (this->dynbss_ == NULL)
     {
-      this->dynbss_ = new Output_data_space(addralign);
+      this->dynbss_ = new Output_data_space(addralign, "** dynbss");
       layout->add_output_section_data(".bss",
                                      elfcpp::SHT_NOBITS,
                                      elfcpp::SHF_ALLOC | elfcpp::SHF_WRITE,
@@ -169,10 +172,12 @@ Copy_relocs<sh_type, size, big_endian>::add_copy_reloc(
 
 template<int sh_type, int size, bool big_endian>
 void
-Copy_relocs<sh_type, size, big_endian>::save(Symbol* sym, Relobj* object,
-                                            unsigned int shndx,
-                                            Output_section* output_section,
-                                            const Reloc& rel)
+Copy_relocs<sh_type, size, big_endian>::save(
+    Symbol* sym,
+    Sized_relobj<size, big_endian>* object,
+    unsigned int shndx,
+    Output_section* output_section,
+    const Reloc& rel)
 {
   unsigned int reloc_type = elfcpp::elf_r_type<size>(rel.get_r_info());
   typename elfcpp::Elf_types<size>::Elf_Addr addend =
This page took 0.033647 seconds and 4 git commands to generate.