diff options
author | Sriraman Tallam <tmsriram@google.com> | 2009-05-22 18:31:22 +0000 |
---|---|---|
committer | Sriraman Tallam <tmsriram@google.com> | 2009-05-22 18:31:22 +0000 |
commit | 531813adfc6b4fd3d27183f8be16e755e8fc003d (patch) | |
tree | d5598ec753381a2f5470085ea91476fb337db946 /gold/object.cc | |
parent | ad04f5cebf7b3f5ace359ff972bd366ca9a4009a (diff) | |
download | gdb-531813adfc6b4fd3d27183f8be16e755e8fc003d.zip gdb-531813adfc6b4fd3d27183f8be16e755e8fc003d.tar.gz gdb-531813adfc6b4fd3d27183f8be16e755e8fc003d.tar.bz2 |
* object.cc (Sized_relobj::map_to_kept_section): Return NULL if the
kept comdat section was garbage collected.
* testsuite/Makefile.am: Add test gc_comdat_test.sh.
* testsuite/Makefile.in: Regenerate.
* testsuite/gc_comdat_test.sh: New file.
* testsuite/gc_comdat_test_1.cc: New file.
* testsuite/gc_comdat_test_2.cc: New file.
Diffstat (limited to 'gold/object.cc')
-rw-r--r-- | gold/object.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gold/object.cc b/gold/object.cc index 9e61831..75fb679 100644 --- a/gold/object.cc +++ b/gold/object.cc @@ -1873,8 +1873,8 @@ Sized_relobj<size, big_endian>::map_to_kept_section( *found = true; Output_section* os = kept->object_->output_section(kept->shndx_); Address offset = kept->object_->get_output_section_offset(kept->shndx_); - gold_assert(os != NULL && offset != invalid_address); - return os->address() + offset; + if (os != NULL && offset != invalid_address) + return os->address() + offset; } *found = false; return 0; |