forked from Imagelibrary/binutils-gdb
* 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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user