Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / elf64-hppa.c
index 66b82d88e4beb1a99cea1418480edbd48ed3058f..7fc2dc0e0c1384babf3b7eee1c56c1a735d40dbc 100644 (file)
@@ -289,7 +289,7 @@ static struct bfd_link_hash_table*
 elf64_hppa_hash_table_create (bfd *abfd)
 {
   struct elf64_hppa_link_hash_table *htab;
-  bfd_size_type amt = sizeof (*htab);
+  size_t amt = sizeof (*htab);
 
   htab = bfd_zmalloc (amt);
   if (htab == NULL)
@@ -383,7 +383,9 @@ elf64_hppa_section_from_shdr (bfd *abfd,
   if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
     return FALSE;
 
-  return TRUE;
+  return ((hdr->sh_flags & SHF_PARISC_SHORT) == 0
+         || bfd_set_section_flags (hdr->bfd_section,
+                                   hdr->bfd_section->flags | SEC_SMALL_DATA));
 }
 
 /* SEC is a section containing relocs for an input BFD when linking; return
@@ -532,8 +534,7 @@ elf64_hppa_check_relocs (bfd *abfd,
 
         ?!? Note we leak the last section_syms array.  Presumably we
         could free it in one of the later routines in this file.  */
-      if (hppa_info->section_syms)
-       free (hppa_info->section_syms);
+      free (hppa_info->section_syms);
 
       /* Read this BFD's local symbols.  */
       if (symtab_hdr->sh_info != 0)
@@ -3038,7 +3039,7 @@ elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info)
   /* Do not attempt to sort non-regular files.  This is here
      especially for configure scripts and kernel builds which run
      tests with "ld [...] -o /dev/null".  */
-  if (stat (abfd->filename, &buf) != 0
+  if (stat (bfd_get_filename (abfd), &buf) != 0
       || !S_ISREG(buf.st_mode))
     return TRUE;
 
@@ -3880,13 +3881,14 @@ elf64_hppa_relocate_section (bfd *output_bfd,
          else if (!bfd_link_relocatable (info))
            {
              bfd_boolean err;
-             err = (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
-                    || ELF_ST_VISIBILITY (eh->other) != STV_DEFAULT);
-             (*info->callbacks->undefined_symbol) (info,
-                                                   eh->root.root.string,
-                                                   input_bfd,
-                                                   input_section,
-                                                   rel->r_offset, err);
+
+             err = (info->unresolved_syms_in_objects == RM_DIAGNOSE
+                    && !info->warn_unresolved_syms)
+               || ELF_ST_VISIBILITY (eh->other) != STV_DEFAULT;
+
+             info->callbacks->undefined_symbol
+               (info, eh->root.root.string, input_bfd,
+                input_section, rel->r_offset, err);
            }
 
          if (!bfd_link_relocatable (info)
@@ -3898,7 +3900,7 @@ elf64_hppa_relocate_section (bfd *output_bfd,
              if (info->unresolved_syms_in_objects == RM_IGNORE
                  && ELF_ST_VISIBILITY (eh->other) == STV_DEFAULT
                  && eh->type == STT_PARISC_MILLI)
-               (*info->callbacks->undefined_symbol)
+               info->callbacks->undefined_symbol
                  (info, eh_name (eh), input_bfd,
                   input_section, rel->r_offset, FALSE);
            }
This page took 0.028167 seconds and 4 git commands to generate.