daily update
[deliverable/binutils-gdb.git] / bfd / elf-hppa.h
index 5e4458c1170666da7dde058697f6a35ca1e6ba46..1e280b71efdfa679269cad69a19b6d7f68b9fd24 100644 (file)
@@ -1,5 +1,6 @@
 /* Common code for PA ELF implementations.
-   Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001, 2002, 2003, 2004
+   Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
@@ -31,7 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define elf_hppa_reloc_final_type elf64_hppa_reloc_final_type
 #define _bfd_elf_hppa_gen_reloc_type _bfd_elf64_hppa_gen_reloc_type
 #define elf_hppa_relocate_section elf64_hppa_relocate_section
-#define bfd_elf_bfd_final_link bfd_elf64_bfd_final_link
 #define elf_hppa_final_link elf64_hppa_final_link
 #endif
 #if ARCH_SIZE == 32
@@ -40,66 +40,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define elf_hppa_reloc_final_type elf32_hppa_reloc_final_type
 #define _bfd_elf_hppa_gen_reloc_type _bfd_elf32_hppa_gen_reloc_type
 #define elf_hppa_relocate_section elf32_hppa_relocate_section
-#define bfd_elf_bfd_final_link bfd_elf32_bfd_final_link
 #define elf_hppa_final_link elf32_hppa_final_link
 #endif
 
-static void elf_hppa_info_to_howto
-  PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-
-static void elf_hppa_info_to_howto_rel
-  PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-
-static reloc_howto_type * elf_hppa_reloc_type_lookup
-  PARAMS ((bfd *, bfd_reloc_code_real_type));
-
-static bfd_boolean elf_hppa_is_local_label_name
-  PARAMS ((bfd *, const char *));
-
-static bfd_boolean elf_hppa_fake_sections
-  PARAMS ((bfd *abfd, Elf_Internal_Shdr *, asection *));
-
-static void elf_hppa_final_write_processing
-  PARAMS ((bfd *, bfd_boolean));
-
-static int hppa_unwind_entry_compare
-  PARAMS ((const PTR, const PTR));
-
-static bfd_boolean elf_hppa_sort_unwind
-  PARAMS ((bfd *));
-
 #if ARCH_SIZE == 64
-static bfd_boolean elf_hppa_add_symbol_hook
-  PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
-          const char **, flagword *, asection **, bfd_vma *));
-
-static bfd_boolean elf_hppa_unmark_useless_dynamic_symbols
-  PARAMS ((struct elf_link_hash_entry *, PTR));
-
-static bfd_boolean elf_hppa_remark_useless_dynamic_symbols
-  PARAMS ((struct elf_link_hash_entry *, PTR));
-
-static bfd_boolean elf_hppa_is_dynamic_loader_symbol
-  PARAMS ((const char *));
-
-static void elf_hppa_record_segment_addrs
-  PARAMS ((bfd *, asection *, PTR));
-
-static bfd_boolean elf_hppa_final_link
-  PARAMS ((bfd *, struct bfd_link_info *));
-
-static bfd_boolean elf_hppa_relocate_section
-  PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
-          bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-
 static bfd_reloc_status_type elf_hppa_final_link_relocate
-  PARAMS ((Elf_Internal_Rela *, bfd *, bfd *, asection *,
-          bfd_byte *, bfd_vma, struct bfd_link_info *,
-          asection *, struct elf_link_hash_entry *,
-          struct elf64_hppa_dyn_hash_entry *));
+  (Elf_Internal_Rela *, bfd *, bfd *, asection *, bfd_byte *, bfd_vma,
+   struct bfd_link_info *, asection *, struct elf_link_hash_entry *,
+   struct elf64_hppa_dyn_hash_entry *);
 
 static int elf_hppa_relocate_insn
-  PARAMS ((int, int, unsigned int));
+  (int, int, unsigned int);
 #endif
 
 /* ELF/PA relocation howto entries.  */
@@ -615,11 +566,10 @@ static reloc_howto_type elf_hppa_howto_table[ELF_HOWTO_TABLE_SIZE] =
    format, and field selector.  */
 
 elf_hppa_reloc_type
-elf_hppa_reloc_final_type (abfd, base_type, format, field)
-     bfd *abfd;
-     elf_hppa_reloc_type base_type;
-     int format;
-     unsigned int field;
+elf_hppa_reloc_final_type (bfd *abfd,
+                          elf_hppa_reloc_type base_type,
+                          int format,
+                          unsigned int field)
 {
   elf_hppa_reloc_type final_type = base_type;
 
@@ -861,6 +811,28 @@ elf_hppa_reloc_final_type (abfd, base_type, format, field)
            }
          break;
 
+       case 32:
+         switch (field)
+           {
+           case e_fsel:
+             final_type = R_PARISC_PCREL32;
+             break;
+           default:
+             return R_PARISC_NONE;
+           }
+         break;
+
+       case 64:
+         switch (field)
+           {
+           case e_fsel:
+             final_type = R_PARISC_PCREL64;
+             break;
+           default:
+             return R_PARISC_NONE;
+           }
+         break;
+
        default:
          return R_PARISC_NONE;
        }
@@ -884,26 +856,25 @@ elf_hppa_reloc_final_type (abfd, base_type, format, field)
    relocation with modifications based on format and field.  */
 
 elf_hppa_reloc_type **
-_bfd_elf_hppa_gen_reloc_type (abfd, base_type, format, field, ignore, sym)
-     bfd *abfd;
-     elf_hppa_reloc_type base_type;
-     int format;
-     unsigned int field;
-     int ignore ATTRIBUTE_UNUSED;
-     asymbol *sym ATTRIBUTE_UNUSED;
+_bfd_elf_hppa_gen_reloc_type (bfd *abfd,
+                             elf_hppa_reloc_type base_type,
+                             int format,
+                             unsigned int field,
+                             int ignore ATTRIBUTE_UNUSED,
+                             asymbol *sym ATTRIBUTE_UNUSED)
 {
   elf_hppa_reloc_type *finaltype;
   elf_hppa_reloc_type **final_types;
   bfd_size_type amt = sizeof (elf_hppa_reloc_type *) * 2;
 
   /* Allocate slots for the BFD relocation.  */
-  final_types = (elf_hppa_reloc_type **) bfd_alloc (abfd, amt);
+  final_types = bfd_alloc (abfd, amt);
   if (final_types == NULL)
     return NULL;
 
   /* Allocate space for the relocation itself.  */
   amt = sizeof (elf_hppa_reloc_type);
-  finaltype = (elf_hppa_reloc_type *) bfd_alloc (abfd, amt);
+  finaltype = bfd_alloc (abfd, amt);
   if (finaltype == NULL)
     return NULL;
 
@@ -919,12 +890,11 @@ _bfd_elf_hppa_gen_reloc_type (abfd, base_type, format, field, ignore, sym)
 /* Translate from an elf into field into a howto relocation pointer.  */
 
 static void
-elf_hppa_info_to_howto (abfd, bfd_reloc, elf_reloc)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *bfd_reloc;
-     Elf_Internal_Rela *elf_reloc;
+elf_hppa_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+                       arelent *bfd_reloc,
+                       Elf_Internal_Rela *elf_reloc)
 {
-  BFD_ASSERT (ELF_R_TYPE(elf_reloc->r_info)
+  BFD_ASSERT (ELF_R_TYPE (elf_reloc->r_info)
              < (unsigned int) R_PARISC_UNIMPLEMENTED);
   bfd_reloc->howto = &elf_hppa_howto_table[ELF_R_TYPE (elf_reloc->r_info)];
 }
@@ -932,10 +902,9 @@ elf_hppa_info_to_howto (abfd, bfd_reloc, elf_reloc)
 /* Translate from an elf into field into a howto relocation pointer.  */
 
 static void
-elf_hppa_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *bfd_reloc;
-     Elf_Internal_Rela *elf_reloc;
+elf_hppa_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
+                           arelent *bfd_reloc,
+                           Elf_Internal_Rela *elf_reloc)
 {
   BFD_ASSERT (ELF_R_TYPE(elf_reloc->r_info)
              < (unsigned int) R_PARISC_UNIMPLEMENTED);
@@ -946,9 +915,8 @@ elf_hppa_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
    relocation for an ARCH machine.  */
 
 static reloc_howto_type *
-elf_hppa_reloc_type_lookup (abfd, code)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     bfd_reloc_code_real_type code;
+elf_hppa_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                           bfd_reloc_code_real_type code)
 {
   if ((int) code < (int) R_PARISC_UNIMPLEMENTED)
     {
@@ -961,9 +929,7 @@ elf_hppa_reloc_type_lookup (abfd, code)
 /* Return TRUE if SYM represents a local label symbol.  */
 
 static bfd_boolean
-elf_hppa_is_local_label_name (abfd, name)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     const char *name;
+elf_hppa_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name)
 {
   if (name[0] == 'L' && name[1] == '$')
     return 1;
@@ -974,12 +940,9 @@ elf_hppa_is_local_label_name (abfd, name)
    section name, which is a hack, but ought to work.  */
 
 static bfd_boolean
-elf_hppa_fake_sections (abfd, hdr, sec)
-     bfd *abfd;
-     Elf_Internal_Shdr *hdr;
-     asection *sec;
+elf_hppa_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec)
 {
-  register const char *name;
+  const char *name;
 
   name = bfd_get_section_name (abfd, sec);
 
@@ -1017,9 +980,8 @@ elf_hppa_fake_sections (abfd, hdr, sec)
 }
 
 static void
-elf_hppa_final_write_processing (abfd, linker)
-     bfd *abfd;
-     bfd_boolean linker ATTRIBUTE_UNUSED;
+elf_hppa_final_write_processing (bfd *abfd,
+                                bfd_boolean linker ATTRIBUTE_UNUSED)
 {
   int mach = bfd_get_mach (abfd);
 
@@ -1048,20 +1010,18 @@ elf_hppa_final_write_processing (abfd, linker)
    final link.  */
 
 static int
-hppa_unwind_entry_compare (a, b)
-     const PTR a;
-     const PTR b;
+hppa_unwind_entry_compare (const void *a, const void *b)
 {
   const bfd_byte *ap, *bp;
   unsigned long av, bv;
 
-  ap = (const bfd_byte *) a;
+  ap = a;
   av = (unsigned long) ap[0] << 24;
   av |= (unsigned long) ap[1] << 16;
   av |= (unsigned long) ap[2] << 8;
   av |= (unsigned long) ap[3];
 
-  bp = (const bfd_byte *) b;
+  bp = b;
   bv = (unsigned long) bp[0] << 24;
   bv |= (unsigned long) bp[1] << 16;
   bv |= (unsigned long) bp[2] << 8;
@@ -1070,8 +1030,7 @@ hppa_unwind_entry_compare (a, b)
   return av < bv ? -1 : av > bv ? 1 : 0;
 }
 
-static bfd_boolean elf_hppa_sort_unwind (abfd)
-     bfd *abfd;
+static bfd_boolean elf_hppa_sort_unwind (bfd *abfd)
 {
   asection *s;
 
@@ -1083,16 +1042,12 @@ static bfd_boolean elf_hppa_sort_unwind (abfd)
   if (s != NULL)
     {
       bfd_size_type size;
-      char *contents;
-
-      size = s->_raw_size;
-      contents = bfd_malloc (size);
-      if (contents == NULL)
-       return FALSE;
+      bfd_byte *contents;
 
-      if (! bfd_get_section_contents (abfd, s, contents, (file_ptr) 0, size))
+      if (!bfd_malloc_and_get_section (abfd, s, &contents))
        return FALSE;
 
+      size = s->size;
       qsort (contents, (size_t) (size / 16), 16, hppa_unwind_entry_compare);
 
       if (! bfd_set_section_contents (abfd, s, contents, (file_ptr) 0, size))
@@ -1108,14 +1063,13 @@ static bfd_boolean elf_hppa_sort_unwind (abfd)
    indices, which we have to handle.  */
 
 static bfd_boolean
-elf_hppa_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
-     bfd *abfd;
-     struct bfd_link_info *info ATTRIBUTE_UNUSED;
-     const Elf_Internal_Sym *sym;
-     const char **namep ATTRIBUTE_UNUSED;
-     flagword *flagsp ATTRIBUTE_UNUSED;
-     asection **secp;
-     bfd_vma *valp;
+elf_hppa_add_symbol_hook (bfd *abfd,
+                         struct bfd_link_info *info ATTRIBUTE_UNUSED,
+                         Elf_Internal_Sym *sym,
+                         const char **namep ATTRIBUTE_UNUSED,
+                         flagword *flagsp ATTRIBUTE_UNUSED,
+                         asection **secp,
+                         bfd_vma *valp)
 {
   int index = sym->st_shndx;
 
@@ -1138,11 +1092,10 @@ elf_hppa_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
 }
 
 static bfd_boolean
-elf_hppa_unmark_useless_dynamic_symbols (h, data)
-     struct elf_link_hash_entry *h;
-     PTR data;
+elf_hppa_unmark_useless_dynamic_symbols (struct elf_link_hash_entry *h,
+                                        void *data)
 {
-  struct bfd_link_info *info = (struct bfd_link_info *)data;
+  struct bfd_link_info *info = data;
 
   if (h->root.type == bfd_link_hash_warning)
     h = (struct elf_link_hash_entry *) h->root.u.i.link;
@@ -1159,9 +1112,8 @@ elf_hppa_unmark_useless_dynamic_symbols (h, data)
 
      Ultimately we should have better controls over the generic ELF BFD
      linker code.  */
-  if (! info->relocateable
-      && ! (info->shared
-           && !info->no_undefined)
+  if (! info->relocatable
+      && info->unresolved_syms_in_shared_libs != RM_IGNORE
       && h->root.type == bfd_link_hash_undefined
       && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0
       && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0)
@@ -1174,11 +1126,10 @@ elf_hppa_unmark_useless_dynamic_symbols (h, data)
 }
 
 static bfd_boolean
-elf_hppa_remark_useless_dynamic_symbols (h, data)
-     struct elf_link_hash_entry *h;
-     PTR data;
+elf_hppa_remark_useless_dynamic_symbols (struct elf_link_hash_entry *h,
+                                        void *data)
 {
-  struct bfd_link_info *info = (struct bfd_link_info *)data;
+  struct bfd_link_info *info = data;
 
   if (h->root.type == bfd_link_hash_warning)
     h = (struct elf_link_hash_entry *) h->root.u.i.link;
@@ -1188,16 +1139,15 @@ elf_hppa_remark_useless_dynamic_symbols (h, data)
      the generic code will warn that it is undefined.
 
      This behavior is undesirable on HPs since the standard shared
-     libraries contain reerences to undefined symbols.
+     libraries contain references to undefined symbols.
 
      So we twiddle the flags associated with such symbols so that they
      will not trigger the warning.  ?!? FIXME.  This is horribly fragile.
 
      Ultimately we should have better controls over the generic ELF BFD
      linker code.  */
-  if (! info->relocateable
-      && ! (info->shared
-           && !info->no_undefined)
+  if (! info->relocatable
+      && info->unresolved_syms_in_shared_libs != RM_IGNORE
       && h->root.type == bfd_link_hash_undefined
       && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0
       && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0
@@ -1211,8 +1161,7 @@ elf_hppa_remark_useless_dynamic_symbols (h, data)
 }
 
 static bfd_boolean
-elf_hppa_is_dynamic_loader_symbol (name)
-     const char * name;
+elf_hppa_is_dynamic_loader_symbol (const char *name)
 {
   return (! strcmp (name, "__CPU_REVISION")
          || ! strcmp (name, "__CPU_KEYBITS_1")
@@ -1229,15 +1178,14 @@ elf_hppa_is_dynamic_loader_symbol (name)
 
 /* Record the lowest address for the data and text segments.  */
 static void
-elf_hppa_record_segment_addrs (abfd, section, data)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *section;
-     PTR data;
+elf_hppa_record_segment_addrs (bfd *abfd ATTRIBUTE_UNUSED,
+                              asection *section,
+                              void *data)
 {
   struct elf64_hppa_link_hash_table *hppa_info;
   bfd_vma value;
 
-  hppa_info = (struct elf64_hppa_link_hash_table *)data;
+  hppa_info = data;
 
   value = section->vma - section->filepos;
 
@@ -1258,14 +1206,12 @@ elf_hppa_record_segment_addrs (abfd, section, data)
    fall back to the generic ELF final link routine.  */
 
 static bfd_boolean
-elf_hppa_final_link (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info)
 {
   bfd_boolean retval;
   struct elf64_hppa_link_hash_table *hppa_info = elf64_hppa_hash_table (info);
 
-  if (! info->relocateable)
+  if (! info->relocatable)
     {
       struct elf_link_hash_entry *gp;
       bfd_vma gp_val;
@@ -1330,7 +1276,7 @@ elf_hppa_final_link (abfd, info)
   hppa_info->data_segment_base = (bfd_vma)-1;
 
   /* HP's shared libraries have references to symbols that are not
-     defined anywhere.  The generic ELF BFD linker code will complaim
+     defined anywhere.  The generic ELF BFD linker code will complain
      about such symbols.
 
      So we detect the losing case and arrange for the flags on the symbol
@@ -1343,7 +1289,7 @@ elf_hppa_final_link (abfd, info)
                          info);
 
   /* Invoke the regular ELF backend linker to do all the work.  */
-  retval = bfd_elf_bfd_final_link (abfd, info);
+  retval = bfd_elf_final_link (abfd, info);
 
   elf_link_hash_traverse (elf_hash_table (info),
                          elf_hppa_remark_useless_dynamic_symbols,
@@ -1360,23 +1306,21 @@ elf_hppa_final_link (abfd, info)
 /* Relocate an HPPA ELF section.  */
 
 static bfd_boolean
-elf_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
-                          contents, relocs, local_syms, local_sections)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
-     bfd *input_bfd;
-     asection *input_section;
-     bfd_byte *contents;
-     Elf_Internal_Rela *relocs;
-     Elf_Internal_Sym *local_syms;
-     asection **local_sections;
+elf_hppa_relocate_section (bfd *output_bfd,
+                          struct bfd_link_info *info,
+                          bfd *input_bfd,
+                          asection *input_section,
+                          bfd_byte *contents,
+                          Elf_Internal_Rela *relocs,
+                          Elf_Internal_Sym *local_syms,
+                          asection **local_sections)
 {
   Elf_Internal_Shdr *symtab_hdr;
   Elf_Internal_Rela *rel;
   Elf_Internal_Rela *relend;
   struct elf64_hppa_link_hash_table *hppa_info;
 
-  if (info->relocateable)
+  if (info->relocatable)
     return TRUE;
 
   hppa_info = elf64_hppa_hash_table (info);
@@ -1417,11 +1361,11 @@ elf_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
          /* This is a local symbol.  */
          sym = local_syms + r_symndx;
          sym_sec = local_sections[r_symndx];
-         relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel);
+         relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sym_sec, rel);
 
          /* If this symbol has an entry in the PA64 dynamic hash
             table, then get it.  */
-         dyn_name = get_dyn_name (input_section, h, rel,
+         dyn_name = get_dyn_name (input_bfd, h, rel,
                                   &dynh_buf, &dynh_buflen);
          dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table,
                                              dyn_name, FALSE, FALSE);
@@ -1444,7 +1388,7 @@ elf_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
 
              /* If this symbol has an entry in the PA64 dynamic hash
                 table, then get it.  */
-             dyn_name = get_dyn_name (input_section, h, rel,
+             dyn_name = get_dyn_name (input_bfd, h, rel,
                                       &dynh_buf, &dynh_buflen);
              dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table,
                                                  dyn_name, FALSE, FALSE);
@@ -1469,18 +1413,12 @@ elf_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
              else
                relocation = 0;
            }
-         /* Allow undefined symbols in shared libraries.  */
-         else if (info->shared && !info->no_undefined
+         else if (info->unresolved_syms_in_objects == RM_IGNORE
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            {
-             if (info->symbolic)
-               (*info->callbacks->undefined_symbol)
-                 (info, h->root.root.string, input_bfd,
-                  input_section, rel->r_offset, FALSE);
-
              /* If this symbol has an entry in the PA64 dynamic hash
                 table, then get it.  */
-             dyn_name = get_dyn_name (input_section, h, rel,
+             dyn_name = get_dyn_name (input_bfd, h, rel,
                                       &dynh_buf, &dynh_buflen);
              dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table,
                                                  dyn_name, FALSE, FALSE);
@@ -1491,12 +1429,25 @@ elf_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
                    (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
                     bfd_archive_filename (input_bfd), h->root.root.string,
                     bfd_get_section_name (input_bfd, input_section));
-                 relocation = 0;
                }
              relocation = 0;
            }
          else if (h->root.type == bfd_link_hash_undefweak)
-           relocation = 0;
+            {
+             dyn_name = get_dyn_name (input_bfd, h, rel,
+                                      &dynh_buf, &dynh_buflen);
+             dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table,
+                                                 dyn_name, FALSE, FALSE);
+
+             if (dyn_h == NULL)
+               {
+                 (*_bfd_error_handler)
+                   (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
+                    bfd_archive_filename (input_bfd), h->root.root.string,
+                    bfd_get_section_name (input_bfd, input_section));
+               }
+             relocation = 0;
+           }
          else
            {
              /* Ignore dynamic loader defined symbols.  */
@@ -1506,7 +1457,9 @@ elf_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
                {
                  if (!((*info->callbacks->undefined_symbol)
                        (info, h->root.root.string, input_bfd,
-                        input_section, rel->r_offset, TRUE)))
+                        input_section, rel->r_offset,
+                        (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
+                         || ELF_ST_VISIBILITY (h->other)))))
                    return FALSE;
                  break;
                }
@@ -1565,19 +1518,16 @@ elf_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
    function.  */
 
 static bfd_reloc_status_type
-elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
-                             input_section, contents, value,
-                             info, sym_sec, h, dyn_h)
-     Elf_Internal_Rela *rel;
-     bfd *input_bfd;
-     bfd *output_bfd;
-     asection *input_section;
-     bfd_byte *contents;
-     bfd_vma value;
-     struct bfd_link_info *info;
-     asection *sym_sec;
-     struct elf_link_hash_entry *h ATTRIBUTE_UNUSED;
-     struct elf64_hppa_dyn_hash_entry *dyn_h;
+elf_hppa_final_link_relocate (Elf_Internal_Rela *rel,
+                             bfd *input_bfd,
+                             bfd *output_bfd,
+                             asection *input_section,
+                             bfd_byte *contents,
+                             bfd_vma value,
+                             struct bfd_link_info *info,
+                             asection *sym_sec,
+                             struct elf_link_hash_entry *h ATTRIBUTE_UNUSED,
+                             struct elf64_hppa_dyn_hash_entry *dyn_h)
 {
   int insn;
   bfd_vma offset = rel->r_offset;
@@ -2123,10 +2073,7 @@ elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
    to insert the relocation into the given instruction.  */
 
 static int
-elf_hppa_relocate_insn (insn, sym_value, r_type)
-     int insn;
-     int sym_value;
-     unsigned int r_type;
+elf_hppa_relocate_insn (int insn, int sym_value, unsigned int r_type)
 {
   switch (r_type)
     {
This page took 0.029727 seconds and 4 git commands to generate.