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