Files removed as of the 1999-08-23 snapshot.
[deliverable/binutils-gdb.git] / bfd / elfcode.h
index a13bda604711a97fb461f6ab29499fa0f45e70cc..adbafd84ff7bf117514e6bbf0061323493f02303 100644 (file)
@@ -130,6 +130,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define elf_gc_common_final_link       NAME(_bfd_elf,gc_common_final_link)
 #define elf_gc_record_vtinherit                NAME(_bfd_elf,gc_record_vtinherit)
 #define elf_gc_record_vtentry          NAME(_bfd_elf,gc_record_vtentry)
+#define elf_link_record_local_dynamic_symbol \
+  NAME(_bfd_elf,link_record_local_dynamic_symbol)
 
 #if ARCH_SIZE == 64
 #define ELF_R_INFO(X,Y)        ELF64_R_INFO(X,Y)
@@ -423,11 +425,13 @@ elf_swap_dyn_in (abfd, p, dst)
 }
 
 INLINE void
-elf_swap_dyn_out (abfd, src, dst)
+elf_swap_dyn_out (abfd, src, p)
      bfd *abfd;
      const Elf_Internal_Dyn *src;
-     Elf_External_Dyn *dst;
+     PTR p;
 {
+  Elf_External_Dyn *dst = (Elf_External_Dyn *) p;
+
   put_word (abfd, src->d_tag, dst->d_tag);
   put_word (abfd, src->d_un.d_val, dst->d_un.d_val);
 }
@@ -1335,16 +1339,22 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
     }
   else
     {
+      /* Note that ASECT->RELOC_COUNT tends not to be accurate in this
+        case because relocations against this section may use the
+        dynamic symbol table, and in that case bfd_section_from_shdr
+        in elf.c does not update the RELOC_COUNT.  */
       if (asect->_raw_size == 0)
        return true;
 
       rel_hdr = &d->this_hdr;
       reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize;
       rel_hdr2 = NULL;
+      reloc_count2 = 0;
     }
 
-  relents = (arelent *) bfd_alloc (abfd, 
-                                  asect->reloc_count * sizeof (arelent));
+  relents = ((arelent *) 
+            bfd_alloc (abfd, 
+                       (reloc_count + reloc_count2) * sizeof (arelent)));
   if (relents == NULL)
     return false;
 
@@ -1494,7 +1504,8 @@ const struct elf_size_info NAME(_bfd_elf,size_info) = {
   sizeof (Elf_External_Sym),
   sizeof (Elf_External_Dyn),
   sizeof (Elf_External_Note),
-
+  ARCH_SIZE / 8,
+  1,
   ARCH_SIZE, FILE_ALIGN,
   ELFCLASS, EV_CURRENT,
   elf_write_out_phdrs,
@@ -1503,5 +1514,10 @@ const struct elf_size_info NAME(_bfd_elf,size_info) = {
   elf_swap_symbol_out,
   elf_slurp_reloc_table,
   elf_slurp_symbol_table,
-  elf_swap_dyn_in
+  elf_swap_dyn_in,
+  elf_swap_dyn_out,
+  NULL,
+  NULL,
+  NULL,
+  NULL
 };
This page took 0.023586 seconds and 4 git commands to generate.