Add -z bndplt support (for Intel MPX).
[deliverable/binutils-gdb.git] / gold / ChangeLog
index 8a9d6d5220c13ab1d2b40140a488269944ba9284..fea77ca4966f886927747326a24321b7b5b75e7b 100644 (file)
@@ -1,3 +1,410 @@
+2016-12-22  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/17643
+       * options.h (-z bndplt): New option.
+       * x86_64.cc (Output_data_plt_x86_64::regular_count): New method.
+       (Output_data_plt_x86_64::address_for_global): Move implementation into
+       virtual method.
+       (Output_data_plt_x86_64::address_for_local): Likewise.
+       (Output_data_plt_x86_64::got): New method.
+       (Output_data_plt_x86_64::got_plt): New method.
+       (Output_data_plt_x86_64::got_irelative): New method.
+       (Output_data_plt_x86_64::do_address_for_global): New virtual method.
+       (Output_data_plt_x86_64::do_address_for_local): New virtual method.
+       (class Output_data_plt_x86_64_bnd): New class.
+       (Target_x86_64::do_make_data_plt): Move out of line and specialize
+       for each size (both overloads).
+       (Output_data_plt_x86_64::set_final_data_size): Cosmetic changes.
+       * testsuite/Makefile.am (bnd_plt_1): New test case.
+       (bnd_ifunc_1): New test case.
+       (bnd_ifunc_2): New test case.
+       * testsuite/Makefile.in: Regenerate.
+       * testsuite/bnd_ifunc_1.s: New source file. 
+       * testsuite/bnd_ifunc_1.sh: New shell script.
+       * testsuite/bnd_ifunc_2.s: New source file.
+       * testsuite/bnd_ifunc_2.sh: New shell script.
+       * testsuite/bnd_plt_1.s: New source file.
+       * testsuite/bnd_plt_1.sh: New shell script.
+
+2016-12-22  Cary Coutant  <ccoutant@gmail.com>
+
+       * layout.cc (Layout::finalize): Track count of forced-local symbols
+       in .dynsym.
+       (Layout::create_symtab_sections): Add local_dynamic_count parameter;
+       use that instead of sh_info value.
+       (Layout::create_dynamic_symtab): Add pforced_local_dynamic_count
+       parameter; pass it to Symtab::set_dynsym_indexes().  Include forced
+       locals in sh_info value.  Pass index of first real global to
+       Dynobj::create_gnu_hash_table() and Dynobj::create_elf_hash_table().
+       * layout.h (Layout::create_symtab_sections): Add local_dynamic_count
+       parameter.
+       (Layout::create_dynamic_symtab): Add pforced_local_dynamic_count
+       parameter.
+       * symtab.cc (Symbol_table::set_dynsym_indexes): Add pforced_local_count
+       parameter.  Process forced-local symbols first and return the count.
+       (Symbol_table::finalize): Update comments.
+       * symtab.h (Symbol_table::set_dynsym_indexes): Add pforced_local_count
+       parameter.
+       (Symbol_table::first_dynamic_global_index_): Update comment.
+       (Symbol_table::dynamic_count_): Update comment.
+       * testsuite/Makefile.am (ifuncmod1.sh): New test case.
+       * testsuite/Makefile.in: Regenerate.
+       * testsuite/ifuncmod1.sh: New shell script.
+
+2016-12-21  Cary Coutant  <ccoutant@gmail.com>
+
+       * symtab.cc (Symbol_table::define_special_symbol): Add is_forced_local
+       parameter; if set, do not check version script.
+       (Symbol_table::do_define_in_output_data): Pass is_forced_local for
+       STB_LOCAL predefined symbols.
+       (Symbol_table::do_define_in_output_segment): Likewise.
+       (Symbol_table::do_define_in_output_segment): Likewise.
+       (Symbol_table::do_define_as_constant): Likewise.
+       * symtab.h (Symbol_table::define_special_symbol): Add is_forced_local
+       parameter. Adjust all callers.
+       * testsuite/Makefile.am (ver_test_8.sh): New test case.
+       * testsuite/Makefile.in: Regenerate.
+       * ver_test_8.sh: New test script.
+
+2016-12-21  Cary Coutant  <ccoutant@gmail.com>
+
+       * output.cc (Output_segment::first_section): Return NULL if there are
+       no sections in the segment.
+       * output.h (Output_segment::first_section_load_address): Assert that
+       first section is not NULL.
+       * symtab.cc (Symbol_table::sized_write_globals): Attach linker-created
+       segment-relative symbols to first section of the segment.
+
+2016-12-21  Alan Modra  <amodra@gmail.com>
+
+       * arm.cc: Fix comment chars with high bit set.
+
+2016-12-20  Cary Coutant  <ccoutant@gmail.com>
+
+       * testsuite/Makefile.am: Add missing dependencies on gcctestdir/ld
+       or ../ld-new.
+       * testsuite/Makefile.in: Regenerate.
+
+2016-12-19  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/20949
+       * script.cc (Lex::get_token): Don't look ahead past NUL characters.
+
+2016-12-19  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/14676
+       PR gold/20983
+       * layout.h (Layout::choose_output_section): Add match_input_spec
+       parameter. Adjust all callers.
+       * layout.cc (Layout::choose_output_section): Likewise.  Pass
+       match_input_spec to Script_sections::output_section_name().
+       (Layout::create_note): Pass true for match_input_spec.
+       * script-sections.h (Script_sections::output_section_name): Add
+       match_input_spec parameter.
+       * script-sections.cc (Sections_element::output_section_name): Likewise.
+       (Output_section_definition::output_section_name): Likewise.
+       (Script_sections::output_section_name): Likewise.
+
+2016-12-19  Igor Kudrin  <ikudrin@accesssoftek.com>
+
+       * arm.cc (Target_arm::Target_arm): Move initialization code ...
+       (Target_arm::do_select_as_default_target): ... to here.
+       * testsuite/Makefile.am (arm_target_lazy_init): New test case.
+       * testsuite/Makefile.in: Regenerate.
+       * testsuite/arm_target_lazy_init.s: New source file.
+       * testsuite/arm_target_lazy_init.t: New linker script.
+
+2016-12-19  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/20976
+       * symtab.cc (Symbol_table::sized_write_globals): Use address of
+       output section, not input section.
+       * testsuite/Makefile.am (pr20976): New test case.
+       * testsuite/Makefile.in: Regenerate.
+       * testsuite/pr20976.c: New source file.
+
+2016-12-13  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/20749
+       * options.h (--orphan-handling): New option.
+       (General_options::Orphan_handling): New enum.
+       (General_options::orphan_handling_enum): New method.
+       (General_options::set_orphan_handling_enum): New method.
+       (General_options::orphan_handling_enum_): New data member.
+       * options.cc (General_options::General_options): Initialize new member.
+       (General_options::finalize): Convert --orphan-handling argument to enum.
+       * script-sections.cc (Script_sections::output_section_name): Check it.
+
+2016-12-13  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/20522
+       * layout.cc (Layout::choose_output_section): Add is_reloc parameter.
+       Adjust all callers.  Do not use linker script for is_reloc sections.
+       (Layout::layout_reloc): Pass is_reloc == true.
+       * layout.h (Layout::choose_output_section): Add is_reloc parameter.
+
+2016-12-12  Igor Kudrin  <ikudrin@accesssoftek.com>
+           Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/14676
+       * script-sections.cc (Output_section_definition::output_section_name):
+       For linker-generated sections, compare with output section name.
+       * testsuite/Makefile.am (script_test_13): New test.
+       * testsuite/Makefile.in: Regenerate.
+       * testsuite/script_test_13.c: New source file.
+       * testsuite/script_test_13.sh: New script.
+       * testsuite/script_test_13.t: New linker script.
+
+2016-12-12  Cary Coutant  <ccoutant@gmail.com>
+
+       * script-sections.cc (Orphan_section_placement::update_last_alloc):
+       New method.
+       (Orphan_section_placement::find_place): Place orphan .data section
+       after either RODATA or TEXT.
+       (Script_sections::place_orphan): Call update_last_alloc for allocated
+       sections.
+       (Script_sections::create_segments): Improve handling of BSS.
+
+2016-12-13  Alan Modra  <amodra@gmail.com>
+
+       PR gold/16711
+       * testsuite/script_test_15a.sh: Allows larger p_filesz.
+       * testsuite/script_test_15b.sh: Likewise.
+       * testsuite/script_test_15c.sh: Likewise.
+
+2016-12-13  Alan Modra  <amodra@gmail.com>
+
+       PR gold/20717
+       * testsuite/pr20717.t: Add .got output section containing .toc.
+
+2016-12-11  Igor Kudrin  <ikudrin@accesssoftek.com>
+
+       PR gold/20717
+       * testsuite/Makefile.am (pr20717): New test.
+       * testsuite/Makefile.in: Regenerate.
+       * testsuite/pr20717.c: New test source file.
+       * testsuite/pr20717.sh: New test script.
+       * testsuite/pr20717.t: New test linker script.
+
+2016-12-11  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/16711
+       * output.cc (Output_section::set_final_data_size): Calculate data size
+       based on relative offset rather than file offset.
+       (Output_segment::set_section_addresses): Track file offset separately
+       from address offset.
+       (Output_segment::set_section_list_addresses): Add pfoff parameter.
+       Track file offset separately.  Don't move file offset for BSS
+       sections.
+       * output.h (Output_segment::set_section_list_addresses): Add pfoff
+       parameter.
+       * script-sections.cc (Orphan_section_placement): Add PLACE_LAST_ALLOC.
+       (Orphan_section_placement::Orphan_section_placement): Initialize it.
+       (Orphan_section_placement::output_section_init): Track last allocated
+       section.
+       (Orphan_section_placement::find_place): Place BSS after last allocated
+       section.
+       (Output_section_element_input::set_section_addresses): Always override
+       input section alignment when SUBALIGN is specified.
+       (Output_section_definition::set_section_addresses): Override alignment
+       of output section when SUBALIGN is specified.
+
+       * testsuite/Makefile.am (script_test_15a, script_test_15b)
+       (script_test_15c): New test cases.
+       * testsuite/Makefile.in: Regenerate.
+       * testsuite/script_test_2.cc: Adjust expected layout.
+       * testsuite/script_test_15.c: New source file.
+       * testsuite/script_test_15a.sh: New shell script.
+       * testsuite/script_test_15a.t: New linker script.
+       * testsuite/script_test_15b.sh: New shell script.
+       * testsuite/script_test_15b.t: New linker script.
+       * testsuite/script_test_15c.sh: New shell script.
+       * testsuite/script_test_15c.t: New linker script.
+
+2016-12-08  Alan Modra  <amodra@gmail.com>
+
+       * powerpc.cc (Powerpc_relobj::stub_table): Return NULL rather
+       then asserting.
+
+2016-12-08  Alan Modra  <amodra@gmail.com>
+
+       * options.h (--stub-group-multi): Fix typo.
+
+2016-12-07  Alan Modra  <amodra@gmail.com>
+
+       * options.h (--stub-group-multi): New PowerPC option.
+       * powerpc.cc (Stub_control): Add multi_os_ var and param
+       to constructor.  Sort start_ var later.  Comment State.
+       (Stub_control::can_add_to_stub_group): Heed multi_os_.
+       (Target_powerpc::group_sections): Update.
+
+2016-12-07  Alan Modra  <amodra@gmail.com>
+
+       PR gold/20878
+       * powerpc.cc (Stub_control): Replace stubs_always_before_branch_
+       with stubs_always_after_branch_, group_end_addr_ with
+       group_start_addr_.
+       (Stub_control::can_add_to_stub_group): Rewrite to suit scanning
+       sections by increasing address.
+       (Target_powerpc::group_sections): Scan that way.  Delete corner
+       case.
+       * options.h (--stub-group-size): Update help string.
+
+2016-12-07  Alan Modra  <amodra@gmail.com>
+
+       * powerpc.cc (Stub_table_owner): Provide constructor.
+       (Powerpc_relobj::set_stub_table): Resize fill with -1.
+       (Target_powerpc::Branch_info::make_stub): Provide target debug
+       output on returning false.
+
+2016-12-05  Cary Coutant  <ccoutant@gmail.com>
+           Tristan Gingold  <gingold@adacore.com>
+
+       * object.cc (Sized_relobj_file::do_count_local_symbols): Check
+       is_ordinary before using shndx.
+       * testsuite/Makefile.am (file_in_many_sections_test.sh): New test case.
+       * testsuite/Makefile.in: Regenerate.
+       * testsuite/file_in_many_sections.c: New source file.
+       * testsuite/file_in_many_sections_test.sh: New script.
+
+2016-12-01  Cary Coutant  <ccoutant@gmail.com>
+           Igor Kudrin  <ikudrin@accesssoftek.com>
+
+       PR gold/20717
+       * script-sections.cc (Script_sections): Set *keep to false when
+       no match.
+
+2016-12-01  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/20834
+       * target.h (Target::default_text_segment_address): Bump default
+       start address up to ABI page size.
+
+2016-12-01  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/18989
+       * options.cc (General_options::object_format_to_string): New function.
+       (General_options::copy_from_posdep_options): New function.
+       (General_options::parse_push_state): New function.
+       (General_options::parse_pop_state): New function.
+       * options.h (--push-state, --pop-state): New options.
+       (General_options::object_format_to_string): New method.
+       (General_options::set_incremental_disposition): New method.
+       (General_options::copy_from_posdep_options): New method.
+       (General_options::options_stack_): New data member.
+
+2016-12-01  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/20807
+       * aarch64.cc (Target_aarch64::scan_reloc_section_for_stubs): Handle
+       section symbols correctly.
+       * arm.cc (Target_arm): Likewise.
+       * powerpc.cc (Target_powerpc): Likewise.
+
+2016-11-27  Ambrogino Modigliani  <ambrogino.modigliani@gmail.com>
+
+       * aarch64-reloc.def: Fix spelling in comments.
+
+2016-11-27  Ambrogino Modigliani  <ambrogino.modigliani@gmail.com>
+
+       * aarch64.cc: Fix spelling in comments.
+       * arm.cc: Fix spelling in comments.
+       * icf.cc: Fix spelling in comments.
+       * layout.cc: Fix spelling in comments.
+       * layout.h: Fix spelling in comments.
+       * mips.cc: Fix spelling in comments.
+       * output.h: Fix spelling in comments.
+       * plugin.h: Fix spelling in comments.
+       * script-sections.h: Fix spelling in comments.
+       * script.h: Fix spelling in comments.
+       * stringpool.h: Fix spelling in comments.
+       * tilegx.cc: Fix spelling in comments.
+
+2016-11-22  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/20346
+       * options.cc (One_option::print): Print "(default)" when appropriate.
+       * options.h: Clean up and re-sort options.
+       (One_option::is_default): New data member.
+       (One_option::One_option): Add is_default parameter; adjust all calls.
+       (DEFINE_var): Add is_default__ parameter; adjust all calls.
+       (DEFINE_bool): Set is_default based on default_value__.
+       (DEFINE_bool_ignore): New macro.
+       (--no-eh-frame-hdr): New option.
+       (--enable-new-dtags): Remove mention of DT_FLAGS.
+
+2016-11-22  Ambrogino Modigliani  <ambrogino.modigliani@gmail.com>
+
+        * configure: Regenerate.
+
+2016-11-21  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/20693
+       * gold.cc (queue_middle_tasks): Force valid target earlier.
+
+2016-11-21  Igor Kudrin  <ikudrin@accesssoftek.com>
+
+       * layout.cc: Include windows.h and rpcdce.h (for MinGW32).
+       (Layout::create_build_id): Generate uuid using UuidCreate().
+
+2016-11-04  Loïc Yhuel <loic.yhuel@softathome.com>
+
+       * configure.ac: add missing '$'.
+       * configure: Regenerate.
+
+2016-10-21  Gergely Nagy  <ngg@tresorit.com>
+
+       PR gold/17704
+       * icf.cc (match_sections): Add new parameter section_addraligns.
+       Check section alignment and keep the section with the strictest
+       alignment.
+       (find_identical_sections): New local variable section_addraligns.
+       Store each section's alignment.
+       * testsuite/pr17704a_test.s: New file.
+       * testsuite/Makefile.am (pr17704a_test): New test.
+       * testsuite/Makefile.in: Regenerate.
+
+2016-10-06  Alan Modra  <amodra@gmail.com>
+
+       * powerpc.cc (Target_powerpc::Relocate::relocate): Add fall
+       through comment.
+       * tilegx.cc (Target_tilegx::Relocate::relocate): Likewise.
+
+2016-10-06  Alan Modra  <amodra@gmail.com>
+
+       * aarch64.cc: Spell fall through comments as "// Fall through.".
+       * arm.cc: Likewise.
+       * mips.cc: Likewise.
+       * powerpc.cc: Likewise.
+       * s390.cc: Likewise.
+       * sparc.cc: Likewise.
+       * x86_64.cc: Likewise.
+       * powerpc.cc (Target_powerpc::Relocate::relocate): Add missing
+       fall through comments.
+       * sparc.cc: (Target_sparc::Scan::global): Likewise.
+       (Target_sparc::Relocate::relocate): Likewise.
+       * tilegx.cc (Target_tilegx::Relocate::relocate): Likewise.
+       * resolve.cc (symbol_to_bits): Add missing break.
+
+2016-09-26  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/20238
+       * symtab.cc (Symbol_table::define_default_version): Check that
+       unversioned symbol is defined.
+
+2016-09-26  Vlad Zakharov  <vzakhar@synopsys.com>
+
+       * Makefile.in: Regenerate.
+       * configure: Likewise.
+       * testsuite/Makefile.in: Likewise.
+
+2016-09-26  Alan Modra  <amodra@gmail.com>
+
+       * aarch64.cc (Target_aarch64::is_erratum_835769_sequence): Avoid
+       compiler warning.
+       * output.cc (Output_segment::set_section_addresses): Likewise.
+       * testsuite/Makefile.in: Regenerate.
+
 2016-09-02  Doug Kwan  <dougkwan@google.com>
 
         * arm.cc (Target_arm::Target_arm): Move method definition outside of
This page took 0.026672 seconds and 4 git commands to generate.