1 2016-12-07 Alan Modra <amodra@gmail.com>
3 * powerpc.cc (Stub_table_owner): Provide constructor.
4 (Powerpc_relobj::set_stub_table): Resize fill with -1.
5 (Target_powerpc::Branch_info::make_stub): Provide target debug
6 output on returning false.
8 2016-12-05 Cary Coutant <ccoutant@gmail.com>
9 Tristan Gingold <gingold@adacore.com>
11 * object.cc (Sized_relobj_file::do_count_local_symbols): Check
12 is_ordinary before using shndx.
13 * testsuite/Makefile.am (file_in_many_sections_test.sh): New test case.
14 * testsuite/Makefile.in: Regenerate.
15 * testsuite/file_in_many_sections.c: New source file.
16 * testsuite/file_in_many_sections_test.sh: New script.
18 2016-12-01 Cary Coutant <ccoutant@gmail.com>
21 * script-sections.cc (Script_sections): Set *keep to false when
24 2016-12-01 Cary Coutant <ccoutant@gmail.com>
27 * target.h (Target::default_text_segment_address): Bump default
28 start address up to ABI page size.
30 2016-12-01 Cary Coutant <ccoutant@gmail.com>
33 * options.cc (General_options::object_format_to_string): New function.
34 (General_options::copy_from_posdep_options): New function.
35 (General_options::parse_push_state): New function.
36 (General_options::parse_pop_state): New function.
37 * options.h (--push-state, --pop-state): New options.
38 (General_options::object_format_to_string): New method.
39 (General_options::set_incremental_disposition): New method.
40 (General_options::copy_from_posdep_options): New method.
41 (General_options::options_stack_): New data member.
43 2016-12-01 Cary Coutant <ccoutant@gmail.com>
46 * aarch64.cc (Target_aarch64::scan_reloc_section_for_stubs): Handle
47 section symbols correctly.
48 * arm.cc (Target_arm): Likewise.
49 * powerpc.cc (Target_powerpc): Likewise.
51 2016-11-27 Ambrogino Modigliani <ambrogino.modigliani@gmail.com>
53 * aarch64-reloc.def: Fix spelling in comments.
55 2016-11-27 Ambrogino Modigliani <ambrogino.modigliani@gmail.com>
57 * aarch64.cc: Fix spelling in comments.
58 * arm.cc: Fix spelling in comments.
59 * icf.cc: Fix spelling in comments.
60 * layout.cc: Fix spelling in comments.
61 * layout.h: Fix spelling in comments.
62 * mips.cc: Fix spelling in comments.
63 * output.h: Fix spelling in comments.
64 * plugin.h: Fix spelling in comments.
65 * script-sections.h: Fix spelling in comments.
66 * script.h: Fix spelling in comments.
67 * stringpool.h: Fix spelling in comments.
68 * tilegx.cc: Fix spelling in comments.
70 2016-11-22 Cary Coutant <ccoutant@gmail.com>
73 * options.cc (One_option::print): Print "(default)" when appropriate.
74 * options.h: Clean up and re-sort options.
75 (One_option::is_default): New data member.
76 (One_option::One_option): Add is_default parameter; adjust all calls.
77 (DEFINE_var): Add is_default__ parameter; adjust all calls.
78 (DEFINE_bool): Set is_default based on default_value__.
79 (DEFINE_bool_ignore): New macro.
80 (--no-eh-frame-hdr): New option.
81 (--enable-new-dtags): Remove mention of DT_FLAGS.
83 2016-11-22 Ambrogino Modigliani <ambrogino.modigliani@gmail.com>
85 * configure: Regenerate.
87 2016-11-21 Cary Coutant <ccoutant@gmail.com>
90 * gold.cc (queue_middle_tasks): Force valid target earlier.
92 2016-11-21 Igor Kudrin <ikudrin@accesssoftek.com>
94 * layout.cc: Include windows.h and rpcdce.h (for MinGW32).
95 (Layout::create_build_id): Generate uuid using UuidCreate().
97 2016-11-04 Loïc Yhuel <loic.yhuel@softathome.com>
99 * configure.ac: add missing '$'.
100 * configure: Regenerate.
102 2016-10-21 Gergely Nagy <ngg@tresorit.com>
105 * icf.cc (match_sections): Add new parameter section_addraligns.
106 Check section alignment and keep the section with the strictest
108 (find_identical_sections): New local variable section_addraligns.
109 Store each section's alignment.
110 * testsuite/pr17704a_test.s: New file.
111 * testsuite/Makefile.am (pr17704a_test): New test.
112 * testsuite/Makefile.in: Regenerate.
114 2016-10-06 Alan Modra <amodra@gmail.com>
116 * powerpc.cc (Target_powerpc::Relocate::relocate): Add fall
118 * tilegx.cc (Target_tilegx::Relocate::relocate): Likewise.
120 2016-10-06 Alan Modra <amodra@gmail.com>
122 * aarch64.cc: Spell fall through comments as "// Fall through.".
125 * powerpc.cc: Likewise.
127 * sparc.cc: Likewise.
128 * x86_64.cc: Likewise.
129 * powerpc.cc (Target_powerpc::Relocate::relocate): Add missing
130 fall through comments.
131 * sparc.cc: (Target_sparc::Scan::global): Likewise.
132 (Target_sparc::Relocate::relocate): Likewise.
133 * tilegx.cc (Target_tilegx::Relocate::relocate): Likewise.
134 * resolve.cc (symbol_to_bits): Add missing break.
136 2016-09-26 Cary Coutant <ccoutant@gmail.com>
139 * symtab.cc (Symbol_table::define_default_version): Check that
140 unversioned symbol is defined.
142 2016-09-26 Vlad Zakharov <vzakhar@synopsys.com>
144 * Makefile.in: Regenerate.
145 * configure: Likewise.
146 * testsuite/Makefile.in: Likewise.
148 2016-09-26 Alan Modra <amodra@gmail.com>
150 * aarch64.cc (Target_aarch64::is_erratum_835769_sequence): Avoid
152 * output.cc (Output_segment::set_section_addresses): Likewise.
153 * testsuite/Makefile.in: Regenerate.
155 2016-09-02 Doug Kwan <dougkwan@google.com>
157 * arm.cc (Target_arm::Target_arm): Move method definition outside of
158 class definition. Add code to handle --target1-rel, --target1-abs
159 and --target2= options.
160 (Target_arm::get_reloc_reloc_type): Change method to be non-static
162 (Target_arm::target1_is_rel_, Target_arm::target2_reloc_): New data
164 (Target_arm::Scan::local, Target_arm::Scan::global,
165 Target_arm::Relocate::relocate,
166 Target_arm::Relocatable_size_for_reloc::get_size_for_reloc): Adjust
167 call to Target_arm::get_real_reloc_type.
168 (Target_arm::get_real_reloc_type): Use command line options to
169 determine real types of R_ARM_TARGET1 and R_ARM_TARGET2.
170 * options.h (--target1-rel, --target1-abs, --target2): New ARM-only
173 2016-08-31 Alan Modra <amodra@gmail.com>
175 * powerpc.cc (class Stub_control): Delete stub14_group_size_
176 and has14_. Add group_size_.
177 (Stub_control::can_add_to_stub_group): Adjust to suit. Print
178 debug info when switching to adding sections before stubs.
180 2016-08-31 Alan Modra <amodra@gmail.com>
182 * debug.h (DEBUG_TARGET): New.
183 (DEBUG_ALL): Add DEBUG_TARGET.
184 (gold_debug): Delete FORMAT param.
185 * powerpc.cc (Stub_control::can_add_to_stub_group): Print debug ourput.
187 2016-08-30 Alan Modra <amodra@gmail.com>
190 * powerpc.cc (class Stub_control): Add has14_. Comment owner_.
191 (Stub_control::can_add_to_stub_group): Correct grouping of
192 sections containing 14-bit external branches. When returning
193 false, set state_ to reflect the fact that we have one section
194 for the next group. Rewrite most of function for clarity.
195 Add and expand comments.
196 (Target_powerpc::do_relax): Print stub group size retry in hex.
198 2016-08-26 Han Shen <shenhan@google.com>
200 PR gold/20529 - relaxing loop never ends.
202 * powerpc.cc (Stub_table::min_size_threshold_): New member to
204 (Stub_table::set_min_size_threshold): New member function.
205 (Stub_table::set_address_and_size): Add code to only allow size
207 (Target_powerpc::do_relax): Add code to record last size.
209 2016-08-23 Roland McGrath <roland@hack.frob.com>
211 * options.h (General_options): Grok -z stack-size.
212 * output.h (Output_segment::set_size): New method.
213 * layout.cc (Layout::create_executable_stack_info): Renamed to ...
214 (Layout::create_stack_segment): ... this. Always create the
215 segment if -z stack-size was used.
216 (Layout::set_segment_offsets): Don't call ->set_offset on the
217 PT_GNU_STACK segment.
219 2016-08-15 Bharathi Seshadri <bseshadr@cisco.com>
221 * options.h (General_options): Add --be8 option.
222 * arm.cc (Arm_relobj::do_relocate_sections): Add code to swap for be8.
223 (Output_data_plt_arm_standard::do_fill_first_plt_entry): Likewise.
224 (Output_data_plt_arm_short::do_fill_plt_entry): Likewise.
225 (Output_data_plt_arm_long::do_fill_plt_entry): Likewise.
226 (Target_arm::do_adjust_elf_header): Do EF_ARM_BE8 adjustment.
228 2016-08-17 Cary Coutant <ccoutant@gmail.com>
230 * i386.cc (Target_i386): Reset skip_call_tls_get_addr_ after printing
232 * testsuite/Makefile.am (pr20216a): Add missing dependencies.
233 (pr20308a): Add -Bgcctestdir/ to compile rules.
234 * testsuite/Makefile.in: Regenerate.
236 2016-08-12 Roland McGrath <roland@hack.frob.com>
239 * script-sections.cc (Script_sections::release_segments):
240 Reset this->segments_created_.
242 2016-08-12 Roland McGrath <roland@hack.frob.com>
244 * yyscript.y (HIDDEN): New %token.
245 (assignment): Handle HIDDEN(string = expr) syntax.
246 * script.cc (script_keyword_parsecodes): Add HIDDEN.
248 2016-08-10 Cary Coutant <ccoutant@gmail.com>
251 * x86_64.cc (Target_x86_64::Relocate::relocate): Add check for
252 R_X86_64_GOTPCREL. Reset skip_call_tls_get_addr_ after printing
254 * testsuite/Makefile.am (pr20216_gd.o): Add -Bgcctestdir/.
255 (pr20216_ld.o): Likewise.
256 * testsuite/Makefile.in: Regenerate.
258 2016-08-10 James Clarke <jrtc27@jrtc27.com>
261 * symtab.cc (Symbol_table::add_from_relobj): Handle NULL symbols,
262 which will be present for STT_SPARC_REGISTER.
263 (Symbol_table::add_from_pluginobj): Likewise.
264 (Symbol_table::add_from_dynobj): Likewise.
265 (Symbol_table::add_from_incrobj): Removed dead code.
267 2016-08-10 James Clarke <jrtc27@jrtc27.com>
270 * sparc.cc (Target_sparc::Relocate::relocate): R_SPARC_GOTDATA_OP_LOX10
271 should fall back on R_SPARC_GOT10, not R_SPARC_GOT13.
273 2016-08-10 James Clarke <jrtc27@jrtc27.com>
276 * sparc.cc (Target_sparc::Scan::check_non_pic): Allow R_SPARC_32 on
279 2016-06-29 Cary Coutant <ccoutant@gmail.com>
282 * testsuite/dynamic_list.sh: Remove check for _ZdlPv.
284 2016-06-29 Cary Coutant <ccoutant@gmail.com>
286 * testsuite/Makefile.am (MOSTLYCLEANFILES): Add eh_test_2.
287 * testsuite/Makefile.in: Regenerate.
289 2016-06-30 Alan Modra <amodra@gmail.com>
291 * testsuite/Makefile.am (memory_test, memory_test_2): Pass
292 -Wl,-z to gcc, not plain -z.
293 * testsuite/Makefile.in: Regenerate.
295 2016-06-29 H.J. Lu <hongjiu.lu@intel.com>
298 * i386.cc (Target_i386::Relocate::relocate): Allow
299 R_386_GOT32X relocation against ___tls_get_addr.
300 (Target_i386::Relocate::tls_gd_to_ie): Support indirect
301 call to __tls_get_addr.
302 (Target_i386::Relocate::tls_gd_to_le): Likewise.
303 (Target_i386::Relocate::tls_ld_to_le): Likewise.
304 * testsuite/Makefile.am (check_PROGRAMS): Add pr20308a_test,
305 pr20308b_test, pr20308c_test, pr20308d_test, pr20308e_test.
306 (pr20308a_test_SOURCES): New.
307 (pr20308a_test_DEPENDENCIES): Likewise.
308 (pr20308a_test_CFLAGS): Likewise.
309 (pr20308a_test_LDFLAGS): Likewise.
310 (pr20308a_test_LDADD): Likewise.
311 (pr20308b_test_SOURCES): Likewise.
312 (pr20308b_test_DEPENDENCIES): Likewise.
313 (pr20308b_test_CFLAGS): Likewise.
314 (pr20308b_test_LDFLAGS): Likewise.
315 (pr20308b_test_LDADD): Likewise.
316 (pr20308c_test_SOURCES): Likewise.
317 (pr20308c_test_DEPENDENCIES): Likewise.
318 (pr20308c_test_CFLAGS): Likewise.
319 (pr20308c_test_LDFLAGS): Likewise.
320 (pr20308c_test_LDADD): Likewise.
321 (pr20308d_test_SOURCES): Likewise.
322 (pr20308d_test_DEPENDENCIES): Likewise.
323 (pr20308d_test_CFLAGS): Likewise.
324 (pr20308d_test_LDFLAGS): Likewise.
325 (pr20308d_test_LDADD): Likewise.
326 (pr20308e_test_SOURCES): Likewise.
327 (pr20308e_test_DEPENDENCIES): Likewise.
328 (pr20308e_test_CFLAGS): Likewise.
329 (pr20308e_test_LDFLAGS): Likewise.
330 (pr20308e_test_LDADD): Likewise.
331 (pr20308a.so): Likewise.
332 (pr20308b.so): Likewise.
333 (pr20308_gd.o): Likewise.
334 (pr20308_ld.o): Likewise.
335 (MOSTLYCLEANFILES): Add pr20308a.so pr20308b.so.
336 * testsuite/Makefile.in: Regenerated.
337 * testsuite/pr20308_def.c: New file.
338 * testsuite/pr20308_gd.S: Likewise.
339 * testsuite/pr20308_ld.S: Likewise.
340 * testsuite/pr20308_main.c: Likewise.
342 2016-06-29 H.J. Lu <hongjiu.lu@intel.com>
345 * configure.ac (DEFAULT_TARGET_X86_64_OR_X32): New
347 * configure: Regenerated.
348 * x86_64.cc (Target_x86_64<size>::Relocate::relocate): Allow
349 R_X86_64_GOTPCRELX relocation against __tls_get_addr.
350 (Target_x86_64<size>::Relocate::tls_gd_to_ie): Support indirect
351 call to __tls_get_addr.
352 (Target_x86_64<size>::Relocate::tls_gd_to_le): Likewise.
353 (Target_x86_64<size>::Relocate::tls_ld_to_le): Likewise.
354 * testsuite/Makefile.am (check_PROGRAMS): Add pr20216a_test,
355 pr20216b_test, pr20216c_test, pr20216d_test, pr20216e_test.
356 (pr20216a_test_SOURCES): New.
357 (pr20216a_test_DEPENDENCIES): Likewise.
358 (pr20216a_test_CFLAGS): Likewise.
359 (pr20216a_test_LDFLAGS): Likewise.
360 (pr20216a_test_LDADD): Likewise.
361 (pr20216b_test_SOURCES): Likewise.
362 (pr20216b_test_DEPENDENCIES): Likewise.
363 (pr20216b_test_CFLAGS): Likewise.
364 (pr20216b_test_LDFLAGS): Likewise.
365 (pr20216b_test_LDADD): Likewise.
366 (pr20216c_test_SOURCES): Likewise.
367 (pr20216c_test_DEPENDENCIES): Likewise.
368 (pr20216c_test_CFLAGS): Likewise.
369 (pr20216c_test_LDFLAGS): Likewise.
370 (pr20216c_test_LDADD): Likewise.
371 (pr20216d_test_SOURCES): Likewise.
372 (pr20216d_test_DEPENDENCIES): Likewise.
373 (pr20216d_test_CFLAGS): Likewise.
374 (pr20216d_test_LDFLAGS): Likewise.
375 (pr20216d_test_LDADD): Likewise.
376 (pr20216e_test_SOURCES): Likewise.
377 (pr20216e_test_DEPENDENCIES): Likewise.
378 (pr20216e_test_CFLAGS): Likewise.
379 (pr20216e_test_LDFLAGS): Likewise.
380 (pr20216e_test_LDADD): Likewise.
381 (pr20216a.so): Likewise.
382 (pr20216b.so): Likewise.
383 (pr20216_gd.o): Likewise.
384 (pr20216_ld.o): Likewise.
385 (MOSTLYCLEANFILES): Add pr20216a.so pr20216b.so.
386 * testsuite/Makefile.in: Regenerated.
387 * testsuite/pr20216_def.c: New file.
388 * testsuite/pr20216_gd.S: Likewise.
389 * testsuite/pr20216_ld.S: Likewise.
390 * testsuite/pr20216_main.c: Likewise.
392 2016-06-29 Alan Modra <amodra@gmail.com>
394 * script_test_12.t: Delete .plt, specify 64k page size.
395 * script_test_12i.t: Likewise.
397 2016-06-29 Alan Modra <amodra@gmail.com>
399 * testsuite/plugin_layout_with_alignment.c: Explicitly align all
402 2016-06-29 Alan Modra <amodra@gmail.com>
404 * testsuite/Makefile.am (copy_test_protected): Disable for powerpc.
405 * testsuite/Makefile.in: Regenerate.
407 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
409 * aarch64-reloc.def (NONE): New relocation.
410 * aarch64.cc (Target_aarch64::Scan::local): Handle R_AARCH64_NONE.
411 (Target_aarch64::Scan::global): Likewise.
412 * testsuite/Makefile.am (aarch64_reloc_none): New test.
413 * testsuite/Makefile.in: Regenerate.
414 * testsuite/aarch64_reloc_none.s: New test source file.
415 * testsuite/aarch64_reloc_none.sh: New test script.
417 2016-06-28 Sriraman Tallam <tmsriram@google.com>
419 * x86_64.cc (Lazy_view): New class.
420 (can_convert_mov_to_lea): Templatize function. Make the function
421 check for appropriate relocation types and use the view parameter
422 to get section contents.
423 (can_convert_callq_to_direct): New function.
424 (Target_x86_64<size>::Scan::global): Refactor.
425 (Target_x86_64<size>::Relocate::relocate): Refactor. Change any indirect
426 call via GOT that can be converted.
427 * testsuite/Makefile.am (x86_64_indirect_call_to_direct.sh): New test.
428 * testsuite/Makefile.in: Regenerate.
429 * testsuite/x86_64_indirect_call_to_direct1.s: New file.
430 * testsuite/x86_64_indirect_jump_to_direct1.s: New file.
432 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
434 * aarch64.cc (Target_aarch64::Scan::local): Move the call to got_section
435 from the top level to the places of its use.
437 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
440 * script-c.h (Sort_wildcard): Add SORT_WILDCARD_BY_INIT_PRIORITY.
441 * script-sections.cc (Input_section_sorter::get_init_priority): New method.
442 (Input_section_sorter::operator()): Handle SORT_WILDCARD_BY_INIT_PRIORITY.
443 (Output_section_element_input::print): Likewise.
444 * script.cc (script_keyword_parsecodes): Add entry SORT_BY_INIT_PRIORITY.
445 * yyscript.y (SORT_BY_INIT_PRIORITY): New token.
446 (wildcard_section): Handle SORT_BY_INIT_PRIORITY.
448 * testsuite/Makefile.am (script_test_14): New test.
449 * testsuite/Makefile.in: Regenerate.
450 * testsuite/script_test_14.s: New test source file.
451 * testsuite/script_test_14.sh: New test script.
452 * testsuite/script_test_14.t: New test linker script.
454 2016-06-28 James Clarke <jrtc27@jrtc27.com>
456 * sparc.cc (Target_sparc::Scan::local): Don't convert R_SPARC_32
457 to R_SPARC_RELATIVE if class is ELFCLASS64.
458 (Target_sparc::Scan::global): Likewise.
460 2016-06-23 Cary Coutant <ccoutant@gmail.com>
461 Igor Kudrin <ikudrin@accesssoftek.com>
465 (Output_section_element_input::set_section_addresses): Keep bin_count
466 separate from input_pattern_count.
467 * testsuite/script_test_12.t: Add another section .x4.
468 * testsuite/script_test_12i.t: Likewise.
469 * testsuite/script_test_12a.c: Likewise.
470 * testsuite/script_test_12b.c: Likewise.
472 2016-06-23 Igor Kudrin <ikudrin@accesssoftek.com>
474 * gold-threads.cc (impl_threads::Lock_impl_threads): Fix typos.
476 2016-06-22 H.J. Lu <hongjiu.lu@intel.com>
479 * NEWS: Mention --enable-relro.
480 * configure.ac: Add --enable-relro.
481 (DEFAULT_LD_Z_RELRO): New. Set by --enable-relro and default
483 * config.in: Regenerated.
484 * configure: Likewise.
485 * options.h (General_options::relro): Default to
488 2016-06-20 Cary Coutant <ccoutant@gmail.com>
490 * NEWS: Add new features in 1.12.
491 * version.cc (version_string): Bump to 1.12.
493 2016-06-20 H.J. Lu <hongjiu.lu@intel.com>
496 * i386.cc (Target_i386::first_plt_entry_offset): Return 0 if
498 (Target_i386::plt_entry_size): Likewise.
499 (Target_x86_64<size>::first_plt_entry_offset): Likewise.
500 (Target_x86_64<size>::plt_entry_size): Likewise.
502 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
504 * mips.cc (Target_mips::Target_mips): Initialize rld_map_.
505 (Target_mips::rld_map_): New data member.
506 (Target_mips::do_finalize_sections): Add support for
507 DT_MIPS_RLD_MAP and DT_MIPS_RLD_MAP_REL dynamic tags,
508 .rld_map section, and __RLD_MAP symbol.
509 (Target_mips::do_dynamic_tag_custom_value): Add support for
510 DT_MIPS_RLD_MAP_REL dynamic tag.
511 * output.cc (Output_data_dynamic::get_entry_offset): New method
513 * output.h (Output_data_dynamic::get_entry_offset): New method
516 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
518 * mips.cc (Mips_relocate_functions::relpc16): Add unaligned check.
520 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
522 * mips.cc (relocation_needs_la25_stub): Add support for relocs:
523 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
524 (hi16_reloc): Add support for R_MIPS_PCHI16 relocation.
525 (is_matching_lo16_reloc): Likewise.
526 (lo16_reloc): Add support for R_MIPS_PCLO16 relocation.
527 (Mips_output_data_plt::plt_entry_r6): New static data member for
529 (Target_mips::is_output_r6): New method.
530 (Target_mips::Mips_mach): Add new enum constants.
531 (Mips_relocate_functions::Status): Likewise.
532 (Mips_relocate_functions::pchi16_relocs): New static data member.
533 (Mips_relocate_functions::relpc21): New method.
534 (Mips_relocate_functions::relpc26): Likewise.
535 (Mips_relocate_functions::relpc18): Likewise.
536 (Mips_relocate_functions::relpc19): Likewise.
537 (Mips_relocate_functions::relpchi16): Likewise.
538 (Mips_relocate_functions::do_relpchi16): Likewise.
539 (Mips_relocate_functions::relpclo16): Likewise.
540 (Mips_output_data_plt::do_write): Add support for Mips r6 plt
542 (Target_mips::mips_32bit_flags): Add E_MIPS_ARCH_32R6 support.
543 (Target_mips::elf_mips_mach): Add E_MIPS_ARCH_32R6 and
544 E_MIPS_ARCH_64R6 support.
545 (Target_mips::update_abiflags_isa): Likewise.
546 (mips_get_size_for_reloc): Add support for relocs: R_MIPS_PCHI16,
547 R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3 and
549 (Target_mips::Scan::local): Add support for relocs: R_MIPS_PCHI16
551 (Target_mips::Scan::global): Add support for relocs:
552 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
553 (Target_mips::Relocate::relocate): Call functions for resolving
554 Mips32r6 and Mips64r6 relocations, and print error message for
555 STATUS_PCREL_UNALIGNED.
556 (Target_mips::Scan::get_reference_flags): Add support for relocs:
557 R_MIPS_PCHI16, R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2,
558 R_MIPS_PC18_S3 and R_MIPS_PC19_S2.
559 (Target_mips::elf_mips_mach_name): Add E_MIPS_ARCH_32R6 and
560 E_MIPS_ARCH_64R6 support.
562 2016-06-13 H.J. Lu <hongjiu.lu@intel.com>
565 * testsuite/script_test_2.t: Add .got.plt after .got.
567 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
569 * mips.cc (struct Mips_abiflags): New struct.
570 (Mips_relobj::Mips_relobj): Initialize attributes_section_data_
572 (Mips_relobj::~Mips_relobj): Delete object pointed by
573 attributes_section_data_.
574 (Mips_relobj::abiflags): New method.
575 (Mips_relobj::attributes_section_data): Likewise.
576 (Mips_relobj::attributes_section_data_): New data member.
577 (Mips_relobj::abiflags_): Likewise.
578 (class Mips_output_section_abiflags): New class.
579 (Target_mips::Target_mips): Initialize attributes_section_data_,
580 abiflags_ and has_abiflags_section_.
581 (Target_mips::do_should_include_section): Don't emit input
582 .MIPS.abiflags sections to output .MIPS.abiflags.
583 (Target_mips::Mips_mach): Add new enum constants.
584 (Target_mips::mips_isa_ext_mach): New method.
585 (Target_mips::mips_isa_ext): Likewise.
586 (Target_mips::update_abiflags_isa): Likewise.
587 (Target_mips::infer_abiflags): Likewise.
588 (Target_mips::create_abiflags): Likewise.
589 (Target_mips::fp_abi_string): Likewise.
590 (Target_mips::select_fp_abi): Likewise.
591 (Target_mips::merge_obj_attributes): Likewise.
592 (Target_mips::merge_obj_abiflags): Likewise.
593 (Target_mips::level_rev): Likewise.
594 (Target_mips::merge_obj_e_flags): Rename from
595 merge_processor_specific_flags. Remove dyn_obj argument,
596 call update_abiflags_isa when needed, compare NaN encodings and
598 (Target_mips::add_machine_extensions): Add two machine extensions
600 (Target_mips::attributes_section_data_): New data member.
601 (Target_mips::abiflags_): Likewise.
602 (Target_mips::has_abiflags_section_): Likewise.
603 (Mips_relobj::do_read_symbols): Read .gnu.attributes and
604 .MIPS.abiflags sections if they exists.
605 (Target_mips::elf_mips_mach): Add E_MIPS_MACH_5900 and
606 E_MIPS_MACH_OCTEON3 support.
607 (Target_mips::do_adjust_elf_header): Setup EI_ABIVERSION flag.
608 (Target_mips::do_finalize_sections): Merge .gnu.attributes and
609 .MIPS.abiflags sections from input. Create these sections if
611 (Target_mips::elf_mips_mach_name): Add E_MIPS_MACH_5900 and
612 E_MIPS_MACH_OCTEON3 support, and change strings for
613 E_MIPS_MACH_LS2E, E_MIPS_MACH_LS2F and E_MIPS_MACH_LS3A just
616 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
618 * mips.cc (Mips_relobj::Mips_relobj): Initialize
619 has_reginfo_section_.
620 (Mips_relobj::has_reginfo_section_): New data member.
621 (Mips_relobj::has_reginfo_section): New method.
622 (class Mips_output_section_reginfo): Change base class to
623 Output_section_data, and set masks of the output .reginfo section
625 (Mips_output_section_reginfo::as_mips_output_section_reginfo):
627 (Mips_output_section_reginfo::set_masks): Likewise.
628 (Mips_output_section_reginfo::set_final_data_size): Likewise.
629 (Mips_output_section_reginfo::do_print_to_mapfile): New method.
630 (Target_mips::do_make_output_section): Remove.
631 (Mips_relobj::do_read_symbols): Set has_reginfo_section_ to true
632 if the object contains a .reginfo section.
633 (Target_mips::do_finalize_sections): Create a .reginfo output
636 2016-06-09 Artemiy Volkov <artemiyv@acm.org>
638 * mips.cc (Mips_output_data_got::do_write): Add missing template
641 2016-05-30 Marcin Kościelnicki <koriakin@0x04.net>
644 * s390.cc (Target_s390::ss_code_st_r14): Removed.
645 (Target_s390::ss_code_l_r14): Removed.
646 (Target_s390::ss_code_ear): Removed.
647 (Target_s390::ss_code_c): Removed.
648 (Target_s390::ss_match_st_r14): New function.
649 (Target_s390::ss_match_l_r14): New function.
650 (Target_s390::ss_match_mcount): Call ss_match_{l,st}_r14 instead
651 of matching code directly.
652 (Target_s390::ss_match_ear): New function.
653 (Target_s390::ss_match_c): New function.
654 (Target_s390::do_calls_non_split): Call ss_match_{ear,c} instead
655 of matching code directly.
657 2016-05-19 Cary Coutant <ccoutant@gmail.com>
660 * copy-relocs.cc (Copy_relocs::make_copy_reloc): Add object
661 parameter; check for protected symbol.
662 * copy-relocs.h (Copy_relocs::make_copy_reloc): Add object parameter.
663 * mips.cc (Mips_copy_relocs): Adjust call to make_copy_reloc.
664 * symtab.cc (Symbol::init_fields): Initialize is_protected_.
665 (Symbol_table::add_from_dynobj): Mark protected symbols.
666 * symtab.h (Symbol::is_protected): New method.
667 (Symbol::set_is_protected): New method.
668 (Symbol::is_protected_): New data member.
670 * testsuite/Makefile.am (copy_test_protected): New test.
671 * testsuite/Makefile.in: Regenerate.
672 * testsuite/copy_test.cc (main): Add legal reference to protected
674 * testsuite/copy_test_v1.cc (main): Likewise.
675 * testsuite/copy_test_2.cc (ip): Add protected symbol.
676 * testsuite/copy_test_protected.cc: New test source file.
677 * testsuite/copy_test_protected.sh: New test script.
679 2016-05-19 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
681 * mips.cc (Mips_got_entry::Mips_got_entry): Remove object argument
682 for global got symbols, and set addend to 0.
683 (Mips_got_entry::hash): Change hash algorithm.
684 (Mips_got_entry::equals): Refactor.
685 (Mips_got_entry::object): Return input object for local got symbols
687 (Mips_got_entry::addend): Change return of the relocation addend.
688 (Mips_got_entry::addend_): Move from union d.
689 (Mips_got_entry::object_): Move into union d.
690 (class Mips_symbol_hash): New class.
691 (Mips_got_info::Global_got_entry_set): New type.
692 (Mips_got_info::global_got_symbols): Change return type to
693 Global_got_entry_set.
694 (Mips_got_info::global_got_symbols_): Change type to
695 Global_got_entry_set.
696 (Mips_symbol::hash): New method.
697 (Mips_output_data_la25_stub::symbols_): Change type to std::vector.
698 (Mips_output_data_mips_stubs::Mips_stubs_entry_set): New type.
699 (Mips_output_data_mips_stubs::symbols_): Change type to
700 Mips_stubs_entry_set.
701 (Mips_got_info::record_global_got_symbol): Don't pass object
702 argument when creating global got symbol.
703 (Mips_got_info::record_got_entry): Remove find before inserting
705 (Mips_got_info::add_reloc_only_entries): Change type of iterator
706 to Global_got_entry_set.
707 (Mips_got_info::count_got_symbols): Likewise.
708 (Mips_output_data_la25_stub::create_la25_stub): Use push_back
709 for adding entries to symbols_.
710 (Mips_output_data_la25_stub::do_write): Change type of iterator
712 (Mips_output_data_mips_stubs::set_lazy_stub_offsets): Change type
713 of iterator to Mips_stubs_entry_set.
714 (Mips_output_data_mips_stubs::set_needs_dynsym_value): Likewise.
715 (Mips_output_data_mips_stubs::do_write): Likewise.
717 2016-05-06 Han Shen <shenhan@google.com>
721 * aarch64-reloc.def: New relocation type.
722 * aarch64.cc (AArch64_relocate_functions::Page): Changed to public.
723 (Target_aarch64::Scan::local): Add R_AARCH64_LD64_GOTPAGE_LO15.
724 (Target_aarch64::Scan::global): Add R_AARCH64_LD64_GOTPAGE_LO15.
725 (Target_aarch64::Relocate::relocate): Implement R_AARCH64_LD64_GOTPAGE_LO15.
727 2016-04-28 Nick Clifton <nickc@redhat.com>
729 * po/zh_CN.po: Updated Chinese (simplified) translation.
731 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
733 * Makefile.in: Regenerated with automake 1.11.6.
734 * aclocal.m4: Likewise.
735 * testsuite/Makefile.in: Likewise.
737 2016-03-30 Cary Coutant <ccoutant@gmail.com>
740 * symtab.cc (Symbol_table::define_default_version): Check for case
741 where symbols are both in different shared objects.
743 2016-03-27 Cary Coutant <ccoutant@gmail.com>
746 * i386.cc (Target_i386): Add check for fully-resolved symbol for
749 2016-03-22 Nick Clifton <nickc@redhat.com>
751 * configure: Regenerate.
753 2016-03-21 Cary Coutant <ccoutant@gmail.com>
756 * errors.cc (Errors::undefined_symbol): Add info message when
757 symbol should have been provided by a plugin.
758 * target-reloc.h (issue_undefined_symbol_error): Check for
759 placeholder symbols defined in discarded sections.
760 * testsuite/Makefile.am (plugin_test_9b): New test case.
761 * testsuite/Makefile.in: Regenerate.
762 * testsuite/plugin_test_9b_elf.cc: New test source file.
763 * testsuite/plugin_test_9b_ir.cc: New test source file.
765 2016-03-20 Cary Coutant <ccoutant@gmail.com>
768 * ehframe.cc (Eh_frame::read_fde): Check for dropped functions.
769 * testsuite/Makefile.am (eh_test_2): New test.
770 * testsuite/Makefile.in: Regenerate.
771 * testsuite/eh_test_2.sh: New test script.
772 * testsuite/eh_test_a.cc (bar): Make it comdat.
773 * testsuite/eh_test_b.cc (bar): Add a duplicate copy.
775 2016-03-18 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
777 * mips.cc (Mips_relobj::is_n64_): Remove.
778 (Target_mips::ei_class_): Likewise.
779 (Mips_relobj::is_newabi): Call methods.
780 (Mips_relobj::is_n64): Change checking for N64 ABI.
781 (Target_mips::is_output_n64): Likewise.
782 (Target_mips::merge_processor_specific_flags): Remove ei_class
783 argument, and remove comparing ei_class.
784 (Target_mips::do_adjust_elf_header): Remove setting EI_CLASS field
786 (Target_mips::do_finalize_sections): Don't pass ei_class argument
787 to merge_processor_specific_flags.
788 (Target_mips::elf_mips_abi_name): Remove ei_class argument, and
789 change checking for N64 ABI.
791 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
793 * mips.cc (enum Special_relocation_symbol): New enum type.
794 (is_readonly_section): New function.
795 (eh_reloc): Likewise.
796 (Mips_got_entry::is_section_symbol_): New member.
797 (Mips_got_entry::is_section_symbol): New method.
798 (Mips_got_info::record_local_got_symbol): Add is_section_symbol
800 (Mips_relobj::mips_elf_options_section_name): New method.
801 (Mips_output_data_got::record_local_got_symbol): Add
802 is_section_symbol argument, and pass it to
803 Mips_got_info::record_local_got_symbol.
804 (Mips_output_data_got::got_offset): Add addend argument, and pass
805 it to Relobj::local_got_offset.
806 (struct Mips_output_reloc_writer): New type.
807 (class Mips_output_data_reloc): New class.
808 (Mips_output_data_plt::Reloc_section): Change type to
809 Mips_output_data_reloc.
810 (Target_mips::Reloc_section): Likewise.
811 (Mips_reloc_types::get_r_addend): Remove unsigned from return type.
812 (Mips_classify_reloc::get_r_type2): New method.
813 (Mips_classify_reloc::get_r_type3): Likewise.
814 (Mips_classify_reloc::get_r_ssym): Likewise.
815 (Target_mips::Reloca_section): Remove.
816 (Relocate::should_apply_static_reloc): Rename from
817 should_apply_r_mips_32_reloc.
818 (Target_mips::copy_reloc): Replace Reltype parameter with r_type
820 (Mips_relocate_functions::Valtype): New type.
821 (Mips_relocate_functions::Valtype64): New type.
822 (Mips_relocate_functions::check_overflow): New method.
823 (Mips_relocate_functions::mips_reloc_unshuffle): Move to public
825 (Mips_relocate_functions::mips_reloc_shuffle): Likewise.
826 (Mips_relocate_functions::rel16): Add support for resolving
827 relocations for Mips64.
828 (Mips_relocate_functions::rel32): Likewise.
829 (Mips_relocate_functions::reljalr): Likewise.
830 (Mips_relocate_functions::relpc32): Likewise.
831 (Mips_relocate_functions::rel26): Likewise.
832 (Mips_relocate_functions::relpc16): Likewise.
833 (Mips_relocate_functions::relmicromips_pc7_s1): Likewise.
834 (Mips_relocate_functions::relmicromips_pc10_s1): Likewise.
835 (Mips_relocate_functions::relmicromips_pc16_s1): Likewise.
836 (Mips_relocate_functions::do_relhi16): Likewise.
837 (Mips_relocate_functions::do_relgot16_local): Likewise.
838 (Mips_relocate_functions::rello16): Likewise.
839 (Mips_relocate_functions::relgot): Likewise.
840 (Mips_relocate_functions::relgotpage): Likewise.
841 (Mips_relocate_functions::relgotofst): Likewise.
842 (Mips_relocate_functions::relgot_hi16): Likewise.
843 (Mips_relocate_functions::relgot_lo16): Likewise.
844 (Mips_relocate_functions::relgprel): Likewise.
845 (Mips_relocate_functions::relgprel32): Likewise.
846 (Mips_relocate_functions::tlsrelhi16): Likewise.
847 (Mips_relocate_functions::tlsrello16): Likewise.
848 (Mips_relocate_functions::tlsrel32): Likewise.
849 (Mips_relocate_functions::relsub): Likewise.
850 (Mips_relocate_functions::releh): New method.
851 (Mips_relocate_functions::rel64): Likewise.
852 (Mips_got_info::record_local_got_symbol): Add is_section_symbol and
853 pass it to Mips_got_entry.
854 (Mips_got_info::add_local_entries): Pass addend argument
855 to code functions, and for STT_SECTION symbols call
856 add_symbolless_local_addend.
857 (Mips_got_info::add_tls_entries): Pass addend argument to code
859 (Mips_relobj::do_read_symbols): Read gp value that was used to
861 (Mips_output_data_plt::plt_entry): Remove opcode from l[wd]
862 instruction. Opcode for instruction will be selected later.
863 (Target_mips::gc_process_relocs): Add case for SHT_RELA.
864 (Target_mips::scan_relocatable_relocs): Likewise.
865 (Target_mips::emit_relocs_scan): Likewise.
866 (Target_mips::relocate_relocs): Likewise.
867 (Target_mips::do_finalize_sections): Skip objects for merging
868 processor specific flags in which all input sections will be
870 (mips_get_size_for_reloc): Add case for R_MIPS_EH.
871 (Target_mips::Scan::get_reference_flags): Likewise.
872 (Target_mips::relocate_special_relocatable): Call rel26 method with
873 calculate_only and calculated_value arguments.
874 (Target_mips::Scan::local): Add case for R_MIPS_EH. Don't create a
875 dynamic relocation against a readonly sections, and pass
876 is_section_symbol to Mips_got_info::record_local_got_symbol.
877 (Target_mips::Scan::global): Add case for R_MIPS_EH. Don't create a
878 dynamic relocation against a readonly sections, and pass r_type
879 and r_offset to Target_mips::copy_reloc.
880 (Target_mips::Relocate::relocate): Add support for resolving
881 relocations for Mips64.
882 (Target_mips::mips_info): Add case for Mips64 default dynamic
884 (Target_selector_mips): Correct emulation names.
886 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
888 * mips.cc (class Mips_output_data_la25_stub): Add
889 do_print_to_mapfile function.
891 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
893 * mips.cc (Mips_classify_reloc::put_r_info): Call 32bit version of
896 2016-03-09 H.J. Lu <hongjiu.lu@intel.com>
898 * testsuite/plugin_layout_with_alignment.cc: Renamed to ..
899 * testsuite/plugin_layout_with_alignment.c: This.
900 * testsuite/Makefile.am (plugin_layout_with_alignment.o): Updated.
901 (plugin_layout_with_alignment): Likewise.
902 * testsuite/Makefile.in: Regenerated.
904 2016-03-08 Cary Coutant <ccoutant@gmail.com>
907 * testsuite/Makefile.am (retain_symbols_file_test): Remove check
909 * testsuite/Makefile.in: Regenerate.
910 * testsuite/dynamic_list.sh: Likewise.
911 * testsuite/retain_symbols_file_test.sh: Likewise.
913 2016-03-08 Cary Coutant <ccoutant@gmail.com>
916 * arm.cc (Reloc_stub::Key::name): Add unused attribute.
917 * dirsearch.cc (Dir_caches::~Dir_caches): Likewise.
919 2016-03-08 Cary Coutant <ccoutant@gmail.com>
920 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
922 * output.cc (Output_reloc_writer): New type.
923 (Output_data_reloc_base::do_write): Move implementation to template
924 in output.h and replace with invocation of template.
925 * output.h (Output_file): Move to top of file.
926 (Output_reloc::get_symbol_index): Move to public interface.
927 (Output_reloc::get_address): Likewise.
928 (Output_data_reloc_base::do_write_generic): New function template.
930 2016-03-04 Cary Coutant <ccoutant@gmail.com>
934 * symtab.cc: Instantiate Sized_symbol::init_constant and
935 Sized_symbol::init_undefined.
937 2016-03-03 Cary Coutant <ccoutant@gmail.com>
940 * layout.h (Layout::add_target_specific_dynamic_tag): New function.
941 * layout.cc (Layout::add_target_specific_dynamic_tag): New function.
942 * mips.cc (Target_mips::make_symbol): Adjust function signature.
943 * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_.
944 (Target_sparc::do_is_defined_by_abi): Remove test for
946 (Target_sparc::Register_symbol): New struct type.
947 (Target_sparc::register_syms_): New data member.
948 (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true.
949 (Target_sparc::make_symbol): New function.
950 (Target_sparc::do_finalize_sections): Add register symbols and new
951 dynamic table entries.
952 * symtab.h (Sized_symbol::init_undefined): Add value parameter.
953 (Symbol_table::add_target_global_symbol): New function.
954 (Symbol_table::target_symbols_): New data member.
955 * symtab.cc (Sized_symbol::init_undefined): Add value parameter.
956 (Symbol_table::Symbol_table): Initialize target_symbols_.
957 (Symbol_table::add_from_object): Pass additional parameters to
959 (Symbol_table::define_special_symbol): Likewise.
960 (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for
961 undefined symbol value.
962 (Symbol_table::set_dynsym_indexes): Process target-specific symbols.
963 (Symbol_table::sized_finalize): Likewise.
964 (Symbol_table::sized_write_globals): Likewise.
965 * target.h (Sized_target::make_symbol): Add name, st_type, object,
966 st_shndx, and value parameters.
968 2016-03-03 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
970 * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and
971 LDPK_WEAKUNDEF symbols.
973 2016-03-03 Than McIntosh <thanm@google.com>
975 * plugin.cc (Plugin::load): Include hooks for get_input_section_size
976 and get_input_section_alignment in transfer vector.
977 (get_input_section_alignment): New function.
978 (get_input_section_size): New function.
979 * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test.
980 * testsuite/Makefile.in: [Regenerate.]
981 * testsuite/plugin_section_alignment.cc: New test file.
982 * testsuite/plugin_layout_with_alignment.cc: New test file.
983 * testsuite/plugin_layout_with_alignment.sh: New test file.
985 2016-03-03 Evgenii Stepanov <eugenis@google.com>
987 * plugin.h (Pluginobj::get_symbol_resolution_info): Add version
989 * plugin.cc (get_symbols_v3): New function.
990 (Plugin::load): Add LDPT_GET_SYMBOLS_V3.
991 (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using
994 2016-02-26 Egor Kochetov <egor.kochetov@intel.com>
995 Cary Coutant <ccoutant@gmail.com>
998 * ehframe.h (Cie::fde_encoding): New method.
999 * ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length
1002 2016-02-15 H.J. Lu <hongjiu.lu@intel.com>
1004 * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
1005 -mrelax-relocations=yes to $(TEST_AS).
1006 (x86_64_mov_to_lea6.o): Likewise.
1007 (x86_64_overflow_pc32.o): Remove duplicated target.
1008 * testsuite/Makefile.in: Regenerated.
1010 2016-02-15 Marcin Kościelnicki <koriakin@0x04.net>
1012 * s390.cc (Target_s390::match_view_u): New helper method.
1013 (Target_s390::do_is_call_to_non_split): New method.
1014 (Target_s390::ss_code_st_r14): New const.
1015 (Target_s390::ss_code_l_r14): New const.
1016 (Target_s390::ss_code_bras_8): New const.
1017 (Target_s390::ss_code_l_basr): New const.
1018 (Target_s390::ss_code_a_basr): New const.
1019 (Target_s390::ss_code_ear): New const.
1020 (Target_s390::ss_code_c): New const.
1021 (Target_s390::ss_code_larl): New const.
1022 (Target_s390::ss_code_brasl): New const.
1023 (Target_s390::ss_code_jg): New const.
1024 (Target_s390::ss_code_jgl): New const.
1025 (Target_s390::ss_match_mcount): New helper method.
1026 (Target_s390::ss_match_l): New helper method.
1027 (Target_s390::ss_match_ahi): New helper method.
1028 (Target_s390::ss_match_alfi): New helper method.
1029 (Target_s390::ss_match_cr): New helper method.
1030 (Target_s390::do_calls_non_split): New method.
1031 * testsuite/Makefile.am: Added new tests.
1032 * testsuite/Makefile.in: Regenerate.
1033 * testsuite/split_s390.sh: New test.
1034 * testsuite/split_s390_1_a1.s: New test.
1035 * testsuite/split_s390_1_a2.s: New test.
1036 * testsuite/split_s390_1_n1.s: New test.
1037 * testsuite/split_s390_1_n2.s: New test.
1038 * testsuite/split_s390_1_z1.s: New test.
1039 * testsuite/split_s390_1_z2.s: New test.
1040 * testsuite/split_s390_1_z3.s: New test.
1041 * testsuite/split_s390_1_z4.s: New test.
1042 * testsuite/split_s390_2_ns.s: New test.
1043 * testsuite/split_s390_2_s.s: New test.
1044 * testsuite/split_s390x_1_a1.s: New test.
1045 * testsuite/split_s390x_1_a2.s: New test.
1046 * testsuite/split_s390x_1_n1.s: New test.
1047 * testsuite/split_s390x_1_n2.s: New test.
1048 * testsuite/split_s390x_1_z1.s: New test.
1049 * testsuite/split_s390x_1_z2.s: New test.
1050 * testsuite/split_s390x_1_z3.s: New test.
1051 * testsuite/split_s390x_1_z4.s: New test.
1052 * testsuite/split_s390x_2_ns.s: New test.
1053 * testsuite/split_s390x_2_s.s: New test.
1055 2016-02-11 Rahul Chaudhry <rahulchaudhry@google.com>
1057 * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove
1058 info message for every erratum 843419 found and fixed.
1060 2016-02-07 Cary Coutant <ccoutant@gmail.com>
1063 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional
1064 information to relocation overflow errors.
1066 2016-02-06 Cary Coutant <ccoutant@gmail.com>
1069 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32
1070 overflow checking when symbol value + addend < 0.
1072 2016-02-06 Cary Coutant <ccoutant@gmail.com>
1075 * reloc.h (Limits): New class.
1076 (Bits::has_overflow32): Use min/max values from Limits.
1077 (Bits::has_unsigned_overflow32): Likewise.
1078 (Bits::has_signed_unsigned_overflow32): Likewise.
1079 (Bits::has_overflow): Likewise.
1080 (Bits::has_unsigned_overflow): Likewise.
1081 (Bits::has_signed_unsigned_overflow64): Likewise.
1083 2016-02-06 Cary Coutant <ccoutant@gmail.com>
1086 * reloc.h (Relocate_functions::Overflow_check): Add comments.
1087 * x86_64.cc (X86_64_relocate_functions): New class.
1088 (Target_x86_64::Relocate::relocate): Use the new class.
1089 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option.
1090 (x32_overflow_pc32): New test case.
1091 * testsuite/Makefile.in: Regenerate.
1092 * testsuite/x32_overflow_pc32.sh: New script.
1093 * testsuite/x86_64_overflow_pc32.s: Remove .space directive.
1095 2016-02-06 Cary Coutant <ccoutant@gmail.com>
1098 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast.
1099 (Bits::has_unsigned_overflow): Remove unnecessary static_cast.
1101 2016-02-06 Cary Coutant <ccoutant@gmail.com>
1104 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed
1106 (Bits::has_unsigned_overflow): Likewise.
1108 2016-02-06 Marcin Kościelnicki <koriakin@0x04.net>
1110 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
1112 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
1113 and view_size to is_call_to_non_split.
1114 * target.cc (Target::is_call_to_non_split): Add view and view_size
1116 * target.h (class Target): Likewise.
1118 2016-02-05 Sriraman Tallam <tmsriram@google.com>
1120 * icf.cc (get_rel_addend): New function.
1121 (get_section_contents): Move merge section addend computation to a
1122 new function. Ignore negative values for SHT_REL and SHT_RELA addends.
1123 Fix bug to not read past the length of the section.
1125 2016-02-05 Cary Coutant <ccoutant@gmail.com>
1126 Andrew Senkevich <andrew.senkevich@intel.com>
1129 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow
1130 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and
1132 * testsuite/Makefile.am (x86_64_overflow_pc32): New test.
1133 * testsuite/x86_64_overflow_pc32.sh: New test script.
1134 * testsuite/x86_64_overflow_pc32.s: New source file.
1136 2016-02-05 Cary Coutant <ccoutant@gmail.com>
1139 * reloc.h (Relocate_functions::Address): New typedef.
1140 (Relocate_functions::Addendtype): New typedef.
1141 (Relocate_functions::Overflow_check): New enum type.
1142 (Relocate_functions::Reloc_status): New enum type.
1143 (Relocate_functions::check_overflow): New function template.
1144 (Relocate_functions::rel): Add check parameter; check for overflow.
1145 (Relocate_functions::rel_unaligned): Likewise.
1146 (Relocate_functions::rela): Likewise.
1147 (Relocate_functions::pcrel): Likewise.
1148 (Relocate_functions::pcrel_unaligned): Likewise.
1149 (Relocate_functions::pcrela): Likewise.
1150 (Relocate_functions::rel8): Adjust parameter types.
1151 (Relocate_functions::rela8): Likewise.
1152 (Relocate_functions::pcrel8): Likewise.
1153 (Relocate_functions::pcrela8): Likewise.
1154 (Relocate_functions::rel16): Likewise.
1155 (Relocate_functions::rela168): Likewise.
1156 (Relocate_functions::pcrel16): Likewise.
1157 (Relocate_functions::pcrela16): Likewise.
1158 (Relocate_functions::rel32): Likewise.
1159 (Relocate_functions::rel32_unaligned): Likewise.
1160 (Relocate_functions::rela32): Likewise.
1161 (Relocate_functions::pcrel32): Likewise.
1162 (Relocate_functions::pcrel32_unaligned): Likewise.
1163 (Relocate_functions::pcrela32): Likewise.
1164 (Relocate_functions::rel8_check): New function.
1165 (Relocate_functions::rela8_check): New function.
1166 (Relocate_functions::pcrel8_check): New function.
1167 (Relocate_functions::pcrela8_check): New function.
1168 (Relocate_functions::rel16_check): New function.
1169 (Relocate_functions::rela168_check): New function.
1170 (Relocate_functions::pcrel16_check): New function.
1171 (Relocate_functions::pcrela16_check): New function.
1172 (Relocate_functions::rel32_check): New function.
1173 (Relocate_functions::rel32_unaligned_check): New function.
1174 (Relocate_functions::rela32_check): New function.
1175 (Relocate_functions::pcrel32_check): New function.
1176 (Relocate_functions::pcrel32_unaligned_check): New function.
1177 (Relocate_functions::pcrela32_check): New function.
1178 (Bits::has_unsigned_overflow32): New function.
1179 (Bits::has_unsigned_overflow): New function.
1180 * testsuite/Makefile.am (overflow_unittest): New test.
1181 * testsuite/Makefile.in: Regenerate.
1182 * testsuite/overflow_unittest.cc: New source file.
1184 2016-02-04 Alan Modra <amodra@gmail.com>
1186 * powerpc.cc (relocate): Adjust last patch for big-endian.
1188 2016-02-02 Alan Modra <amodra@gmail.com>
1190 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
1192 2016-01-15 Han Shen <shenhan@google.com>
1194 PR gold/19472 - need pc-relative stubs.
1196 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
1197 stub type for DSOs and pie executables.
1199 2016-01-12 H.J. Lu <hongjiu.lu@intel.com>
1201 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
1204 2016-01-12 Cary Coutant <ccoutant@gmail.com>
1206 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
1207 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
1208 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
1209 specializations) New method.
1211 2016-01-11 Cary Coutant <ccoutant@gmail.com>
1214 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
1215 we have a TLS segment for GD-to-IE optimization.
1216 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
1218 (Target_i386::tls_desc_gd_to_ie): Likewise.
1219 (Target_i386::relocate_tls): Don't insist that we have a TLS segment
1220 for TLSDESC GD-to-IE optimizations.
1221 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
1223 (Target_x86_64::tls_desc_gd_to_ie): Likewise.
1224 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
1225 for TLSDESC GD-to-IE optimizations.
1227 2016-01-11 Cary Coutant <ccoutant@gmail.com>
1229 Refactor gold to enable support for MIPS-64 relocation format.
1231 * gc.h (get_embedded_addend_size): Remove sh_type parameter.
1232 (gc_process_relocs): Remove sh_type template parameter.
1233 Use Classify_reloc to access r_sym, r_type, and r_addend fields.
1234 * object.h (Sized_relobj_file::split_stack_adjust): Add target
1236 (Sized_relobj_file::split_stack_adjust_reltype): Likewise.
1237 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
1238 specializations) Remove.
1239 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
1240 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
1241 (Sized_relobj_file::emit_relocs_scan_reltype): Remove.
1242 (Sized_relobj_file::split_stack_adjust): Add target parameter.
1244 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
1245 Target::get_r_sym() to get r_sym field from relocations.
1246 (Track_relocs::next_symndx): Call Target::get_r_sym().
1247 * target-reloc.h (scan_relocs): Remove sh_type template parameter;
1248 add Classify_reloc template parameter. Use for accessing r_sym and
1250 (relocate_section): Likewise.
1251 (Default_classify_reloc): New class (renamed and moved from reloc.cc).
1252 (Default_scan_relocatable_relocs): Remove sh_type template parameter.
1253 (Default_scan_relocatable_relocs::Reltype): New typedef.
1254 (Default_scan_relocatable_relocs::reloc_size): New const.
1255 (Default_scan_relocatable_relocs::sh_type): New const.
1256 (Default_scan_relocatable_relocs::get_r_sym): New method.
1257 (Default_scan_relocatable_relocs::get_r_type): New method.
1258 (Default_emit_relocs_strategy): New class.
1259 (scan_relocatable_relocs): Replace sh_type template parameter with
1260 Scan_relocatable_relocs class. Use it to access r_sym and r_type
1262 (relocate_relocs): Replace sh_type template parameter with
1263 Classify_reloc class. Use it to access r_sym and r_type fields.
1264 * target.h (Target::is_call_to_non_split): Replace r_type parameter
1265 with pointer to relocation. Adjust all callers.
1266 (Target::do_is_call_to_non_split): Likewise.
1267 (Target::emit_relocs_scan): New virtual method.
1268 (Sized_target::get_r_sym): New virtual method.
1269 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
1270 with pointer to relocation.
1272 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
1273 (Target_aarch64::Relocatable_size_for_reloc): Remove.
1274 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
1275 (Target_aarch64::scan_relocs): Likewise.
1276 (Target_aarch64::relocate_section): Likewise.
1277 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
1279 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
1280 (Target_aarch64::relocate_relocs): Use Default_classify_reloc.
1281 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
1283 (Target_arm::emit_relocs_scan): New method.
1284 (Target_arm::Relocatable_size_for_reloc): Replace with...
1285 (Target_arm::Classify_reloc): ...this.
1286 (Target_arm::gc_process_relocs): Use Classify_reloc.
1287 (Target_arm::scan_relocs): Likewise.
1288 (Target_arm::relocate_section): Likewise.
1289 (Target_arm::scan_relocatable_relocs): Likewise.
1290 (Target_arm::relocate_relocs): Likewise.
1291 * i386.cc (Target_i386::emit_relocs_scan): New method.
1292 (Target_i386::Relocatable_size_for_reloc): Replace with...
1293 (Target_i386::Classify_reloc): ...this.
1294 (Target_i386::gc_process_relocs): Use Classify_reloc.
1295 (Target_i386::scan_relocs): Likewise.
1296 (Target_i386::relocate_section): Likewise.
1297 (Target_i386::scan_relocatable_relocs): Likewise.
1298 (Target_i386::relocate_relocs): Likewise.
1299 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
1301 (Mips_reloc_types): New class template.
1302 (Mips_classify_reloc): New class template.
1303 (Target_mips::Reltype): New typedef.
1304 (Target_mips::Relatype): New typedef.
1305 (Target_mips::emit_relocs_scan): New method.
1306 (Target_mips::get_r_sym): New method.
1307 (Target_mips::Relocatable_size_for_reloc): Replace with
1308 Mips_classify_reloc.
1309 (Target_mips::copy_reloc): Use Mips_classify_reloc.
1310 (Target_mips::gc_process_relocs): Likewise.
1311 (Target_mips::scan_relocs): Likewise.
1312 (Target_mips::relocate_section): Likewise.
1313 (Target_mips::scan_relocatable_relocs): Likewise.
1314 (Target_mips::relocate_relocs): Likewise.
1315 (mips_get_size_for_reloc): New function, factored out from
1316 Relocatable_size_for_reloc::get_size_for_reloc.
1317 (Target_mips::Scan::local): Use Mips_classify_reloc.
1318 (Target_mips::Scan::global): Likewise.
1319 (Target_mips::Relocate::relocate): Likewise.
1320 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
1321 (Target_powerpc::Relocatable_size_for_reloc): Remove.
1322 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
1323 (Target_powerpc::scan_relocs): Likewise.
1324 (Target_powerpc::relocate_section): Likewise.
1325 (Powerpc_scan_relocatable_reloc): Convert to class template.
1326 (Powerpc_scan_relocatable_reloc::Reltype): New typedef.
1327 (Powerpc_scan_relocatable_reloc::reloc_size): New const.
1328 (Powerpc_scan_relocatable_reloc::sh_type): New const.
1329 (Powerpc_scan_relocatable_reloc::get_r_sym): New method.
1330 (Powerpc_scan_relocatable_reloc::get_r_type): New method.
1331 (Target_powerpc::scan_relocatable_relocs): Use
1332 Powerpc_scan_relocatable_reloc.
1333 (Target_powerpc::relocate_relocs): Use Default_classify_reloc.
1334 * s390.cc (Target_s390::emit_relocs_scan): New method.
1335 (Target_s390::Relocatable_size_for_reloc): Remove.
1336 (Target_s390::gc_process_relocs): Use Default_classify_reloc.
1337 (Target_s390::scan_relocs): Likewise.
1338 (Target_s390::relocate_section): Likewise.
1339 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
1341 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
1342 (Target_s390::relocate_relocs): Use Default_classify_reloc.
1343 * sparc.cc (Target_sparc::emit_relocs_scan): New method.
1344 (Target_sparc::Relocatable_size_for_reloc): Remove.
1345 (Target_sparc::gc_process_relocs): Use Default_classify_reloc.
1346 (Target_sparc::scan_relocs): Likewise.
1347 (Target_sparc::relocate_section): Likewise.
1348 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
1350 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
1351 (Target_sparc::relocate_relocs): Use Default_classify_reloc.
1352 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
1353 (Target_tilegx::Relocatable_size_for_reloc): Remove.
1354 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
1355 (Target_tilegx::scan_relocs): Likewise.
1356 (Target_tilegx::relocate_section): Likewise.
1357 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
1359 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
1360 (Target_tilegx::relocate_relocs): Use Default_classify_reloc.
1361 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
1362 (Target_x86_64::Relocatable_size_for_reloc): Remove.
1363 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
1364 (Target_x86_64::scan_relocs): Likewise.
1365 (Target_x86_64::relocate_section): Likewise.
1366 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
1368 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
1369 (Target_x86_64::relocate_relocs): Use Default_classify_reloc.
1371 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
1373 2016-01-01 Alan Modra <amodra@gmail.com>
1375 Update year range in copyright notice of all files.
1377 For older changes see ChangeLog-0815
1379 Copyright (C) 2016 Free Software Foundation, Inc.
1381 Copying and distribution of this file, with or without modification,
1382 are permitted in any medium without royalty provided the copyright
1383 notice and this notice are preserved.
1389 version-control: never