1 2016-12-11 Cary Coutant <ccoutant@gmail.com>
3 * Makefile.in: Regenerate.
5 2016-12-08 Alan Modra <amodra@gmail.com>
7 * powerpc.cc (Powerpc_relobj::stub_table): Return NULL rather
10 2016-12-08 Alan Modra <amodra@gmail.com>
12 * options.h (--stub-group-multi): Fix typo.
14 2016-12-07 Alan Modra <amodra@gmail.com>
16 * options.h (--stub-group-multi): New PowerPC option.
17 * powerpc.cc (Stub_control): Add multi_os_ var and param
18 to constructor. Sort start_ var later. Comment State.
19 (Stub_control::can_add_to_stub_group): Heed multi_os_.
20 (Target_powerpc::group_sections): Update.
22 2016-12-07 Alan Modra <amodra@gmail.com>
25 * powerpc.cc (Stub_control): Replace stubs_always_before_branch_
26 with stubs_always_after_branch_, group_end_addr_ with
28 (Stub_control::can_add_to_stub_group): Rewrite to suit scanning
29 sections by increasing address.
30 (Target_powerpc::group_sections): Scan that way. Delete corner
32 * options.h (--stub-group-size): Update help string.
34 2016-12-07 Alan Modra <amodra@gmail.com>
36 * powerpc.cc (Stub_table_owner): Provide constructor.
37 (Powerpc_relobj::set_stub_table): Resize fill with -1.
38 (Target_powerpc::Branch_info::make_stub): Provide target debug
39 output on returning false.
41 2016-12-05 Cary Coutant <ccoutant@gmail.com>
42 Tristan Gingold <gingold@adacore.com>
44 * object.cc (Sized_relobj_file::do_count_local_symbols): Check
45 is_ordinary before using shndx.
46 * testsuite/Makefile.am (file_in_many_sections_test.sh): New test case.
47 * testsuite/Makefile.in: Regenerate.
48 * testsuite/file_in_many_sections.c: New source file.
49 * testsuite/file_in_many_sections_test.sh: New script.
51 2016-12-01 Cary Coutant <ccoutant@gmail.com>
54 * script-sections.cc (Script_sections): Set *keep to false when
57 2016-12-01 Cary Coutant <ccoutant@gmail.com>
60 * target.h (Target::default_text_segment_address): Bump default
61 start address up to ABI page size.
63 2016-12-01 Cary Coutant <ccoutant@gmail.com>
66 * options.cc (General_options::object_format_to_string): New function.
67 (General_options::copy_from_posdep_options): New function.
68 (General_options::parse_push_state): New function.
69 (General_options::parse_pop_state): New function.
70 * options.h (--push-state, --pop-state): New options.
71 (General_options::object_format_to_string): New method.
72 (General_options::set_incremental_disposition): New method.
73 (General_options::copy_from_posdep_options): New method.
74 (General_options::options_stack_): New data member.
76 2016-12-01 Cary Coutant <ccoutant@gmail.com>
79 * aarch64.cc (Target_aarch64::scan_reloc_section_for_stubs): Handle
80 section symbols correctly.
81 * arm.cc (Target_arm): Likewise.
82 * powerpc.cc (Target_powerpc): Likewise.
84 2016-11-27 Ambrogino Modigliani <ambrogino.modigliani@gmail.com>
86 * aarch64-reloc.def: Fix spelling in comments.
88 2016-11-27 Ambrogino Modigliani <ambrogino.modigliani@gmail.com>
90 * aarch64.cc: Fix spelling in comments.
91 * arm.cc: Fix spelling in comments.
92 * icf.cc: Fix spelling in comments.
93 * layout.cc: Fix spelling in comments.
94 * layout.h: Fix spelling in comments.
95 * mips.cc: Fix spelling in comments.
96 * output.h: Fix spelling in comments.
97 * plugin.h: Fix spelling in comments.
98 * script-sections.h: Fix spelling in comments.
99 * script.h: Fix spelling in comments.
100 * stringpool.h: Fix spelling in comments.
101 * tilegx.cc: Fix spelling in comments.
103 2016-11-22 Cary Coutant <ccoutant@gmail.com>
106 * options.cc (One_option::print): Print "(default)" when appropriate.
107 * options.h: Clean up and re-sort options.
108 (One_option::is_default): New data member.
109 (One_option::One_option): Add is_default parameter; adjust all calls.
110 (DEFINE_var): Add is_default__ parameter; adjust all calls.
111 (DEFINE_bool): Set is_default based on default_value__.
112 (DEFINE_bool_ignore): New macro.
113 (--no-eh-frame-hdr): New option.
114 (--enable-new-dtags): Remove mention of DT_FLAGS.
116 2016-11-22 Ambrogino Modigliani <ambrogino.modigliani@gmail.com>
118 * configure: Regenerate.
120 2016-11-21 Cary Coutant <ccoutant@gmail.com>
123 * gold.cc (queue_middle_tasks): Force valid target earlier.
125 2016-11-21 Igor Kudrin <ikudrin@accesssoftek.com>
127 * layout.cc: Include windows.h and rpcdce.h (for MinGW32).
128 (Layout::create_build_id): Generate uuid using UuidCreate().
130 2016-11-04 Loïc Yhuel <loic.yhuel@softathome.com>
132 * configure.ac: add missing '$'.
133 * configure: Regenerate.
135 2016-10-21 Gergely Nagy <ngg@tresorit.com>
138 * icf.cc (match_sections): Add new parameter section_addraligns.
139 Check section alignment and keep the section with the strictest
141 (find_identical_sections): New local variable section_addraligns.
142 Store each section's alignment.
143 * testsuite/pr17704a_test.s: New file.
144 * testsuite/Makefile.am (pr17704a_test): New test.
145 * testsuite/Makefile.in: Regenerate.
147 2016-10-06 Alan Modra <amodra@gmail.com>
149 * powerpc.cc (Target_powerpc::Relocate::relocate): Add fall
151 * tilegx.cc (Target_tilegx::Relocate::relocate): Likewise.
153 2016-10-06 Alan Modra <amodra@gmail.com>
155 * aarch64.cc: Spell fall through comments as "// Fall through.".
158 * powerpc.cc: Likewise.
160 * sparc.cc: Likewise.
161 * x86_64.cc: Likewise.
162 * powerpc.cc (Target_powerpc::Relocate::relocate): Add missing
163 fall through comments.
164 * sparc.cc: (Target_sparc::Scan::global): Likewise.
165 (Target_sparc::Relocate::relocate): Likewise.
166 * tilegx.cc (Target_tilegx::Relocate::relocate): Likewise.
167 * resolve.cc (symbol_to_bits): Add missing break.
169 2016-09-26 Cary Coutant <ccoutant@gmail.com>
172 * symtab.cc (Symbol_table::define_default_version): Check that
173 unversioned symbol is defined.
175 2016-09-26 Vlad Zakharov <vzakhar@synopsys.com>
177 * Makefile.in: Regenerate.
178 * configure: Likewise.
179 * testsuite/Makefile.in: Likewise.
181 2016-09-26 Alan Modra <amodra@gmail.com>
183 * aarch64.cc (Target_aarch64::is_erratum_835769_sequence): Avoid
185 * output.cc (Output_segment::set_section_addresses): Likewise.
186 * testsuite/Makefile.in: Regenerate.
188 2016-09-02 Doug Kwan <dougkwan@google.com>
190 * arm.cc (Target_arm::Target_arm): Move method definition outside of
191 class definition. Add code to handle --target1-rel, --target1-abs
192 and --target2= options.
193 (Target_arm::get_reloc_reloc_type): Change method to be non-static
195 (Target_arm::target1_is_rel_, Target_arm::target2_reloc_): New data
197 (Target_arm::Scan::local, Target_arm::Scan::global,
198 Target_arm::Relocate::relocate,
199 Target_arm::Relocatable_size_for_reloc::get_size_for_reloc): Adjust
200 call to Target_arm::get_real_reloc_type.
201 (Target_arm::get_real_reloc_type): Use command line options to
202 determine real types of R_ARM_TARGET1 and R_ARM_TARGET2.
203 * options.h (--target1-rel, --target1-abs, --target2): New ARM-only
206 2016-08-31 Alan Modra <amodra@gmail.com>
208 * powerpc.cc (class Stub_control): Delete stub14_group_size_
209 and has14_. Add group_size_.
210 (Stub_control::can_add_to_stub_group): Adjust to suit. Print
211 debug info when switching to adding sections before stubs.
213 2016-08-31 Alan Modra <amodra@gmail.com>
215 * debug.h (DEBUG_TARGET): New.
216 (DEBUG_ALL): Add DEBUG_TARGET.
217 (gold_debug): Delete FORMAT param.
218 * powerpc.cc (Stub_control::can_add_to_stub_group): Print debug ourput.
220 2016-08-30 Alan Modra <amodra@gmail.com>
223 * powerpc.cc (class Stub_control): Add has14_. Comment owner_.
224 (Stub_control::can_add_to_stub_group): Correct grouping of
225 sections containing 14-bit external branches. When returning
226 false, set state_ to reflect the fact that we have one section
227 for the next group. Rewrite most of function for clarity.
228 Add and expand comments.
229 (Target_powerpc::do_relax): Print stub group size retry in hex.
231 2016-08-26 Han Shen <shenhan@google.com>
233 PR gold/20529 - relaxing loop never ends.
235 * powerpc.cc (Stub_table::min_size_threshold_): New member to
237 (Stub_table::set_min_size_threshold): New member function.
238 (Stub_table::set_address_and_size): Add code to only allow size
240 (Target_powerpc::do_relax): Add code to record last size.
242 2016-08-23 Roland McGrath <roland@hack.frob.com>
244 * options.h (General_options): Grok -z stack-size.
245 * output.h (Output_segment::set_size): New method.
246 * layout.cc (Layout::create_executable_stack_info): Renamed to ...
247 (Layout::create_stack_segment): ... this. Always create the
248 segment if -z stack-size was used.
249 (Layout::set_segment_offsets): Don't call ->set_offset on the
250 PT_GNU_STACK segment.
252 2016-08-15 Bharathi Seshadri <bseshadr@cisco.com>
254 * options.h (General_options): Add --be8 option.
255 * arm.cc (Arm_relobj::do_relocate_sections): Add code to swap for be8.
256 (Output_data_plt_arm_standard::do_fill_first_plt_entry): Likewise.
257 (Output_data_plt_arm_short::do_fill_plt_entry): Likewise.
258 (Output_data_plt_arm_long::do_fill_plt_entry): Likewise.
259 (Target_arm::do_adjust_elf_header): Do EF_ARM_BE8 adjustment.
261 2016-08-17 Cary Coutant <ccoutant@gmail.com>
263 * i386.cc (Target_i386): Reset skip_call_tls_get_addr_ after printing
265 * testsuite/Makefile.am (pr20216a): Add missing dependencies.
266 (pr20308a): Add -Bgcctestdir/ to compile rules.
267 * testsuite/Makefile.in: Regenerate.
269 2016-08-12 Roland McGrath <roland@hack.frob.com>
272 * script-sections.cc (Script_sections::release_segments):
273 Reset this->segments_created_.
275 2016-08-12 Roland McGrath <roland@hack.frob.com>
277 * yyscript.y (HIDDEN): New %token.
278 (assignment): Handle HIDDEN(string = expr) syntax.
279 * script.cc (script_keyword_parsecodes): Add HIDDEN.
281 2016-08-10 Cary Coutant <ccoutant@gmail.com>
284 * x86_64.cc (Target_x86_64::Relocate::relocate): Add check for
285 R_X86_64_GOTPCREL. Reset skip_call_tls_get_addr_ after printing
287 * testsuite/Makefile.am (pr20216_gd.o): Add -Bgcctestdir/.
288 (pr20216_ld.o): Likewise.
289 * testsuite/Makefile.in: Regenerate.
291 2016-08-10 James Clarke <jrtc27@jrtc27.com>
294 * symtab.cc (Symbol_table::add_from_relobj): Handle NULL symbols,
295 which will be present for STT_SPARC_REGISTER.
296 (Symbol_table::add_from_pluginobj): Likewise.
297 (Symbol_table::add_from_dynobj): Likewise.
298 (Symbol_table::add_from_incrobj): Removed dead code.
300 2016-08-10 James Clarke <jrtc27@jrtc27.com>
303 * sparc.cc (Target_sparc::Relocate::relocate): R_SPARC_GOTDATA_OP_LOX10
304 should fall back on R_SPARC_GOT10, not R_SPARC_GOT13.
306 2016-08-10 James Clarke <jrtc27@jrtc27.com>
309 * sparc.cc (Target_sparc::Scan::check_non_pic): Allow R_SPARC_32 on
312 2016-06-29 Cary Coutant <ccoutant@gmail.com>
315 * testsuite/dynamic_list.sh: Remove check for _ZdlPv.
317 2016-06-29 Cary Coutant <ccoutant@gmail.com>
319 * testsuite/Makefile.am (MOSTLYCLEANFILES): Add eh_test_2.
320 * testsuite/Makefile.in: Regenerate.
322 2016-06-30 Alan Modra <amodra@gmail.com>
324 * testsuite/Makefile.am (memory_test, memory_test_2): Pass
325 -Wl,-z to gcc, not plain -z.
326 * testsuite/Makefile.in: Regenerate.
328 2016-06-29 H.J. Lu <hongjiu.lu@intel.com>
331 * i386.cc (Target_i386::Relocate::relocate): Allow
332 R_386_GOT32X relocation against ___tls_get_addr.
333 (Target_i386::Relocate::tls_gd_to_ie): Support indirect
334 call to __tls_get_addr.
335 (Target_i386::Relocate::tls_gd_to_le): Likewise.
336 (Target_i386::Relocate::tls_ld_to_le): Likewise.
337 * testsuite/Makefile.am (check_PROGRAMS): Add pr20308a_test,
338 pr20308b_test, pr20308c_test, pr20308d_test, pr20308e_test.
339 (pr20308a_test_SOURCES): New.
340 (pr20308a_test_DEPENDENCIES): Likewise.
341 (pr20308a_test_CFLAGS): Likewise.
342 (pr20308a_test_LDFLAGS): Likewise.
343 (pr20308a_test_LDADD): Likewise.
344 (pr20308b_test_SOURCES): Likewise.
345 (pr20308b_test_DEPENDENCIES): Likewise.
346 (pr20308b_test_CFLAGS): Likewise.
347 (pr20308b_test_LDFLAGS): Likewise.
348 (pr20308b_test_LDADD): Likewise.
349 (pr20308c_test_SOURCES): Likewise.
350 (pr20308c_test_DEPENDENCIES): Likewise.
351 (pr20308c_test_CFLAGS): Likewise.
352 (pr20308c_test_LDFLAGS): Likewise.
353 (pr20308c_test_LDADD): Likewise.
354 (pr20308d_test_SOURCES): Likewise.
355 (pr20308d_test_DEPENDENCIES): Likewise.
356 (pr20308d_test_CFLAGS): Likewise.
357 (pr20308d_test_LDFLAGS): Likewise.
358 (pr20308d_test_LDADD): Likewise.
359 (pr20308e_test_SOURCES): Likewise.
360 (pr20308e_test_DEPENDENCIES): Likewise.
361 (pr20308e_test_CFLAGS): Likewise.
362 (pr20308e_test_LDFLAGS): Likewise.
363 (pr20308e_test_LDADD): Likewise.
364 (pr20308a.so): Likewise.
365 (pr20308b.so): Likewise.
366 (pr20308_gd.o): Likewise.
367 (pr20308_ld.o): Likewise.
368 (MOSTLYCLEANFILES): Add pr20308a.so pr20308b.so.
369 * testsuite/Makefile.in: Regenerated.
370 * testsuite/pr20308_def.c: New file.
371 * testsuite/pr20308_gd.S: Likewise.
372 * testsuite/pr20308_ld.S: Likewise.
373 * testsuite/pr20308_main.c: Likewise.
375 2016-06-29 H.J. Lu <hongjiu.lu@intel.com>
378 * configure.ac (DEFAULT_TARGET_X86_64_OR_X32): New
380 * configure: Regenerated.
381 * x86_64.cc (Target_x86_64<size>::Relocate::relocate): Allow
382 R_X86_64_GOTPCRELX relocation against __tls_get_addr.
383 (Target_x86_64<size>::Relocate::tls_gd_to_ie): Support indirect
384 call to __tls_get_addr.
385 (Target_x86_64<size>::Relocate::tls_gd_to_le): Likewise.
386 (Target_x86_64<size>::Relocate::tls_ld_to_le): Likewise.
387 * testsuite/Makefile.am (check_PROGRAMS): Add pr20216a_test,
388 pr20216b_test, pr20216c_test, pr20216d_test, pr20216e_test.
389 (pr20216a_test_SOURCES): New.
390 (pr20216a_test_DEPENDENCIES): Likewise.
391 (pr20216a_test_CFLAGS): Likewise.
392 (pr20216a_test_LDFLAGS): Likewise.
393 (pr20216a_test_LDADD): Likewise.
394 (pr20216b_test_SOURCES): Likewise.
395 (pr20216b_test_DEPENDENCIES): Likewise.
396 (pr20216b_test_CFLAGS): Likewise.
397 (pr20216b_test_LDFLAGS): Likewise.
398 (pr20216b_test_LDADD): Likewise.
399 (pr20216c_test_SOURCES): Likewise.
400 (pr20216c_test_DEPENDENCIES): Likewise.
401 (pr20216c_test_CFLAGS): Likewise.
402 (pr20216c_test_LDFLAGS): Likewise.
403 (pr20216c_test_LDADD): Likewise.
404 (pr20216d_test_SOURCES): Likewise.
405 (pr20216d_test_DEPENDENCIES): Likewise.
406 (pr20216d_test_CFLAGS): Likewise.
407 (pr20216d_test_LDFLAGS): Likewise.
408 (pr20216d_test_LDADD): Likewise.
409 (pr20216e_test_SOURCES): Likewise.
410 (pr20216e_test_DEPENDENCIES): Likewise.
411 (pr20216e_test_CFLAGS): Likewise.
412 (pr20216e_test_LDFLAGS): Likewise.
413 (pr20216e_test_LDADD): Likewise.
414 (pr20216a.so): Likewise.
415 (pr20216b.so): Likewise.
416 (pr20216_gd.o): Likewise.
417 (pr20216_ld.o): Likewise.
418 (MOSTLYCLEANFILES): Add pr20216a.so pr20216b.so.
419 * testsuite/Makefile.in: Regenerated.
420 * testsuite/pr20216_def.c: New file.
421 * testsuite/pr20216_gd.S: Likewise.
422 * testsuite/pr20216_ld.S: Likewise.
423 * testsuite/pr20216_main.c: Likewise.
425 2016-06-29 Alan Modra <amodra@gmail.com>
427 * script_test_12.t: Delete .plt, specify 64k page size.
428 * script_test_12i.t: Likewise.
430 2016-06-29 Alan Modra <amodra@gmail.com>
432 * testsuite/plugin_layout_with_alignment.c: Explicitly align all
435 2016-06-29 Alan Modra <amodra@gmail.com>
437 * testsuite/Makefile.am (copy_test_protected): Disable for powerpc.
438 * testsuite/Makefile.in: Regenerate.
440 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
442 * aarch64-reloc.def (NONE): New relocation.
443 * aarch64.cc (Target_aarch64::Scan::local): Handle R_AARCH64_NONE.
444 (Target_aarch64::Scan::global): Likewise.
445 * testsuite/Makefile.am (aarch64_reloc_none): New test.
446 * testsuite/Makefile.in: Regenerate.
447 * testsuite/aarch64_reloc_none.s: New test source file.
448 * testsuite/aarch64_reloc_none.sh: New test script.
450 2016-06-28 Sriraman Tallam <tmsriram@google.com>
452 * x86_64.cc (Lazy_view): New class.
453 (can_convert_mov_to_lea): Templatize function. Make the function
454 check for appropriate relocation types and use the view parameter
455 to get section contents.
456 (can_convert_callq_to_direct): New function.
457 (Target_x86_64<size>::Scan::global): Refactor.
458 (Target_x86_64<size>::Relocate::relocate): Refactor. Change any indirect
459 call via GOT that can be converted.
460 * testsuite/Makefile.am (x86_64_indirect_call_to_direct.sh): New test.
461 * testsuite/Makefile.in: Regenerate.
462 * testsuite/x86_64_indirect_call_to_direct1.s: New file.
463 * testsuite/x86_64_indirect_jump_to_direct1.s: New file.
465 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
467 * aarch64.cc (Target_aarch64::Scan::local): Move the call to got_section
468 from the top level to the places of its use.
470 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
473 * script-c.h (Sort_wildcard): Add SORT_WILDCARD_BY_INIT_PRIORITY.
474 * script-sections.cc (Input_section_sorter::get_init_priority): New method.
475 (Input_section_sorter::operator()): Handle SORT_WILDCARD_BY_INIT_PRIORITY.
476 (Output_section_element_input::print): Likewise.
477 * script.cc (script_keyword_parsecodes): Add entry SORT_BY_INIT_PRIORITY.
478 * yyscript.y (SORT_BY_INIT_PRIORITY): New token.
479 (wildcard_section): Handle SORT_BY_INIT_PRIORITY.
481 * testsuite/Makefile.am (script_test_14): New test.
482 * testsuite/Makefile.in: Regenerate.
483 * testsuite/script_test_14.s: New test source file.
484 * testsuite/script_test_14.sh: New test script.
485 * testsuite/script_test_14.t: New test linker script.
487 2016-06-28 James Clarke <jrtc27@jrtc27.com>
489 * sparc.cc (Target_sparc::Scan::local): Don't convert R_SPARC_32
490 to R_SPARC_RELATIVE if class is ELFCLASS64.
491 (Target_sparc::Scan::global): Likewise.
493 2016-06-23 Cary Coutant <ccoutant@gmail.com>
494 Igor Kudrin <ikudrin@accesssoftek.com>
498 (Output_section_element_input::set_section_addresses): Keep bin_count
499 separate from input_pattern_count.
500 * testsuite/script_test_12.t: Add another section .x4.
501 * testsuite/script_test_12i.t: Likewise.
502 * testsuite/script_test_12a.c: Likewise.
503 * testsuite/script_test_12b.c: Likewise.
505 2016-06-23 Igor Kudrin <ikudrin@accesssoftek.com>
507 * gold-threads.cc (impl_threads::Lock_impl_threads): Fix typos.
509 2016-06-22 H.J. Lu <hongjiu.lu@intel.com>
512 * NEWS: Mention --enable-relro.
513 * configure.ac: Add --enable-relro.
514 (DEFAULT_LD_Z_RELRO): New. Set by --enable-relro and default
516 * config.in: Regenerated.
517 * configure: Likewise.
518 * options.h (General_options::relro): Default to
521 2016-06-20 Cary Coutant <ccoutant@gmail.com>
523 * NEWS: Add new features in 1.12.
524 * version.cc (version_string): Bump to 1.12.
526 2016-06-20 H.J. Lu <hongjiu.lu@intel.com>
529 * i386.cc (Target_i386::first_plt_entry_offset): Return 0 if
531 (Target_i386::plt_entry_size): Likewise.
532 (Target_x86_64<size>::first_plt_entry_offset): Likewise.
533 (Target_x86_64<size>::plt_entry_size): Likewise.
535 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
537 * mips.cc (Target_mips::Target_mips): Initialize rld_map_.
538 (Target_mips::rld_map_): New data member.
539 (Target_mips::do_finalize_sections): Add support for
540 DT_MIPS_RLD_MAP and DT_MIPS_RLD_MAP_REL dynamic tags,
541 .rld_map section, and __RLD_MAP symbol.
542 (Target_mips::do_dynamic_tag_custom_value): Add support for
543 DT_MIPS_RLD_MAP_REL dynamic tag.
544 * output.cc (Output_data_dynamic::get_entry_offset): New method
546 * output.h (Output_data_dynamic::get_entry_offset): New method
549 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
551 * mips.cc (Mips_relocate_functions::relpc16): Add unaligned check.
553 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
555 * mips.cc (relocation_needs_la25_stub): Add support for relocs:
556 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
557 (hi16_reloc): Add support for R_MIPS_PCHI16 relocation.
558 (is_matching_lo16_reloc): Likewise.
559 (lo16_reloc): Add support for R_MIPS_PCLO16 relocation.
560 (Mips_output_data_plt::plt_entry_r6): New static data member for
562 (Target_mips::is_output_r6): New method.
563 (Target_mips::Mips_mach): Add new enum constants.
564 (Mips_relocate_functions::Status): Likewise.
565 (Mips_relocate_functions::pchi16_relocs): New static data member.
566 (Mips_relocate_functions::relpc21): New method.
567 (Mips_relocate_functions::relpc26): Likewise.
568 (Mips_relocate_functions::relpc18): Likewise.
569 (Mips_relocate_functions::relpc19): Likewise.
570 (Mips_relocate_functions::relpchi16): Likewise.
571 (Mips_relocate_functions::do_relpchi16): Likewise.
572 (Mips_relocate_functions::relpclo16): Likewise.
573 (Mips_output_data_plt::do_write): Add support for Mips r6 plt
575 (Target_mips::mips_32bit_flags): Add E_MIPS_ARCH_32R6 support.
576 (Target_mips::elf_mips_mach): Add E_MIPS_ARCH_32R6 and
577 E_MIPS_ARCH_64R6 support.
578 (Target_mips::update_abiflags_isa): Likewise.
579 (mips_get_size_for_reloc): Add support for relocs: R_MIPS_PCHI16,
580 R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3 and
582 (Target_mips::Scan::local): Add support for relocs: R_MIPS_PCHI16
584 (Target_mips::Scan::global): Add support for relocs:
585 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
586 (Target_mips::Relocate::relocate): Call functions for resolving
587 Mips32r6 and Mips64r6 relocations, and print error message for
588 STATUS_PCREL_UNALIGNED.
589 (Target_mips::Scan::get_reference_flags): Add support for relocs:
590 R_MIPS_PCHI16, R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2,
591 R_MIPS_PC18_S3 and R_MIPS_PC19_S2.
592 (Target_mips::elf_mips_mach_name): Add E_MIPS_ARCH_32R6 and
593 E_MIPS_ARCH_64R6 support.
595 2016-06-13 H.J. Lu <hongjiu.lu@intel.com>
598 * testsuite/script_test_2.t: Add .got.plt after .got.
600 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
602 * mips.cc (struct Mips_abiflags): New struct.
603 (Mips_relobj::Mips_relobj): Initialize attributes_section_data_
605 (Mips_relobj::~Mips_relobj): Delete object pointed by
606 attributes_section_data_.
607 (Mips_relobj::abiflags): New method.
608 (Mips_relobj::attributes_section_data): Likewise.
609 (Mips_relobj::attributes_section_data_): New data member.
610 (Mips_relobj::abiflags_): Likewise.
611 (class Mips_output_section_abiflags): New class.
612 (Target_mips::Target_mips): Initialize attributes_section_data_,
613 abiflags_ and has_abiflags_section_.
614 (Target_mips::do_should_include_section): Don't emit input
615 .MIPS.abiflags sections to output .MIPS.abiflags.
616 (Target_mips::Mips_mach): Add new enum constants.
617 (Target_mips::mips_isa_ext_mach): New method.
618 (Target_mips::mips_isa_ext): Likewise.
619 (Target_mips::update_abiflags_isa): Likewise.
620 (Target_mips::infer_abiflags): Likewise.
621 (Target_mips::create_abiflags): Likewise.
622 (Target_mips::fp_abi_string): Likewise.
623 (Target_mips::select_fp_abi): Likewise.
624 (Target_mips::merge_obj_attributes): Likewise.
625 (Target_mips::merge_obj_abiflags): Likewise.
626 (Target_mips::level_rev): Likewise.
627 (Target_mips::merge_obj_e_flags): Rename from
628 merge_processor_specific_flags. Remove dyn_obj argument,
629 call update_abiflags_isa when needed, compare NaN encodings and
631 (Target_mips::add_machine_extensions): Add two machine extensions
633 (Target_mips::attributes_section_data_): New data member.
634 (Target_mips::abiflags_): Likewise.
635 (Target_mips::has_abiflags_section_): Likewise.
636 (Mips_relobj::do_read_symbols): Read .gnu.attributes and
637 .MIPS.abiflags sections if they exists.
638 (Target_mips::elf_mips_mach): Add E_MIPS_MACH_5900 and
639 E_MIPS_MACH_OCTEON3 support.
640 (Target_mips::do_adjust_elf_header): Setup EI_ABIVERSION flag.
641 (Target_mips::do_finalize_sections): Merge .gnu.attributes and
642 .MIPS.abiflags sections from input. Create these sections if
644 (Target_mips::elf_mips_mach_name): Add E_MIPS_MACH_5900 and
645 E_MIPS_MACH_OCTEON3 support, and change strings for
646 E_MIPS_MACH_LS2E, E_MIPS_MACH_LS2F and E_MIPS_MACH_LS3A just
649 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
651 * mips.cc (Mips_relobj::Mips_relobj): Initialize
652 has_reginfo_section_.
653 (Mips_relobj::has_reginfo_section_): New data member.
654 (Mips_relobj::has_reginfo_section): New method.
655 (class Mips_output_section_reginfo): Change base class to
656 Output_section_data, and set masks of the output .reginfo section
658 (Mips_output_section_reginfo::as_mips_output_section_reginfo):
660 (Mips_output_section_reginfo::set_masks): Likewise.
661 (Mips_output_section_reginfo::set_final_data_size): Likewise.
662 (Mips_output_section_reginfo::do_print_to_mapfile): New method.
663 (Target_mips::do_make_output_section): Remove.
664 (Mips_relobj::do_read_symbols): Set has_reginfo_section_ to true
665 if the object contains a .reginfo section.
666 (Target_mips::do_finalize_sections): Create a .reginfo output
669 2016-06-09 Artemiy Volkov <artemiyv@acm.org>
671 * mips.cc (Mips_output_data_got::do_write): Add missing template
674 2016-05-30 Marcin Kościelnicki <koriakin@0x04.net>
677 * s390.cc (Target_s390::ss_code_st_r14): Removed.
678 (Target_s390::ss_code_l_r14): Removed.
679 (Target_s390::ss_code_ear): Removed.
680 (Target_s390::ss_code_c): Removed.
681 (Target_s390::ss_match_st_r14): New function.
682 (Target_s390::ss_match_l_r14): New function.
683 (Target_s390::ss_match_mcount): Call ss_match_{l,st}_r14 instead
684 of matching code directly.
685 (Target_s390::ss_match_ear): New function.
686 (Target_s390::ss_match_c): New function.
687 (Target_s390::do_calls_non_split): Call ss_match_{ear,c} instead
688 of matching code directly.
690 2016-05-19 Cary Coutant <ccoutant@gmail.com>
693 * copy-relocs.cc (Copy_relocs::make_copy_reloc): Add object
694 parameter; check for protected symbol.
695 * copy-relocs.h (Copy_relocs::make_copy_reloc): Add object parameter.
696 * mips.cc (Mips_copy_relocs): Adjust call to make_copy_reloc.
697 * symtab.cc (Symbol::init_fields): Initialize is_protected_.
698 (Symbol_table::add_from_dynobj): Mark protected symbols.
699 * symtab.h (Symbol::is_protected): New method.
700 (Symbol::set_is_protected): New method.
701 (Symbol::is_protected_): New data member.
703 * testsuite/Makefile.am (copy_test_protected): New test.
704 * testsuite/Makefile.in: Regenerate.
705 * testsuite/copy_test.cc (main): Add legal reference to protected
707 * testsuite/copy_test_v1.cc (main): Likewise.
708 * testsuite/copy_test_2.cc (ip): Add protected symbol.
709 * testsuite/copy_test_protected.cc: New test source file.
710 * testsuite/copy_test_protected.sh: New test script.
712 2016-05-19 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
714 * mips.cc (Mips_got_entry::Mips_got_entry): Remove object argument
715 for global got symbols, and set addend to 0.
716 (Mips_got_entry::hash): Change hash algorithm.
717 (Mips_got_entry::equals): Refactor.
718 (Mips_got_entry::object): Return input object for local got symbols
720 (Mips_got_entry::addend): Change return of the relocation addend.
721 (Mips_got_entry::addend_): Move from union d.
722 (Mips_got_entry::object_): Move into union d.
723 (class Mips_symbol_hash): New class.
724 (Mips_got_info::Global_got_entry_set): New type.
725 (Mips_got_info::global_got_symbols): Change return type to
726 Global_got_entry_set.
727 (Mips_got_info::global_got_symbols_): Change type to
728 Global_got_entry_set.
729 (Mips_symbol::hash): New method.
730 (Mips_output_data_la25_stub::symbols_): Change type to std::vector.
731 (Mips_output_data_mips_stubs::Mips_stubs_entry_set): New type.
732 (Mips_output_data_mips_stubs::symbols_): Change type to
733 Mips_stubs_entry_set.
734 (Mips_got_info::record_global_got_symbol): Don't pass object
735 argument when creating global got symbol.
736 (Mips_got_info::record_got_entry): Remove find before inserting
738 (Mips_got_info::add_reloc_only_entries): Change type of iterator
739 to Global_got_entry_set.
740 (Mips_got_info::count_got_symbols): Likewise.
741 (Mips_output_data_la25_stub::create_la25_stub): Use push_back
742 for adding entries to symbols_.
743 (Mips_output_data_la25_stub::do_write): Change type of iterator
745 (Mips_output_data_mips_stubs::set_lazy_stub_offsets): Change type
746 of iterator to Mips_stubs_entry_set.
747 (Mips_output_data_mips_stubs::set_needs_dynsym_value): Likewise.
748 (Mips_output_data_mips_stubs::do_write): Likewise.
750 2016-05-06 Han Shen <shenhan@google.com>
754 * aarch64-reloc.def: New relocation type.
755 * aarch64.cc (AArch64_relocate_functions::Page): Changed to public.
756 (Target_aarch64::Scan::local): Add R_AARCH64_LD64_GOTPAGE_LO15.
757 (Target_aarch64::Scan::global): Add R_AARCH64_LD64_GOTPAGE_LO15.
758 (Target_aarch64::Relocate::relocate): Implement R_AARCH64_LD64_GOTPAGE_LO15.
760 2016-04-28 Nick Clifton <nickc@redhat.com>
762 * po/zh_CN.po: Updated Chinese (simplified) translation.
764 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
766 * Makefile.in: Regenerated with automake 1.11.6.
767 * aclocal.m4: Likewise.
768 * testsuite/Makefile.in: Likewise.
770 2016-03-30 Cary Coutant <ccoutant@gmail.com>
773 * symtab.cc (Symbol_table::define_default_version): Check for case
774 where symbols are both in different shared objects.
776 2016-03-27 Cary Coutant <ccoutant@gmail.com>
779 * i386.cc (Target_i386): Add check for fully-resolved symbol for
782 2016-03-22 Nick Clifton <nickc@redhat.com>
784 * configure: Regenerate.
786 2016-03-21 Cary Coutant <ccoutant@gmail.com>
789 * errors.cc (Errors::undefined_symbol): Add info message when
790 symbol should have been provided by a plugin.
791 * target-reloc.h (issue_undefined_symbol_error): Check for
792 placeholder symbols defined in discarded sections.
793 * testsuite/Makefile.am (plugin_test_9b): New test case.
794 * testsuite/Makefile.in: Regenerate.
795 * testsuite/plugin_test_9b_elf.cc: New test source file.
796 * testsuite/plugin_test_9b_ir.cc: New test source file.
798 2016-03-20 Cary Coutant <ccoutant@gmail.com>
801 * ehframe.cc (Eh_frame::read_fde): Check for dropped functions.
802 * testsuite/Makefile.am (eh_test_2): New test.
803 * testsuite/Makefile.in: Regenerate.
804 * testsuite/eh_test_2.sh: New test script.
805 * testsuite/eh_test_a.cc (bar): Make it comdat.
806 * testsuite/eh_test_b.cc (bar): Add a duplicate copy.
808 2016-03-18 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
810 * mips.cc (Mips_relobj::is_n64_): Remove.
811 (Target_mips::ei_class_): Likewise.
812 (Mips_relobj::is_newabi): Call methods.
813 (Mips_relobj::is_n64): Change checking for N64 ABI.
814 (Target_mips::is_output_n64): Likewise.
815 (Target_mips::merge_processor_specific_flags): Remove ei_class
816 argument, and remove comparing ei_class.
817 (Target_mips::do_adjust_elf_header): Remove setting EI_CLASS field
819 (Target_mips::do_finalize_sections): Don't pass ei_class argument
820 to merge_processor_specific_flags.
821 (Target_mips::elf_mips_abi_name): Remove ei_class argument, and
822 change checking for N64 ABI.
824 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
826 * mips.cc (enum Special_relocation_symbol): New enum type.
827 (is_readonly_section): New function.
828 (eh_reloc): Likewise.
829 (Mips_got_entry::is_section_symbol_): New member.
830 (Mips_got_entry::is_section_symbol): New method.
831 (Mips_got_info::record_local_got_symbol): Add is_section_symbol
833 (Mips_relobj::mips_elf_options_section_name): New method.
834 (Mips_output_data_got::record_local_got_symbol): Add
835 is_section_symbol argument, and pass it to
836 Mips_got_info::record_local_got_symbol.
837 (Mips_output_data_got::got_offset): Add addend argument, and pass
838 it to Relobj::local_got_offset.
839 (struct Mips_output_reloc_writer): New type.
840 (class Mips_output_data_reloc): New class.
841 (Mips_output_data_plt::Reloc_section): Change type to
842 Mips_output_data_reloc.
843 (Target_mips::Reloc_section): Likewise.
844 (Mips_reloc_types::get_r_addend): Remove unsigned from return type.
845 (Mips_classify_reloc::get_r_type2): New method.
846 (Mips_classify_reloc::get_r_type3): Likewise.
847 (Mips_classify_reloc::get_r_ssym): Likewise.
848 (Target_mips::Reloca_section): Remove.
849 (Relocate::should_apply_static_reloc): Rename from
850 should_apply_r_mips_32_reloc.
851 (Target_mips::copy_reloc): Replace Reltype parameter with r_type
853 (Mips_relocate_functions::Valtype): New type.
854 (Mips_relocate_functions::Valtype64): New type.
855 (Mips_relocate_functions::check_overflow): New method.
856 (Mips_relocate_functions::mips_reloc_unshuffle): Move to public
858 (Mips_relocate_functions::mips_reloc_shuffle): Likewise.
859 (Mips_relocate_functions::rel16): Add support for resolving
860 relocations for Mips64.
861 (Mips_relocate_functions::rel32): Likewise.
862 (Mips_relocate_functions::reljalr): Likewise.
863 (Mips_relocate_functions::relpc32): Likewise.
864 (Mips_relocate_functions::rel26): Likewise.
865 (Mips_relocate_functions::relpc16): Likewise.
866 (Mips_relocate_functions::relmicromips_pc7_s1): Likewise.
867 (Mips_relocate_functions::relmicromips_pc10_s1): Likewise.
868 (Mips_relocate_functions::relmicromips_pc16_s1): Likewise.
869 (Mips_relocate_functions::do_relhi16): Likewise.
870 (Mips_relocate_functions::do_relgot16_local): Likewise.
871 (Mips_relocate_functions::rello16): Likewise.
872 (Mips_relocate_functions::relgot): Likewise.
873 (Mips_relocate_functions::relgotpage): Likewise.
874 (Mips_relocate_functions::relgotofst): Likewise.
875 (Mips_relocate_functions::relgot_hi16): Likewise.
876 (Mips_relocate_functions::relgot_lo16): Likewise.
877 (Mips_relocate_functions::relgprel): Likewise.
878 (Mips_relocate_functions::relgprel32): Likewise.
879 (Mips_relocate_functions::tlsrelhi16): Likewise.
880 (Mips_relocate_functions::tlsrello16): Likewise.
881 (Mips_relocate_functions::tlsrel32): Likewise.
882 (Mips_relocate_functions::relsub): Likewise.
883 (Mips_relocate_functions::releh): New method.
884 (Mips_relocate_functions::rel64): Likewise.
885 (Mips_got_info::record_local_got_symbol): Add is_section_symbol and
886 pass it to Mips_got_entry.
887 (Mips_got_info::add_local_entries): Pass addend argument
888 to code functions, and for STT_SECTION symbols call
889 add_symbolless_local_addend.
890 (Mips_got_info::add_tls_entries): Pass addend argument to code
892 (Mips_relobj::do_read_symbols): Read gp value that was used to
894 (Mips_output_data_plt::plt_entry): Remove opcode from l[wd]
895 instruction. Opcode for instruction will be selected later.
896 (Target_mips::gc_process_relocs): Add case for SHT_RELA.
897 (Target_mips::scan_relocatable_relocs): Likewise.
898 (Target_mips::emit_relocs_scan): Likewise.
899 (Target_mips::relocate_relocs): Likewise.
900 (Target_mips::do_finalize_sections): Skip objects for merging
901 processor specific flags in which all input sections will be
903 (mips_get_size_for_reloc): Add case for R_MIPS_EH.
904 (Target_mips::Scan::get_reference_flags): Likewise.
905 (Target_mips::relocate_special_relocatable): Call rel26 method with
906 calculate_only and calculated_value arguments.
907 (Target_mips::Scan::local): Add case for R_MIPS_EH. Don't create a
908 dynamic relocation against a readonly sections, and pass
909 is_section_symbol to Mips_got_info::record_local_got_symbol.
910 (Target_mips::Scan::global): Add case for R_MIPS_EH. Don't create a
911 dynamic relocation against a readonly sections, and pass r_type
912 and r_offset to Target_mips::copy_reloc.
913 (Target_mips::Relocate::relocate): Add support for resolving
914 relocations for Mips64.
915 (Target_mips::mips_info): Add case for Mips64 default dynamic
917 (Target_selector_mips): Correct emulation names.
919 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
921 * mips.cc (class Mips_output_data_la25_stub): Add
922 do_print_to_mapfile function.
924 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
926 * mips.cc (Mips_classify_reloc::put_r_info): Call 32bit version of
929 2016-03-09 H.J. Lu <hongjiu.lu@intel.com>
931 * testsuite/plugin_layout_with_alignment.cc: Renamed to ..
932 * testsuite/plugin_layout_with_alignment.c: This.
933 * testsuite/Makefile.am (plugin_layout_with_alignment.o): Updated.
934 (plugin_layout_with_alignment): Likewise.
935 * testsuite/Makefile.in: Regenerated.
937 2016-03-08 Cary Coutant <ccoutant@gmail.com>
940 * testsuite/Makefile.am (retain_symbols_file_test): Remove check
942 * testsuite/Makefile.in: Regenerate.
943 * testsuite/dynamic_list.sh: Likewise.
944 * testsuite/retain_symbols_file_test.sh: Likewise.
946 2016-03-08 Cary Coutant <ccoutant@gmail.com>
949 * arm.cc (Reloc_stub::Key::name): Add unused attribute.
950 * dirsearch.cc (Dir_caches::~Dir_caches): Likewise.
952 2016-03-08 Cary Coutant <ccoutant@gmail.com>
953 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
955 * output.cc (Output_reloc_writer): New type.
956 (Output_data_reloc_base::do_write): Move implementation to template
957 in output.h and replace with invocation of template.
958 * output.h (Output_file): Move to top of file.
959 (Output_reloc::get_symbol_index): Move to public interface.
960 (Output_reloc::get_address): Likewise.
961 (Output_data_reloc_base::do_write_generic): New function template.
963 2016-03-04 Cary Coutant <ccoutant@gmail.com>
967 * symtab.cc: Instantiate Sized_symbol::init_constant and
968 Sized_symbol::init_undefined.
970 2016-03-03 Cary Coutant <ccoutant@gmail.com>
973 * layout.h (Layout::add_target_specific_dynamic_tag): New function.
974 * layout.cc (Layout::add_target_specific_dynamic_tag): New function.
975 * mips.cc (Target_mips::make_symbol): Adjust function signature.
976 * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_.
977 (Target_sparc::do_is_defined_by_abi): Remove test for
979 (Target_sparc::Register_symbol): New struct type.
980 (Target_sparc::register_syms_): New data member.
981 (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true.
982 (Target_sparc::make_symbol): New function.
983 (Target_sparc::do_finalize_sections): Add register symbols and new
984 dynamic table entries.
985 * symtab.h (Sized_symbol::init_undefined): Add value parameter.
986 (Symbol_table::add_target_global_symbol): New function.
987 (Symbol_table::target_symbols_): New data member.
988 * symtab.cc (Sized_symbol::init_undefined): Add value parameter.
989 (Symbol_table::Symbol_table): Initialize target_symbols_.
990 (Symbol_table::add_from_object): Pass additional parameters to
992 (Symbol_table::define_special_symbol): Likewise.
993 (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for
994 undefined symbol value.
995 (Symbol_table::set_dynsym_indexes): Process target-specific symbols.
996 (Symbol_table::sized_finalize): Likewise.
997 (Symbol_table::sized_write_globals): Likewise.
998 * target.h (Sized_target::make_symbol): Add name, st_type, object,
999 st_shndx, and value parameters.
1001 2016-03-03 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1003 * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and
1004 LDPK_WEAKUNDEF symbols.
1006 2016-03-03 Than McIntosh <thanm@google.com>
1008 * plugin.cc (Plugin::load): Include hooks for get_input_section_size
1009 and get_input_section_alignment in transfer vector.
1010 (get_input_section_alignment): New function.
1011 (get_input_section_size): New function.
1012 * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test.
1013 * testsuite/Makefile.in: [Regenerate.]
1014 * testsuite/plugin_section_alignment.cc: New test file.
1015 * testsuite/plugin_layout_with_alignment.cc: New test file.
1016 * testsuite/plugin_layout_with_alignment.sh: New test file.
1018 2016-03-03 Evgenii Stepanov <eugenis@google.com>
1020 * plugin.h (Pluginobj::get_symbol_resolution_info): Add version
1022 * plugin.cc (get_symbols_v3): New function.
1023 (Plugin::load): Add LDPT_GET_SYMBOLS_V3.
1024 (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using
1027 2016-02-26 Egor Kochetov <egor.kochetov@intel.com>
1028 Cary Coutant <ccoutant@gmail.com>
1031 * ehframe.h (Cie::fde_encoding): New method.
1032 * ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length
1035 2016-02-15 H.J. Lu <hongjiu.lu@intel.com>
1037 * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
1038 -mrelax-relocations=yes to $(TEST_AS).
1039 (x86_64_mov_to_lea6.o): Likewise.
1040 (x86_64_overflow_pc32.o): Remove duplicated target.
1041 * testsuite/Makefile.in: Regenerated.
1043 2016-02-15 Marcin Kościelnicki <koriakin@0x04.net>
1045 * s390.cc (Target_s390::match_view_u): New helper method.
1046 (Target_s390::do_is_call_to_non_split): New method.
1047 (Target_s390::ss_code_st_r14): New const.
1048 (Target_s390::ss_code_l_r14): New const.
1049 (Target_s390::ss_code_bras_8): New const.
1050 (Target_s390::ss_code_l_basr): New const.
1051 (Target_s390::ss_code_a_basr): New const.
1052 (Target_s390::ss_code_ear): New const.
1053 (Target_s390::ss_code_c): New const.
1054 (Target_s390::ss_code_larl): New const.
1055 (Target_s390::ss_code_brasl): New const.
1056 (Target_s390::ss_code_jg): New const.
1057 (Target_s390::ss_code_jgl): New const.
1058 (Target_s390::ss_match_mcount): New helper method.
1059 (Target_s390::ss_match_l): New helper method.
1060 (Target_s390::ss_match_ahi): New helper method.
1061 (Target_s390::ss_match_alfi): New helper method.
1062 (Target_s390::ss_match_cr): New helper method.
1063 (Target_s390::do_calls_non_split): New method.
1064 * testsuite/Makefile.am: Added new tests.
1065 * testsuite/Makefile.in: Regenerate.
1066 * testsuite/split_s390.sh: New test.
1067 * testsuite/split_s390_1_a1.s: New test.
1068 * testsuite/split_s390_1_a2.s: New test.
1069 * testsuite/split_s390_1_n1.s: New test.
1070 * testsuite/split_s390_1_n2.s: New test.
1071 * testsuite/split_s390_1_z1.s: New test.
1072 * testsuite/split_s390_1_z2.s: New test.
1073 * testsuite/split_s390_1_z3.s: New test.
1074 * testsuite/split_s390_1_z4.s: New test.
1075 * testsuite/split_s390_2_ns.s: New test.
1076 * testsuite/split_s390_2_s.s: New test.
1077 * testsuite/split_s390x_1_a1.s: New test.
1078 * testsuite/split_s390x_1_a2.s: New test.
1079 * testsuite/split_s390x_1_n1.s: New test.
1080 * testsuite/split_s390x_1_n2.s: New test.
1081 * testsuite/split_s390x_1_z1.s: New test.
1082 * testsuite/split_s390x_1_z2.s: New test.
1083 * testsuite/split_s390x_1_z3.s: New test.
1084 * testsuite/split_s390x_1_z4.s: New test.
1085 * testsuite/split_s390x_2_ns.s: New test.
1086 * testsuite/split_s390x_2_s.s: New test.
1088 2016-02-11 Rahul Chaudhry <rahulchaudhry@google.com>
1090 * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove
1091 info message for every erratum 843419 found and fixed.
1093 2016-02-07 Cary Coutant <ccoutant@gmail.com>
1096 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional
1097 information to relocation overflow errors.
1099 2016-02-06 Cary Coutant <ccoutant@gmail.com>
1102 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32
1103 overflow checking when symbol value + addend < 0.
1105 2016-02-06 Cary Coutant <ccoutant@gmail.com>
1108 * reloc.h (Limits): New class.
1109 (Bits::has_overflow32): Use min/max values from Limits.
1110 (Bits::has_unsigned_overflow32): Likewise.
1111 (Bits::has_signed_unsigned_overflow32): Likewise.
1112 (Bits::has_overflow): Likewise.
1113 (Bits::has_unsigned_overflow): Likewise.
1114 (Bits::has_signed_unsigned_overflow64): Likewise.
1116 2016-02-06 Cary Coutant <ccoutant@gmail.com>
1119 * reloc.h (Relocate_functions::Overflow_check): Add comments.
1120 * x86_64.cc (X86_64_relocate_functions): New class.
1121 (Target_x86_64::Relocate::relocate): Use the new class.
1122 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option.
1123 (x32_overflow_pc32): New test case.
1124 * testsuite/Makefile.in: Regenerate.
1125 * testsuite/x32_overflow_pc32.sh: New script.
1126 * testsuite/x86_64_overflow_pc32.s: Remove .space directive.
1128 2016-02-06 Cary Coutant <ccoutant@gmail.com>
1131 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast.
1132 (Bits::has_unsigned_overflow): Remove unnecessary static_cast.
1134 2016-02-06 Cary Coutant <ccoutant@gmail.com>
1137 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed
1139 (Bits::has_unsigned_overflow): Likewise.
1141 2016-02-06 Marcin Kościelnicki <koriakin@0x04.net>
1143 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
1145 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
1146 and view_size to is_call_to_non_split.
1147 * target.cc (Target::is_call_to_non_split): Add view and view_size
1149 * target.h (class Target): Likewise.
1151 2016-02-05 Sriraman Tallam <tmsriram@google.com>
1153 * icf.cc (get_rel_addend): New function.
1154 (get_section_contents): Move merge section addend computation to a
1155 new function. Ignore negative values for SHT_REL and SHT_RELA addends.
1156 Fix bug to not read past the length of the section.
1158 2016-02-05 Cary Coutant <ccoutant@gmail.com>
1159 Andrew Senkevich <andrew.senkevich@intel.com>
1162 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow
1163 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and
1165 * testsuite/Makefile.am (x86_64_overflow_pc32): New test.
1166 * testsuite/x86_64_overflow_pc32.sh: New test script.
1167 * testsuite/x86_64_overflow_pc32.s: New source file.
1169 2016-02-05 Cary Coutant <ccoutant@gmail.com>
1172 * reloc.h (Relocate_functions::Address): New typedef.
1173 (Relocate_functions::Addendtype): New typedef.
1174 (Relocate_functions::Overflow_check): New enum type.
1175 (Relocate_functions::Reloc_status): New enum type.
1176 (Relocate_functions::check_overflow): New function template.
1177 (Relocate_functions::rel): Add check parameter; check for overflow.
1178 (Relocate_functions::rel_unaligned): Likewise.
1179 (Relocate_functions::rela): Likewise.
1180 (Relocate_functions::pcrel): Likewise.
1181 (Relocate_functions::pcrel_unaligned): Likewise.
1182 (Relocate_functions::pcrela): Likewise.
1183 (Relocate_functions::rel8): Adjust parameter types.
1184 (Relocate_functions::rela8): Likewise.
1185 (Relocate_functions::pcrel8): Likewise.
1186 (Relocate_functions::pcrela8): Likewise.
1187 (Relocate_functions::rel16): Likewise.
1188 (Relocate_functions::rela168): Likewise.
1189 (Relocate_functions::pcrel16): Likewise.
1190 (Relocate_functions::pcrela16): Likewise.
1191 (Relocate_functions::rel32): Likewise.
1192 (Relocate_functions::rel32_unaligned): Likewise.
1193 (Relocate_functions::rela32): Likewise.
1194 (Relocate_functions::pcrel32): Likewise.
1195 (Relocate_functions::pcrel32_unaligned): Likewise.
1196 (Relocate_functions::pcrela32): Likewise.
1197 (Relocate_functions::rel8_check): New function.
1198 (Relocate_functions::rela8_check): New function.
1199 (Relocate_functions::pcrel8_check): New function.
1200 (Relocate_functions::pcrela8_check): New function.
1201 (Relocate_functions::rel16_check): New function.
1202 (Relocate_functions::rela168_check): New function.
1203 (Relocate_functions::pcrel16_check): New function.
1204 (Relocate_functions::pcrela16_check): New function.
1205 (Relocate_functions::rel32_check): New function.
1206 (Relocate_functions::rel32_unaligned_check): New function.
1207 (Relocate_functions::rela32_check): New function.
1208 (Relocate_functions::pcrel32_check): New function.
1209 (Relocate_functions::pcrel32_unaligned_check): New function.
1210 (Relocate_functions::pcrela32_check): New function.
1211 (Bits::has_unsigned_overflow32): New function.
1212 (Bits::has_unsigned_overflow): New function.
1213 * testsuite/Makefile.am (overflow_unittest): New test.
1214 * testsuite/Makefile.in: Regenerate.
1215 * testsuite/overflow_unittest.cc: New source file.
1217 2016-02-04 Alan Modra <amodra@gmail.com>
1219 * powerpc.cc (relocate): Adjust last patch for big-endian.
1221 2016-02-02 Alan Modra <amodra@gmail.com>
1223 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
1225 2016-01-15 Han Shen <shenhan@google.com>
1227 PR gold/19472 - need pc-relative stubs.
1229 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
1230 stub type for DSOs and pie executables.
1232 2016-01-12 H.J. Lu <hongjiu.lu@intel.com>
1234 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
1237 2016-01-12 Cary Coutant <ccoutant@gmail.com>
1239 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
1240 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
1241 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
1242 specializations) New method.
1244 2016-01-11 Cary Coutant <ccoutant@gmail.com>
1247 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
1248 we have a TLS segment for GD-to-IE optimization.
1249 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
1251 (Target_i386::tls_desc_gd_to_ie): Likewise.
1252 (Target_i386::relocate_tls): Don't insist that we have a TLS segment
1253 for TLSDESC GD-to-IE optimizations.
1254 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
1256 (Target_x86_64::tls_desc_gd_to_ie): Likewise.
1257 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
1258 for TLSDESC GD-to-IE optimizations.
1260 2016-01-11 Cary Coutant <ccoutant@gmail.com>
1262 Refactor gold to enable support for MIPS-64 relocation format.
1264 * gc.h (get_embedded_addend_size): Remove sh_type parameter.
1265 (gc_process_relocs): Remove sh_type template parameter.
1266 Use Classify_reloc to access r_sym, r_type, and r_addend fields.
1267 * object.h (Sized_relobj_file::split_stack_adjust): Add target
1269 (Sized_relobj_file::split_stack_adjust_reltype): Likewise.
1270 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
1271 specializations) Remove.
1272 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
1273 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
1274 (Sized_relobj_file::emit_relocs_scan_reltype): Remove.
1275 (Sized_relobj_file::split_stack_adjust): Add target parameter.
1277 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
1278 Target::get_r_sym() to get r_sym field from relocations.
1279 (Track_relocs::next_symndx): Call Target::get_r_sym().
1280 * target-reloc.h (scan_relocs): Remove sh_type template parameter;
1281 add Classify_reloc template parameter. Use for accessing r_sym and
1283 (relocate_section): Likewise.
1284 (Default_classify_reloc): New class (renamed and moved from reloc.cc).
1285 (Default_scan_relocatable_relocs): Remove sh_type template parameter.
1286 (Default_scan_relocatable_relocs::Reltype): New typedef.
1287 (Default_scan_relocatable_relocs::reloc_size): New const.
1288 (Default_scan_relocatable_relocs::sh_type): New const.
1289 (Default_scan_relocatable_relocs::get_r_sym): New method.
1290 (Default_scan_relocatable_relocs::get_r_type): New method.
1291 (Default_emit_relocs_strategy): New class.
1292 (scan_relocatable_relocs): Replace sh_type template parameter with
1293 Scan_relocatable_relocs class. Use it to access r_sym and r_type
1295 (relocate_relocs): Replace sh_type template parameter with
1296 Classify_reloc class. Use it to access r_sym and r_type fields.
1297 * target.h (Target::is_call_to_non_split): Replace r_type parameter
1298 with pointer to relocation. Adjust all callers.
1299 (Target::do_is_call_to_non_split): Likewise.
1300 (Target::emit_relocs_scan): New virtual method.
1301 (Sized_target::get_r_sym): New virtual method.
1302 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
1303 with pointer to relocation.
1305 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
1306 (Target_aarch64::Relocatable_size_for_reloc): Remove.
1307 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
1308 (Target_aarch64::scan_relocs): Likewise.
1309 (Target_aarch64::relocate_section): Likewise.
1310 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
1312 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
1313 (Target_aarch64::relocate_relocs): Use Default_classify_reloc.
1314 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
1316 (Target_arm::emit_relocs_scan): New method.
1317 (Target_arm::Relocatable_size_for_reloc): Replace with...
1318 (Target_arm::Classify_reloc): ...this.
1319 (Target_arm::gc_process_relocs): Use Classify_reloc.
1320 (Target_arm::scan_relocs): Likewise.
1321 (Target_arm::relocate_section): Likewise.
1322 (Target_arm::scan_relocatable_relocs): Likewise.
1323 (Target_arm::relocate_relocs): Likewise.
1324 * i386.cc (Target_i386::emit_relocs_scan): New method.
1325 (Target_i386::Relocatable_size_for_reloc): Replace with...
1326 (Target_i386::Classify_reloc): ...this.
1327 (Target_i386::gc_process_relocs): Use Classify_reloc.
1328 (Target_i386::scan_relocs): Likewise.
1329 (Target_i386::relocate_section): Likewise.
1330 (Target_i386::scan_relocatable_relocs): Likewise.
1331 (Target_i386::relocate_relocs): Likewise.
1332 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
1334 (Mips_reloc_types): New class template.
1335 (Mips_classify_reloc): New class template.
1336 (Target_mips::Reltype): New typedef.
1337 (Target_mips::Relatype): New typedef.
1338 (Target_mips::emit_relocs_scan): New method.
1339 (Target_mips::get_r_sym): New method.
1340 (Target_mips::Relocatable_size_for_reloc): Replace with
1341 Mips_classify_reloc.
1342 (Target_mips::copy_reloc): Use Mips_classify_reloc.
1343 (Target_mips::gc_process_relocs): Likewise.
1344 (Target_mips::scan_relocs): Likewise.
1345 (Target_mips::relocate_section): Likewise.
1346 (Target_mips::scan_relocatable_relocs): Likewise.
1347 (Target_mips::relocate_relocs): Likewise.
1348 (mips_get_size_for_reloc): New function, factored out from
1349 Relocatable_size_for_reloc::get_size_for_reloc.
1350 (Target_mips::Scan::local): Use Mips_classify_reloc.
1351 (Target_mips::Scan::global): Likewise.
1352 (Target_mips::Relocate::relocate): Likewise.
1353 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
1354 (Target_powerpc::Relocatable_size_for_reloc): Remove.
1355 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
1356 (Target_powerpc::scan_relocs): Likewise.
1357 (Target_powerpc::relocate_section): Likewise.
1358 (Powerpc_scan_relocatable_reloc): Convert to class template.
1359 (Powerpc_scan_relocatable_reloc::Reltype): New typedef.
1360 (Powerpc_scan_relocatable_reloc::reloc_size): New const.
1361 (Powerpc_scan_relocatable_reloc::sh_type): New const.
1362 (Powerpc_scan_relocatable_reloc::get_r_sym): New method.
1363 (Powerpc_scan_relocatable_reloc::get_r_type): New method.
1364 (Target_powerpc::scan_relocatable_relocs): Use
1365 Powerpc_scan_relocatable_reloc.
1366 (Target_powerpc::relocate_relocs): Use Default_classify_reloc.
1367 * s390.cc (Target_s390::emit_relocs_scan): New method.
1368 (Target_s390::Relocatable_size_for_reloc): Remove.
1369 (Target_s390::gc_process_relocs): Use Default_classify_reloc.
1370 (Target_s390::scan_relocs): Likewise.
1371 (Target_s390::relocate_section): Likewise.
1372 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
1374 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
1375 (Target_s390::relocate_relocs): Use Default_classify_reloc.
1376 * sparc.cc (Target_sparc::emit_relocs_scan): New method.
1377 (Target_sparc::Relocatable_size_for_reloc): Remove.
1378 (Target_sparc::gc_process_relocs): Use Default_classify_reloc.
1379 (Target_sparc::scan_relocs): Likewise.
1380 (Target_sparc::relocate_section): Likewise.
1381 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
1383 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
1384 (Target_sparc::relocate_relocs): Use Default_classify_reloc.
1385 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
1386 (Target_tilegx::Relocatable_size_for_reloc): Remove.
1387 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
1388 (Target_tilegx::scan_relocs): Likewise.
1389 (Target_tilegx::relocate_section): Likewise.
1390 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
1392 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
1393 (Target_tilegx::relocate_relocs): Use Default_classify_reloc.
1394 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
1395 (Target_x86_64::Relocatable_size_for_reloc): Remove.
1396 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
1397 (Target_x86_64::scan_relocs): Likewise.
1398 (Target_x86_64::relocate_section): Likewise.
1399 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
1401 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
1402 (Target_x86_64::relocate_relocs): Use Default_classify_reloc.
1404 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
1406 2016-01-01 Alan Modra <amodra@gmail.com>
1408 Update year range in copyright notice of all files.
1410 For older changes see ChangeLog-0815
1412 Copyright (C) 2016 Free Software Foundation, Inc.
1414 Copying and distribution of this file, with or without modification,
1415 are permitted in any medium without royalty provided the copyright
1416 notice and this notice are preserved.
1422 version-control: never