* amd64-tdep.c (amd64_frame_cache): Fix comment.
[deliverable/binutils-gdb.git] / bfd / elf64-hppa.c
index 88403f5221cf52d0ef88e9b3226582665ede5f4c..06aff7b014ed4f8f79a8df334ff28970dba78b23 100644 (file)
@@ -202,8 +202,8 @@ static bfd_boolean elf64_hppa_size_dynamic_sections
   PARAMS ((bfd *, struct bfd_link_info *));
 
 static bfd_boolean elf64_hppa_link_output_symbol_hook
-  PARAMS ((bfd *abfd, struct bfd_link_info *, const char *,
-          Elf_Internal_Sym *, asection *input_sec));
+  PARAMS ((struct bfd_link_info *, const char *, Elf_Internal_Sym *,
+          asection *, struct elf_link_hash_entry *));
 
 static bfd_boolean elf64_hppa_finish_dynamic_symbol
   PARAMS ((bfd *, struct bfd_link_info *,
@@ -213,7 +213,7 @@ static int elf64_hppa_additional_program_headers
   PARAMS ((bfd *));
 
 static bfd_boolean elf64_hppa_modify_segment_map
-  PARAMS ((bfd *));
+  PARAMS ((bfd *, struct bfd_link_info *));
 
 static enum elf_reloc_type_class elf64_hppa_reloc_type_class
   PARAMS ((const Elf_Internal_Rela *));
@@ -975,7 +975,7 @@ elf64_hppa_dynamic_symbol_p (h, info)
     return FALSE;
 }
 
-/* Mark all funtions exported by this file so that we can later allocate
+/* Mark all functions exported by this file so that we can later allocate
    entries in .opd for them.  */
 
 static bfd_boolean
@@ -1211,7 +1211,7 @@ elf64_hppa_post_process_headers (abfd, link_info)
 }
 
 /* Create function descriptor section (.opd).  This section is called .opd
-   because it contains "official prodecure descriptors".  The "official"
+   because it contains "official procedure descriptors".  The "official"
    refers to the fact that these descriptors are used when taking the address
    of a procedure, thus ensuring a unique address for each procedure.  */
 
@@ -1642,7 +1642,7 @@ elf64_hppa_size_dynamic_sections (output_bfd, info)
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (! info->shared)
+      if (info->executable)
        {
          s = bfd_get_section_by_name (dynobj, ".interp");
          BFD_ASSERT (s != NULL);
@@ -1893,12 +1893,12 @@ elf64_hppa_size_dynamic_sections (output_bfd, info)
    table.  Ick.  */
 
 static bfd_boolean
-elf64_hppa_link_output_symbol_hook (abfd, info, name, sym, input_sec)
-     bfd *abfd ATTRIBUTE_UNUSED;
+elf64_hppa_link_output_symbol_hook (info, name, sym, input_sec, h)
      struct bfd_link_info *info;
      const char *name;
      Elf_Internal_Sym *sym;
      asection *input_sec ATTRIBUTE_UNUSED;
+     struct elf_link_hash_entry *h;
 {
   struct elf64_hppa_link_hash_table *hppa_info;
   struct elf64_hppa_dyn_hash_entry *dyn_h;
@@ -1912,6 +1912,8 @@ elf64_hppa_link_output_symbol_hook (abfd, info, name, sym, input_sec)
   hppa_info = elf64_hppa_hash_table (info);
   dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table,
                                      name, FALSE, FALSE);
+  if (!dyn_h || dyn_h->h != h)
+    return TRUE;
 
   /* Function symbols for which we created .opd entries *may* have been
      munged by finish_dynamic_symbol and have to be un-munged here.
@@ -1920,7 +1922,7 @@ elf64_hppa_link_output_symbol_hook (abfd, info, name, sym, input_sec)
      into non-dynamic ones, so we initialize st_shndx to -1 in
      mark_exported_functions and check to see if it was overwritten
      here instead of just checking dyn_h->h->dynindx.  */
-  if (dyn_h && dyn_h->want_opd && dyn_h->st_shndx != -1)
+  if (dyn_h->want_opd && dyn_h->st_shndx != -1)
     {
       /* Restore the saved value and section index.  */
       sym->st_value = dyn_h->st_value;
@@ -2281,7 +2283,7 @@ elf64_hppa_finalize_dlt (dyn_h, data)
       bfd_put_64 (sdlt->owner, value, sdlt->contents + dyn_h->dlt_offset);
     }
 
-  /* Create a relocation for the DLT entry assocated with this symbol.
+  /* Create a relocation for the DLT entry associated with this symbol.
      When building a shared library the symbol does not have to be dynamic.  */
   if (dyn_h->want_dlt
       && (elf64_hppa_dynamic_symbol_p (dyn_h->h, info) || info->shared))
@@ -2609,8 +2611,9 @@ elf64_hppa_additional_program_headers (abfd)
    existence of a .interp section.  */
 
 static bfd_boolean
-elf64_hppa_modify_segment_map (abfd)
+elf64_hppa_modify_segment_map (abfd, info)
      bfd *abfd;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
 {
   struct elf_segment_map *m;
   asection *s;
@@ -2675,12 +2678,9 @@ elf64_hppa_elf_get_symbol_type (elf_sym, type)
 
 static struct bfd_elf_special_section const elf64_hppa_special_sections[]=
 {
-  { ".fini",           0,      NULL,   0,
-    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
-  { ".init",           0,      NULL,   0,
-    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
-  { NULL,              0,      NULL,   0,
-    0,                 0 }
+  { ".fini",    5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+  { ".init",    5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+  { NULL,       0, 0, 0,            0 }
 };
 
 /* The hash bucket size is the standard one, namely 4.  */
@@ -2775,7 +2775,6 @@ const struct elf_size_info hppa64_elf_size_info =
 #define elf_backend_plt_readonly       0
 #define elf_backend_want_plt_sym       0
 #define elf_backend_got_header_size     0
-#define elf_backend_plt_header_size     0
 #define elf_backend_type_change_ok     TRUE
 #define elf_backend_get_symbol_type    elf64_hppa_elf_get_symbol_type
 #define elf_backend_reloc_type_class   elf64_hppa_reloc_type_class
This page took 0.025551 seconds and 4 git commands to generate.