forked from Imagelibrary/binutils-gdb
Fix internal error with LTO on ARM.
This prevents the target-specific do_read_symbols methods from being called twice when do_layout_deferred_sections needs to layout an .eh_frame section. gold/ PR gold/15639 * dynobj.h (Sized_dynobj::base_read_symbols): New method. * dynobj.cc (Sized_dynobj::do_read_symbols): Move body to... (Sized_dynobj::base_read_symbols): ...new method. * object.h (Sized_relobj_file::base_read_symbols): New method. * object.cc (Sized_relobj_file::do_read_symbols): Move body to... (Sized_relobj_file::base_read_symbols): ...new method. * arm.cc (Arm_relobj::do_read_symbols): Call base_read_symbols. * mips.cc: (Mips_relobj::do_read_symbols): Likewise. * powerpc.cc (Powerpc_dynobj::do_read_symbols): Likewise.
This commit is contained in:
@@ -754,6 +754,16 @@ Sized_relobj_file<size, big_endian>::do_find_special_sections(
|
||||
template<int size, bool big_endian>
|
||||
void
|
||||
Sized_relobj_file<size, big_endian>::do_read_symbols(Read_symbols_data* sd)
|
||||
{
|
||||
this->base_read_symbols(sd);
|
||||
}
|
||||
|
||||
// Read the sections and symbols from an object file. This is common
|
||||
// code for all target-specific overrides of do_read_symbols().
|
||||
|
||||
template<int size, bool big_endian>
|
||||
void
|
||||
Sized_relobj_file<size, big_endian>::base_read_symbols(Read_symbols_data* sd)
|
||||
{
|
||||
this->read_section_data(&this->elf_file_, sd);
|
||||
|
||||
@@ -1848,7 +1858,7 @@ Sized_relobj_file<size, big_endian>::do_layout_deferred_sections(Layout* layout)
|
||||
|
||||
// Reading the symbols again here may be slow.
|
||||
Read_symbols_data sd;
|
||||
this->read_symbols(&sd);
|
||||
this->base_read_symbols(&sd);
|
||||
this->layout_eh_frame_section(layout,
|
||||
sd.symbols->data(),
|
||||
sd.symbols_size,
|
||||
|
||||
Reference in New Issue
Block a user