This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This patch implements the part where we apply the incremental relocations during an incremental update. Incremental relocations are applied at the end of the Layout task, just before resizing the file and calling queue_final_tasks. At that point in time, the output file has not yet been modified, so we can safely apply all the incremental relocations for each symbol that has been updated (when traversing the per-symbol list of relocations, they're chained together in such a way that it's expensive to figure out the input file to which a relocation comes from). The do_relocate function for an incremental object just rewrites the incremental relocations to the new incremental relocs section. I've added a new target hook to apply a single relocation; x86_64 is the only supported target at the moment. -cary 2011-03-30 Cary Coutant <ccoutant@google.com> * 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. * x86_64.cc (Target_x86_64::apply_relocation): New function.
Attachment:
incr-patch-9.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |