* chew.c: Use #include "" instead of <> for local header files.
[deliverable/binutils-gdb.git] / bfd / elf64-sh64.c
index 901bfa5bda6b89821c5be42c8b32130d730280a0..b168934e9633c89b8a803844f9cdee6b3c5c2d3c 100644 (file)
@@ -1754,7 +1754,7 @@ sh_elf64_relocate_section (output_bfd, info, input_bfd, input_section,
 
              if (outrel.r_offset == (bfd_vma) -1)
                skip = true;
-             else if (outrel.r_offset == (bfd_vma) -1)
+             else if (outrel.r_offset == (bfd_vma) -2)
                skip = true, relocate = true;
              
              outrel.r_offset += (input_section->output_section->vma
@@ -2929,7 +2929,8 @@ sh64_elf64_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
      bfd_vma *valp;
 {
   /* We want to do this for relocatable as well as final linking.  */
-  if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL)
+  if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL
+      && info->hash->creator->flavour == bfd_target_elf_flavour)
     {
       struct elf_link_hash_entry *h;
 
@@ -3227,14 +3228,14 @@ sh64_elf64_link_hash_table_create (abfd)
   struct elf_sh64_link_hash_table *ret;
 
   ret = ((struct elf_sh64_link_hash_table *)
-        bfd_alloc (abfd, sizeof (struct elf_sh64_link_hash_table)));
+        bfd_malloc (sizeof (struct elf_sh64_link_hash_table)));
   if (ret == (struct elf_sh64_link_hash_table *) NULL)
     return NULL;
 
   if (! _bfd_elf_link_hash_table_init (&ret->root, abfd,
                                       sh64_elf64_link_hash_newfunc))
     {
-      bfd_release (abfd, ret);
+      free (ret);
       return NULL;
     }
 
@@ -3607,6 +3608,9 @@ sh64_elf64_discard_copies (h, ignore)
 {
   struct elf_sh64_pcrel_relocs_copied *s;
 
+  if (h->root.root.type == bfd_link_hash_warning)
+    h = (struct elf_sh64_link_hash_entry *) h->root.root.u.i.link;
+
   /* We only discard relocs for symbols defined in a regular object.  */
   if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
     return true;
This page took 0.024545 seconds and 4 git commands to generate.