diff options
author | Alan Modra <amodra@gmail.com> | 2017-11-21 10:04:05 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-11-21 11:20:24 +1030 |
commit | 0ee5a0e48314fec3522f7eabadd5fea920628077 (patch) | |
tree | 325c8ffc094ec4bcbc3983d15015f01b23956c06 /bfd/elf-bfd.h | |
parent | bf3d139947aa7f846b463db4a7c4b6059a183e11 (diff) | |
download | gdb-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/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 99e13e0..954105e 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -731,10 +731,11 @@ struct elf_size_info { }; #define elf_symbol_from(ABFD,S) \ - (((S)->the_bfd->xvec->flavour == bfd_target_elf_flavour \ - && (S)->the_bfd->tdata.elf_obj_data != 0) \ - ? (elf_symbol_type *) (S) \ - : 0) + (((S)->the_bfd != NULL \ + && (S)->the_bfd->xvec->flavour == bfd_target_elf_flavour \ + && (S)->the_bfd->tdata.elf_obj_data != 0) \ + ? (elf_symbol_type *) (S) \ + : 0) enum elf_reloc_type_class { reloc_class_normal, |