daily update
[deliverable/binutils-gdb.git] / gold / target-reloc.h
index 04854d2d60eeb4d7f0ad480e54f53d6ece4f28eb..2d12fa21e0fa5d454ff2e87c049cca8db39fab09 100644 (file)
@@ -36,7 +36,7 @@ namespace gold
 // template parameter Scan must be a class type which provides two
 // functions: local() and global().  Those functions implement the
 // machine specific part of scanning.  We do it this way to
-// avoidmaking a function call for each relocation, and to avoid
+// avoid making a function call for each relocation, and to avoid
 // repeating the generic code for each target.
 
 template<int size, bool big_endian, typename Target_type, int sh_type,
@@ -284,6 +284,10 @@ relocate_section(
          else
            symval.set_no_output_symtab_entry();
          symval.set_output_value(sym->value());
+         if (gsym->type() == elfcpp::STT_TLS)
+           symval.set_is_tls_symbol();
+         else if (gsym->type() == elfcpp::STT_GNU_IFUNC)
+           symval.set_is_ifunc_symbol();
          psymval = &symval;
 
          is_defined_in_discarded_section =
@@ -341,7 +345,7 @@ relocate_section(
        }
 
       if (sym != NULL
-         && sym->is_undefined()
+         && (sym->is_undefined() || sym->is_placeholder())
          && sym->binding() != elfcpp::STB_WEAK
          && !is_defined_in_discarded_section
           && !target->is_defined_by_abi(sym)
@@ -515,7 +519,7 @@ relocate_for_relocatable(
     const Relocatable_relocs* rr,
     unsigned char* view,
     typename elfcpp::Elf_types<size>::Elf_Addr view_address,
-    section_size_type,
+    section_size_type view_size,
     unsigned char* reloc_view,
     section_size_type reloc_view_size)
 {
@@ -537,6 +541,19 @@ relocate_for_relocatable(
       if (strategy == Relocatable_relocs::RELOC_DISCARD)
        continue;
 
+      if (strategy == Relocatable_relocs::RELOC_SPECIAL)
+       {
+         // Target wants to handle this relocation.
+         Sized_target<size, big_endian>* target =
+           parameters->sized_target<size, big_endian>();
+         target->relocate_special_relocatable(relinfo, sh_type, prelocs,
+                                              i, output_section,
+                                              offset_in_output_section,
+                                              view, view_address,
+                                              view_size, pwrite);
+         pwrite += reloc_size;
+         continue;
+       }
       Reltype reloc(prelocs);
       Reltype_write reloc_write(pwrite);
 
This page took 0.024711 seconds and 4 git commands to generate.