aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfcode.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-11-21 10:04:05 +1030
committerAlan Modra <amodra@gmail.com>2017-11-21 11:20:24 +1030
commit0ee5a0e48314fec3522f7eabadd5fea920628077 (patch)
tree325c8ffc094ec4bcbc3983d15015f01b23956c06 /bfd/elfcode.h
parentbf3d139947aa7f846b463db4a7c4b6059a183e11 (diff)
downloadgdb-0ee5a0e48314fec3522f7eabadd5fea920628077.zip
gdb-0ee5a0e48314fec3522f7eabadd5fea920628077.tar.gz
gdb-0ee5a0e48314fec3522f7eabadd5fea920628077.tar.bz2
Add NULL bfd test to elf_symbol_from
A followup to PR22443. * elf-bfd.h (elf_symbol_from): Check for NULL symbol bfd. * elfcode.h (elf_slurp_reloc_table_from_section): Add FIXME comment.
Diffstat (limited to 'bfd/elfcode.h')
-rw-r--r--bfd/elfcode.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 6114b11..80b26aa 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -1440,6 +1440,8 @@ elf_slurp_reloc_table_from_section (bfd *abfd,
relent->address = rela.r_offset - asect->vma;
if (ELF_R_SYM (rela.r_info) == STN_UNDEF)
+ /* FIXME: This and the error case below mean that we have a
+ symbol on relocs that is not elf_symbol_type. */
relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
else if (ELF_R_SYM (rela.r_info) > symcount)
{