1 2016-12-12 Cary Coutant <ccoutant@gmail.com>
3 * script-sections.cc (Orphan_section_placement::update_last_alloc):
5 (Orphan_section_placement::find_place): Place orphan .data section
6 after either RODATA or TEXT.
7 (Script_sections::place_orphan): Call update_last_alloc for allocated
9 (Script_sections::create_segments): Improve handling of BSS.
11 2016-12-13 Alan Modra <amodra@gmail.com>
14 * testsuite/script_test_15a.sh: Allows larger p_filesz.
15 * testsuite/script_test_15b.sh: Likewise.
16 * testsuite/script_test_15c.sh: Likewise.
18 2016-12-13 Alan Modra <amodra@gmail.com>
21 * testsuite/pr20717.t: Add .got output section containing .toc.
23 2016-12-11 Igor Kudrin <ikudrin@accesssoftek.com>
26 * testsuite/Makefile.am (pr20717): New test.
27 * testsuite/Makefile.in: Regenerate.
28 * testsuite/pr20717.c: New test source file.
29 * testsuite/pr20717.sh: New test script.
30 * testsuite/pr20717.t: New test linker script.
32 2016-12-11 Cary Coutant <ccoutant@gmail.com>
35 * output.cc (Output_section::set_final_data_size): Calculate data size
36 based on relative offset rather than file offset.
37 (Output_segment::set_section_addresses): Track file offset separately
39 (Output_segment::set_section_list_addresses): Add pfoff parameter.
40 Track file offset separately. Don't move file offset for BSS
42 * output.h (Output_segment::set_section_list_addresses): Add pfoff
44 * script-sections.cc (Orphan_section_placement): Add PLACE_LAST_ALLOC.
45 (Orphan_section_placement::Orphan_section_placement): Initialize it.
46 (Orphan_section_placement::output_section_init): Track last allocated
48 (Orphan_section_placement::find_place): Place BSS after last allocated
50 (Output_section_element_input::set_section_addresses): Always override
51 input section alignment when SUBALIGN is specified.
52 (Output_section_definition::set_section_addresses): Override alignment
53 of output section when SUBALIGN is specified.
55 * testsuite/Makefile.am (script_test_15a, script_test_15b)
56 (script_test_15c): New test cases.
57 * testsuite/Makefile.in: Regenerate.
58 * testsuite/script_test_2.cc: Adjust expected layout.
59 * testsuite/script_test_15.c: New source file.
60 * testsuite/script_test_15a.sh: New shell script.
61 * testsuite/script_test_15a.t: New linker script.
62 * testsuite/script_test_15b.sh: New shell script.
63 * testsuite/script_test_15b.t: New linker script.
64 * testsuite/script_test_15c.sh: New shell script.
65 * testsuite/script_test_15c.t: New linker script.
67 2016-12-08 Alan Modra <amodra@gmail.com>
69 * powerpc.cc (Powerpc_relobj::stub_table): Return NULL rather
72 2016-12-08 Alan Modra <amodra@gmail.com>
74 * options.h (--stub-group-multi): Fix typo.
76 2016-12-07 Alan Modra <amodra@gmail.com>
78 * options.h (--stub-group-multi): New PowerPC option.
79 * powerpc.cc (Stub_control): Add multi_os_ var and param
80 to constructor. Sort start_ var later. Comment State.
81 (Stub_control::can_add_to_stub_group): Heed multi_os_.
82 (Target_powerpc::group_sections): Update.
84 2016-12-07 Alan Modra <amodra@gmail.com>
87 * powerpc.cc (Stub_control): Replace stubs_always_before_branch_
88 with stubs_always_after_branch_, group_end_addr_ with
90 (Stub_control::can_add_to_stub_group): Rewrite to suit scanning
91 sections by increasing address.
92 (Target_powerpc::group_sections): Scan that way. Delete corner
94 * options.h (--stub-group-size): Update help string.
96 2016-12-07 Alan Modra <amodra@gmail.com>
98 * powerpc.cc (Stub_table_owner): Provide constructor.
99 (Powerpc_relobj::set_stub_table): Resize fill with -1.
100 (Target_powerpc::Branch_info::make_stub): Provide target debug
101 output on returning false.
103 2016-12-05 Cary Coutant <ccoutant@gmail.com>
104 Tristan Gingold <gingold@adacore.com>
106 * object.cc (Sized_relobj_file::do_count_local_symbols): Check
107 is_ordinary before using shndx.
108 * testsuite/Makefile.am (file_in_many_sections_test.sh): New test case.
109 * testsuite/Makefile.in: Regenerate.
110 * testsuite/file_in_many_sections.c: New source file.
111 * testsuite/file_in_many_sections_test.sh: New script.
113 2016-12-01 Cary Coutant <ccoutant@gmail.com>
114 Igor Kudrin <ikudrin@accesssoftek.com>
117 * script-sections.cc (Script_sections): Set *keep to false when
120 2016-12-01 Cary Coutant <ccoutant@gmail.com>
123 * target.h (Target::default_text_segment_address): Bump default
124 start address up to ABI page size.
126 2016-12-01 Cary Coutant <ccoutant@gmail.com>
129 * options.cc (General_options::object_format_to_string): New function.
130 (General_options::copy_from_posdep_options): New function.
131 (General_options::parse_push_state): New function.
132 (General_options::parse_pop_state): New function.
133 * options.h (--push-state, --pop-state): New options.
134 (General_options::object_format_to_string): New method.
135 (General_options::set_incremental_disposition): New method.
136 (General_options::copy_from_posdep_options): New method.
137 (General_options::options_stack_): New data member.
139 2016-12-01 Cary Coutant <ccoutant@gmail.com>
142 * aarch64.cc (Target_aarch64::scan_reloc_section_for_stubs): Handle
143 section symbols correctly.
144 * arm.cc (Target_arm): Likewise.
145 * powerpc.cc (Target_powerpc): Likewise.
147 2016-11-27 Ambrogino Modigliani <ambrogino.modigliani@gmail.com>
149 * aarch64-reloc.def: Fix spelling in comments.
151 2016-11-27 Ambrogino Modigliani <ambrogino.modigliani@gmail.com>
153 * aarch64.cc: Fix spelling in comments.
154 * arm.cc: Fix spelling in comments.
155 * icf.cc: Fix spelling in comments.
156 * layout.cc: Fix spelling in comments.
157 * layout.h: Fix spelling in comments.
158 * mips.cc: Fix spelling in comments.
159 * output.h: Fix spelling in comments.
160 * plugin.h: Fix spelling in comments.
161 * script-sections.h: Fix spelling in comments.
162 * script.h: Fix spelling in comments.
163 * stringpool.h: Fix spelling in comments.
164 * tilegx.cc: Fix spelling in comments.
166 2016-11-22 Cary Coutant <ccoutant@gmail.com>
169 * options.cc (One_option::print): Print "(default)" when appropriate.
170 * options.h: Clean up and re-sort options.
171 (One_option::is_default): New data member.
172 (One_option::One_option): Add is_default parameter; adjust all calls.
173 (DEFINE_var): Add is_default__ parameter; adjust all calls.
174 (DEFINE_bool): Set is_default based on default_value__.
175 (DEFINE_bool_ignore): New macro.
176 (--no-eh-frame-hdr): New option.
177 (--enable-new-dtags): Remove mention of DT_FLAGS.
179 2016-11-22 Ambrogino Modigliani <ambrogino.modigliani@gmail.com>
181 * configure: Regenerate.
183 2016-11-21 Cary Coutant <ccoutant@gmail.com>
186 * gold.cc (queue_middle_tasks): Force valid target earlier.
188 2016-11-21 Igor Kudrin <ikudrin@accesssoftek.com>
190 * layout.cc: Include windows.h and rpcdce.h (for MinGW32).
191 (Layout::create_build_id): Generate uuid using UuidCreate().
193 2016-11-04 Loïc Yhuel <loic.yhuel@softathome.com>
195 * configure.ac: add missing '$'.
196 * configure: Regenerate.
198 2016-10-21 Gergely Nagy <ngg@tresorit.com>
201 * icf.cc (match_sections): Add new parameter section_addraligns.
202 Check section alignment and keep the section with the strictest
204 (find_identical_sections): New local variable section_addraligns.
205 Store each section's alignment.
206 * testsuite/pr17704a_test.s: New file.
207 * testsuite/Makefile.am (pr17704a_test): New test.
208 * testsuite/Makefile.in: Regenerate.
210 2016-10-06 Alan Modra <amodra@gmail.com>
212 * powerpc.cc (Target_powerpc::Relocate::relocate): Add fall
214 * tilegx.cc (Target_tilegx::Relocate::relocate): Likewise.
216 2016-10-06 Alan Modra <amodra@gmail.com>
218 * aarch64.cc: Spell fall through comments as "// Fall through.".
221 * powerpc.cc: Likewise.
223 * sparc.cc: Likewise.
224 * x86_64.cc: Likewise.
225 * powerpc.cc (Target_powerpc::Relocate::relocate): Add missing
226 fall through comments.
227 * sparc.cc: (Target_sparc::Scan::global): Likewise.
228 (Target_sparc::Relocate::relocate): Likewise.
229 * tilegx.cc (Target_tilegx::Relocate::relocate): Likewise.
230 * resolve.cc (symbol_to_bits): Add missing break.
232 2016-09-26 Cary Coutant <ccoutant@gmail.com>
235 * symtab.cc (Symbol_table::define_default_version): Check that
236 unversioned symbol is defined.
238 2016-09-26 Vlad Zakharov <vzakhar@synopsys.com>
240 * Makefile.in: Regenerate.
241 * configure: Likewise.
242 * testsuite/Makefile.in: Likewise.
244 2016-09-26 Alan Modra <amodra@gmail.com>
246 * aarch64.cc (Target_aarch64::is_erratum_835769_sequence): Avoid
248 * output.cc (Output_segment::set_section_addresses): Likewise.
249 * testsuite/Makefile.in: Regenerate.
251 2016-09-02 Doug Kwan <dougkwan@google.com>
253 * arm.cc (Target_arm::Target_arm): Move method definition outside of
254 class definition. Add code to handle --target1-rel, --target1-abs
255 and --target2= options.
256 (Target_arm::get_reloc_reloc_type): Change method to be non-static
258 (Target_arm::target1_is_rel_, Target_arm::target2_reloc_): New data
260 (Target_arm::Scan::local, Target_arm::Scan::global,
261 Target_arm::Relocate::relocate,
262 Target_arm::Relocatable_size_for_reloc::get_size_for_reloc): Adjust
263 call to Target_arm::get_real_reloc_type.
264 (Target_arm::get_real_reloc_type): Use command line options to
265 determine real types of R_ARM_TARGET1 and R_ARM_TARGET2.
266 * options.h (--target1-rel, --target1-abs, --target2): New ARM-only
269 2016-08-31 Alan Modra <amodra@gmail.com>
271 * powerpc.cc (class Stub_control): Delete stub14_group_size_
272 and has14_. Add group_size_.
273 (Stub_control::can_add_to_stub_group): Adjust to suit. Print
274 debug info when switching to adding sections before stubs.
276 2016-08-31 Alan Modra <amodra@gmail.com>
278 * debug.h (DEBUG_TARGET): New.
279 (DEBUG_ALL): Add DEBUG_TARGET.
280 (gold_debug): Delete FORMAT param.
281 * powerpc.cc (Stub_control::can_add_to_stub_group): Print debug ourput.
283 2016-08-30 Alan Modra <amodra@gmail.com>
286 * powerpc.cc (class Stub_control): Add has14_. Comment owner_.
287 (Stub_control::can_add_to_stub_group): Correct grouping of
288 sections containing 14-bit external branches. When returning
289 false, set state_ to reflect the fact that we have one section
290 for the next group. Rewrite most of function for clarity.
291 Add and expand comments.
292 (Target_powerpc::do_relax): Print stub group size retry in hex.
294 2016-08-26 Han Shen <shenhan@google.com>
296 PR gold/20529 - relaxing loop never ends.
298 * powerpc.cc (Stub_table::min_size_threshold_): New member to
300 (Stub_table::set_min_size_threshold): New member function.
301 (Stub_table::set_address_and_size): Add code to only allow size
303 (Target_powerpc::do_relax): Add code to record last size.
305 2016-08-23 Roland McGrath <roland@hack.frob.com>
307 * options.h (General_options): Grok -z stack-size.
308 * output.h (Output_segment::set_size): New method.
309 * layout.cc (Layout::create_executable_stack_info): Renamed to ...
310 (Layout::create_stack_segment): ... this. Always create the
311 segment if -z stack-size was used.
312 (Layout::set_segment_offsets): Don't call ->set_offset on the
313 PT_GNU_STACK segment.
315 2016-08-15 Bharathi Seshadri <bseshadr@cisco.com>
317 * options.h (General_options): Add --be8 option.
318 * arm.cc (Arm_relobj::do_relocate_sections): Add code to swap for be8.
319 (Output_data_plt_arm_standard::do_fill_first_plt_entry): Likewise.
320 (Output_data_plt_arm_short::do_fill_plt_entry): Likewise.
321 (Output_data_plt_arm_long::do_fill_plt_entry): Likewise.
322 (Target_arm::do_adjust_elf_header): Do EF_ARM_BE8 adjustment.
324 2016-08-17 Cary Coutant <ccoutant@gmail.com>
326 * i386.cc (Target_i386): Reset skip_call_tls_get_addr_ after printing
328 * testsuite/Makefile.am (pr20216a): Add missing dependencies.
329 (pr20308a): Add -Bgcctestdir/ to compile rules.
330 * testsuite/Makefile.in: Regenerate.
332 2016-08-12 Roland McGrath <roland@hack.frob.com>
335 * script-sections.cc (Script_sections::release_segments):
336 Reset this->segments_created_.
338 2016-08-12 Roland McGrath <roland@hack.frob.com>
340 * yyscript.y (HIDDEN): New %token.
341 (assignment): Handle HIDDEN(string = expr) syntax.
342 * script.cc (script_keyword_parsecodes): Add HIDDEN.
344 2016-08-10 Cary Coutant <ccoutant@gmail.com>
347 * x86_64.cc (Target_x86_64::Relocate::relocate): Add check for
348 R_X86_64_GOTPCREL. Reset skip_call_tls_get_addr_ after printing
350 * testsuite/Makefile.am (pr20216_gd.o): Add -Bgcctestdir/.
351 (pr20216_ld.o): Likewise.
352 * testsuite/Makefile.in: Regenerate.
354 2016-08-10 James Clarke <jrtc27@jrtc27.com>
357 * symtab.cc (Symbol_table::add_from_relobj): Handle NULL symbols,
358 which will be present for STT_SPARC_REGISTER.
359 (Symbol_table::add_from_pluginobj): Likewise.
360 (Symbol_table::add_from_dynobj): Likewise.
361 (Symbol_table::add_from_incrobj): Removed dead code.
363 2016-08-10 James Clarke <jrtc27@jrtc27.com>
366 * sparc.cc (Target_sparc::Relocate::relocate): R_SPARC_GOTDATA_OP_LOX10
367 should fall back on R_SPARC_GOT10, not R_SPARC_GOT13.
369 2016-08-10 James Clarke <jrtc27@jrtc27.com>
372 * sparc.cc (Target_sparc::Scan::check_non_pic): Allow R_SPARC_32 on
375 2016-06-29 Cary Coutant <ccoutant@gmail.com>
378 * testsuite/dynamic_list.sh: Remove check for _ZdlPv.
380 2016-06-29 Cary Coutant <ccoutant@gmail.com>
382 * testsuite/Makefile.am (MOSTLYCLEANFILES): Add eh_test_2.
383 * testsuite/Makefile.in: Regenerate.
385 2016-06-30 Alan Modra <amodra@gmail.com>
387 * testsuite/Makefile.am (memory_test, memory_test_2): Pass
388 -Wl,-z to gcc, not plain -z.
389 * testsuite/Makefile.in: Regenerate.
391 2016-06-29 H.J. Lu <hongjiu.lu@intel.com>
394 * i386.cc (Target_i386::Relocate::relocate): Allow
395 R_386_GOT32X relocation against ___tls_get_addr.
396 (Target_i386::Relocate::tls_gd_to_ie): Support indirect
397 call to __tls_get_addr.
398 (Target_i386::Relocate::tls_gd_to_le): Likewise.
399 (Target_i386::Relocate::tls_ld_to_le): Likewise.
400 * testsuite/Makefile.am (check_PROGRAMS): Add pr20308a_test,
401 pr20308b_test, pr20308c_test, pr20308d_test, pr20308e_test.
402 (pr20308a_test_SOURCES): New.
403 (pr20308a_test_DEPENDENCIES): Likewise.
404 (pr20308a_test_CFLAGS): Likewise.
405 (pr20308a_test_LDFLAGS): Likewise.
406 (pr20308a_test_LDADD): Likewise.
407 (pr20308b_test_SOURCES): Likewise.
408 (pr20308b_test_DEPENDENCIES): Likewise.
409 (pr20308b_test_CFLAGS): Likewise.
410 (pr20308b_test_LDFLAGS): Likewise.
411 (pr20308b_test_LDADD): Likewise.
412 (pr20308c_test_SOURCES): Likewise.
413 (pr20308c_test_DEPENDENCIES): Likewise.
414 (pr20308c_test_CFLAGS): Likewise.
415 (pr20308c_test_LDFLAGS): Likewise.
416 (pr20308c_test_LDADD): Likewise.
417 (pr20308d_test_SOURCES): Likewise.
418 (pr20308d_test_DEPENDENCIES): Likewise.
419 (pr20308d_test_CFLAGS): Likewise.
420 (pr20308d_test_LDFLAGS): Likewise.
421 (pr20308d_test_LDADD): Likewise.
422 (pr20308e_test_SOURCES): Likewise.
423 (pr20308e_test_DEPENDENCIES): Likewise.
424 (pr20308e_test_CFLAGS): Likewise.
425 (pr20308e_test_LDFLAGS): Likewise.
426 (pr20308e_test_LDADD): Likewise.
427 (pr20308a.so): Likewise.
428 (pr20308b.so): Likewise.
429 (pr20308_gd.o): Likewise.
430 (pr20308_ld.o): Likewise.
431 (MOSTLYCLEANFILES): Add pr20308a.so pr20308b.so.
432 * testsuite/Makefile.in: Regenerated.
433 * testsuite/pr20308_def.c: New file.
434 * testsuite/pr20308_gd.S: Likewise.
435 * testsuite/pr20308_ld.S: Likewise.
436 * testsuite/pr20308_main.c: Likewise.
438 2016-06-29 H.J. Lu <hongjiu.lu@intel.com>
441 * configure.ac (DEFAULT_TARGET_X86_64_OR_X32): New
443 * configure: Regenerated.
444 * x86_64.cc (Target_x86_64<size>::Relocate::relocate): Allow
445 R_X86_64_GOTPCRELX relocation against __tls_get_addr.
446 (Target_x86_64<size>::Relocate::tls_gd_to_ie): Support indirect
447 call to __tls_get_addr.
448 (Target_x86_64<size>::Relocate::tls_gd_to_le): Likewise.
449 (Target_x86_64<size>::Relocate::tls_ld_to_le): Likewise.
450 * testsuite/Makefile.am (check_PROGRAMS): Add pr20216a_test,
451 pr20216b_test, pr20216c_test, pr20216d_test, pr20216e_test.
452 (pr20216a_test_SOURCES): New.
453 (pr20216a_test_DEPENDENCIES): Likewise.
454 (pr20216a_test_CFLAGS): Likewise.
455 (pr20216a_test_LDFLAGS): Likewise.
456 (pr20216a_test_LDADD): Likewise.
457 (pr20216b_test_SOURCES): Likewise.
458 (pr20216b_test_DEPENDENCIES): Likewise.
459 (pr20216b_test_CFLAGS): Likewise.
460 (pr20216b_test_LDFLAGS): Likewise.
461 (pr20216b_test_LDADD): Likewise.
462 (pr20216c_test_SOURCES): Likewise.
463 (pr20216c_test_DEPENDENCIES): Likewise.
464 (pr20216c_test_CFLAGS): Likewise.
465 (pr20216c_test_LDFLAGS): Likewise.
466 (pr20216c_test_LDADD): Likewise.
467 (pr20216d_test_SOURCES): Likewise.
468 (pr20216d_test_DEPENDENCIES): Likewise.
469 (pr20216d_test_CFLAGS): Likewise.
470 (pr20216d_test_LDFLAGS): Likewise.
471 (pr20216d_test_LDADD): Likewise.
472 (pr20216e_test_SOURCES): Likewise.
473 (pr20216e_test_DEPENDENCIES): Likewise.
474 (pr20216e_test_CFLAGS): Likewise.
475 (pr20216e_test_LDFLAGS): Likewise.
476 (pr20216e_test_LDADD): Likewise.
477 (pr20216a.so): Likewise.
478 (pr20216b.so): Likewise.
479 (pr20216_gd.o): Likewise.
480 (pr20216_ld.o): Likewise.
481 (MOSTLYCLEANFILES): Add pr20216a.so pr20216b.so.
482 * testsuite/Makefile.in: Regenerated.
483 * testsuite/pr20216_def.c: New file.
484 * testsuite/pr20216_gd.S: Likewise.
485 * testsuite/pr20216_ld.S: Likewise.
486 * testsuite/pr20216_main.c: Likewise.
488 2016-06-29 Alan Modra <amodra@gmail.com>
490 * script_test_12.t: Delete .plt, specify 64k page size.
491 * script_test_12i.t: Likewise.
493 2016-06-29 Alan Modra <amodra@gmail.com>
495 * testsuite/plugin_layout_with_alignment.c: Explicitly align all
498 2016-06-29 Alan Modra <amodra@gmail.com>
500 * testsuite/Makefile.am (copy_test_protected): Disable for powerpc.
501 * testsuite/Makefile.in: Regenerate.
503 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
505 * aarch64-reloc.def (NONE): New relocation.
506 * aarch64.cc (Target_aarch64::Scan::local): Handle R_AARCH64_NONE.
507 (Target_aarch64::Scan::global): Likewise.
508 * testsuite/Makefile.am (aarch64_reloc_none): New test.
509 * testsuite/Makefile.in: Regenerate.
510 * testsuite/aarch64_reloc_none.s: New test source file.
511 * testsuite/aarch64_reloc_none.sh: New test script.
513 2016-06-28 Sriraman Tallam <tmsriram@google.com>
515 * x86_64.cc (Lazy_view): New class.
516 (can_convert_mov_to_lea): Templatize function. Make the function
517 check for appropriate relocation types and use the view parameter
518 to get section contents.
519 (can_convert_callq_to_direct): New function.
520 (Target_x86_64<size>::Scan::global): Refactor.
521 (Target_x86_64<size>::Relocate::relocate): Refactor. Change any indirect
522 call via GOT that can be converted.
523 * testsuite/Makefile.am (x86_64_indirect_call_to_direct.sh): New test.
524 * testsuite/Makefile.in: Regenerate.
525 * testsuite/x86_64_indirect_call_to_direct1.s: New file.
526 * testsuite/x86_64_indirect_jump_to_direct1.s: New file.
528 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
530 * aarch64.cc (Target_aarch64::Scan::local): Move the call to got_section
531 from the top level to the places of its use.
533 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
536 * script-c.h (Sort_wildcard): Add SORT_WILDCARD_BY_INIT_PRIORITY.
537 * script-sections.cc (Input_section_sorter::get_init_priority): New method.
538 (Input_section_sorter::operator()): Handle SORT_WILDCARD_BY_INIT_PRIORITY.
539 (Output_section_element_input::print): Likewise.
540 * script.cc (script_keyword_parsecodes): Add entry SORT_BY_INIT_PRIORITY.
541 * yyscript.y (SORT_BY_INIT_PRIORITY): New token.
542 (wildcard_section): Handle SORT_BY_INIT_PRIORITY.
544 * testsuite/Makefile.am (script_test_14): New test.
545 * testsuite/Makefile.in: Regenerate.
546 * testsuite/script_test_14.s: New test source file.
547 * testsuite/script_test_14.sh: New test script.
548 * testsuite/script_test_14.t: New test linker script.
550 2016-06-28 James Clarke <jrtc27@jrtc27.com>
552 * sparc.cc (Target_sparc::Scan::local): Don't convert R_SPARC_32
553 to R_SPARC_RELATIVE if class is ELFCLASS64.
554 (Target_sparc::Scan::global): Likewise.
556 2016-06-23 Cary Coutant <ccoutant@gmail.com>
557 Igor Kudrin <ikudrin@accesssoftek.com>
561 (Output_section_element_input::set_section_addresses): Keep bin_count
562 separate from input_pattern_count.
563 * testsuite/script_test_12.t: Add another section .x4.
564 * testsuite/script_test_12i.t: Likewise.
565 * testsuite/script_test_12a.c: Likewise.
566 * testsuite/script_test_12b.c: Likewise.
568 2016-06-23 Igor Kudrin <ikudrin@accesssoftek.com>
570 * gold-threads.cc (impl_threads::Lock_impl_threads): Fix typos.
572 2016-06-22 H.J. Lu <hongjiu.lu@intel.com>
575 * NEWS: Mention --enable-relro.
576 * configure.ac: Add --enable-relro.
577 (DEFAULT_LD_Z_RELRO): New. Set by --enable-relro and default
579 * config.in: Regenerated.
580 * configure: Likewise.
581 * options.h (General_options::relro): Default to
584 2016-06-20 Cary Coutant <ccoutant@gmail.com>
586 * NEWS: Add new features in 1.12.
587 * version.cc (version_string): Bump to 1.12.
589 2016-06-20 H.J. Lu <hongjiu.lu@intel.com>
592 * i386.cc (Target_i386::first_plt_entry_offset): Return 0 if
594 (Target_i386::plt_entry_size): Likewise.
595 (Target_x86_64<size>::first_plt_entry_offset): Likewise.
596 (Target_x86_64<size>::plt_entry_size): Likewise.
598 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
600 * mips.cc (Target_mips::Target_mips): Initialize rld_map_.
601 (Target_mips::rld_map_): New data member.
602 (Target_mips::do_finalize_sections): Add support for
603 DT_MIPS_RLD_MAP and DT_MIPS_RLD_MAP_REL dynamic tags,
604 .rld_map section, and __RLD_MAP symbol.
605 (Target_mips::do_dynamic_tag_custom_value): Add support for
606 DT_MIPS_RLD_MAP_REL dynamic tag.
607 * output.cc (Output_data_dynamic::get_entry_offset): New method
609 * output.h (Output_data_dynamic::get_entry_offset): New method
612 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
614 * mips.cc (Mips_relocate_functions::relpc16): Add unaligned check.
616 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
618 * mips.cc (relocation_needs_la25_stub): Add support for relocs:
619 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
620 (hi16_reloc): Add support for R_MIPS_PCHI16 relocation.
621 (is_matching_lo16_reloc): Likewise.
622 (lo16_reloc): Add support for R_MIPS_PCLO16 relocation.
623 (Mips_output_data_plt::plt_entry_r6): New static data member for
625 (Target_mips::is_output_r6): New method.
626 (Target_mips::Mips_mach): Add new enum constants.
627 (Mips_relocate_functions::Status): Likewise.
628 (Mips_relocate_functions::pchi16_relocs): New static data member.
629 (Mips_relocate_functions::relpc21): New method.
630 (Mips_relocate_functions::relpc26): Likewise.
631 (Mips_relocate_functions::relpc18): Likewise.
632 (Mips_relocate_functions::relpc19): Likewise.
633 (Mips_relocate_functions::relpchi16): Likewise.
634 (Mips_relocate_functions::do_relpchi16): Likewise.
635 (Mips_relocate_functions::relpclo16): Likewise.
636 (Mips_output_data_plt::do_write): Add support for Mips r6 plt
638 (Target_mips::mips_32bit_flags): Add E_MIPS_ARCH_32R6 support.
639 (Target_mips::elf_mips_mach): Add E_MIPS_ARCH_32R6 and
640 E_MIPS_ARCH_64R6 support.
641 (Target_mips::update_abiflags_isa): Likewise.
642 (mips_get_size_for_reloc): Add support for relocs: R_MIPS_PCHI16,
643 R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3 and
645 (Target_mips::Scan::local): Add support for relocs: R_MIPS_PCHI16
647 (Target_mips::Scan::global): Add support for relocs:
648 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
649 (Target_mips::Relocate::relocate): Call functions for resolving
650 Mips32r6 and Mips64r6 relocations, and print error message for
651 STATUS_PCREL_UNALIGNED.
652 (Target_mips::Scan::get_reference_flags): Add support for relocs:
653 R_MIPS_PCHI16, R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2,
654 R_MIPS_PC18_S3 and R_MIPS_PC19_S2.
655 (Target_mips::elf_mips_mach_name): Add E_MIPS_ARCH_32R6 and
656 E_MIPS_ARCH_64R6 support.
658 2016-06-13 H.J. Lu <hongjiu.lu@intel.com>
661 * testsuite/script_test_2.t: Add .got.plt after .got.
663 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
665 * mips.cc (struct Mips_abiflags): New struct.
666 (Mips_relobj::Mips_relobj): Initialize attributes_section_data_
668 (Mips_relobj::~Mips_relobj): Delete object pointed by
669 attributes_section_data_.
670 (Mips_relobj::abiflags): New method.
671 (Mips_relobj::attributes_section_data): Likewise.
672 (Mips_relobj::attributes_section_data_): New data member.
673 (Mips_relobj::abiflags_): Likewise.
674 (class Mips_output_section_abiflags): New class.
675 (Target_mips::Target_mips): Initialize attributes_section_data_,
676 abiflags_ and has_abiflags_section_.
677 (Target_mips::do_should_include_section): Don't emit input
678 .MIPS.abiflags sections to output .MIPS.abiflags.
679 (Target_mips::Mips_mach): Add new enum constants.
680 (Target_mips::mips_isa_ext_mach): New method.
681 (Target_mips::mips_isa_ext): Likewise.
682 (Target_mips::update_abiflags_isa): Likewise.
683 (Target_mips::infer_abiflags): Likewise.
684 (Target_mips::create_abiflags): Likewise.
685 (Target_mips::fp_abi_string): Likewise.
686 (Target_mips::select_fp_abi): Likewise.
687 (Target_mips::merge_obj_attributes): Likewise.
688 (Target_mips::merge_obj_abiflags): Likewise.
689 (Target_mips::level_rev): Likewise.
690 (Target_mips::merge_obj_e_flags): Rename from
691 merge_processor_specific_flags. Remove dyn_obj argument,
692 call update_abiflags_isa when needed, compare NaN encodings and
694 (Target_mips::add_machine_extensions): Add two machine extensions
696 (Target_mips::attributes_section_data_): New data member.
697 (Target_mips::abiflags_): Likewise.
698 (Target_mips::has_abiflags_section_): Likewise.
699 (Mips_relobj::do_read_symbols): Read .gnu.attributes and
700 .MIPS.abiflags sections if they exists.
701 (Target_mips::elf_mips_mach): Add E_MIPS_MACH_5900 and
702 E_MIPS_MACH_OCTEON3 support.
703 (Target_mips::do_adjust_elf_header): Setup EI_ABIVERSION flag.
704 (Target_mips::do_finalize_sections): Merge .gnu.attributes and
705 .MIPS.abiflags sections from input. Create these sections if
707 (Target_mips::elf_mips_mach_name): Add E_MIPS_MACH_5900 and
708 E_MIPS_MACH_OCTEON3 support, and change strings for
709 E_MIPS_MACH_LS2E, E_MIPS_MACH_LS2F and E_MIPS_MACH_LS3A just
712 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
714 * mips.cc (Mips_relobj::Mips_relobj): Initialize
715 has_reginfo_section_.
716 (Mips_relobj::has_reginfo_section_): New data member.
717 (Mips_relobj::has_reginfo_section): New method.
718 (class Mips_output_section_reginfo): Change base class to
719 Output_section_data, and set masks of the output .reginfo section
721 (Mips_output_section_reginfo::as_mips_output_section_reginfo):
723 (Mips_output_section_reginfo::set_masks): Likewise.
724 (Mips_output_section_reginfo::set_final_data_size): Likewise.
725 (Mips_output_section_reginfo::do_print_to_mapfile): New method.
726 (Target_mips::do_make_output_section): Remove.
727 (Mips_relobj::do_read_symbols): Set has_reginfo_section_ to true
728 if the object contains a .reginfo section.
729 (Target_mips::do_finalize_sections): Create a .reginfo output
732 2016-06-09 Artemiy Volkov <artemiyv@acm.org>
734 * mips.cc (Mips_output_data_got::do_write): Add missing template
737 2016-05-30 Marcin Kościelnicki <koriakin@0x04.net>
740 * s390.cc (Target_s390::ss_code_st_r14): Removed.
741 (Target_s390::ss_code_l_r14): Removed.
742 (Target_s390::ss_code_ear): Removed.
743 (Target_s390::ss_code_c): Removed.
744 (Target_s390::ss_match_st_r14): New function.
745 (Target_s390::ss_match_l_r14): New function.
746 (Target_s390::ss_match_mcount): Call ss_match_{l,st}_r14 instead
747 of matching code directly.
748 (Target_s390::ss_match_ear): New function.
749 (Target_s390::ss_match_c): New function.
750 (Target_s390::do_calls_non_split): Call ss_match_{ear,c} instead
751 of matching code directly.
753 2016-05-19 Cary Coutant <ccoutant@gmail.com>
756 * copy-relocs.cc (Copy_relocs::make_copy_reloc): Add object
757 parameter; check for protected symbol.
758 * copy-relocs.h (Copy_relocs::make_copy_reloc): Add object parameter.
759 * mips.cc (Mips_copy_relocs): Adjust call to make_copy_reloc.
760 * symtab.cc (Symbol::init_fields): Initialize is_protected_.
761 (Symbol_table::add_from_dynobj): Mark protected symbols.
762 * symtab.h (Symbol::is_protected): New method.
763 (Symbol::set_is_protected): New method.
764 (Symbol::is_protected_): New data member.
766 * testsuite/Makefile.am (copy_test_protected): New test.
767 * testsuite/Makefile.in: Regenerate.
768 * testsuite/copy_test.cc (main): Add legal reference to protected
770 * testsuite/copy_test_v1.cc (main): Likewise.
771 * testsuite/copy_test_2.cc (ip): Add protected symbol.
772 * testsuite/copy_test_protected.cc: New test source file.
773 * testsuite/copy_test_protected.sh: New test script.
775 2016-05-19 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
777 * mips.cc (Mips_got_entry::Mips_got_entry): Remove object argument
778 for global got symbols, and set addend to 0.
779 (Mips_got_entry::hash): Change hash algorithm.
780 (Mips_got_entry::equals): Refactor.
781 (Mips_got_entry::object): Return input object for local got symbols
783 (Mips_got_entry::addend): Change return of the relocation addend.
784 (Mips_got_entry::addend_): Move from union d.
785 (Mips_got_entry::object_): Move into union d.
786 (class Mips_symbol_hash): New class.
787 (Mips_got_info::Global_got_entry_set): New type.
788 (Mips_got_info::global_got_symbols): Change return type to
789 Global_got_entry_set.
790 (Mips_got_info::global_got_symbols_): Change type to
791 Global_got_entry_set.
792 (Mips_symbol::hash): New method.
793 (Mips_output_data_la25_stub::symbols_): Change type to std::vector.
794 (Mips_output_data_mips_stubs::Mips_stubs_entry_set): New type.
795 (Mips_output_data_mips_stubs::symbols_): Change type to
796 Mips_stubs_entry_set.
797 (Mips_got_info::record_global_got_symbol): Don't pass object
798 argument when creating global got symbol.
799 (Mips_got_info::record_got_entry): Remove find before inserting
801 (Mips_got_info::add_reloc_only_entries): Change type of iterator
802 to Global_got_entry_set.
803 (Mips_got_info::count_got_symbols): Likewise.
804 (Mips_output_data_la25_stub::create_la25_stub): Use push_back
805 for adding entries to symbols_.
806 (Mips_output_data_la25_stub::do_write): Change type of iterator
808 (Mips_output_data_mips_stubs::set_lazy_stub_offsets): Change type
809 of iterator to Mips_stubs_entry_set.
810 (Mips_output_data_mips_stubs::set_needs_dynsym_value): Likewise.
811 (Mips_output_data_mips_stubs::do_write): Likewise.
813 2016-05-06 Han Shen <shenhan@google.com>
817 * aarch64-reloc.def: New relocation type.
818 * aarch64.cc (AArch64_relocate_functions::Page): Changed to public.
819 (Target_aarch64::Scan::local): Add R_AARCH64_LD64_GOTPAGE_LO15.
820 (Target_aarch64::Scan::global): Add R_AARCH64_LD64_GOTPAGE_LO15.
821 (Target_aarch64::Relocate::relocate): Implement R_AARCH64_LD64_GOTPAGE_LO15.
823 2016-04-28 Nick Clifton <nickc@redhat.com>
825 * po/zh_CN.po: Updated Chinese (simplified) translation.
827 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
829 * Makefile.in: Regenerated with automake 1.11.6.
830 * aclocal.m4: Likewise.
831 * testsuite/Makefile.in: Likewise.
833 2016-03-30 Cary Coutant <ccoutant@gmail.com>
836 * symtab.cc (Symbol_table::define_default_version): Check for case
837 where symbols are both in different shared objects.
839 2016-03-27 Cary Coutant <ccoutant@gmail.com>
842 * i386.cc (Target_i386): Add check for fully-resolved symbol for
845 2016-03-22 Nick Clifton <nickc@redhat.com>
847 * configure: Regenerate.
849 2016-03-21 Cary Coutant <ccoutant@gmail.com>
852 * errors.cc (Errors::undefined_symbol): Add info message when
853 symbol should have been provided by a plugin.
854 * target-reloc.h (issue_undefined_symbol_error): Check for
855 placeholder symbols defined in discarded sections.
856 * testsuite/Makefile.am (plugin_test_9b): New test case.
857 * testsuite/Makefile.in: Regenerate.
858 * testsuite/plugin_test_9b_elf.cc: New test source file.
859 * testsuite/plugin_test_9b_ir.cc: New test source file.
861 2016-03-20 Cary Coutant <ccoutant@gmail.com>
864 * ehframe.cc (Eh_frame::read_fde): Check for dropped functions.
865 * testsuite/Makefile.am (eh_test_2): New test.
866 * testsuite/Makefile.in: Regenerate.
867 * testsuite/eh_test_2.sh: New test script.
868 * testsuite/eh_test_a.cc (bar): Make it comdat.
869 * testsuite/eh_test_b.cc (bar): Add a duplicate copy.
871 2016-03-18 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
873 * mips.cc (Mips_relobj::is_n64_): Remove.
874 (Target_mips::ei_class_): Likewise.
875 (Mips_relobj::is_newabi): Call methods.
876 (Mips_relobj::is_n64): Change checking for N64 ABI.
877 (Target_mips::is_output_n64): Likewise.
878 (Target_mips::merge_processor_specific_flags): Remove ei_class
879 argument, and remove comparing ei_class.
880 (Target_mips::do_adjust_elf_header): Remove setting EI_CLASS field
882 (Target_mips::do_finalize_sections): Don't pass ei_class argument
883 to merge_processor_specific_flags.
884 (Target_mips::elf_mips_abi_name): Remove ei_class argument, and
885 change checking for N64 ABI.
887 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
889 * mips.cc (enum Special_relocation_symbol): New enum type.
890 (is_readonly_section): New function.
891 (eh_reloc): Likewise.
892 (Mips_got_entry::is_section_symbol_): New member.
893 (Mips_got_entry::is_section_symbol): New method.
894 (Mips_got_info::record_local_got_symbol): Add is_section_symbol
896 (Mips_relobj::mips_elf_options_section_name): New method.
897 (Mips_output_data_got::record_local_got_symbol): Add
898 is_section_symbol argument, and pass it to
899 Mips_got_info::record_local_got_symbol.
900 (Mips_output_data_got::got_offset): Add addend argument, and pass
901 it to Relobj::local_got_offset.
902 (struct Mips_output_reloc_writer): New type.
903 (class Mips_output_data_reloc): New class.
904 (Mips_output_data_plt::Reloc_section): Change type to
905 Mips_output_data_reloc.
906 (Target_mips::Reloc_section): Likewise.
907 (Mips_reloc_types::get_r_addend): Remove unsigned from return type.
908 (Mips_classify_reloc::get_r_type2): New method.
909 (Mips_classify_reloc::get_r_type3): Likewise.
910 (Mips_classify_reloc::get_r_ssym): Likewise.
911 (Target_mips::Reloca_section): Remove.
912 (Relocate::should_apply_static_reloc): Rename from
913 should_apply_r_mips_32_reloc.
914 (Target_mips::copy_reloc): Replace Reltype parameter with r_type
916 (Mips_relocate_functions::Valtype): New type.
917 (Mips_relocate_functions::Valtype64): New type.
918 (Mips_relocate_functions::check_overflow): New method.
919 (Mips_relocate_functions::mips_reloc_unshuffle): Move to public
921 (Mips_relocate_functions::mips_reloc_shuffle): Likewise.
922 (Mips_relocate_functions::rel16): Add support for resolving
923 relocations for Mips64.
924 (Mips_relocate_functions::rel32): Likewise.
925 (Mips_relocate_functions::reljalr): Likewise.
926 (Mips_relocate_functions::relpc32): Likewise.
927 (Mips_relocate_functions::rel26): Likewise.
928 (Mips_relocate_functions::relpc16): Likewise.
929 (Mips_relocate_functions::relmicromips_pc7_s1): Likewise.
930 (Mips_relocate_functions::relmicromips_pc10_s1): Likewise.
931 (Mips_relocate_functions::relmicromips_pc16_s1): Likewise.
932 (Mips_relocate_functions::do_relhi16): Likewise.
933 (Mips_relocate_functions::do_relgot16_local): Likewise.
934 (Mips_relocate_functions::rello16): Likewise.
935 (Mips_relocate_functions::relgot): Likewise.
936 (Mips_relocate_functions::relgotpage): Likewise.
937 (Mips_relocate_functions::relgotofst): Likewise.
938 (Mips_relocate_functions::relgot_hi16): Likewise.
939 (Mips_relocate_functions::relgot_lo16): Likewise.
940 (Mips_relocate_functions::relgprel): Likewise.
941 (Mips_relocate_functions::relgprel32): Likewise.
942 (Mips_relocate_functions::tlsrelhi16): Likewise.
943 (Mips_relocate_functions::tlsrello16): Likewise.
944 (Mips_relocate_functions::tlsrel32): Likewise.
945 (Mips_relocate_functions::relsub): Likewise.
946 (Mips_relocate_functions::releh): New method.
947 (Mips_relocate_functions::rel64): Likewise.
948 (Mips_got_info::record_local_got_symbol): Add is_section_symbol and
949 pass it to Mips_got_entry.
950 (Mips_got_info::add_local_entries): Pass addend argument
951 to code functions, and for STT_SECTION symbols call
952 add_symbolless_local_addend.
953 (Mips_got_info::add_tls_entries): Pass addend argument to code
955 (Mips_relobj::do_read_symbols): Read gp value that was used to
957 (Mips_output_data_plt::plt_entry): Remove opcode from l[wd]
958 instruction. Opcode for instruction will be selected later.
959 (Target_mips::gc_process_relocs): Add case for SHT_RELA.
960 (Target_mips::scan_relocatable_relocs): Likewise.
961 (Target_mips::emit_relocs_scan): Likewise.
962 (Target_mips::relocate_relocs): Likewise.
963 (Target_mips::do_finalize_sections): Skip objects for merging
964 processor specific flags in which all input sections will be
966 (mips_get_size_for_reloc): Add case for R_MIPS_EH.
967 (Target_mips::Scan::get_reference_flags): Likewise.
968 (Target_mips::relocate_special_relocatable): Call rel26 method with
969 calculate_only and calculated_value arguments.
970 (Target_mips::Scan::local): Add case for R_MIPS_EH. Don't create a
971 dynamic relocation against a readonly sections, and pass
972 is_section_symbol to Mips_got_info::record_local_got_symbol.
973 (Target_mips::Scan::global): Add case for R_MIPS_EH. Don't create a
974 dynamic relocation against a readonly sections, and pass r_type
975 and r_offset to Target_mips::copy_reloc.
976 (Target_mips::Relocate::relocate): Add support for resolving
977 relocations for Mips64.
978 (Target_mips::mips_info): Add case for Mips64 default dynamic
980 (Target_selector_mips): Correct emulation names.
982 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
984 * mips.cc (class Mips_output_data_la25_stub): Add
985 do_print_to_mapfile function.
987 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
989 * mips.cc (Mips_classify_reloc::put_r_info): Call 32bit version of
992 2016-03-09 H.J. Lu <hongjiu.lu@intel.com>
994 * testsuite/plugin_layout_with_alignment.cc: Renamed to ..
995 * testsuite/plugin_layout_with_alignment.c: This.
996 * testsuite/Makefile.am (plugin_layout_with_alignment.o): Updated.
997 (plugin_layout_with_alignment): Likewise.
998 * testsuite/Makefile.in: Regenerated.
1000 2016-03-08 Cary Coutant <ccoutant@gmail.com>
1003 * testsuite/Makefile.am (retain_symbols_file_test): Remove check
1005 * testsuite/Makefile.in: Regenerate.
1006 * testsuite/dynamic_list.sh: Likewise.
1007 * testsuite/retain_symbols_file_test.sh: Likewise.
1009 2016-03-08 Cary Coutant <ccoutant@gmail.com>
1012 * arm.cc (Reloc_stub::Key::name): Add unused attribute.
1013 * dirsearch.cc (Dir_caches::~Dir_caches): Likewise.
1015 2016-03-08 Cary Coutant <ccoutant@gmail.com>
1016 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
1018 * output.cc (Output_reloc_writer): New type.
1019 (Output_data_reloc_base::do_write): Move implementation to template
1020 in output.h and replace with invocation of template.
1021 * output.h (Output_file): Move to top of file.
1022 (Output_reloc::get_symbol_index): Move to public interface.
1023 (Output_reloc::get_address): Likewise.
1024 (Output_data_reloc_base::do_write_generic): New function template.
1026 2016-03-04 Cary Coutant <ccoutant@gmail.com>
1030 * symtab.cc: Instantiate Sized_symbol::init_constant and
1031 Sized_symbol::init_undefined.
1033 2016-03-03 Cary Coutant <ccoutant@gmail.com>
1036 * layout.h (Layout::add_target_specific_dynamic_tag): New function.
1037 * layout.cc (Layout::add_target_specific_dynamic_tag): New function.
1038 * mips.cc (Target_mips::make_symbol): Adjust function signature.
1039 * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_.
1040 (Target_sparc::do_is_defined_by_abi): Remove test for
1042 (Target_sparc::Register_symbol): New struct type.
1043 (Target_sparc::register_syms_): New data member.
1044 (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true.
1045 (Target_sparc::make_symbol): New function.
1046 (Target_sparc::do_finalize_sections): Add register symbols and new
1047 dynamic table entries.
1048 * symtab.h (Sized_symbol::init_undefined): Add value parameter.
1049 (Symbol_table::add_target_global_symbol): New function.
1050 (Symbol_table::target_symbols_): New data member.
1051 * symtab.cc (Sized_symbol::init_undefined): Add value parameter.
1052 (Symbol_table::Symbol_table): Initialize target_symbols_.
1053 (Symbol_table::add_from_object): Pass additional parameters to
1054 Target::make_symbol.
1055 (Symbol_table::define_special_symbol): Likewise.
1056 (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for
1057 undefined symbol value.
1058 (Symbol_table::set_dynsym_indexes): Process target-specific symbols.
1059 (Symbol_table::sized_finalize): Likewise.
1060 (Symbol_table::sized_write_globals): Likewise.
1061 * target.h (Sized_target::make_symbol): Add name, st_type, object,
1062 st_shndx, and value parameters.
1064 2016-03-03 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1066 * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and
1067 LDPK_WEAKUNDEF symbols.
1069 2016-03-03 Than McIntosh <thanm@google.com>
1071 * plugin.cc (Plugin::load): Include hooks for get_input_section_size
1072 and get_input_section_alignment in transfer vector.
1073 (get_input_section_alignment): New function.
1074 (get_input_section_size): New function.
1075 * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test.
1076 * testsuite/Makefile.in: [Regenerate.]
1077 * testsuite/plugin_section_alignment.cc: New test file.
1078 * testsuite/plugin_layout_with_alignment.cc: New test file.
1079 * testsuite/plugin_layout_with_alignment.sh: New test file.
1081 2016-03-03 Evgenii Stepanov <eugenis@google.com>
1083 * plugin.h (Pluginobj::get_symbol_resolution_info): Add version
1085 * plugin.cc (get_symbols_v3): New function.
1086 (Plugin::load): Add LDPT_GET_SYMBOLS_V3.
1087 (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using
1090 2016-02-26 Egor Kochetov <egor.kochetov@intel.com>
1091 Cary Coutant <ccoutant@gmail.com>
1094 * ehframe.h (Cie::fde_encoding): New method.
1095 * ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length
1098 2016-02-15 H.J. Lu <hongjiu.lu@intel.com>
1100 * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
1101 -mrelax-relocations=yes to $(TEST_AS).
1102 (x86_64_mov_to_lea6.o): Likewise.
1103 (x86_64_overflow_pc32.o): Remove duplicated target.
1104 * testsuite/Makefile.in: Regenerated.
1106 2016-02-15 Marcin Kościelnicki <koriakin@0x04.net>
1108 * s390.cc (Target_s390::match_view_u): New helper method.
1109 (Target_s390::do_is_call_to_non_split): New method.
1110 (Target_s390::ss_code_st_r14): New const.
1111 (Target_s390::ss_code_l_r14): New const.
1112 (Target_s390::ss_code_bras_8): New const.
1113 (Target_s390::ss_code_l_basr): New const.
1114 (Target_s390::ss_code_a_basr): New const.
1115 (Target_s390::ss_code_ear): New const.
1116 (Target_s390::ss_code_c): New const.
1117 (Target_s390::ss_code_larl): New const.
1118 (Target_s390::ss_code_brasl): New const.
1119 (Target_s390::ss_code_jg): New const.
1120 (Target_s390::ss_code_jgl): New const.
1121 (Target_s390::ss_match_mcount): New helper method.
1122 (Target_s390::ss_match_l): New helper method.
1123 (Target_s390::ss_match_ahi): New helper method.
1124 (Target_s390::ss_match_alfi): New helper method.
1125 (Target_s390::ss_match_cr): New helper method.
1126 (Target_s390::do_calls_non_split): New method.
1127 * testsuite/Makefile.am: Added new tests.
1128 * testsuite/Makefile.in: Regenerate.
1129 * testsuite/split_s390.sh: New test.
1130 * testsuite/split_s390_1_a1.s: New test.
1131 * testsuite/split_s390_1_a2.s: New test.
1132 * testsuite/split_s390_1_n1.s: New test.
1133 * testsuite/split_s390_1_n2.s: New test.
1134 * testsuite/split_s390_1_z1.s: New test.
1135 * testsuite/split_s390_1_z2.s: New test.
1136 * testsuite/split_s390_1_z3.s: New test.
1137 * testsuite/split_s390_1_z4.s: New test.
1138 * testsuite/split_s390_2_ns.s: New test.
1139 * testsuite/split_s390_2_s.s: New test.
1140 * testsuite/split_s390x_1_a1.s: New test.
1141 * testsuite/split_s390x_1_a2.s: New test.
1142 * testsuite/split_s390x_1_n1.s: New test.
1143 * testsuite/split_s390x_1_n2.s: New test.
1144 * testsuite/split_s390x_1_z1.s: New test.
1145 * testsuite/split_s390x_1_z2.s: New test.
1146 * testsuite/split_s390x_1_z3.s: New test.
1147 * testsuite/split_s390x_1_z4.s: New test.
1148 * testsuite/split_s390x_2_ns.s: New test.
1149 * testsuite/split_s390x_2_s.s: New test.
1151 2016-02-11 Rahul Chaudhry <rahulchaudhry@google.com>
1153 * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove
1154 info message for every erratum 843419 found and fixed.
1156 2016-02-07 Cary Coutant <ccoutant@gmail.com>
1159 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional
1160 information to relocation overflow errors.
1162 2016-02-06 Cary Coutant <ccoutant@gmail.com>
1165 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32
1166 overflow checking when symbol value + addend < 0.
1168 2016-02-06 Cary Coutant <ccoutant@gmail.com>
1171 * reloc.h (Limits): New class.
1172 (Bits::has_overflow32): Use min/max values from Limits.
1173 (Bits::has_unsigned_overflow32): Likewise.
1174 (Bits::has_signed_unsigned_overflow32): Likewise.
1175 (Bits::has_overflow): Likewise.
1176 (Bits::has_unsigned_overflow): Likewise.
1177 (Bits::has_signed_unsigned_overflow64): Likewise.
1179 2016-02-06 Cary Coutant <ccoutant@gmail.com>
1182 * reloc.h (Relocate_functions::Overflow_check): Add comments.
1183 * x86_64.cc (X86_64_relocate_functions): New class.
1184 (Target_x86_64::Relocate::relocate): Use the new class.
1185 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option.
1186 (x32_overflow_pc32): New test case.
1187 * testsuite/Makefile.in: Regenerate.
1188 * testsuite/x32_overflow_pc32.sh: New script.
1189 * testsuite/x86_64_overflow_pc32.s: Remove .space directive.
1191 2016-02-06 Cary Coutant <ccoutant@gmail.com>
1194 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast.
1195 (Bits::has_unsigned_overflow): Remove unnecessary static_cast.
1197 2016-02-06 Cary Coutant <ccoutant@gmail.com>
1200 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed
1202 (Bits::has_unsigned_overflow): Likewise.
1204 2016-02-06 Marcin Kościelnicki <koriakin@0x04.net>
1206 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
1208 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
1209 and view_size to is_call_to_non_split.
1210 * target.cc (Target::is_call_to_non_split): Add view and view_size
1212 * target.h (class Target): Likewise.
1214 2016-02-05 Sriraman Tallam <tmsriram@google.com>
1216 * icf.cc (get_rel_addend): New function.
1217 (get_section_contents): Move merge section addend computation to a
1218 new function. Ignore negative values for SHT_REL and SHT_RELA addends.
1219 Fix bug to not read past the length of the section.
1221 2016-02-05 Cary Coutant <ccoutant@gmail.com>
1222 Andrew Senkevich <andrew.senkevich@intel.com>
1225 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow
1226 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and
1228 * testsuite/Makefile.am (x86_64_overflow_pc32): New test.
1229 * testsuite/x86_64_overflow_pc32.sh: New test script.
1230 * testsuite/x86_64_overflow_pc32.s: New source file.
1232 2016-02-05 Cary Coutant <ccoutant@gmail.com>
1235 * reloc.h (Relocate_functions::Address): New typedef.
1236 (Relocate_functions::Addendtype): New typedef.
1237 (Relocate_functions::Overflow_check): New enum type.
1238 (Relocate_functions::Reloc_status): New enum type.
1239 (Relocate_functions::check_overflow): New function template.
1240 (Relocate_functions::rel): Add check parameter; check for overflow.
1241 (Relocate_functions::rel_unaligned): Likewise.
1242 (Relocate_functions::rela): Likewise.
1243 (Relocate_functions::pcrel): Likewise.
1244 (Relocate_functions::pcrel_unaligned): Likewise.
1245 (Relocate_functions::pcrela): Likewise.
1246 (Relocate_functions::rel8): Adjust parameter types.
1247 (Relocate_functions::rela8): Likewise.
1248 (Relocate_functions::pcrel8): Likewise.
1249 (Relocate_functions::pcrela8): Likewise.
1250 (Relocate_functions::rel16): Likewise.
1251 (Relocate_functions::rela168): Likewise.
1252 (Relocate_functions::pcrel16): Likewise.
1253 (Relocate_functions::pcrela16): Likewise.
1254 (Relocate_functions::rel32): Likewise.
1255 (Relocate_functions::rel32_unaligned): Likewise.
1256 (Relocate_functions::rela32): Likewise.
1257 (Relocate_functions::pcrel32): Likewise.
1258 (Relocate_functions::pcrel32_unaligned): Likewise.
1259 (Relocate_functions::pcrela32): Likewise.
1260 (Relocate_functions::rel8_check): New function.
1261 (Relocate_functions::rela8_check): New function.
1262 (Relocate_functions::pcrel8_check): New function.
1263 (Relocate_functions::pcrela8_check): New function.
1264 (Relocate_functions::rel16_check): New function.
1265 (Relocate_functions::rela168_check): New function.
1266 (Relocate_functions::pcrel16_check): New function.
1267 (Relocate_functions::pcrela16_check): New function.
1268 (Relocate_functions::rel32_check): New function.
1269 (Relocate_functions::rel32_unaligned_check): New function.
1270 (Relocate_functions::rela32_check): New function.
1271 (Relocate_functions::pcrel32_check): New function.
1272 (Relocate_functions::pcrel32_unaligned_check): New function.
1273 (Relocate_functions::pcrela32_check): New function.
1274 (Bits::has_unsigned_overflow32): New function.
1275 (Bits::has_unsigned_overflow): New function.
1276 * testsuite/Makefile.am (overflow_unittest): New test.
1277 * testsuite/Makefile.in: Regenerate.
1278 * testsuite/overflow_unittest.cc: New source file.
1280 2016-02-04 Alan Modra <amodra@gmail.com>
1282 * powerpc.cc (relocate): Adjust last patch for big-endian.
1284 2016-02-02 Alan Modra <amodra@gmail.com>
1286 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
1288 2016-01-15 Han Shen <shenhan@google.com>
1290 PR gold/19472 - need pc-relative stubs.
1292 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
1293 stub type for DSOs and pie executables.
1295 2016-01-12 H.J. Lu <hongjiu.lu@intel.com>
1297 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
1300 2016-01-12 Cary Coutant <ccoutant@gmail.com>
1302 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
1303 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
1304 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
1305 specializations) New method.
1307 2016-01-11 Cary Coutant <ccoutant@gmail.com>
1310 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
1311 we have a TLS segment for GD-to-IE optimization.
1312 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
1314 (Target_i386::tls_desc_gd_to_ie): Likewise.
1315 (Target_i386::relocate_tls): Don't insist that we have a TLS segment
1316 for TLSDESC GD-to-IE optimizations.
1317 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
1319 (Target_x86_64::tls_desc_gd_to_ie): Likewise.
1320 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
1321 for TLSDESC GD-to-IE optimizations.
1323 2016-01-11 Cary Coutant <ccoutant@gmail.com>
1325 Refactor gold to enable support for MIPS-64 relocation format.
1327 * gc.h (get_embedded_addend_size): Remove sh_type parameter.
1328 (gc_process_relocs): Remove sh_type template parameter.
1329 Use Classify_reloc to access r_sym, r_type, and r_addend fields.
1330 * object.h (Sized_relobj_file::split_stack_adjust): Add target
1332 (Sized_relobj_file::split_stack_adjust_reltype): Likewise.
1333 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
1334 specializations) Remove.
1335 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
1336 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
1337 (Sized_relobj_file::emit_relocs_scan_reltype): Remove.
1338 (Sized_relobj_file::split_stack_adjust): Add target parameter.
1340 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
1341 Target::get_r_sym() to get r_sym field from relocations.
1342 (Track_relocs::next_symndx): Call Target::get_r_sym().
1343 * target-reloc.h (scan_relocs): Remove sh_type template parameter;
1344 add Classify_reloc template parameter. Use for accessing r_sym and
1346 (relocate_section): Likewise.
1347 (Default_classify_reloc): New class (renamed and moved from reloc.cc).
1348 (Default_scan_relocatable_relocs): Remove sh_type template parameter.
1349 (Default_scan_relocatable_relocs::Reltype): New typedef.
1350 (Default_scan_relocatable_relocs::reloc_size): New const.
1351 (Default_scan_relocatable_relocs::sh_type): New const.
1352 (Default_scan_relocatable_relocs::get_r_sym): New method.
1353 (Default_scan_relocatable_relocs::get_r_type): New method.
1354 (Default_emit_relocs_strategy): New class.
1355 (scan_relocatable_relocs): Replace sh_type template parameter with
1356 Scan_relocatable_relocs class. Use it to access r_sym and r_type
1358 (relocate_relocs): Replace sh_type template parameter with
1359 Classify_reloc class. Use it to access r_sym and r_type fields.
1360 * target.h (Target::is_call_to_non_split): Replace r_type parameter
1361 with pointer to relocation. Adjust all callers.
1362 (Target::do_is_call_to_non_split): Likewise.
1363 (Target::emit_relocs_scan): New virtual method.
1364 (Sized_target::get_r_sym): New virtual method.
1365 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
1366 with pointer to relocation.
1368 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
1369 (Target_aarch64::Relocatable_size_for_reloc): Remove.
1370 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
1371 (Target_aarch64::scan_relocs): Likewise.
1372 (Target_aarch64::relocate_section): Likewise.
1373 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
1375 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
1376 (Target_aarch64::relocate_relocs): Use Default_classify_reloc.
1377 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
1379 (Target_arm::emit_relocs_scan): New method.
1380 (Target_arm::Relocatable_size_for_reloc): Replace with...
1381 (Target_arm::Classify_reloc): ...this.
1382 (Target_arm::gc_process_relocs): Use Classify_reloc.
1383 (Target_arm::scan_relocs): Likewise.
1384 (Target_arm::relocate_section): Likewise.
1385 (Target_arm::scan_relocatable_relocs): Likewise.
1386 (Target_arm::relocate_relocs): Likewise.
1387 * i386.cc (Target_i386::emit_relocs_scan): New method.
1388 (Target_i386::Relocatable_size_for_reloc): Replace with...
1389 (Target_i386::Classify_reloc): ...this.
1390 (Target_i386::gc_process_relocs): Use Classify_reloc.
1391 (Target_i386::scan_relocs): Likewise.
1392 (Target_i386::relocate_section): Likewise.
1393 (Target_i386::scan_relocatable_relocs): Likewise.
1394 (Target_i386::relocate_relocs): Likewise.
1395 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
1397 (Mips_reloc_types): New class template.
1398 (Mips_classify_reloc): New class template.
1399 (Target_mips::Reltype): New typedef.
1400 (Target_mips::Relatype): New typedef.
1401 (Target_mips::emit_relocs_scan): New method.
1402 (Target_mips::get_r_sym): New method.
1403 (Target_mips::Relocatable_size_for_reloc): Replace with
1404 Mips_classify_reloc.
1405 (Target_mips::copy_reloc): Use Mips_classify_reloc.
1406 (Target_mips::gc_process_relocs): Likewise.
1407 (Target_mips::scan_relocs): Likewise.
1408 (Target_mips::relocate_section): Likewise.
1409 (Target_mips::scan_relocatable_relocs): Likewise.
1410 (Target_mips::relocate_relocs): Likewise.
1411 (mips_get_size_for_reloc): New function, factored out from
1412 Relocatable_size_for_reloc::get_size_for_reloc.
1413 (Target_mips::Scan::local): Use Mips_classify_reloc.
1414 (Target_mips::Scan::global): Likewise.
1415 (Target_mips::Relocate::relocate): Likewise.
1416 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
1417 (Target_powerpc::Relocatable_size_for_reloc): Remove.
1418 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
1419 (Target_powerpc::scan_relocs): Likewise.
1420 (Target_powerpc::relocate_section): Likewise.
1421 (Powerpc_scan_relocatable_reloc): Convert to class template.
1422 (Powerpc_scan_relocatable_reloc::Reltype): New typedef.
1423 (Powerpc_scan_relocatable_reloc::reloc_size): New const.
1424 (Powerpc_scan_relocatable_reloc::sh_type): New const.
1425 (Powerpc_scan_relocatable_reloc::get_r_sym): New method.
1426 (Powerpc_scan_relocatable_reloc::get_r_type): New method.
1427 (Target_powerpc::scan_relocatable_relocs): Use
1428 Powerpc_scan_relocatable_reloc.
1429 (Target_powerpc::relocate_relocs): Use Default_classify_reloc.
1430 * s390.cc (Target_s390::emit_relocs_scan): New method.
1431 (Target_s390::Relocatable_size_for_reloc): Remove.
1432 (Target_s390::gc_process_relocs): Use Default_classify_reloc.
1433 (Target_s390::scan_relocs): Likewise.
1434 (Target_s390::relocate_section): Likewise.
1435 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
1437 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
1438 (Target_s390::relocate_relocs): Use Default_classify_reloc.
1439 * sparc.cc (Target_sparc::emit_relocs_scan): New method.
1440 (Target_sparc::Relocatable_size_for_reloc): Remove.
1441 (Target_sparc::gc_process_relocs): Use Default_classify_reloc.
1442 (Target_sparc::scan_relocs): Likewise.
1443 (Target_sparc::relocate_section): Likewise.
1444 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
1446 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
1447 (Target_sparc::relocate_relocs): Use Default_classify_reloc.
1448 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
1449 (Target_tilegx::Relocatable_size_for_reloc): Remove.
1450 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
1451 (Target_tilegx::scan_relocs): Likewise.
1452 (Target_tilegx::relocate_section): Likewise.
1453 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
1455 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
1456 (Target_tilegx::relocate_relocs): Use Default_classify_reloc.
1457 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
1458 (Target_x86_64::Relocatable_size_for_reloc): Remove.
1459 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
1460 (Target_x86_64::scan_relocs): Likewise.
1461 (Target_x86_64::relocate_section): Likewise.
1462 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
1464 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
1465 (Target_x86_64::relocate_relocs): Use Default_classify_reloc.
1467 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
1469 2016-01-01 Alan Modra <amodra@gmail.com>
1471 Update year range in copyright notice of all files.
1473 For older changes see ChangeLog-0815
1475 Copyright (C) 2016 Free Software Foundation, Inc.
1477 Copying and distribution of this file, with or without modification,
1478 are permitted in any medium without royalty provided the copyright
1479 notice and this notice are preserved.
1485 version-control: never