mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 22:48:57 +08:00
Even when stripping all symbols, we need to write out the dynamic
symbol table.
This commit is contained in:
17
gold/gold.cc
17
gold/gold.cc
@ -307,16 +307,13 @@ queue_final_tasks(const General_options& options,
|
|||||||
Task_token* final_blocker = new Task_token(true);
|
Task_token* final_blocker = new Task_token(true);
|
||||||
|
|
||||||
// Queue a task to write out the symbol table.
|
// Queue a task to write out the symbol table.
|
||||||
if (!options.strip_all())
|
final_blocker->add_blocker();
|
||||||
{
|
workqueue->queue(new Write_symbols_task(symtab,
|
||||||
final_blocker->add_blocker();
|
input_objects,
|
||||||
workqueue->queue(new Write_symbols_task(symtab,
|
layout->sympool(),
|
||||||
input_objects,
|
layout->dynpool(),
|
||||||
layout->sympool(),
|
of,
|
||||||
layout->dynpool(),
|
final_blocker));
|
||||||
of,
|
|
||||||
final_blocker));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Queue a task to write out the output sections.
|
// Queue a task to write out the output sections.
|
||||||
output_sections_blocker->add_blocker();
|
output_sections_blocker->add_blocker();
|
||||||
|
@ -1827,14 +1827,18 @@ Symbol_table::sized_write_globals(const Input_objects* input_objects,
|
|||||||
const unsigned int output_count = this->output_count_;
|
const unsigned int output_count = this->output_count_;
|
||||||
const section_size_type oview_size = output_count * sym_size;
|
const section_size_type oview_size = output_count * sym_size;
|
||||||
const unsigned int first_global_index = this->first_global_index_;
|
const unsigned int first_global_index = this->first_global_index_;
|
||||||
unsigned char* const psyms = of->get_output_view(this->offset_, oview_size);
|
unsigned char* psyms;
|
||||||
|
if (this->offset_ == 0 || output_count == 0)
|
||||||
|
psyms = NULL;
|
||||||
|
else
|
||||||
|
psyms = of->get_output_view(this->offset_, oview_size);
|
||||||
|
|
||||||
const unsigned int dynamic_count = this->dynamic_count_;
|
const unsigned int dynamic_count = this->dynamic_count_;
|
||||||
const section_size_type dynamic_size = dynamic_count * sym_size;
|
const section_size_type dynamic_size = dynamic_count * sym_size;
|
||||||
const unsigned int first_dynamic_global_index =
|
const unsigned int first_dynamic_global_index =
|
||||||
this->first_dynamic_global_index_;
|
this->first_dynamic_global_index_;
|
||||||
unsigned char* dynamic_view;
|
unsigned char* dynamic_view;
|
||||||
if (this->dynamic_offset_ == 0)
|
if (this->dynamic_offset_ == 0 || dynamic_count == 0)
|
||||||
dynamic_view = NULL;
|
dynamic_view = NULL;
|
||||||
else
|
else
|
||||||
dynamic_view = of->get_output_view(this->dynamic_offset_, dynamic_size);
|
dynamic_view = of->get_output_view(this->dynamic_offset_, dynamic_size);
|
||||||
|
Reference in New Issue
Block a user