Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / elflink.c
index a01daf2fdff9f4953e71978025ba39243dd62967..16421cfd5e7e2ace47c6e5ca2fa39011726baedd 100644 (file)
@@ -85,6 +85,7 @@ _bfd_elf_define_linkage_sym (bfd *abfd,
   h = (struct elf_link_hash_entry *) bh;
   h->def_regular = 1;
   h->non_elf = 0;
+  h->root.linker_def = 1;
   h->type = STT_OBJECT;
   if (ELF_ST_VISIBILITY (h->other) != STV_INTERNAL)
     h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_HIDDEN;
@@ -2684,6 +2685,7 @@ _bfd_elf_adjust_dynamic_copy (struct bfd_link_info *info,
       info->callbacks->einfo
        (_("%P: copy reloc against protected `%T' is invalid\n"),
         h->root.root.string);
+      bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
 
@@ -11859,6 +11861,12 @@ _bfd_elf_gc_mark_rsec (struct bfd_link_info *info, asection *sec,
       || ELF_ST_BIND (cookie->locsyms[r_symndx].st_info) != STB_LOCAL)
     {
       h = cookie->sym_hashes[r_symndx - cookie->extsymoff];
+      if (h == NULL)
+       {
+         info->callbacks->einfo (_("%F%P: corrupt input: %B\n"),
+                                 sec->owner);
+         return NULL;
+       }
       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;
This page took 0.03081 seconds and 4 git commands to generate.