From 26d3c67de1d0e6434dabb908e5a6fa002f5b1db8 Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Wed, 8 Jun 2011 03:50:12 +0000 Subject: * copy-relocs.cc (Copy_relocs::copy_reloc): Call make_copy_reloc instead of emit_copy_reloc. (Copy_relocs::emit_copy_reloc): Refactor. (Copy_relocs::make_copy_reloc): New function. (Copy_relocs::add_copy_reloc): Remove. * copy-relocs.h (Copy_relocs::emit_copy_reloc): Move to public section. (Copy_relocs::make_copy_reloc): New function. (Copy_relocs::add_copy_reloc): Remove. * gold.cc (queue_middle_tasks): Emit old COPY relocations from unchanged input files. * incremental-dump.cc (dump_incremental_inputs): Print "COPY" flag. * incremental.cc (Sized_incremental_binary::do_reserve_layout): Reserve BSS space for COPY relocations. (Sized_incremental_binary::do_emit_copy_relocs): New function. (Output_section_incremental_inputs::write_info_blocks): Record whether a symbol is copied from a shared object. (Sized_incr_dynobj::do_add_symbols): Record COPY relocations. * incremental.h (enum Incremental_shlib_symbol_flags): New type. (INCREMENTAL_SHLIB_SYM_FLAGS_SHIFT): New constant. (Incremental_input_entry_reader::get_output_symbol_index): Add is_copy parameter. (Incremental_binary::emit_copy_relocs): New function. (Incremental_binary::do_emit_copy_relocs): New function. (Sized_incremental_binary::Sized_incremental_binary): Initialize new data member. (Sized_incremental_binary::add_copy_reloc): New function. (Sized_incremental_binary::do_emit_copy_relocs): New function. (Sized_incremental_binary::Copy_reloc): New struct. (Sized_incremental_binary::Copy_relocs): New typedef. (Sized_incremental_binary::copy_relocs_): New data member. * symtab.cc (Symbol_table::add_from_incrobj): Change return type. * symtab.h (Symbol_table::add_from_incrobj): Change return type. * target.h (Sized_target::emit_copy_reloc): New function. * x86_64.cc (Target_x86_64::emit_copy_reloc): New function. --- gold/incremental-dump.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gold/incremental-dump.cc') diff --git a/gold/incremental-dump.cc b/gold/incremental-dump.cc index fff4637617a..e7e838aaaf8 100644 --- a/gold/incremental-dump.cc +++ b/gold/incremental-dump.cc @@ -293,8 +293,9 @@ dump_incremental_inputs(const char* argv0, const char* filename, for (unsigned int symndx = 0; symndx < nsyms; ++symndx) { bool is_def; + bool is_copy; unsigned int output_symndx = - input_file.get_output_symbol_index(symndx, &is_def); + input_file.get_output_symbol_index(symndx, &is_def, &is_copy); sym_p = symtab_view.data() + output_symndx * sym_size; elfcpp::Sym sym(sym_p); const char* symname; @@ -303,7 +304,7 @@ dump_incremental_inputs(const char* argv0, const char* filename, printf(" %6d %6s %8s %8s %8s %8s %-5s %s\n", output_symndx, "", "", "", "", "", - is_def ? "DEF" : "UNDEF", + is_copy ? "COPY" : (is_def ? "DEF" : "UNDEF"), symname); } } -- cgit v1.2.1