+2012-08-14 Nick Clifton <nickc@redhat.com>
+
+ PR ld/14265
+ * script-sections.cc (Sections_element::output_section_name): Add
+ keep return parameter.
+ (Output_section_element::match_name): Add keep return parameter.
+ Return the value of the keep_ member.
+ * script-sections.h (class Output_section): Update
+ output_section_name prototype.
+ * layout.cc (Layout::keep_input_section): New public member
+ function.
+ (Layout::choose_output_section): Pass keep parameter to
+ output_section_name.
+ * layout.h (class Layout): Add keep_input_section.
+ * object.cc (Sized_relobj_file::do_layout): Check for kept input
+ sections.
+ * testsuite/Makefile.am: Add a test.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/pr14265.c: Source file for the test.
+ * testsuite/pr14265.t: Linker script for the test.
+ * testsuite/pr14265.sh: Shell script for the test.
+
+2012-08-14 Alan Modra <amodra@gmail.com>
+
+ * target.h (Target::output_section_name): New function.
+ (Target::do_output_section_name): New function.
+ * layout.cc (Layout::choose_output_section): Call the above.
+ * powerpc.cc (Target_powerpc::do_output_section_name): New function.
+
+2012-08-14 Alan Modra <amodra@gmail.com>
+
+ * powerpc.cc: Update for renamed R_PPC_REL16 relocs.
+ (Output_data_got_powerpc::do_write): Don't rely on base class lookup
+ for replace_constant call.
+ (Output_data_plt_powerpc::do_print_to_mapfile): New function.
+ (Output_data_glink::do_print_to_mapfile): New function.
+ (Target_powerpc::Scan::local): Ignore R_PPC64_TOCSAVE.
+ (Target_powerpc::Relocate::relocate): Likewise.
+
+2012-08-14 Alan Modra <amodra@gmail.com>
+
+ * powerpc.cc (Powerpc_relobj::set_got2_shndx): Delete.
+ (Powerpc_relobj::do_find_special_sections): Don't use set_got2_shndx.
+ (Output_data_glink::add_entry,find_entry): Remove shndx param.
+ (class Glink_sym_ent): Rename from struct Glink_sym_ent. Remove
+ all references to shndx_. Handle special case for R_PPC_PLTREL24
+ here.
+ (class Glink_sym_ent_hash): Rename from struct Glink_sym_ent_hash.
+ (Output_data_glink::do_write): Retrieve got2_shdnx from object.
+ (Target_powerpc::make_plt_entry): Don't special case R_PPC_PLTREL24
+ here.
+ (Target_powerpc::Scan::global): Nor on make_plt_entry call.
+ (Target_powerpc::Relocate::relocate): Nor on glink->find_entry call.
+
+2012-08-12 Alan Modra <amodra@gmail.com>
+
+ * powerpc.cc: Whitespace fixes. Wrap overly long lines.
+ (glink insn constants): Use uint32_t.
+ (Output_data_glink::add_entry): Use insert, not [] operator.
+
+2012-08-11 Alan Modra <amodra@gmail.com>
+
+ * object.h (Sized_relobj_file::find_shdr): New function.
+ (Sized_relobj_file::find_special_sections): New function.
+ * object.cc (Sized_relobj_file::find_shdr): New function.
+ (Sized_relobj_file::find_eh_frame): Use find_shdr.
+ (Sized_relobj_file::find_special_sections): New function, split out..
+ (Sized_relobj_file::do_read_symbols): ..from here.
+ * output.h (Output_data_got::replace_constant): New function.
+ (Output_data_got::num_entries): New function.
+ (Output_data_got::last_got_offset,set_got_size): Use num_entries.
+ (Output_data_got::got_offset): Protected rather than private.
+ (Output_data_got::replace_got_entry): New function.
+ * output.cc (Output_data_got::replace_got_entry): New function.
+ * powerpc.cc (class Powerpc_relobj): New.
+ (class Powerpc_relocate_functions): Delete all psymval variants or
+ convert to value,addend type. Delete pcrela, pcrela_unaligned.
+ Implement _ha functions using corresponding _hi function.
+ (Powerpc_relobj::find_special_sections): New function.
+ (Target_powerpc::do_make_elf_object): New function.
+ (class Output_data_got_powerpc): New.
+ (class Output_data_glink): New.
+ (class Powerpc_scan_relocatable_reloc): New.
+ Many more changes througout file.
+
+2012-08-09 Nick Clifton <nickc@redhat.com>
+
+ * po/vi.po: Updated Vietnamese translation.
+
+2012-08-07 Ian Lance Taylor <iant@google.com>
+
+ * layout.cc (Layout::add_target_dynamic_tags): If
+ dynrel_includes_plt but no dyn_rel, emit dynamic reloc tags for
+ plt_rel.
+
+2012-07-30 Nick Clifton <nickc@redhat.com>
+
+ * po/gold.pot: Updated template.
+ * po/es.po: Updated Spanish translation.
+
+2012-07-18 Cary Coutant <ccoutant@google.com>
+
+ PR gold/14344
+ * configure.ac: Add check for -gpubnames support.
+ * configure: Regenerate.
+ * testsuite/Makefile.am (gdb_index_test_1): Add check for -gpubnames
+ support; force -gno-pubnames.
+ (gdb_index_test_2, gdb_index_test_3): Add check for -gpubnames
+ support.
+ (gdb_index_test_4): New test.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/gdb_index_test_1.sh: Refactor code into common file.
+ * testsuite/gdb_index_test_2.sh: Likewise.
+ * testsuite/gdb_index_test_3.sh: Don't look for space after colon.
+ * testsuite/gdb_index_test_4.sh: New script.
+ * testsuite/gdb_index_test_comm.sh: New script with common code;
+ don't look for space after colon.
+
+2012-07-16 Sriraman Tallam <tmsriram@google.com>
+
+ * gold.cc (queue_middle_tasks): Update function order only after
+ deferred objects due to plugins are processed.
+
+2012-07-11 Ian Lance Taylor <iant@google.com>
+
+ * arm.cc (Arm_relocate_functions::abs16): Remove unused typedef.
+ (Arm_exidx_cantunwind::do_fixed_endian_write): Likewise.
+ (Target_arm::scan_reloc_for_stub): Likewise.
+ * common.cc (Symbol_table::do_allocate_commons_list): Likewise.
+ * dwarf_reader.cc (Dwarf_die::skip_attributes): Likewise.
+ * ehframe.cc (Eh_frame::do_add_ehframe_input_section): Likewise.
+ * incremental.cc (Sized_incr_dynobj::do_add_symbols): Likewise.
+ * powerpc.cc (Target_powerpc::relocate_tls): Likewise.
+
+2012-07-10 Dodji Seketeli <dodji@redhat.com>
+ Ian Lance Taylor <iant@google.com>
+
+ PR gold/14309
+ * configure.ac: Test whether std::tr1::hash<off_t> works.
+ * gold.h: Add a specialization for std::tr1::hash<off_t> if
+ needed.
+ * output.h (class Output_fill): Add virtual destructor.
+ * configure, config.in: Rebuild.
+
+2012-06-22 Roland McGrath <mcgrathr@google.com>
+
+ * layout.cc (finalize): Define __ehdr_start symbol if applicable.
+
+2012-06-12 Rafael Ávila de Espíndola <respindola@mozilla.com>
+
+ * plugin.cc (Plugin::load): Handle position independent executables.
+
+2012-06-06 Cary Coutant <ccoutant@google.com>
+
+ * layout.cc (gdb_sections): Remove ".debug_" prefixes,
+ add .debug_macro.
+ (lines_only_debug_sections): Likewise.
+ (gdb_fast_lookup_sections): New static array.
+ (is_gdb_debug_section): Rename formal parameter.
+ (is_lines_only_debug_section): Likewise.
+ (is_gdb_fast_lookup_section): New function.
+ (Layout::include_section): Check for ".zdebug_" prefix; pass
+ section name suffix to is_gdb_debug_section, et al.; check for
+ fast-lookup sections when building .gdb_index.
+ * options.h (--strip-debug-gdb): Update GDB version number.
+
+2012-06-06 Cary Coutant <ccoutant@google.com>
+
+ * configure.ac: Add check for fallocate.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+
+ * options.h (class General_options): Add --mmap-output-file and
+ --posix-fallocate options.
+ * output.cc: (posix_fallocate): Remove; replace with...
+ (gold_fallocate): New function.
+ (Output_file::map_no_anonymous): Call gold_fallocate.
+ (Output_file::map): Check --mmap-output-file option.
+
+2012-06-05 Jing Yu <jingyu@google.com>
+
+ * gold.h (textdomain): Add do {} to empty while(0).
+ (bindtextdomain): Likewise.
+
+2012-06-04 Cary Coutant <ccoutant@google.com>
+
+ * dynobj.cc (Sized_dynobj::do_get_global_symbol_counts): Call
+ has_dynsym_index.
+
+2012-05-25 Sriraman Tallam <tmsriram@google.com>
+
+ * symtab.cc (Symbol_table::define_special_symbol):
+ Initialize *poldsym to prevent uninitialized variable errors.
+
+2012-05-23 Cary Coutant <ccoutant@google.com>
+
+ * layout.cc (Layout::section_name_mapping): Add rules to handle
+ exact match on .data.rel.ro.local or .data.rel.ro.
+ (Layout::output_section_name): Check for exact matches.
+
+2012-05-23 Cary Coutant <ccoutant@google.com>
+
+ * layout.cc (Layout::section_name_mapping): Match .data.rel.ro.*
+ more carefully.
+
+2012-05-22 Cary Coutant <ccoutant@google.com>
+
+ * symtab.cc (Symbol::should_add_dynsym_entry): Check for relocatable
+ object before exporting symbol.
+
+2012-05-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * testsuite/tls_test.cc: Include "config.h" first.
+ * testsuite/tls_test_c.c: Likewise.
+
+2012-05-17 Daniel Richard G. <skunk@iskunk.org>
+ Nick Clifton <nickc@redhat.com>
+
+ PR 14072
+ * configure.in: Add check that sysdep.h has been included before
+ any system header files.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+
+2012-05-14 Cary Coutant <ccoutant@google.com>
+
+ * layout.cc (Layout::make_output_section): Mark .tdata section
+ as RELRO.
+ * testsuite/relro_test.cc: Add a TLS variable.
+
+2012-05-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gold/14091
+ * x86_64.cc (Target_x86_64::Scan::local): For x32, generate
+ R_X86_64_RELATIVE64 instead of R_X86_64_RELATIVE in case of
+ R_X86_64_64.
+
+2012-05-08 Cary Coutant <ccoutant@google.com>
+
+ * layout.cc (gdb_sections): Update GDB version, add .debug_addr.
+ (lines_only_debug_sections): Likewise.
+
+2012-05-02 Roland McGrath <mcgrathr@google.com>
+
+ * nacl.cc: New file.
+ * nacl.h: New file.
+ * Makefile.am (CCFILES, HFILES): Add them.
+ * Makefile.in: Regenerate.
+ * i386.cc (Output_data_plt_i386_nacl): New class.
+ (Output_data_plt_i386_nacl_exec): New class.
+ (Output_data_plt_i386_nacl_dyn): New class.
+ (Target_i386_nacl): New class.
+ (Target_selector_i386_nacl): New class.
+ (target_selector_i386): Use it instead of Target_selector_i386.
+ * x86_64.cc (Output_data_plt_x86_64_nacl): New class.
+ (Target_x86_64_nacl): New class.
+ (Target_selector_x86_64_nacl): New class.
+ (target_selector_x86_64, target_selector_x32): Use it instead of
+ Target_selector_x86_64.
+ * arm.cc (Output_data_plt_arm_nacl): New class.
+ (Target_arm_nacl): New class.
+ (Target_selector_arm_nacl): New class.
+ (target_selector_arm, target_selector_armbe): Use it instead of
+ Target_selector_arm.
+
+ * target-select.cc (select_target): Take new Input_file* and off_t
+ arguments, pass them on to recognize method of selector.
+ * object.cc (make_elf_sized_object): Update caller.
+ * parameters.cc (parameters_force_valid_target): Likewise.
+ * incremental.cc (make_sized_incremental_binary): Likewise.
+ * target-select.h: Update decl.
+ (Target_selector::recognize): Take new Input_file* argument,
+ pass it on to do_recognize.
+ (Target_selector::do_recognize): Take new Input_file* argument.
+ * freebsd.h (Target_selector_freebsd::do_recognize): Likewise.
+ * powerpc.cc (Target_selector_powerpc::do_recognize): Likewise.
+ * sparc.cc (Target_selector_sparc::do_recognize): Likewise.
+ * testsuite/testfile.cc (Target_selector::do_recognize): Likewise.
+
+ * target.h (Target::Target_info): New members isolate_execinstr
+ and rosegment_gap.
+ (Target::isolate_execinstr, Target::rosegment_gap): New methods.
+ * arm.cc (Target_arm::arm_info): Update initializer.
+ * i386.cc (Target_i386::i386_info): Likewise.
+ * powerpc.cc (Target_powerpc::powerpc_info): Likewise.
+ * sparc.cc (Target_sparc::sparc_info): Likewise.
+ * x86_64.cc (Target_x86_64::x86_64_info): Likewise.
+ * testsuite/testfile.cc (Target_test::test_target_info): Likewise.
+ * layout.cc (Layout::attach_allocated_section_to_segment):
+ Take new const Target* argument. If target->isolate_execinstr(), act
+ like --rosegment.
+ (Layout::find_first_load_seg): Take new const Target* argument;
+ if target->isolate_execinstr(), reject PF_X segments.
+ (Layout::relaxation_loop_body): Update caller.
+ (Layout::set_segment_offsets): If target->isolate_execinstr(),
+ reset file offset to zero when we hit LOAD_SEG, and then do a second
+ loop over the segments before LOAD_SEG to reassign offsets after
+ addresses have been determined. Handle target->rosegment_gap().
+ (Layout::attach_section_to_segment): Take new const Target* argument;
+ pass it to attach_allocated_section_to_segment.
+ (Layout::make_output_section): Update caller.
+ (Layout::attach_sections_to_segments): Take new const Target* argument;
+ pass it to attach_section_to_segment.
+ * gold.cc (queue_middle_tasks): Update caller.
+ * layout.h (Layout): Update method decls with new arguments.
+
+ * arm.cc (Target_arm::Target_arm): Take optional argument for the
+ Target_info pointer to use.
+ (Target_arm::do_make_data_plt): New virtual method.
+ (Target_arm::make_data_plt): New method that calls it.
+ (Target_arm::make_plt_entry): Use it.
+ (Output_data_plt_arm::Output_data_plt_arm): Take additional argument
+ for the section alignment.
+ (Output_data_plt_arm::do_first_plt_entry_offset): New abstract virtual
+ method.
+ (Output_data_plt_arm::first_plt_entry_offset): Call it.
+ (Output_data_plt_arm::do_get_plt_entry_size): New abstract virtual
+ method.
+ (Output_data_plt_arm::get_plt_entry_size): Call it.
+ (Output_data_plt_arm::do_fill_plt_entry): New abstract virtual method.
+ (Output_data_plt_arm::fill_plt_entry): New method that calls it.
+ (Output_data_plt_arm::do_fill_first_plt_entry): New abstract virtual
+ method.
+ (Output_data_plt_arm::fill_first_plt_entry): New method that calls it.
+ (Output_data_plt_arm::set_final_data_size): Use get_plt_entry_size
+ method instead of sizeof(plt_entry).
+ (Output_data_plt_arm::add_entry): Likewise.
+ Use first_plt_entry_offset method instead of sizeof(first_plt_entry).
+ (Target_arm::first_plt_entry_offset): Call method on this->plt_ rather
+ than static method.
+ (Target_arm::plt_entry_size): Likewise.
+ (Output_data_plt_arm::first_plt_entry, Output_data_plt_arm::plt_entry):
+ Move to ...
+ (Output_data_plt_arm_standard): ... here, new class.
+ (Output_data_plt_arm::do_write): Move guts of PLT filling to...
+ (Output_data_plt_arm_standard::do_fill_first_plt_entry): ... here ...
+ (Output_data_plt_arm_standard::do_fill_plt_entry): ... and here.
+
+ * x86_64.cc (Output_data_plt_x86_64::Output_data_plt_x86_64):
+ Take additional argument for the PLT entry size.
+ (Output_data_plt_x86_64::get_tlsdesc_plt_offset):
+ Use get_plt_entry_size method rather than plt_entry_size variable.
+ (Output_data_plt_x86_64::reserve_slot): Likewise.
+ (Output_data_plt_x86_64::do_adjust_output_section): Likewise.
+ (Output_data_plt_x86_64::add_entry): Likewise.
+ (Output_data_plt_x86_64::add_local_ifunc_entry): Likewise.
+ (Output_data_plt_x86_64::address_for_global): Likewise.
+ (Output_data_plt_x86_64::address_for_local): Likewise.
+ (Output_data_plt_x86_64::set_final_data_size): Likewise.
+ (Output_data_plt_x86_64::first_plt_entry_offset): Likewise.
+ Make method non-static.
+ (Output_data_plt_x86_64::do_get_plt_entry_size): New abstract virtual
+ method.
+ (Output_data_plt_x86_64::get_plt_entry_size): Just call that.
+ (Output_data_plt_x86_64::do_add_eh_frame): New abstract virtual method.
+ (Output_data_plt_x86_64::add_eh_frame): New method to call it.
+ (Output_data_plt_x86_64::do_fill_first_plt_entry): New abstract
+ virtual method.
+ (Output_data_plt_x86_64::fill_first_plt_entry): New method to call it.
+ (Output_data_plt_x86_64::do_fill_plt_entry): New abstract
+ virtual method.
+ (Output_data_plt_x86_64::fill_plt_entry): New method to call it.
+ (Output_data_plt_x86_64::do_fill_tlsdesc_entry): New abstract
+ virtual method.
+ (Output_data_plt_x86_64::fill_tlsdesc_entry): New method to call it.
+ (Output_data_plt_x86_64::plt_entry_size)
+ (Output_data_plt_x86_64::first_plt_entry)
+ (Output_data_plt_x86_64::plt_entry)
+ (Output_data_plt_x86_64::tlsdesc_plt_entry)
+ (Output_data_plt_x86_64::plt_eh_frame_fde_size)
+ (Output_data_plt_x86_64::plt_eh_frame_fde): Move to ...
+ (Output_data_plt_x86_64_standard): ... here, new class.
+ (Target_x86_64::Target_x86_64): Take optional argument for the
+ Target_info pointer to use.
+ (Target_x86_64::do_make_data_plt): New virtual method.
+ (Target_x86_64::make_data_plt): New method to call it.
+ (Target_x86_64::init_got_plt_for_update): Use that.
+ Call this->plt_->add_eh_frame method here.
+ (Output_data_plt_x86_64::init): Don't do add_eh_frame_for_plt here.
+ (Target_x86_64::first_plt_entry_offset): Call method on this->plt_
+ rather than static method.
+ (Target_x86_64::plt_entry_size): Likewise.
+ (Output_data_plt_x86_64::do_write): Use get_plt_entry_size method
+ rather than plt_entry_size variable. Move guts of PLT filling to...
+ (Output_data_plt_x86_64_standard::do_fill_first_plt_entry): ... here ...
+ (Output_data_plt_x86_64_standard::do_fill_plt_entry): ... and here ...
+ (Output_data_plt_x86_64_standard::do_fill_tlsdesc_entry): ... and here.
+
+ * i386.cc (Output_data_plt_i386::Output_data_plt_i386): Take
+ additional argument for the section alignment.
+ Don't do add_eh_frame_for_plt here.
+ (Output_data_plt_i386::first_plt_entry_offset): Make the method
+ non-static. Use get_plt_entry_size method rather than plt_entry_size
+ variable.
+ (Output_data_plt_i386::do_get_plt_entry_size): New abstract virtual
+ method.
+ (Output_data_plt_i386::get_plt_entry_size): Call it.
+ (Output_data_plt_i386::do_add_eh_frame): New abstract virtual method.
+ (Output_data_plt_i386::add_eh_frame): New method to call it.
+ (Output_data_plt_i386::do_fill_first_plt_entry): New abstract virtual
+ method.
+ (Output_data_plt_i386::fill_first_plt_entry): New method to call it.
+ (Output_data_plt_i386::do_fill_plt_entry): New abstract virtual
+ method.
+ (Output_data_plt_i386::fill_plt_entry): New method to call it.
+ (Output_data_plt_i386::set_final_data_size): Use get_plt_entry_size
+ method instead of plt_entry_size.
+ (Output_data_plt_i386::plt_entry_size)
+ (Output_data_plt_i386::plt_eh_frame_fde_size)
+ (Output_data_plt_i386::plt_eh_frame_fde): Move to ...
+ (Output_data_plt_i386_standard): ... here, new class.
+ (Output_data_plt_i386_exec): New class.
+ (Output_data_plt_i386::exec_first_plt_entry): Move to ...
+ (Output_data_plt_i386_exec::first_plt_entry): ... here.
+ (Output_data_plt_i386::exec_plt_entry): Move to ...
+ (Output_data_plt_i386_exec::plt_entry): ... here.
+ (Output_data_plt_i386_dyn): New class.
+ (Output_data_plt_i386::first_plt_entry): Move to ...
+ (Output_data_plt_i386_dyn::first_plt_entry): ... here.
+ (Output_data_plt_i386::dyn_plt_entry): Move to ...
+ (Output_data_plt_i386_dyn::plt_entry): ... here.
+ (Target_i386::Target_i386): Take optional argument for the Target_info
+ pointer to use.
+ (Target_i386::do_make_data_plt): New virtual method.
+ (Target_i386::make_data_plt): New method to call it.
+ (Target_i386::make_plt_section): Use that.
+ Call this->plt_->add_eh_frame method here.
+ (Output_data_plt_i386::add_entry): Use get_plt_entry_size method
+ rather than plt_entry_size variable.
+ (Output_data_plt_i386::add_local_ifunc_entry): Likewise.
+ (Output_data_plt_i386::address_for_local): Likewise.
+ (Output_data_plt_i386::do_write): Likewise.
+ Move guts of PLT filling to...
+ (Output_data_plt_i386_exec::do_fill_first_plt_entry): ... here ...
+ (Output_data_plt_i386_exec::do_fill_plt_entry): ... and here ...
+ (Output_data_plt_i386_dyn::do_fill_first_plt_entry): ... and here ...
+ (Output_data_plt_i386_dyn::do_fill_plt_entry): ... and here.
+
+2012-05-01 Cary Coutant <ccoutant@google.com>
+
+ * dwarf_reader.cc (Dwarf_die::read_attributes)
+ (Dwarf_die::skip_attributes, Dwarf_die::int_attribute)
+ (Dwarf_die::uint_attribute): Remove DW_FORM_null.
+ * reduced_debug_output.cc
+ (Output_reduced_debug_info_section::get_die_end): Remove
+ DW_FORM_GNU_ref_index. Add default case.
+
+2012-04-26 Mark Wielaard <mjw@redhat.com>
+
+ * dwarf_reader.cc (Dwarf_die::address_attribute): New function.
+ * dwarf_reader.h (Dwarf_die::address_attribute): Likewise.
+ * gdb-index.cc (Gdb_index_info_reader::record_cu_ranges): Handle
+ DW_AT_high_pc as offset from DW_AT_low_pc.
+
+ * testsuite/Makefile.am (gdb_index_test_3.sh): New test case.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/gdb_index_test_3.c: New test source file.
+ * testsuite/gdb_index_test_3.sh: New test source file.
+
+2012-04-25 Ian Lance Taylor <iant@google.com>
+
+ * arm.cc (Target_arm::do_is_defined_by_abi): Make sym a const
+ pointer.
+ (Stub_addend_reader::operator()): Declare Arm_relocate_functions
+ as a class, not a struct.
+ (Target_arm::scan_span_for_cortex_a8_erratum): Likewise.
+ (Target_arm::apply_cortex_a8_workaround): Likewise.
+ * gc.h: Declare Reloc_types as a struct, not a class.
+ * object.h: Declare Symbols_data as a struct.
+ * reloc.h: Declare Read_relocs_data as a struct.
+ * target.h: Declare Relocate_info as a struct.
+
+2012-04-24 David S. Miller <davem@davemloft.net>
+
+ * sparc.cc (Target_sparc::Relocate::relax_call): New function.
+ (Target_sparc::Relocate::relocate): Call it for R_SPARC_WDISP30
+ and R_SPARC_WPLT30.
+
+2012-04-24 Cary Coutant <ccoutant@google.com>
+
+ * incremental-dump.cc (find_input_containing_global): Replace
+ magic number with symbolic constant.
+ (dump_incremental_inputs): Update version number.
+ * incremental.cc (Output_section_incremental_inputs): Update version
+ number; import symbolic constants from Incremental_inputs_reader.
+ (Incremental_inputs::create_data_sections): Align relocations
+ section correctly for 64-bit targets.
+ (Output_section_incremental_inputs::set_final_data_size): Use symbolic
+ constants; add padding.
+ (Output_section_incremental_inputs::write_header): Add assert for
+ header_size.
+ (Output_section_incremental_inputs::write_input_files): Add assert
+ for input_entry_size.
+ (Output_section_incremental_inputs::write_info_blocks): Add padding;
+ add assert for object_info_size, input_section_entry_size,
+ global_sym_entry_size.
+ * incremental.h (Incremental_inputs_reader): Add symbolic constants
+ for data structure sizes; use them.
+ (Incremental_input_entry_reader): Import symbolic constants from
+ Incremental_inputs_reader; use them.
+
+2012-04-23 David S. Miller <davem@davemloft.net>
+
+ * sparc.cc (class Target_sparc): Add elf_machine_, elf_flags_,
+ and elf_flags_set_.
+ (Target_sparc::Target_sparc): Initialize new fields.
+ (Target_sparc::do_make_elf_object): New function.
+ (Target_sparc::do_adjust_elf_header): New function.
+
+2012-04-23 Cary Coutant <ccoutant@google.com>
+
+ * gdb-index.cc (Gdb_index::do_write): Use Swap_aligned32 for writing
+ CU range table of gdb index.
+
+2012-04-20 David S. Miller <davem@davemloft.net>
+
+ * target.cc (Sized_target::do_adjust_elf_header): Use big_endian
+ instead of false.
+
+2012-04-16 David S. Miller <davem@davemloft.net>
+
+ * sparc.cc (Target_sparc::got_address): New function.
+ (Sparc_relocate_functions::gdop_hix22): New function.
+ (Sparc_relocate_functions::gdop_lox10): New function.
+ (Target_sparc::Scan::local): Do not emit a GOT entry for GOTDATA
+ relocs.
+ (Target_sparc::Scan::local): Likewise if the global symbol is not
+ preemptible and is not IFUNC.
+ (Target_sparc::Relocate::relocate): Perform GOTDATA code
+ transformations for local and non-preemptible non-IFUNC global
+ symbols.
+
+ * gdb-index.cc (Gdb_index::do_write): Use Swap_unaligned when
+ writing out 64-bit part of ranges.
+
+ * Makefile.am: Build IFUNC tests with -fPIC and -fPIE instead of
+ -fpic and -fpie respectively.
+ * Makefile.in: Regenerate.
+
+ * sparc.cc (class Target_sparc): Add rela_ifunc_.
+ (Target_sparc::Target_sparc): Initialize new field.
+ (Target_sparc::do_plt_section_for_global): New function.
+ (Target_sparc::do_plt_section_for_local): New function.
+ (Target_sparc::reloc_needs_plt_for_ifunc): New function.
+ (Target_sparc::make_plt_section): New function, broken out of
+ make_plt_entry. Use ORDER_NON_RELRO_FIRST for ".plt".
+ (Target_sparc::make_plt_entry): Call make_plt_section.
+ (Target_sparc::make_local_ifunc_plt_entry): New function.
+ (Target_sparc::rela_ifunc_section): New function.
+ (Target_sparc::plt_section): Remove const.
+ (Output_data_plt_sparc): Update declarations. Define Global_ifunc
+ and Local_ifunc types. Add global_ifuncs_, local_ifuncs_, ifunc_rel_,
+ and ifunc_count_ fields.
+ (Output_data_plt_sparc::Output_data_plt_sparc): Initialize new fields.
+ (Output_data_plt_sparc::add_entry): Handle IFUNC symbols.
+ (Output_data_plt_sparc::add_local_ifunc_entry): New function.
+ (Output_data_plt_sparc::rela_ifunc): New function.
+ (Output_data_plt_sparc::emit_pending_ifunc_relocs): New function.
+ (Output_data_plt_sparc::has_ifunc_section): New function.
+ (Output_data_plt_sparc::entry_count): Include ifunc_count_.
+ (Output_data_plt_sparc::address_for_global): New function.
+ (Output_data_plt_sparc::address_for_local): New function.
+ (Output_data_plt_sparc::plt_index_to_offset): New function.
+ (Output_data_plt_sparc::set_final_data_size): Use plt_index_to_offset
+ and entry_count.
+ (Output_data_plt_sparc::do_write): Use first_plt_entry_offset and
+ entry_count.
+ (Target_sparc::Scan::get_reference_flags): Add R_SPARC_IRELATIVE and
+ R_SPARC_JMP_IREL to switch.
+ (Target_sparc::Scan::check_non_pic): Likewise.
+ (Target_sparc::Scan::local): Handle IFUNC symbols.
+ (Target_sparc::Scan::local): Likewise.
+ (Target_sparc::Relocate::relocate): Likewise, use plt_address_for_global
+ and plt_address_for_local.
+ (Target_sparc::do_finalize_sections): Call emit_pending_ifunc_relocs.
+ Define __rel_iplt_start and __rel_iplt_end if doing a static link.
+
+ * output.h (Output_reloc): Allow use_plt_offset for global relocs too.
+ (class Output_data_reloc): Adjust calls to Output_reloc_type.
+ (Output_data_reloc::add_global_relative): (RELA only) Add use_plt_offset.
+ * output.cc (Output_reloc::Output_reloc): Add use_plt_offset flag for
+ global relocs too.
+ (Output_reloc::symbol_value): Respect use_plt_offset_ for global symbols.
+ * powerpc.cc (Target_powerpc::Scan::global): Adjust add_global_relative
+ calls.
+ * sparc.cc (Target_sparc::Scan::global): Likewise.
+ * x86_64.cc (Target_x86_64::Scan::global): Likewise.
+
+2012-04-16 Cary Coutant <ccoutant@google.com>
+
+ * archive.cc (Library_base::should_include_member): Check for
+ --export-dynamic-symbol.
+ * options.h (class General_options): Add --export-dynamic-symbol.
+ * symtab.cc (Symbol::should_add_dynsym_entry): Check for
+ --export-dynamic-symbol.
+ (Symbol_table::gc_mark_undef_symbols): Likewise.
+ (Symbol_table::do_add_undefined_symbols_from_command_line): Likewise.
+
+2012-04-12 David S. Miller <davem@davemloft.net>
+
+ * sparc.cc (Reloc::wdisp10): New relocation method.
+ (Reloc::h34): Likewise.
+ (Target_sparc::Scan::check_non_pic): Handle R_SPARC_H34.
+ (Target_sparc::Scan::get_reference_flags): Handle R_SPARC_H34 and
+ R_SPARC_WDISP10.
+ (Target_sparc::Scan::local): Likewise.
+ (Target_sparc::Scan::global): Likewise.
+ (Target_sparc::Relocate::relocate): Likewise.
+
+2012-04-09 Cary Coutant <ccoutant@google.com>
+
+ * gdb-index.cc (Gdb_index_info_reader::record_cu_ranges): Allow
+ low_pc == 0.
+
+2012-04-06 Ian Lance Taylor <iant@google.com>
+
+ * timer.cc: #include <unistd.h>.
+
+2012-04-06 Roland McGrath <mcgrathr@google.com>
+
+ * configure.in (AC_CHECK_HEADERS): Add locale.h.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+
+2012-04-05 Nick Clifton <nickc@redhat.com>
+
+ * configure.ac (AC_CHECK_FUNCS): Add setlocale.
+ (AM_LC_MESSAGES): Add.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+
+2012-03-21 Cary Coutant <ccoutant@google.com>
+
+ * Makefile.am: Add gdb-index.cc, gdb-index.h.
+ * Makefile.in: Regenerate.
+ * dwarf_reader.cc (Sized_elf_reloc_mapper::do_initialize): New function.
+ (Sized_elf_reloc_mapper::symbol_section): New function.
+ (Sized_elf_reloc_mapper::do_get_reloc_target): New function.
+ (make_elf_reloc_mapper): New function.
+ (Dwarf_abbrev_table::clear_abbrev_codes): New function.
+ (Dwarf_abbrev_table::do_read_abbrevs): New function.
+ (Dwarf_abbrev_table::do_get_abbrev): New function.
+ (Dwarf_ranges_table::read_ranges_table): New function.
+ (Dwarf_ranges_table::read_range_list): New function.
+ (Dwarf_pubnames_table::read_section): New function.
+ (Dwarf_pubnames_table::read_header): New function.
+ (Dwarf_pubnames_table::next_name): New function.
+ (Dwarf_die::Dwarf_die): New function.
+ (Dwarf_die::read_attributes): New function.
+ (Dwarf_die::skip_attributes): New function.
+ (Dwarf_die::set_name): New function.
+ (Dwarf_die::set_linkage_name): New function.
+ (Dwarf_die::attribute): New function.
+ (Dwarf_die::string_attribute): New function.
+ (Dwarf_die::int_attribute): New function.
+ (Dwarf_die::uint_attribute): New function.
+ (Dwarf_die::ref_attribute): New function.
+ (Dwarf_die::child_offset): New function.
+ (Dwarf_die::sibling_offset): New function.
+ (Dwarf_info_reader::check_buffer): New function.
+ (Dwarf_info_reader::parse): New function.
+ (Dwarf_info_reader::do_parse): New function.
+ (Dwarf_info_reader::do_read_string_table): New function.
+ (Dwarf_info_reader::lookup_reloc): New function.
+ (Dwarf_info_reader::get_string): New function.
+ (Dwarf_info_reader::visit_compilation_unit): New function.
+ (Dwarf_info_reader::visit_type_unit): New function.
+ (Sized_dwarf_line_info::Sized_dwarf_line_info): Use
+ Sized_elf_reloc_mapper.
+ (Sized_dwarf_line_info::symbol_section): Remove function.
+ (Sized_dwarf_line_info::read_relocs): Use Sized_elf_reloc_mapper.
+ (Sized_dwarf_line_info::read_line_mappings): Remove object
+ parameter, adjust callers.
+ (Sized_dwarf_line_info::format_file_lineno): Fix type of cast.
+ * dwarf_reader.h: Include <sys/types.h>.
+ (class Track_relocs): Remove forward declaration.
+ (class Elf_reloc_mapper): New class.
+ (class Sized_elf_reloc_mapper): New class.
+ (class Dwarf_abbrev_table): New class.
+ (class Dwarf_range_list): New class.
+ (class Dwarf_ranges_table): New class.
+ (class Dwarf_pubnames_table): New class.
+ (class Dwarf_die): New class.
+ (class Dwarf_info_reader): New class.
+ (Sized_dwarf_line_info::read_line_mappings): Remove object parameter.
+ (Sized_dwarf_line_info::symbol_section): Remove member function.
+ * dynobj.h (Sized_dynobj::do_section_contents): Refactor code from
+ base class.
+ * gdb-index.cc: New source file.
+ * gdb-index.h: New source file.
+ * incremental.cc (Sized_relobj_incr::do_layout): Track .debug_info
+ and .debug_types sections, call Layout::add_to_gdb_index.
+ (Sized_relobj_incr::do_section_name): Implement.
+ (Sized_relobj_incr::do_section_contents): Adjust parameter list and
+ return type; Implement.
+ (Sized_incr_dynobj::do_section_contents): Adjust parameter list and
+ return type.
+ * incremental.h (Sized_relobj_incr::do_section_contents): Adjust
+ parameter list and return type.
+ (Sized_incr_dynobj::do_section_contents): Likewise.
+ * layout.cc: Include gdb-index.h.
+ (Layout::Layout): Initialize gdb_index_data_.
+ (Layout::init_fixed_output_section): Check for .gdb_index section.
+ (Layout::add_to_gdb_index): New function. Instantiate.
+ * layout.h: Add forward declaration for class Gdb_index.
+ (Layout::add_to_gdb_index): New member function.
+ (Layout::gdb_index_data_): New data member.
+ * main.cc: Include gdb-index.h.
+ (main): Print statistics for gdb index.
+ * object.cc (Object::section_contents): Move code into
+ do_section_contents.
+ (need_decompressed_section): Check for sections needed when building
+ gdb index.
+ (build_compressed_section_map): Likewise.
+ (Sized_relobj_file::do_read_symbols): Need local symbols when building
+ gdb index.
+ (Sized_relobj_file::do_layout): Track .debug_info and .debug_types
+ sections; call Layout::add_to_gdb_index.
+ (Sized_relobj_file::do_decompressed_section_contents): Call
+ do_section_contents directly.
+ * object.h (Object::do_section_contents): Adjust parameter list and
+ return type.
+ (Object::do_decompressed_section_contents): Call do_section_contents
+ directly.
+ (Sized_relobj_file::do_section_contents): Adjust parameter list and
+ return type.
+ * options.h (class General_options): Add --gdb-index option.
+ * plugin.cc (Sized_pluginobj::do_section_contents): Adjust parameter
+ list and return type.
+ * plugin.h (Sized_pluginobj::do_section_contents): Likewise.
+ * reloc.h (Track_relocs::checkpoint): New function.
+ (Track_relocs::reset): New function.
+
+ * testsuite/Makefile.am (gdb_index_test_1.sh, gdb_index_test_2.sh):
+ New test cases.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/gdb_index_test.cc: New test source file.
+ * testsuite/gdb_index_test_1.sh: New test source file.
+ * testsuite/gdb_index_test_2.sh: New test source file.
+
+2012-03-19 Doug Kwan <dougkwan@google.com>
+
+ * arm.cc (Target_arm::do_define_standard_symbols): New method.
+ (Target_arm::do_finalize_sections): Remove code which defines
+ __exidx_start and __exidx_end. Make symbol table parameter
+ anonymous as it is not used.
+ * gold.cc (queue_middle_tasks): Call target hook to define any
+ target-specific symbols.
+ * target.h (Target::define_standard_symbols): New method.
+ (Target::do_define_standard_symbols): Same.
+ * testsuite/Makefile.am (arm_exidx_test): Dump relocations also.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/arm_exidx.s: Generate data relocations for __exidx_start
+ and __exidx_end.
+ * testsuite/arm_exidx_test.sh: Check that no unused dynamic
+ relocations are generated for __exidx_start and __exidx_end.
+
+2012-03-16 Doug Kwan <dougkwan@google.com>
+
+ * testsuite/Makefile.am: Disable test initpri3b.
+ * testsuite/Makefile.in: Regenerate.
+
+2012-03-15 Doug Kwan <dougkwan@google.com>
+
+ * arm.cc (Target_arm::got_section): Make .got section read-only
+ if -z now is given.
+
+2012-03-15 Ian Lance Taylor <iant@google.com>
+
+ PR gold/13850
+ * layout.cc (Layout::make_output_section): Correctly mark
+ SHT_INIT_ARRAY, et. al., as relro.
+
+2012-03-14 Doug Kwan <dougkwan@google.com>
+
+ * gold/arm.cc (Target_arm::Scan::global): Generate R_ARM_GLOB_DAT
+ dynamic relocations for protected symbols in shared objects.
+
+2012-03-13 Ian Lance Taylor <iant@google.com>
+
+ * resolve.cc (Symbol_table::resolve): When merging common symbols,
+ keep the larger alignment.
+
+2012-03-12 Cary Coutant <ccoutant@google.com>
+
+ * dwarf_reader.cc (Sized_dwarf_line_info::process_one_opcode): Fix
+ handling of DW_LNE_define_file.
+
+2012-03-12 Cary Coutant <ccoutant@google.com>
+
+ * reduced_debug_output.cc
+ (Output_reduced_debug_info_section::get_die_end): Add new FORM
+ codes to switch.
+
+2012-02-29 Cary Coutant <ccoutant@google.com>
+
+ * object.cc (need_decompressed_section): Add #ifdef ENABLE_THREADS.
+
+2012-02-29 Cary Coutant <ccoutant@google.com>
+
+ * dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info):
+ Call Object::decompressed_section_contents.
+ * dwarf_reader.h (Sized_dwarf_line_info::~Sized_dwarf_line_info):
+ New dtor.
+ (Sized_dwarf_line_info::buffer_start_): New data member.
+ * merge.cc (Output_merge_data::do_add_input_section): Call
+ Object::decompressed_section_contents.
+ (Output_merge_string::do_add_input_section): Likewise.
+ * object.cc (need_decompressed_section): New function.
+ (build_compressed_section_map): Decompress sections needed later.
+ (Sized_relobj_file::do_decompressed_section_contents): New function.
+ (Sized_relobj_file::do_discard_decompressed_sections): New function.
+ * object.h (Object::decompressed_section_contents): New function.
+ (Object::discard_decompressed_sections): New function.
+ (Object::do_decompressed_section_contents): New function.
+ (Object::do_discard_decompressed_sections): New function.
+ (Compressed_section_info): New type.
+ (Compressed_section_map): Include decompressed section contents.
+ (Sized_relobj_file::do_decompressed_section_contents): New function.
+ (Sized_relobj_file::do_discard_decompressed_sections): New function.
+
+2012-02-16 Cary Coutant <ccoutant@google.com>
+
+ * testsuite/Makefile.am (initpri2): Add --ctors-in-init-array option.
+ * testsuite/Makefile.in: Regenerate.
+
+2012-02-14 Cary Coutant <ccoutant@google.com>
+
+ * options.cc (General_options::finalize): Disallow -pie and -static.
+
+2012-02-03 Doug Kwan <dougkwan@google.com>
+
+ * arm.cc (Arm_relocate_functions::abs8,
+ Arm_relocate_functions::abs16): Use
+ Bits::has_signed_unsigned_overflow32.
+ (Arm_relocate_functions::thm_abs8): Correct range of
+ overflow check.
+ * reloc.h (Bits class): Change minimum number of bits from 0 to 1
+ in assertions.
+
+2012-02-02 Doug Kwan <dougkwan@google.com>
+
+ * arm.cc (Reloc_stub::stub_type_for_reloc): Use PIC stubs in all
+ position independent outputs, not just shared objects.
+
+2012-01-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * configure.ac: Check if -fpic -mtls-dialect=gnu2 works.
+ * configure: Regenerated.
+