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