diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf64-mips.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d65d5a8..33127be 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,11 @@ 2018-04-09 Maciej W. Rozycki <macro@mips.com> + * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer + in the BFD symbol referred by the relocation. + (mips_elf64_write_rela): Likewise. + +2018-04-09 Maciej W. Rozycki <macro@mips.com> + * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an error for out-of-range `r_sym' values. diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c index 86e5589..4b9fdf6 100644 --- a/bfd/elf64-mips.c +++ b/bfd/elf64-mips.c @@ -4038,7 +4038,8 @@ mips_elf64_write_rel (bfd *abfd, asection *sec, int_rel.r_sym = n; int_rel.r_ssym = RSS_UNDEF; - if ((*ptr->sym_ptr_ptr)->the_bfd->xvec != abfd->xvec + if ((*ptr->sym_ptr_ptr)->the_bfd != NULL + && (*ptr->sym_ptr_ptr)->the_bfd->xvec != abfd->xvec && ! _bfd_elf_validate_reloc (abfd, ptr)) { *failedp = TRUE; @@ -4137,7 +4138,8 @@ mips_elf64_write_rela (bfd *abfd, asection *sec, int_rela.r_addend = ptr->addend; int_rela.r_ssym = RSS_UNDEF; - if ((*ptr->sym_ptr_ptr)->the_bfd->xvec != abfd->xvec + if ((*ptr->sym_ptr_ptr)->the_bfd != NULL + && (*ptr->sym_ptr_ptr)->the_bfd->xvec != abfd->xvec && ! _bfd_elf_validate_reloc (abfd, ptr)) { *failedp = TRUE; |