diff options
author | Cary Coutant <ccoutant@google.com> | 2010-08-12 22:15:00 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2010-08-12 22:15:00 +0000 |
commit | 0e70b9111a696f5b70cade541df55de14c31f9f1 (patch) | |
tree | 6f83a4c1e2c4431cbffd2ee3bb5e71f1fe8cece0 /gold/layout.cc | |
parent | 09ec0418c0d4144afba5947499425e27900d953f (diff) | |
download | gdb-0e70b9111a696f5b70cade541df55de14c31f9f1.zip gdb-0e70b9111a696f5b70cade541df55de14c31f9f1.tar.gz gdb-0e70b9111a696f5b70cade541df55de14c31f9f1.tar.bz2 |
elfcpp/ChangeLog:
* elfcpp.h (enum SHT): Add SHT_GNU_INCREMENTAL_GOT_PLT.
gold/ChangeLog:
* arm.cc (Target_arm::got_size): Add const.
(Target_arm::got_entry_count): New function.
(Target_arm::plt_entry_count): New function.
(Target_arm::first_plt_entry_offset): New function.
(Target_arm::plt_entry_size): New function.
(Output_data_plt_arm::entry_count): New function.
(Output_data_plt_arm::first_plt_entry_offset): New function.
(Output_data_plt_arm::get_plt_entry_size): New function.
* i386.cc (Target_i386::got_size): Add const.
(Target_i386::got_entry_count): New function.
(Target_i386::plt_entry_count): New function.
(Target_i386::first_plt_entry_offset): New function.
(Target_i386::plt_entry_size): New function.
(Output_data_plt_i386::entry_count): New function.
(Output_data_plt_i386::first_plt_entry_offset): New function.
(Output_data_plt_i386::get_plt_entry_size): New function.
* incremental-dump.cc (dump_incremental_inputs): Adjust call to
find_incremental_inputs_sections. Dump incremental_got_plt section.
* incremental.cc: Include target.h.
(Sized_incremental_binary::do_find_incremental_inputs_sections): Add
parameter. Adjust all callers. Find incremental_got_plt section.
(Incremental_inputs::create_data_sections): Create incremental_got_plt
section.
(Output_section_incremental_inputs::set_final_data_size): Calculate
size of incremental_got_plt section.
(Output_section_incremental_inputs::do_write): Write the
incremental_got_plt section.
(Got_plt_view_info): New struct.
(Local_got_offset_visitor): New class.
(Global_got_offset_visitor): New class.
(Global_symbol_visitor_got_plt): New class.
(Output_section_incremental_inputs::write_got_plt): New function.
* incremental.h (Incremental_binary::find_incremental_inputs_sections):
Add parameter. Adjust all callers.
(Incremental_binary::do_find_incremental_inputs_sections): Likewise.
(Incremental_inputs::got_plt_section): New function.
(Incremental_inputs::got_plt_section_): New data member.
(Incremental_got_plt_reader): New class.
* layout.cc (Layout::create_incremental_info_sections): Add the
incremental_got_plt section.
* object.h (Got_offset_list::get_list): New function.
(Got offset_list::for_all_got_offsets): New function.
(Sized_relobj::local_got_offset_list): New function.
* powerpc.cc (Target_powerpc::got_size): Add const.
(Target_powerpc::got_entry_count): New function.
(Target_powerpc::plt_entry_count): New function.
(Target_powerpc::first_plt_entry_offset): New function.
(Target_powerpc::plt_entry_size): New function.
(Output_data_plt_powerpc::entry_count): New function.
(Output_data_plt_powerpc::first_plt_entry_offset): New function.
(Output_data_plt_powerpc::get_plt_entry_size): New function.
* sparc.cc (Target_sparc::got_size): Add const.
(Target_sparc::got_entry_count): New function.
(Target_sparc::plt_entry_count): New function.
(Target_sparc::first_plt_entry_offset): New function.
(Target_sparc::plt_entry_size): New function.
(Output_data_plt_sparc::entry_count): New function.
(Output_data_plt_sparc::first_plt_entry_offset): New function.
(Output_data_plt_sparc::get_plt_entry_size): New function.
* symtab.h (Symbol::got_offset_list): New function.
(Symbol_table::for_all_symbols): New function.
* target.h (Sized_target::got_entry_count): New function.
(Sized_target::plt_entry_count): New function.
(Sized_target::plt_entry_size): New function.
* x86_64.cc (Target_x86_64::got_size): Add const.
(Target_x86_64::got_entry_count): New function.
(Target_x86_64::plt_entry_count): New function.
(Target_x86_64::first_plt_entry_offset): New function.
(Target_x86_64::plt_entry_size): New function.
(Output_data_plt_x86_64::entry_count): New function.
(Output_data_plt_x86_64::first_plt_entry_offset): New function.
(Output_data_plt_x86_64::get_plt_entry_size): New function.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r-- | gold/layout.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gold/layout.cc b/gold/layout.cc index eb1322a..1dd41f3 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -2342,6 +2342,15 @@ Layout::create_incremental_info_sections(Symbol_table* symtab) incremental_relocs_os->add_output_section_data(incr->relocs_section()); incremental_relocs_os->set_entsize(incr->relocs_entsize()); + // Add the .gnu_incremental_got_plt section. + const char *incremental_got_plt_name = + this->namepool_.add(".gnu_incremental_got_plt", false, NULL); + Output_section* incremental_got_plt_os = + this->make_output_section(incremental_got_plt_name, + elfcpp::SHT_GNU_INCREMENTAL_GOT_PLT, 0, + ORDER_INVALID, false); + incremental_got_plt_os->add_output_section_data(incr->got_plt_section()); + // Add the .gnu_incremental_strtab section. const char *incremental_strtab_name = this->namepool_.add(".gnu_incremental_strtab", false, NULL); @@ -2355,10 +2364,12 @@ Layout::create_incremental_info_sections(Symbol_table* symtab) incremental_inputs_os->set_after_input_sections(); incremental_symtab_os->set_after_input_sections(); incremental_relocs_os->set_after_input_sections(); + incremental_got_plt_os->set_after_input_sections(); incremental_inputs_os->set_link_section(incremental_strtab_os); incremental_symtab_os->set_link_section(incremental_inputs_os); incremental_relocs_os->set_link_section(incremental_inputs_os); + incremental_got_plt_os->set_link_section(incremental_inputs_os); } // Return whether SEG1 should be before SEG2 in the output file. This |