diff options
author | Clément Chigot <clement.chigot@atos.net> | 2021-07-29 14:22:54 +0200 |
---|---|---|
committer | Clément Chigot <clement.chigot@atos.net> | 2021-07-30 08:37:15 +0200 |
commit | 1417c848426871e767342ffbc673198145f4cec7 (patch) | |
tree | 316419fefbc813485123c435dbb04503a891bb8c /bfd/xcofflink.c | |
parent | 237877b8183a23ecc889b5c796c210aac9cfb742 (diff) | |
download | gdb-1417c848426871e767342ffbc673198145f4cec7.zip gdb-1417c848426871e767342ffbc673198145f4cec7.tar.gz gdb-1417c848426871e767342ffbc673198145f4cec7.tar.bz2 |
bfd: avoid a crash when debug_section isn't created in XCOFF
bfd/
* xcofflink.c (bfd_xcoff_size_dynamic_sections):
Add check to know if debug_section is initialized.
Diffstat (limited to 'bfd/xcofflink.c')
-rw-r--r-- | bfd/xcofflink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c index e18efd4..a00ae89 100644 --- a/bfd/xcofflink.c +++ b/bfd/xcofflink.c @@ -3992,7 +3992,8 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, } } - if (info->strip != strip_all) + if (info->strip != strip_all + && xcoff_hash_table (info)->debug_section != NULL) xcoff_hash_table (info)->debug_section->size = _bfd_stringtab_size (debug_strtab); |