X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=bfd%2Felf32-cris.c;h=1f4b0ddda6b5ac21d47e82a50fa3ec03f1c0cf66;hb=02865b8e1845472cb19f85af0811745e5a2e2392;hp=389798db7d9431a1fcd6aa07f1e08d36534c6e44;hpb=237bc7f0464985ca8b6bd8b62e0b6a34222b7dfe;p=platform%2Fupstream%2Fbinutils.git diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index 389798d..1f4b0dd 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -1494,7 +1494,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section, && r_type != R_CRIS_16_PCREL && r_type != R_CRIS_32_PCREL) || (!info->symbolic - || !h->def_regular))) + || (h != NULL && !h->def_regular)))) { Elf_Internal_Rela outrel; bfd_byte *loc; @@ -3024,6 +3024,11 @@ elf_cris_copy_indirect_symbol (struct bfd_link_info *info, edir = (struct elf_cris_link_hash_entry *) dir; eind = (struct elf_cris_link_hash_entry *) ind; + /* Only indirect symbols are replaced; we're not interested in + updating any of EIND's fields for other symbols. */ + if (eind->root.root.type != bfd_link_hash_indirect) + return; + BFD_ASSERT (edir->pcrel_relocs_copied == NULL); BFD_ASSERT (edir->gotplt_offset == 0 || eind->gotplt_offset == 0);