sim: bfin: only regen linux-fixed-code.h in maintainer mode
[deliverable/binutils-gdb.git] / bfd / elf-m10300.c
index b44a4b475b6152db8532a2efe95cfcaeba0f61f5..c0a9309b7fff2c1800890e2a6941ff06f049140c 100644 (file)
@@ -604,7 +604,7 @@ static reloc_howto_type elf_mn10300_howto_table[] =
         0xffffffff,            /* src_mask */
         0xffffffff,            /* dst_mask */
         FALSE),                /* pcrel_offset */
-  
+
   HOWTO (R_MN10300_SYM_DIFF,   /* type */
         0,                     /* rightshift */
         2,                     /* size (0 = byte, 1 = short, 2 = long) */
@@ -1084,6 +1084,10 @@ mn10300_elf_check_relocs (bfd *abfd,
          while (h->root.type == bfd_link_hash_indirect
                 || h->root.type == bfd_link_hash_warning)
            h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+         /* PR15323, ref flags aren't set for references in the same
+            object.  */
+         h->root.non_ir_ref = 1;
        }
 
       r_type = ELF32_R_TYPE (rel->r_info);
@@ -1147,7 +1151,7 @@ mn10300_elf_check_relocs (bfd *abfd,
          if (info->shared)
            info->flags |= DF_STATIC_TLS;
          /* Fall through */
-         
+
        case R_MN10300_TLS_GD:
        case R_MN10300_GOT32:
        case R_MN10300_GOT24:
@@ -2425,7 +2429,7 @@ mn10300_elf_relax_delete_bytes (bfd *abfd,
         serve to keep the section artifically inflated.  */
       if (ELF32_R_TYPE ((irelend - 1)->r_info) == (int) R_MN10300_ALIGN)
        --irelend;
-      
+
       /* The deletion must stop at the next ALIGN reloc for an aligment
         power larger than, or not a multiple of, the number of bytes we
         are deleting.  */
@@ -4603,7 +4607,7 @@ elf32_mn10300_link_hash_table_create (bfd *abfd)
   struct elf32_mn10300_link_hash_table *ret;
   bfd_size_type amt = sizeof (* ret);
 
-  ret = bfd_malloc (amt);
+  ret = bfd_zmalloc (amt);
   if (ret == NULL)
     return NULL;
 
@@ -4616,14 +4620,10 @@ elf32_mn10300_link_hash_table_create (bfd *abfd)
       return NULL;
     }
 
-  ret->flags = 0;
-  ret->tls_ldm_got.refcount = 0;
   ret->tls_ldm_got.offset = -1;
-  ret->tls_ldm_got.got_allocated = 0;
-  ret->tls_ldm_got.rel_emitted = 0;
 
   amt = sizeof (struct elf_link_hash_table);
-  ret->static_hash_table = bfd_malloc (amt);
+  ret->static_hash_table = bfd_zmalloc (amt);
   if (ret->static_hash_table == NULL)
     {
       free (ret);
@@ -4650,9 +4650,9 @@ elf32_mn10300_link_hash_table_free (struct bfd_link_hash_table *hash)
   struct elf32_mn10300_link_hash_table *ret
     = (struct elf32_mn10300_link_hash_table *) hash;
 
-  _bfd_generic_link_hash_table_free
+  _bfd_elf_link_hash_table_free
     ((struct bfd_link_hash_table *) ret->static_hash_table);
-  _bfd_generic_link_hash_table_free
+  _bfd_elf_link_hash_table_free
     ((struct bfd_link_hash_table *) ret);
 }
 
@@ -5536,7 +5536,9 @@ _bfd_mn10300_elf_finish_dynamic_sections (bfd * output_bfd,
    properly.  */
 
 static enum elf_reloc_type_class
-_bfd_mn10300_elf_reloc_type_class (const Elf_Internal_Rela *rela)
+_bfd_mn10300_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
+                                  const asection *rel_sec ATTRIBUTE_UNUSED,
+                                  const Elf_Internal_Rela *rela)
 {
   switch ((int) ELF32_R_TYPE (rela->r_info))
     {
This page took 0.02752 seconds and 4 git commands to generate.