aboutsummaryrefslogtreecommitdiff
path: root/gold/x86_64.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2011-04-22 22:39:55 +0000
committerCary Coutant <ccoutant@google.com>2011-04-22 22:39:55 +0000
commit94a3fc8b837eb39007fa4e82120f60ec9429317d (patch)
tree36553d09d1690d090951979ae7df2653c6bb471a /gold/x86_64.cc
parentc87e430233549c1670ff335b0d4614f1ea1d7edb (diff)
downloadgdb-94a3fc8b837eb39007fa4e82120f60ec9429317d.zip
gdb-94a3fc8b837eb39007fa4e82120f60ec9429317d.tar.gz
gdb-94a3fc8b837eb39007fa4e82120f60ec9429317d.tar.bz2
* incremental.cc (Sized_incremental_binary::setup_readers): Allocate
global symbol map. (Sized_incremental_binary::do_apply_incremental_relocs): New function. (Sized_incr_relobj::do_add_symbols): Add symbols to global symbol map. (Sized_incr_relobj::do_relocate): Remap section indices in incremental relocations. (Sized_incr_dynobj::do_add_symbols): Add symbols to global symbol map. (Sized_incr_dynobj::do_for_all_global_symbols): Remove FIXME. (Sized_incr_dynobj::do_for_all_local_got_entries): Likewise. * incremental.h (Incremental_inputs_reader::global_symbol_reader_at_offset): New function. (Incremental_binary::apply_incremental_relocs): New function. (Incremental_binary::do_apply_incremental_relocs): New function. (Sized_incremental_binary::Sized_incremental_binary): Initialize new data member. (Sized_incremental_binary::add_global_symbol): New function. (Sized_incremental_binary::global_symbol): New function. (Sized_incremental_binary::do_apply_incremental_relocs): New function. (Sized_incremental_binary::symbol_map_): New data member. * layout.cc (Layout_task_runner::run): Apply incremental relocations. * target.h (Sized_target::apply_relocation): New function. * target-reloc.h (apply_relocation): New function. * x86_64.cc (Target_x86_64::apply_relocation): New function.
Diffstat (limited to 'gold/x86_64.cc')
-rw-r--r--gold/x86_64.cc37
1 files changed, 37 insertions, 0 deletions
diff --git a/gold/x86_64.cc b/gold/x86_64.cc
index 5ba15c4..e4a7043 100644
--- a/gold/x86_64.cc
+++ b/gold/x86_64.cc
@@ -345,6 +345,17 @@ class Target_x86_64 : public Target_freebsd<64, false>
unsigned int
plt_entry_size() const;
+ // Apply an incremental relocation.
+ void
+ apply_relocation(const Relocate_info<64, false>* relinfo,
+ elfcpp::Elf_types<64>::Elf_Addr r_offset,
+ unsigned int r_type,
+ elfcpp::Elf_types<64>::Elf_Swxword r_addend,
+ const Symbol* gsym,
+ unsigned char* view,
+ elfcpp::Elf_types<64>::Elf_Addr address,
+ section_size_type view_size);
+
// Add a new reloc argument, returning the index in the vector.
size_t
add_tlsdesc_info(Sized_relobj<64, false>* object, unsigned int r_sym)
@@ -3014,6 +3025,32 @@ Target_x86_64::relocate_section(
reloc_symbol_changes);
}
+// Apply an incremental relocation. Incremental relocations always refer
+// to global symbols.
+
+void
+Target_x86_64::apply_relocation(
+ const Relocate_info<64, false>* relinfo,
+ elfcpp::Elf_types<64>::Elf_Addr r_offset,
+ unsigned int r_type,
+ elfcpp::Elf_types<64>::Elf_Swxword r_addend,
+ const Symbol* gsym,
+ unsigned char* view,
+ elfcpp::Elf_types<64>::Elf_Addr address,
+ section_size_type view_size)
+{
+ gold::apply_relocation<64, false, Target_x86_64, Target_x86_64::Relocate>(
+ relinfo,
+ this,
+ r_offset,
+ r_type,
+ r_addend,
+ gsym,
+ view,
+ address,
+ view_size);
+}
+
// Return the size of a relocation while scanning during a relocatable
// link.