mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 17:18:24 +08:00
2009-12-03 Doug Kwan <dougkwan@google.com>
* arm.cc: Remove comment about missing .ARM.exidx section symbols. (Target_arm::do_finalize_sections): Add parameter for symbol table pointer. Add __exidx_start and __exidx_end symbols as appropriate. * i386.cc (Target_i386::do_finalize_sections): Add an additional parameter for symbol table pointer. * layout.cc (Layout::finalize): Call Target::finalize_sections with an additional parameter for a pointer to symbol table. * powerpc.cc (Target_powerpc::do_finalize_sections): Add an additional parameter for a symbol table pointer. * sparc.cc (Target_sparc::do_finalize_sections): Ditto. * target.h (Target::finalize_sections, Target::do_finalize_sections): Ditto. * x86_64.cc (Target_x86_64::do_finalize_sections): Add an additional parameter for a symbol table pointer.
This commit is contained in:
@ -1,3 +1,20 @@
|
|||||||
|
2009-12-03 Doug Kwan <dougkwan@google.com>
|
||||||
|
|
||||||
|
* arm.cc: Remove comment about missing .ARM.exidx section symbols.
|
||||||
|
(Target_arm::do_finalize_sections): Add parameter for symbol table
|
||||||
|
pointer. Add __exidx_start and __exidx_end symbols as appropriate.
|
||||||
|
* i386.cc (Target_i386::do_finalize_sections): Add an additional
|
||||||
|
parameter for symbol table pointer.
|
||||||
|
* layout.cc (Layout::finalize): Call Target::finalize_sections with
|
||||||
|
an additional parameter for a pointer to symbol table.
|
||||||
|
* powerpc.cc (Target_powerpc::do_finalize_sections): Add an additional
|
||||||
|
parameter for a symbol table pointer.
|
||||||
|
* sparc.cc (Target_sparc::do_finalize_sections): Ditto.
|
||||||
|
* target.h (Target::finalize_sections, Target::do_finalize_sections):
|
||||||
|
Ditto.
|
||||||
|
* x86_64.cc (Target_x86_64::do_finalize_sections): Add an additional
|
||||||
|
parameter for a symbol table pointer.
|
||||||
|
|
||||||
2009-12-03 Rafael Avila de Espindola <espindola@google.com>
|
2009-12-03 Rafael Avila de Espindola <espindola@google.com>
|
||||||
|
|
||||||
* incremental.cc (Incremental_inputs_header)
|
* incremental.cc (Incremental_inputs_header)
|
||||||
|
29
gold/arm.cc
29
gold/arm.cc
@ -123,7 +123,6 @@ const int32_t THM2_MAX_BWD_BRANCH_OFFSET = (-(1 << 24) + 4);
|
|||||||
// TODOs:
|
// TODOs:
|
||||||
// - Generate various branch stubs.
|
// - Generate various branch stubs.
|
||||||
// - Support interworking.
|
// - Support interworking.
|
||||||
// - Define section symbols __exidx_start and __exidx_stop.
|
|
||||||
// - Support more relocation types as needed.
|
// - Support more relocation types as needed.
|
||||||
// - Make PLTs more flexible for different architecture features like
|
// - Make PLTs more flexible for different architecture features like
|
||||||
// Thumb-2 and BE8.
|
// Thumb-2 and BE8.
|
||||||
@ -1234,7 +1233,7 @@ class Target_arm : public Sized_target<32, big_endian>
|
|||||||
|
|
||||||
// Finalize the sections.
|
// Finalize the sections.
|
||||||
void
|
void
|
||||||
do_finalize_sections(Layout*, const Input_objects*);
|
do_finalize_sections(Layout*, const Input_objects*, Symbol_table*);
|
||||||
|
|
||||||
// Return the value to use for a dynamic symbol which requires special
|
// Return the value to use for a dynamic symbol which requires special
|
||||||
// treatment.
|
// treatment.
|
||||||
@ -4560,7 +4559,8 @@ template<bool big_endian>
|
|||||||
void
|
void
|
||||||
Target_arm<big_endian>::do_finalize_sections(
|
Target_arm<big_endian>::do_finalize_sections(
|
||||||
Layout* layout,
|
Layout* layout,
|
||||||
const Input_objects* input_objects)
|
const Input_objects* input_objects,
|
||||||
|
Symbol_table* symtab)
|
||||||
{
|
{
|
||||||
// Merge processor-specific flags.
|
// Merge processor-specific flags.
|
||||||
for (Input_objects::Relobj_iterator p = input_objects->relobj_begin();
|
for (Input_objects::Relobj_iterator p = input_objects->relobj_begin();
|
||||||
@ -4625,16 +4625,25 @@ Target_arm<big_endian>::do_finalize_sections(
|
|||||||
if (this->copy_relocs_.any_saved_relocs())
|
if (this->copy_relocs_.any_saved_relocs())
|
||||||
this->copy_relocs_.emit(this->rel_dyn_section(layout));
|
this->copy_relocs_.emit(this->rel_dyn_section(layout));
|
||||||
|
|
||||||
// For the ARM target, we need to add a PT_ARM_EXIDX segment for
|
// Handle the .ARM.exidx section.
|
||||||
// the .ARM.exidx section.
|
Output_section* exidx_section = layout->find_output_section(".ARM.exidx");
|
||||||
if (!layout->script_options()->saw_phdrs_clause()
|
if (exidx_section != NULL
|
||||||
|
&& exidx_section->type() == elfcpp::SHT_ARM_EXIDX
|
||||||
&& !parameters->options().relocatable())
|
&& !parameters->options().relocatable())
|
||||||
{
|
{
|
||||||
Output_section* exidx_section =
|
// Create __exidx_start and __exdix_end symbols.
|
||||||
layout->find_output_section(".ARM.exidx");
|
symtab->define_in_output_data("__exidx_start", NULL, exidx_section,
|
||||||
|
0, 0, elfcpp::STT_OBJECT,
|
||||||
|
elfcpp::STB_LOCAL, elfcpp::STV_HIDDEN, 0,
|
||||||
|
false, false);
|
||||||
|
symtab->define_in_output_data("__exidx_end", NULL, exidx_section,
|
||||||
|
0, 0, elfcpp::STT_OBJECT,
|
||||||
|
elfcpp::STB_LOCAL, elfcpp::STV_HIDDEN, 0,
|
||||||
|
true, false);
|
||||||
|
|
||||||
if (exidx_section != NULL
|
// For the ARM target, we need to add a PT_ARM_EXIDX segment for
|
||||||
&& exidx_section->type() == elfcpp::SHT_ARM_EXIDX)
|
// the .ARM.exidx section.
|
||||||
|
if (!layout->script_options()->saw_phdrs_clause())
|
||||||
{
|
{
|
||||||
gold_assert(layout->find_output_segment(elfcpp::PT_ARM_EXIDX, 0, 0)
|
gold_assert(layout->find_output_segment(elfcpp::PT_ARM_EXIDX, 0, 0)
|
||||||
== NULL);
|
== NULL);
|
||||||
|
@ -95,7 +95,7 @@ class Target_i386 : public Target_freebsd<32, false>
|
|||||||
|
|
||||||
// Finalize the sections.
|
// Finalize the sections.
|
||||||
void
|
void
|
||||||
do_finalize_sections(Layout*, const Input_objects*);
|
do_finalize_sections(Layout*, const Input_objects*, Symbol_table*);
|
||||||
|
|
||||||
// Return the value to use for a dynamic which requires special
|
// Return the value to use for a dynamic which requires special
|
||||||
// treatment.
|
// treatment.
|
||||||
@ -1552,7 +1552,10 @@ Target_i386::scan_relocs(Symbol_table* symtab,
|
|||||||
// Finalize the sections.
|
// Finalize the sections.
|
||||||
|
|
||||||
void
|
void
|
||||||
Target_i386::do_finalize_sections(Layout* layout, const Input_objects*)
|
Target_i386::do_finalize_sections(
|
||||||
|
Layout* layout,
|
||||||
|
const Input_objects*,
|
||||||
|
Symbol_table*)
|
||||||
{
|
{
|
||||||
// Fill in some more dynamic tags.
|
// Fill in some more dynamic tags.
|
||||||
Output_data_dynamic* const odyn = layout->dynamic_data();
|
Output_data_dynamic* const odyn = layout->dynamic_data();
|
||||||
|
@ -1533,7 +1533,7 @@ off_t
|
|||||||
Layout::finalize(const Input_objects* input_objects, Symbol_table* symtab,
|
Layout::finalize(const Input_objects* input_objects, Symbol_table* symtab,
|
||||||
Target* target, const Task* task)
|
Target* target, const Task* task)
|
||||||
{
|
{
|
||||||
target->finalize_sections(this, input_objects);
|
target->finalize_sections(this, input_objects, symtab);
|
||||||
|
|
||||||
this->count_local_symbols(task, input_objects);
|
this->count_local_symbols(task, input_objects);
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ class Target_powerpc : public Sized_target<size, big_endian>
|
|||||||
const unsigned char* plocal_symbols);
|
const unsigned char* plocal_symbols);
|
||||||
// Finalize the sections.
|
// Finalize the sections.
|
||||||
void
|
void
|
||||||
do_finalize_sections(Layout*, const Input_objects*);
|
do_finalize_sections(Layout*, const Input_objects*, Symbol_table*);
|
||||||
|
|
||||||
// Return the value to use for a dynamic which requires special
|
// Return the value to use for a dynamic which requires special
|
||||||
// treatment.
|
// treatment.
|
||||||
@ -1532,7 +1532,8 @@ template<int size, bool big_endian>
|
|||||||
void
|
void
|
||||||
Target_powerpc<size, big_endian>::do_finalize_sections(
|
Target_powerpc<size, big_endian>::do_finalize_sections(
|
||||||
Layout* layout,
|
Layout* layout,
|
||||||
const Input_objects*)
|
const Input_objects*,
|
||||||
|
Symbol_table*)
|
||||||
{
|
{
|
||||||
// Fill in some more dynamic tags.
|
// Fill in some more dynamic tags.
|
||||||
Output_data_dynamic* const odyn = layout->dynamic_data();
|
Output_data_dynamic* const odyn = layout->dynamic_data();
|
||||||
|
@ -94,7 +94,7 @@ class Target_sparc : public Sized_target<size, big_endian>
|
|||||||
const unsigned char* plocal_symbols);
|
const unsigned char* plocal_symbols);
|
||||||
// Finalize the sections.
|
// Finalize the sections.
|
||||||
void
|
void
|
||||||
do_finalize_sections(Layout*, const Input_objects*);
|
do_finalize_sections(Layout*, const Input_objects*, Symbol_table*);
|
||||||
|
|
||||||
// Return the value to use for a dynamic which requires special
|
// Return the value to use for a dynamic which requires special
|
||||||
// treatment.
|
// treatment.
|
||||||
@ -2319,7 +2319,8 @@ template<int size, bool big_endian>
|
|||||||
void
|
void
|
||||||
Target_sparc<size, big_endian>::do_finalize_sections(
|
Target_sparc<size, big_endian>::do_finalize_sections(
|
||||||
Layout* layout,
|
Layout* layout,
|
||||||
const Input_objects*)
|
const Input_objects*,
|
||||||
|
Symbol_table*)
|
||||||
{
|
{
|
||||||
// Fill in some more dynamic tags.
|
// Fill in some more dynamic tags.
|
||||||
Output_data_dynamic* const odyn = layout->dynamic_data();
|
Output_data_dynamic* const odyn = layout->dynamic_data();
|
||||||
|
@ -194,8 +194,9 @@ class Target
|
|||||||
// This is called to tell the target to complete any sections it is
|
// This is called to tell the target to complete any sections it is
|
||||||
// handling. After this all sections must have their final size.
|
// handling. After this all sections must have their final size.
|
||||||
void
|
void
|
||||||
finalize_sections(Layout* layout, const Input_objects* input_objects)
|
finalize_sections(Layout* layout, const Input_objects* input_objects,
|
||||||
{ return this->do_finalize_sections(layout, input_objects); }
|
Symbol_table* symtab)
|
||||||
|
{ return this->do_finalize_sections(layout, input_objects, symtab); }
|
||||||
|
|
||||||
// Return the value to use for a global symbol which needs a special
|
// Return the value to use for a global symbol which needs a special
|
||||||
// value in the dynamic symbol table. This will only be called if
|
// value in the dynamic symbol table. This will only be called if
|
||||||
@ -336,7 +337,7 @@ class Target
|
|||||||
|
|
||||||
// Virtual function which may be implemented by the child class.
|
// Virtual function which may be implemented by the child class.
|
||||||
virtual void
|
virtual void
|
||||||
do_finalize_sections(Layout*, const Input_objects*)
|
do_finalize_sections(Layout*, const Input_objects*, Symbol_table*)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
// Virtual function which may be implemented by the child class.
|
// Virtual function which may be implemented by the child class.
|
||||||
|
@ -102,7 +102,7 @@ class Target_x86_64 : public Target_freebsd<64, false>
|
|||||||
|
|
||||||
// Finalize the sections.
|
// Finalize the sections.
|
||||||
void
|
void
|
||||||
do_finalize_sections(Layout*, const Input_objects*);
|
do_finalize_sections(Layout*, const Input_objects*, Symbol_table*);
|
||||||
|
|
||||||
// Return the value to use for a dynamic which requires special
|
// Return the value to use for a dynamic which requires special
|
||||||
// treatment.
|
// treatment.
|
||||||
@ -1642,7 +1642,10 @@ Target_x86_64::scan_relocs(Symbol_table* symtab,
|
|||||||
// Finalize the sections.
|
// Finalize the sections.
|
||||||
|
|
||||||
void
|
void
|
||||||
Target_x86_64::do_finalize_sections(Layout* layout, const Input_objects*)
|
Target_x86_64::do_finalize_sections(
|
||||||
|
Layout* layout,
|
||||||
|
const Input_objects*,
|
||||||
|
Symbol_table*)
|
||||||
{
|
{
|
||||||
// Fill in some more dynamic tags.
|
// Fill in some more dynamic tags.
|
||||||
Output_data_dynamic* const odyn = layout->dynamic_data();
|
Output_data_dynamic* const odyn = layout->dynamic_data();
|
||||||
|
Reference in New Issue
Block a user