diff options
author | Ian Lance Taylor <ian@airs.com> | 1996-10-02 16:02:56 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1996-10-02 16:02:56 +0000 |
commit | 263d4a626b6f359bd3182370e744683c2d8a9e30 (patch) | |
tree | b42aa2d7a189aa4e7d6391a2f340cc0baf65ce80 /bfd/cofflink.c | |
parent | 38e4433bfb0fd388a1370e4e200196380bb13661 (diff) | |
download | gdb-263d4a626b6f359bd3182370e744683c2d8a9e30.zip gdb-263d4a626b6f359bd3182370e744683c2d8a9e30.tar.gz gdb-263d4a626b6f359bd3182370e744683c2d8a9e30.tar.bz2 |
* cofflink.c (_bfd_coff_link_input_bfd): Don't crash if there is
no hash table entry for a global symbol.
Diffstat (limited to 'bfd/cofflink.c')
-rw-r--r-- | bfd/cofflink.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bfd/cofflink.c b/bfd/cofflink.c index 9d62013..ea37865 100644 --- a/bfd/cofflink.c +++ b/bfd/cofflink.c @@ -1514,7 +1514,13 @@ _bfd_coff_link_input_bfd (finfo, input_bfd) indx = ((esym - (bfd_byte *) obj_coff_external_syms (input_bfd)) / isymesz); h = obj_coff_sym_hashes (input_bfd)[indx]; - BFD_ASSERT (h != NULL); + if (h == NULL) + { + /* This can happen if there were errors earlier in + the link. */ + bfd_set_error (bfd_error_bad_value); + return false; + } h->indx = output_index; } |