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