1 2016-10-06 Alan Modra <amodra@gmail.com>
3 * aarch64.cc: Spell fall through comments as "// Fall through.".
6 * powerpc.cc: Likewise.
10 * powerpc.cc (Target_powerpc::Relocate::relocate): Add missing
11 fall through comments.
12 * sparc.cc: (Target_sparc::Scan::global): Likewise.
13 (Target_sparc::Relocate::relocate): Likewise.
14 * tilegx.cc (Target_tilegx::Relocate::relocate): Likewise.
15 * resolve.cc (symbol_to_bits): Add missing break.
17 2016-09-26 Cary Coutant <ccoutant@gmail.com>
20 * symtab.cc (Symbol_table::define_default_version): Check that
21 unversioned symbol is defined.
23 2016-09-26 Vlad Zakharov <vzakhar@synopsys.com>
25 * Makefile.in: Regenerate.
26 * configure: Likewise.
27 * testsuite/Makefile.in: Likewise.
29 2016-09-26 Alan Modra <amodra@gmail.com>
31 * aarch64.cc (Target_aarch64::is_erratum_835769_sequence): Avoid
33 * output.cc (Output_segment::set_section_addresses): Likewise.
34 * testsuite/Makefile.in: Regenerate.
36 2016-09-02 Doug Kwan <dougkwan@google.com>
38 * arm.cc (Target_arm::Target_arm): Move method definition outside of
39 class definition. Add code to handle --target1-rel, --target1-abs
40 and --target2= options.
41 (Target_arm::get_reloc_reloc_type): Change method to be non-static
43 (Target_arm::target1_is_rel_, Target_arm::target2_reloc_): New data
45 (Target_arm::Scan::local, Target_arm::Scan::global,
46 Target_arm::Relocate::relocate,
47 Target_arm::Relocatable_size_for_reloc::get_size_for_reloc): Adjust
48 call to Target_arm::get_real_reloc_type.
49 (Target_arm::get_real_reloc_type): Use command line options to
50 determine real types of R_ARM_TARGET1 and R_ARM_TARGET2.
51 * options.h (--target1-rel, --target1-abs, --target2): New ARM-only
54 2016-08-31 Alan Modra <amodra@gmail.com>
56 * powerpc.cc (class Stub_control): Delete stub14_group_size_
57 and has14_. Add group_size_.
58 (Stub_control::can_add_to_stub_group): Adjust to suit. Print
59 debug info when switching to adding sections before stubs.
61 2016-08-31 Alan Modra <amodra@gmail.com>
63 * debug.h (DEBUG_TARGET): New.
64 (DEBUG_ALL): Add DEBUG_TARGET.
65 (gold_debug): Delete FORMAT param.
66 * powerpc.cc (Stub_control::can_add_to_stub_group): Print debug ourput.
68 2016-08-30 Alan Modra <amodra@gmail.com>
71 * powerpc.cc (class Stub_control): Add has14_. Comment owner_.
72 (Stub_control::can_add_to_stub_group): Correct grouping of
73 sections containing 14-bit external branches. When returning
74 false, set state_ to reflect the fact that we have one section
75 for the next group. Rewrite most of function for clarity.
76 Add and expand comments.
77 (Target_powerpc::do_relax): Print stub group size retry in hex.
79 2016-08-26 Han Shen <shenhan@google.com>
81 PR gold/20529 - relaxing loop never ends.
83 * powerpc.cc (Stub_table::min_size_threshold_): New member to
85 (Stub_table::set_min_size_threshold): New member function.
86 (Stub_table::set_address_and_size): Add code to only allow size
88 (Target_powerpc::do_relax): Add code to record last size.
90 2016-08-23 Roland McGrath <roland@hack.frob.com>
92 * options.h (General_options): Grok -z stack-size.
93 * output.h (Output_segment::set_size): New method.
94 * layout.cc (Layout::create_executable_stack_info): Renamed to ...
95 (Layout::create_stack_segment): ... this. Always create the
96 segment if -z stack-size was used.
97 (Layout::set_segment_offsets): Don't call ->set_offset on the
100 2016-08-15 Bharathi Seshadri <bseshadr@cisco.com>
102 * options.h (General_options): Add --be8 option.
103 * arm.cc (Arm_relobj::do_relocate_sections): Add code to swap for be8.
104 (Output_data_plt_arm_standard::do_fill_first_plt_entry): Likewise.
105 (Output_data_plt_arm_short::do_fill_plt_entry): Likewise.
106 (Output_data_plt_arm_long::do_fill_plt_entry): Likewise.
107 (Target_arm::do_adjust_elf_header): Do EF_ARM_BE8 adjustment.
109 2016-08-17 Cary Coutant <ccoutant@gmail.com>
111 * i386.cc (Target_i386): Reset skip_call_tls_get_addr_ after printing
113 * testsuite/Makefile.am (pr20216a): Add missing dependencies.
114 (pr20308a): Add -Bgcctestdir/ to compile rules.
115 * testsuite/Makefile.in: Regenerate.
117 2016-08-12 Roland McGrath <roland@hack.frob.com>
120 * script-sections.cc (Script_sections::release_segments):
121 Reset this->segments_created_.
123 2016-08-12 Roland McGrath <roland@hack.frob.com>
125 * yyscript.y (HIDDEN): New %token.
126 (assignment): Handle HIDDEN(string = expr) syntax.
127 * script.cc (script_keyword_parsecodes): Add HIDDEN.
129 2016-08-10 Cary Coutant <ccoutant@gmail.com>
132 * x86_64.cc (Target_x86_64::Relocate::relocate): Add check for
133 R_X86_64_GOTPCREL. Reset skip_call_tls_get_addr_ after printing
135 * testsuite/Makefile.am (pr20216_gd.o): Add -Bgcctestdir/.
136 (pr20216_ld.o): Likewise.
137 * testsuite/Makefile.in: Regenerate.
139 2016-08-10 James Clarke <jrtc27@jrtc27.com>
142 * symtab.cc (Symbol_table::add_from_relobj): Handle NULL symbols,
143 which will be present for STT_SPARC_REGISTER.
144 (Symbol_table::add_from_pluginobj): Likewise.
145 (Symbol_table::add_from_dynobj): Likewise.
146 (Symbol_table::add_from_incrobj): Removed dead code.
148 2016-08-10 James Clarke <jrtc27@jrtc27.com>
151 * sparc.cc (Target_sparc::Relocate::relocate): R_SPARC_GOTDATA_OP_LOX10
152 should fall back on R_SPARC_GOT10, not R_SPARC_GOT13.
154 2016-08-10 James Clarke <jrtc27@jrtc27.com>
157 * sparc.cc (Target_sparc::Scan::check_non_pic): Allow R_SPARC_32 on
160 2016-06-29 Cary Coutant <ccoutant@gmail.com>
163 * testsuite/dynamic_list.sh: Remove check for _ZdlPv.
165 2016-06-29 Cary Coutant <ccoutant@gmail.com>
167 * testsuite/Makefile.am (MOSTLYCLEANFILES): Add eh_test_2.
168 * testsuite/Makefile.in: Regenerate.
170 2016-06-30 Alan Modra <amodra@gmail.com>
172 * testsuite/Makefile.am (memory_test, memory_test_2): Pass
173 -Wl,-z to gcc, not plain -z.
174 * testsuite/Makefile.in: Regenerate.
176 2016-06-29 H.J. Lu <hongjiu.lu@intel.com>
179 * i386.cc (Target_i386::Relocate::relocate): Allow
180 R_386_GOT32X relocation against ___tls_get_addr.
181 (Target_i386::Relocate::tls_gd_to_ie): Support indirect
182 call to __tls_get_addr.
183 (Target_i386::Relocate::tls_gd_to_le): Likewise.
184 (Target_i386::Relocate::tls_ld_to_le): Likewise.
185 * testsuite/Makefile.am (check_PROGRAMS): Add pr20308a_test,
186 pr20308b_test, pr20308c_test, pr20308d_test, pr20308e_test.
187 (pr20308a_test_SOURCES): New.
188 (pr20308a_test_DEPENDENCIES): Likewise.
189 (pr20308a_test_CFLAGS): Likewise.
190 (pr20308a_test_LDFLAGS): Likewise.
191 (pr20308a_test_LDADD): Likewise.
192 (pr20308b_test_SOURCES): Likewise.
193 (pr20308b_test_DEPENDENCIES): Likewise.
194 (pr20308b_test_CFLAGS): Likewise.
195 (pr20308b_test_LDFLAGS): Likewise.
196 (pr20308b_test_LDADD): Likewise.
197 (pr20308c_test_SOURCES): Likewise.
198 (pr20308c_test_DEPENDENCIES): Likewise.
199 (pr20308c_test_CFLAGS): Likewise.
200 (pr20308c_test_LDFLAGS): Likewise.
201 (pr20308c_test_LDADD): Likewise.
202 (pr20308d_test_SOURCES): Likewise.
203 (pr20308d_test_DEPENDENCIES): Likewise.
204 (pr20308d_test_CFLAGS): Likewise.
205 (pr20308d_test_LDFLAGS): Likewise.
206 (pr20308d_test_LDADD): Likewise.
207 (pr20308e_test_SOURCES): Likewise.
208 (pr20308e_test_DEPENDENCIES): Likewise.
209 (pr20308e_test_CFLAGS): Likewise.
210 (pr20308e_test_LDFLAGS): Likewise.
211 (pr20308e_test_LDADD): Likewise.
212 (pr20308a.so): Likewise.
213 (pr20308b.so): Likewise.
214 (pr20308_gd.o): Likewise.
215 (pr20308_ld.o): Likewise.
216 (MOSTLYCLEANFILES): Add pr20308a.so pr20308b.so.
217 * testsuite/Makefile.in: Regenerated.
218 * testsuite/pr20308_def.c: New file.
219 * testsuite/pr20308_gd.S: Likewise.
220 * testsuite/pr20308_ld.S: Likewise.
221 * testsuite/pr20308_main.c: Likewise.
223 2016-06-29 H.J. Lu <hongjiu.lu@intel.com>
226 * configure.ac (DEFAULT_TARGET_X86_64_OR_X32): New
228 * configure: Regenerated.
229 * x86_64.cc (Target_x86_64<size>::Relocate::relocate): Allow
230 R_X86_64_GOTPCRELX relocation against __tls_get_addr.
231 (Target_x86_64<size>::Relocate::tls_gd_to_ie): Support indirect
232 call to __tls_get_addr.
233 (Target_x86_64<size>::Relocate::tls_gd_to_le): Likewise.
234 (Target_x86_64<size>::Relocate::tls_ld_to_le): Likewise.
235 * testsuite/Makefile.am (check_PROGRAMS): Add pr20216a_test,
236 pr20216b_test, pr20216c_test, pr20216d_test, pr20216e_test.
237 (pr20216a_test_SOURCES): New.
238 (pr20216a_test_DEPENDENCIES): Likewise.
239 (pr20216a_test_CFLAGS): Likewise.
240 (pr20216a_test_LDFLAGS): Likewise.
241 (pr20216a_test_LDADD): Likewise.
242 (pr20216b_test_SOURCES): Likewise.
243 (pr20216b_test_DEPENDENCIES): Likewise.
244 (pr20216b_test_CFLAGS): Likewise.
245 (pr20216b_test_LDFLAGS): Likewise.
246 (pr20216b_test_LDADD): Likewise.
247 (pr20216c_test_SOURCES): Likewise.
248 (pr20216c_test_DEPENDENCIES): Likewise.
249 (pr20216c_test_CFLAGS): Likewise.
250 (pr20216c_test_LDFLAGS): Likewise.
251 (pr20216c_test_LDADD): Likewise.
252 (pr20216d_test_SOURCES): Likewise.
253 (pr20216d_test_DEPENDENCIES): Likewise.
254 (pr20216d_test_CFLAGS): Likewise.
255 (pr20216d_test_LDFLAGS): Likewise.
256 (pr20216d_test_LDADD): Likewise.
257 (pr20216e_test_SOURCES): Likewise.
258 (pr20216e_test_DEPENDENCIES): Likewise.
259 (pr20216e_test_CFLAGS): Likewise.
260 (pr20216e_test_LDFLAGS): Likewise.
261 (pr20216e_test_LDADD): Likewise.
262 (pr20216a.so): Likewise.
263 (pr20216b.so): Likewise.
264 (pr20216_gd.o): Likewise.
265 (pr20216_ld.o): Likewise.
266 (MOSTLYCLEANFILES): Add pr20216a.so pr20216b.so.
267 * testsuite/Makefile.in: Regenerated.
268 * testsuite/pr20216_def.c: New file.
269 * testsuite/pr20216_gd.S: Likewise.
270 * testsuite/pr20216_ld.S: Likewise.
271 * testsuite/pr20216_main.c: Likewise.
273 2016-06-29 Alan Modra <amodra@gmail.com>
275 * script_test_12.t: Delete .plt, specify 64k page size.
276 * script_test_12i.t: Likewise.
278 2016-06-29 Alan Modra <amodra@gmail.com>
280 * testsuite/plugin_layout_with_alignment.c: Explicitly align all
283 2016-06-29 Alan Modra <amodra@gmail.com>
285 * testsuite/Makefile.am (copy_test_protected): Disable for powerpc.
286 * testsuite/Makefile.in: Regenerate.
288 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
290 * aarch64-reloc.def (NONE): New relocation.
291 * aarch64.cc (Target_aarch64::Scan::local): Handle R_AARCH64_NONE.
292 (Target_aarch64::Scan::global): Likewise.
293 * testsuite/Makefile.am (aarch64_reloc_none): New test.
294 * testsuite/Makefile.in: Regenerate.
295 * testsuite/aarch64_reloc_none.s: New test source file.
296 * testsuite/aarch64_reloc_none.sh: New test script.
298 2016-06-28 Sriraman Tallam <tmsriram@google.com>
300 * x86_64.cc (Lazy_view): New class.
301 (can_convert_mov_to_lea): Templatize function. Make the function
302 check for appropriate relocation types and use the view parameter
303 to get section contents.
304 (can_convert_callq_to_direct): New function.
305 (Target_x86_64<size>::Scan::global): Refactor.
306 (Target_x86_64<size>::Relocate::relocate): Refactor. Change any indirect
307 call via GOT that can be converted.
308 * testsuite/Makefile.am (x86_64_indirect_call_to_direct.sh): New test.
309 * testsuite/Makefile.in: Regenerate.
310 * testsuite/x86_64_indirect_call_to_direct1.s: New file.
311 * testsuite/x86_64_indirect_jump_to_direct1.s: New file.
313 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
315 * aarch64.cc (Target_aarch64::Scan::local): Move the call to got_section
316 from the top level to the places of its use.
318 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
321 * script-c.h (Sort_wildcard): Add SORT_WILDCARD_BY_INIT_PRIORITY.
322 * script-sections.cc (Input_section_sorter::get_init_priority): New method.
323 (Input_section_sorter::operator()): Handle SORT_WILDCARD_BY_INIT_PRIORITY.
324 (Output_section_element_input::print): Likewise.
325 * script.cc (script_keyword_parsecodes): Add entry SORT_BY_INIT_PRIORITY.
326 * yyscript.y (SORT_BY_INIT_PRIORITY): New token.
327 (wildcard_section): Handle SORT_BY_INIT_PRIORITY.
329 * testsuite/Makefile.am (script_test_14): New test.
330 * testsuite/Makefile.in: Regenerate.
331 * testsuite/script_test_14.s: New test source file.
332 * testsuite/script_test_14.sh: New test script.
333 * testsuite/script_test_14.t: New test linker script.
335 2016-06-28 James Clarke <jrtc27@jrtc27.com>
337 * sparc.cc (Target_sparc::Scan::local): Don't convert R_SPARC_32
338 to R_SPARC_RELATIVE if class is ELFCLASS64.
339 (Target_sparc::Scan::global): Likewise.
341 2016-06-23 Cary Coutant <ccoutant@gmail.com>
342 Igor Kudrin <ikudrin@accesssoftek.com>
346 (Output_section_element_input::set_section_addresses): Keep bin_count
347 separate from input_pattern_count.
348 * testsuite/script_test_12.t: Add another section .x4.
349 * testsuite/script_test_12i.t: Likewise.
350 * testsuite/script_test_12a.c: Likewise.
351 * testsuite/script_test_12b.c: Likewise.
353 2016-06-23 Igor Kudrin <ikudrin@accesssoftek.com>
355 * gold-threads.cc (impl_threads::Lock_impl_threads): Fix typos.
357 2016-06-22 H.J. Lu <hongjiu.lu@intel.com>
360 * NEWS: Mention --enable-relro.
361 * configure.ac: Add --enable-relro.
362 (DEFAULT_LD_Z_RELRO): New. Set by --enable-relro and default
364 * config.in: Regenerated.
365 * configure: Likewise.
366 * options.h (General_options::relro): Default to
369 2016-06-20 Cary Coutant <ccoutant@gmail.com>
371 * NEWS: Add new features in 1.12.
372 * version.cc (version_string): Bump to 1.12.
374 2016-06-20 H.J. Lu <hongjiu.lu@intel.com>
377 * i386.cc (Target_i386::first_plt_entry_offset): Return 0 if
379 (Target_i386::plt_entry_size): Likewise.
380 (Target_x86_64<size>::first_plt_entry_offset): Likewise.
381 (Target_x86_64<size>::plt_entry_size): Likewise.
383 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
385 * mips.cc (Target_mips::Target_mips): Initialize rld_map_.
386 (Target_mips::rld_map_): New data member.
387 (Target_mips::do_finalize_sections): Add support for
388 DT_MIPS_RLD_MAP and DT_MIPS_RLD_MAP_REL dynamic tags,
389 .rld_map section, and __RLD_MAP symbol.
390 (Target_mips::do_dynamic_tag_custom_value): Add support for
391 DT_MIPS_RLD_MAP_REL dynamic tag.
392 * output.cc (Output_data_dynamic::get_entry_offset): New method
394 * output.h (Output_data_dynamic::get_entry_offset): New method
397 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
399 * mips.cc (Mips_relocate_functions::relpc16): Add unaligned check.
401 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
403 * mips.cc (relocation_needs_la25_stub): Add support for relocs:
404 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
405 (hi16_reloc): Add support for R_MIPS_PCHI16 relocation.
406 (is_matching_lo16_reloc): Likewise.
407 (lo16_reloc): Add support for R_MIPS_PCLO16 relocation.
408 (Mips_output_data_plt::plt_entry_r6): New static data member for
410 (Target_mips::is_output_r6): New method.
411 (Target_mips::Mips_mach): Add new enum constants.
412 (Mips_relocate_functions::Status): Likewise.
413 (Mips_relocate_functions::pchi16_relocs): New static data member.
414 (Mips_relocate_functions::relpc21): New method.
415 (Mips_relocate_functions::relpc26): Likewise.
416 (Mips_relocate_functions::relpc18): Likewise.
417 (Mips_relocate_functions::relpc19): Likewise.
418 (Mips_relocate_functions::relpchi16): Likewise.
419 (Mips_relocate_functions::do_relpchi16): Likewise.
420 (Mips_relocate_functions::relpclo16): Likewise.
421 (Mips_output_data_plt::do_write): Add support for Mips r6 plt
423 (Target_mips::mips_32bit_flags): Add E_MIPS_ARCH_32R6 support.
424 (Target_mips::elf_mips_mach): Add E_MIPS_ARCH_32R6 and
425 E_MIPS_ARCH_64R6 support.
426 (Target_mips::update_abiflags_isa): Likewise.
427 (mips_get_size_for_reloc): Add support for relocs: R_MIPS_PCHI16,
428 R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3 and
430 (Target_mips::Scan::local): Add support for relocs: R_MIPS_PCHI16
432 (Target_mips::Scan::global): Add support for relocs:
433 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
434 (Target_mips::Relocate::relocate): Call functions for resolving
435 Mips32r6 and Mips64r6 relocations, and print error message for
436 STATUS_PCREL_UNALIGNED.
437 (Target_mips::Scan::get_reference_flags): Add support for relocs:
438 R_MIPS_PCHI16, R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2,
439 R_MIPS_PC18_S3 and R_MIPS_PC19_S2.
440 (Target_mips::elf_mips_mach_name): Add E_MIPS_ARCH_32R6 and
441 E_MIPS_ARCH_64R6 support.
443 2016-06-13 H.J. Lu <hongjiu.lu@intel.com>
446 * testsuite/script_test_2.t: Add .got.plt after .got.
448 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
450 * mips.cc (struct Mips_abiflags): New struct.
451 (Mips_relobj::Mips_relobj): Initialize attributes_section_data_
453 (Mips_relobj::~Mips_relobj): Delete object pointed by
454 attributes_section_data_.
455 (Mips_relobj::abiflags): New method.
456 (Mips_relobj::attributes_section_data): Likewise.
457 (Mips_relobj::attributes_section_data_): New data member.
458 (Mips_relobj::abiflags_): Likewise.
459 (class Mips_output_section_abiflags): New class.
460 (Target_mips::Target_mips): Initialize attributes_section_data_,
461 abiflags_ and has_abiflags_section_.
462 (Target_mips::do_should_include_section): Don't emit input
463 .MIPS.abiflags sections to output .MIPS.abiflags.
464 (Target_mips::Mips_mach): Add new enum constants.
465 (Target_mips::mips_isa_ext_mach): New method.
466 (Target_mips::mips_isa_ext): Likewise.
467 (Target_mips::update_abiflags_isa): Likewise.
468 (Target_mips::infer_abiflags): Likewise.
469 (Target_mips::create_abiflags): Likewise.
470 (Target_mips::fp_abi_string): Likewise.
471 (Target_mips::select_fp_abi): Likewise.
472 (Target_mips::merge_obj_attributes): Likewise.
473 (Target_mips::merge_obj_abiflags): Likewise.
474 (Target_mips::level_rev): Likewise.
475 (Target_mips::merge_obj_e_flags): Rename from
476 merge_processor_specific_flags. Remove dyn_obj argument,
477 call update_abiflags_isa when needed, compare NaN encodings and
479 (Target_mips::add_machine_extensions): Add two machine extensions
481 (Target_mips::attributes_section_data_): New data member.
482 (Target_mips::abiflags_): Likewise.
483 (Target_mips::has_abiflags_section_): Likewise.
484 (Mips_relobj::do_read_symbols): Read .gnu.attributes and
485 .MIPS.abiflags sections if they exists.
486 (Target_mips::elf_mips_mach): Add E_MIPS_MACH_5900 and
487 E_MIPS_MACH_OCTEON3 support.
488 (Target_mips::do_adjust_elf_header): Setup EI_ABIVERSION flag.
489 (Target_mips::do_finalize_sections): Merge .gnu.attributes and
490 .MIPS.abiflags sections from input. Create these sections if
492 (Target_mips::elf_mips_mach_name): Add E_MIPS_MACH_5900 and
493 E_MIPS_MACH_OCTEON3 support, and change strings for
494 E_MIPS_MACH_LS2E, E_MIPS_MACH_LS2F and E_MIPS_MACH_LS3A just
497 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
499 * mips.cc (Mips_relobj::Mips_relobj): Initialize
500 has_reginfo_section_.
501 (Mips_relobj::has_reginfo_section_): New data member.
502 (Mips_relobj::has_reginfo_section): New method.
503 (class Mips_output_section_reginfo): Change base class to
504 Output_section_data, and set masks of the output .reginfo section
506 (Mips_output_section_reginfo::as_mips_output_section_reginfo):
508 (Mips_output_section_reginfo::set_masks): Likewise.
509 (Mips_output_section_reginfo::set_final_data_size): Likewise.
510 (Mips_output_section_reginfo::do_print_to_mapfile): New method.
511 (Target_mips::do_make_output_section): Remove.
512 (Mips_relobj::do_read_symbols): Set has_reginfo_section_ to true
513 if the object contains a .reginfo section.
514 (Target_mips::do_finalize_sections): Create a .reginfo output
517 2016-06-09 Artemiy Volkov <artemiyv@acm.org>
519 * mips.cc (Mips_output_data_got::do_write): Add missing template
522 2016-05-30 Marcin KoĆcielnicki <koriakin@0x04.net>
525 * s390.cc (Target_s390::ss_code_st_r14): Removed.
526 (Target_s390::ss_code_l_r14): Removed.
527 (Target_s390::ss_code_ear): Removed.
528 (Target_s390::ss_code_c): Removed.
529 (Target_s390::ss_match_st_r14): New function.
530 (Target_s390::ss_match_l_r14): New function.
531 (Target_s390::ss_match_mcount): Call ss_match_{l,st}_r14 instead
532 of matching code directly.
533 (Target_s390::ss_match_ear): New function.
534 (Target_s390::ss_match_c): New function.
535 (Target_s390::do_calls_non_split): Call ss_match_{ear,c} instead
536 of matching code directly.
538 2016-05-19 Cary Coutant <ccoutant@gmail.com>
541 * copy-relocs.cc (Copy_relocs::make_copy_reloc): Add object
542 parameter; check for protected symbol.
543 * copy-relocs.h (Copy_relocs::make_copy_reloc): Add object parameter.
544 * mips.cc (Mips_copy_relocs): Adjust call to make_copy_reloc.
545 * symtab.cc (Symbol::init_fields): Initialize is_protected_.
546 (Symbol_table::add_from_dynobj): Mark protected symbols.
547 * symtab.h (Symbol::is_protected): New method.
548 (Symbol::set_is_protected): New method.
549 (Symbol::is_protected_): New data member.
551 * testsuite/Makefile.am (copy_test_protected): New test.
552 * testsuite/Makefile.in: Regenerate.
553 * testsuite/copy_test.cc (main): Add legal reference to protected
555 * testsuite/copy_test_v1.cc (main): Likewise.
556 * testsuite/copy_test_2.cc (ip): Add protected symbol.
557 * testsuite/copy_test_protected.cc: New test source file.
558 * testsuite/copy_test_protected.sh: New test script.
560 2016-05-19 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
562 * mips.cc (Mips_got_entry::Mips_got_entry): Remove object argument
563 for global got symbols, and set addend to 0.
564 (Mips_got_entry::hash): Change hash algorithm.
565 (Mips_got_entry::equals): Refactor.
566 (Mips_got_entry::object): Return input object for local got symbols
568 (Mips_got_entry::addend): Change return of the relocation addend.
569 (Mips_got_entry::addend_): Move from union d.
570 (Mips_got_entry::object_): Move into union d.
571 (class Mips_symbol_hash): New class.
572 (Mips_got_info::Global_got_entry_set): New type.
573 (Mips_got_info::global_got_symbols): Change return type to
574 Global_got_entry_set.
575 (Mips_got_info::global_got_symbols_): Change type to
576 Global_got_entry_set.
577 (Mips_symbol::hash): New method.
578 (Mips_output_data_la25_stub::symbols_): Change type to std::vector.
579 (Mips_output_data_mips_stubs::Mips_stubs_entry_set): New type.
580 (Mips_output_data_mips_stubs::symbols_): Change type to
581 Mips_stubs_entry_set.
582 (Mips_got_info::record_global_got_symbol): Don't pass object
583 argument when creating global got symbol.
584 (Mips_got_info::record_got_entry): Remove find before inserting
586 (Mips_got_info::add_reloc_only_entries): Change type of iterator
587 to Global_got_entry_set.
588 (Mips_got_info::count_got_symbols): Likewise.
589 (Mips_output_data_la25_stub::create_la25_stub): Use push_back
590 for adding entries to symbols_.
591 (Mips_output_data_la25_stub::do_write): Change type of iterator
593 (Mips_output_data_mips_stubs::set_lazy_stub_offsets): Change type
594 of iterator to Mips_stubs_entry_set.
595 (Mips_output_data_mips_stubs::set_needs_dynsym_value): Likewise.
596 (Mips_output_data_mips_stubs::do_write): Likewise.
598 2016-05-06 Han Shen <shenhan@google.com>
602 * aarch64-reloc.def: New relocation type.
603 * aarch64.cc (AArch64_relocate_functions::Page): Changed to public.
604 (Target_aarch64::Scan::local): Add R_AARCH64_LD64_GOTPAGE_LO15.
605 (Target_aarch64::Scan::global): Add R_AARCH64_LD64_GOTPAGE_LO15.
606 (Target_aarch64::Relocate::relocate): Implement R_AARCH64_LD64_GOTPAGE_LO15.
608 2016-04-28 Nick Clifton <nickc@redhat.com>
610 * po/zh_CN.po: Updated Chinese (simplified) translation.
612 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
614 * Makefile.in: Regenerated with automake 1.11.6.
615 * aclocal.m4: Likewise.
616 * testsuite/Makefile.in: Likewise.
618 2016-03-30 Cary Coutant <ccoutant@gmail.com>
621 * symtab.cc (Symbol_table::define_default_version): Check for case
622 where symbols are both in different shared objects.
624 2016-03-27 Cary Coutant <ccoutant@gmail.com>
627 * i386.cc (Target_i386): Add check for fully-resolved symbol for
630 2016-03-22 Nick Clifton <nickc@redhat.com>
632 * configure: Regenerate.
634 2016-03-21 Cary Coutant <ccoutant@gmail.com>
637 * errors.cc (Errors::undefined_symbol): Add info message when
638 symbol should have been provided by a plugin.
639 * target-reloc.h (issue_undefined_symbol_error): Check for
640 placeholder symbols defined in discarded sections.
641 * testsuite/Makefile.am (plugin_test_9b): New test case.
642 * testsuite/Makefile.in: Regenerate.
643 * testsuite/plugin_test_9b_elf.cc: New test source file.
644 * testsuite/plugin_test_9b_ir.cc: New test source file.
646 2016-03-20 Cary Coutant <ccoutant@gmail.com>
649 * ehframe.cc (Eh_frame::read_fde): Check for dropped functions.
650 * testsuite/Makefile.am (eh_test_2): New test.
651 * testsuite/Makefile.in: Regenerate.
652 * testsuite/eh_test_2.sh: New test script.
653 * testsuite/eh_test_a.cc (bar): Make it comdat.
654 * testsuite/eh_test_b.cc (bar): Add a duplicate copy.
656 2016-03-18 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
658 * mips.cc (Mips_relobj::is_n64_): Remove.
659 (Target_mips::ei_class_): Likewise.
660 (Mips_relobj::is_newabi): Call methods.
661 (Mips_relobj::is_n64): Change checking for N64 ABI.
662 (Target_mips::is_output_n64): Likewise.
663 (Target_mips::merge_processor_specific_flags): Remove ei_class
664 argument, and remove comparing ei_class.
665 (Target_mips::do_adjust_elf_header): Remove setting EI_CLASS field
667 (Target_mips::do_finalize_sections): Don't pass ei_class argument
668 to merge_processor_specific_flags.
669 (Target_mips::elf_mips_abi_name): Remove ei_class argument, and
670 change checking for N64 ABI.
672 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
674 * mips.cc (enum Special_relocation_symbol): New enum type.
675 (is_readonly_section): New function.
676 (eh_reloc): Likewise.
677 (Mips_got_entry::is_section_symbol_): New member.
678 (Mips_got_entry::is_section_symbol): New method.
679 (Mips_got_info::record_local_got_symbol): Add is_section_symbol
681 (Mips_relobj::mips_elf_options_section_name): New method.
682 (Mips_output_data_got::record_local_got_symbol): Add
683 is_section_symbol argument, and pass it to
684 Mips_got_info::record_local_got_symbol.
685 (Mips_output_data_got::got_offset): Add addend argument, and pass
686 it to Relobj::local_got_offset.
687 (struct Mips_output_reloc_writer): New type.
688 (class Mips_output_data_reloc): New class.
689 (Mips_output_data_plt::Reloc_section): Change type to
690 Mips_output_data_reloc.
691 (Target_mips::Reloc_section): Likewise.
692 (Mips_reloc_types::get_r_addend): Remove unsigned from return type.
693 (Mips_classify_reloc::get_r_type2): New method.
694 (Mips_classify_reloc::get_r_type3): Likewise.
695 (Mips_classify_reloc::get_r_ssym): Likewise.
696 (Target_mips::Reloca_section): Remove.
697 (Relocate::should_apply_static_reloc): Rename from
698 should_apply_r_mips_32_reloc.
699 (Target_mips::copy_reloc): Replace Reltype parameter with r_type
701 (Mips_relocate_functions::Valtype): New type.
702 (Mips_relocate_functions::Valtype64): New type.
703 (Mips_relocate_functions::check_overflow): New method.
704 (Mips_relocate_functions::mips_reloc_unshuffle): Move to public
706 (Mips_relocate_functions::mips_reloc_shuffle): Likewise.
707 (Mips_relocate_functions::rel16): Add support for resolving
708 relocations for Mips64.
709 (Mips_relocate_functions::rel32): Likewise.
710 (Mips_relocate_functions::reljalr): Likewise.
711 (Mips_relocate_functions::relpc32): Likewise.
712 (Mips_relocate_functions::rel26): Likewise.
713 (Mips_relocate_functions::relpc16): Likewise.
714 (Mips_relocate_functions::relmicromips_pc7_s1): Likewise.
715 (Mips_relocate_functions::relmicromips_pc10_s1): Likewise.
716 (Mips_relocate_functions::relmicromips_pc16_s1): Likewise.
717 (Mips_relocate_functions::do_relhi16): Likewise.
718 (Mips_relocate_functions::do_relgot16_local): Likewise.
719 (Mips_relocate_functions::rello16): Likewise.
720 (Mips_relocate_functions::relgot): Likewise.
721 (Mips_relocate_functions::relgotpage): Likewise.
722 (Mips_relocate_functions::relgotofst): Likewise.
723 (Mips_relocate_functions::relgot_hi16): Likewise.
724 (Mips_relocate_functions::relgot_lo16): Likewise.
725 (Mips_relocate_functions::relgprel): Likewise.
726 (Mips_relocate_functions::relgprel32): Likewise.
727 (Mips_relocate_functions::tlsrelhi16): Likewise.
728 (Mips_relocate_functions::tlsrello16): Likewise.
729 (Mips_relocate_functions::tlsrel32): Likewise.
730 (Mips_relocate_functions::relsub): Likewise.
731 (Mips_relocate_functions::releh): New method.
732 (Mips_relocate_functions::rel64): Likewise.
733 (Mips_got_info::record_local_got_symbol): Add is_section_symbol and
734 pass it to Mips_got_entry.
735 (Mips_got_info::add_local_entries): Pass addend argument
736 to code functions, and for STT_SECTION symbols call
737 add_symbolless_local_addend.
738 (Mips_got_info::add_tls_entries): Pass addend argument to code
740 (Mips_relobj::do_read_symbols): Read gp value that was used to
742 (Mips_output_data_plt::plt_entry): Remove opcode from l[wd]
743 instruction. Opcode for instruction will be selected later.
744 (Target_mips::gc_process_relocs): Add case for SHT_RELA.
745 (Target_mips::scan_relocatable_relocs): Likewise.
746 (Target_mips::emit_relocs_scan): Likewise.
747 (Target_mips::relocate_relocs): Likewise.
748 (Target_mips::do_finalize_sections): Skip objects for merging
749 processor specific flags in which all input sections will be
751 (mips_get_size_for_reloc): Add case for R_MIPS_EH.
752 (Target_mips::Scan::get_reference_flags): Likewise.
753 (Target_mips::relocate_special_relocatable): Call rel26 method with
754 calculate_only and calculated_value arguments.
755 (Target_mips::Scan::local): Add case for R_MIPS_EH. Don't create a
756 dynamic relocation against a readonly sections, and pass
757 is_section_symbol to Mips_got_info::record_local_got_symbol.
758 (Target_mips::Scan::global): Add case for R_MIPS_EH. Don't create a
759 dynamic relocation against a readonly sections, and pass r_type
760 and r_offset to Target_mips::copy_reloc.
761 (Target_mips::Relocate::relocate): Add support for resolving
762 relocations for Mips64.
763 (Target_mips::mips_info): Add case for Mips64 default dynamic
765 (Target_selector_mips): Correct emulation names.
767 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
769 * mips.cc (class Mips_output_data_la25_stub): Add
770 do_print_to_mapfile function.
772 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
774 * mips.cc (Mips_classify_reloc::put_r_info): Call 32bit version of
777 2016-03-09 H.J. Lu <hongjiu.lu@intel.com>
779 * testsuite/plugin_layout_with_alignment.cc: Renamed to ..
780 * testsuite/plugin_layout_with_alignment.c: This.
781 * testsuite/Makefile.am (plugin_layout_with_alignment.o): Updated.
782 (plugin_layout_with_alignment): Likewise.
783 * testsuite/Makefile.in: Regenerated.
785 2016-03-08 Cary Coutant <ccoutant@gmail.com>
788 * testsuite/Makefile.am (retain_symbols_file_test): Remove check
790 * testsuite/Makefile.in: Regenerate.
791 * testsuite/dynamic_list.sh: Likewise.
792 * testsuite/retain_symbols_file_test.sh: Likewise.
794 2016-03-08 Cary Coutant <ccoutant@gmail.com>
797 * arm.cc (Reloc_stub::Key::name): Add unused attribute.
798 * dirsearch.cc (Dir_caches::~Dir_caches): Likewise.
800 2016-03-08 Cary Coutant <ccoutant@gmail.com>
801 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
803 * output.cc (Output_reloc_writer): New type.
804 (Output_data_reloc_base::do_write): Move implementation to template
805 in output.h and replace with invocation of template.
806 * output.h (Output_file): Move to top of file.
807 (Output_reloc::get_symbol_index): Move to public interface.
808 (Output_reloc::get_address): Likewise.
809 (Output_data_reloc_base::do_write_generic): New function template.
811 2016-03-04 Cary Coutant <ccoutant@gmail.com>
815 * symtab.cc: Instantiate Sized_symbol::init_constant and
816 Sized_symbol::init_undefined.
818 2016-03-03 Cary Coutant <ccoutant@gmail.com>
821 * layout.h (Layout::add_target_specific_dynamic_tag): New function.
822 * layout.cc (Layout::add_target_specific_dynamic_tag): New function.
823 * mips.cc (Target_mips::make_symbol): Adjust function signature.
824 * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_.
825 (Target_sparc::do_is_defined_by_abi): Remove test for
827 (Target_sparc::Register_symbol): New struct type.
828 (Target_sparc::register_syms_): New data member.
829 (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true.
830 (Target_sparc::make_symbol): New function.
831 (Target_sparc::do_finalize_sections): Add register symbols and new
832 dynamic table entries.
833 * symtab.h (Sized_symbol::init_undefined): Add value parameter.
834 (Symbol_table::add_target_global_symbol): New function.
835 (Symbol_table::target_symbols_): New data member.
836 * symtab.cc (Sized_symbol::init_undefined): Add value parameter.
837 (Symbol_table::Symbol_table): Initialize target_symbols_.
838 (Symbol_table::add_from_object): Pass additional parameters to
840 (Symbol_table::define_special_symbol): Likewise.
841 (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for
842 undefined symbol value.
843 (Symbol_table::set_dynsym_indexes): Process target-specific symbols.
844 (Symbol_table::sized_finalize): Likewise.
845 (Symbol_table::sized_write_globals): Likewise.
846 * target.h (Sized_target::make_symbol): Add name, st_type, object,
847 st_shndx, and value parameters.
849 2016-03-03 Rafael Ăvila de EspĂndola <rafael.espindola@gmail.com>
851 * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and
852 LDPK_WEAKUNDEF symbols.
854 2016-03-03 Than McIntosh <thanm@google.com>
856 * plugin.cc (Plugin::load): Include hooks for get_input_section_size
857 and get_input_section_alignment in transfer vector.
858 (get_input_section_alignment): New function.
859 (get_input_section_size): New function.
860 * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test.
861 * testsuite/Makefile.in: [Regenerate.]
862 * testsuite/plugin_section_alignment.cc: New test file.
863 * testsuite/plugin_layout_with_alignment.cc: New test file.
864 * testsuite/plugin_layout_with_alignment.sh: New test file.
866 2016-03-03 Evgenii Stepanov <eugenis@google.com>
868 * plugin.h (Pluginobj::get_symbol_resolution_info): Add version
870 * plugin.cc (get_symbols_v3): New function.
871 (Plugin::load): Add LDPT_GET_SYMBOLS_V3.
872 (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using
875 2016-02-26 Egor Kochetov <egor.kochetov@intel.com>
876 Cary Coutant <ccoutant@gmail.com>
879 * ehframe.h (Cie::fde_encoding): New method.
880 * ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length
883 2016-02-15 H.J. Lu <hongjiu.lu@intel.com>
885 * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
886 -mrelax-relocations=yes to $(TEST_AS).
887 (x86_64_mov_to_lea6.o): Likewise.
888 (x86_64_overflow_pc32.o): Remove duplicated target.
889 * testsuite/Makefile.in: Regenerated.
891 2016-02-15 Marcin KoĆcielnicki <koriakin@0x04.net>
893 * s390.cc (Target_s390::match_view_u): New helper method.
894 (Target_s390::do_is_call_to_non_split): New method.
895 (Target_s390::ss_code_st_r14): New const.
896 (Target_s390::ss_code_l_r14): New const.
897 (Target_s390::ss_code_bras_8): New const.
898 (Target_s390::ss_code_l_basr): New const.
899 (Target_s390::ss_code_a_basr): New const.
900 (Target_s390::ss_code_ear): New const.
901 (Target_s390::ss_code_c): New const.
902 (Target_s390::ss_code_larl): New const.
903 (Target_s390::ss_code_brasl): New const.
904 (Target_s390::ss_code_jg): New const.
905 (Target_s390::ss_code_jgl): New const.
906 (Target_s390::ss_match_mcount): New helper method.
907 (Target_s390::ss_match_l): New helper method.
908 (Target_s390::ss_match_ahi): New helper method.
909 (Target_s390::ss_match_alfi): New helper method.
910 (Target_s390::ss_match_cr): New helper method.
911 (Target_s390::do_calls_non_split): New method.
912 * testsuite/Makefile.am: Added new tests.
913 * testsuite/Makefile.in: Regenerate.
914 * testsuite/split_s390.sh: New test.
915 * testsuite/split_s390_1_a1.s: New test.
916 * testsuite/split_s390_1_a2.s: New test.
917 * testsuite/split_s390_1_n1.s: New test.
918 * testsuite/split_s390_1_n2.s: New test.
919 * testsuite/split_s390_1_z1.s: New test.
920 * testsuite/split_s390_1_z2.s: New test.
921 * testsuite/split_s390_1_z3.s: New test.
922 * testsuite/split_s390_1_z4.s: New test.
923 * testsuite/split_s390_2_ns.s: New test.
924 * testsuite/split_s390_2_s.s: New test.
925 * testsuite/split_s390x_1_a1.s: New test.
926 * testsuite/split_s390x_1_a2.s: New test.
927 * testsuite/split_s390x_1_n1.s: New test.
928 * testsuite/split_s390x_1_n2.s: New test.
929 * testsuite/split_s390x_1_z1.s: New test.
930 * testsuite/split_s390x_1_z2.s: New test.
931 * testsuite/split_s390x_1_z3.s: New test.
932 * testsuite/split_s390x_1_z4.s: New test.
933 * testsuite/split_s390x_2_ns.s: New test.
934 * testsuite/split_s390x_2_s.s: New test.
936 2016-02-11 Rahul Chaudhry <rahulchaudhry@google.com>
938 * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove
939 info message for every erratum 843419 found and fixed.
941 2016-02-07 Cary Coutant <ccoutant@gmail.com>
944 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional
945 information to relocation overflow errors.
947 2016-02-06 Cary Coutant <ccoutant@gmail.com>
950 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32
951 overflow checking when symbol value + addend < 0.
953 2016-02-06 Cary Coutant <ccoutant@gmail.com>
956 * reloc.h (Limits): New class.
957 (Bits::has_overflow32): Use min/max values from Limits.
958 (Bits::has_unsigned_overflow32): Likewise.
959 (Bits::has_signed_unsigned_overflow32): Likewise.
960 (Bits::has_overflow): Likewise.
961 (Bits::has_unsigned_overflow): Likewise.
962 (Bits::has_signed_unsigned_overflow64): Likewise.
964 2016-02-06 Cary Coutant <ccoutant@gmail.com>
967 * reloc.h (Relocate_functions::Overflow_check): Add comments.
968 * x86_64.cc (X86_64_relocate_functions): New class.
969 (Target_x86_64::Relocate::relocate): Use the new class.
970 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option.
971 (x32_overflow_pc32): New test case.
972 * testsuite/Makefile.in: Regenerate.
973 * testsuite/x32_overflow_pc32.sh: New script.
974 * testsuite/x86_64_overflow_pc32.s: Remove .space directive.
976 2016-02-06 Cary Coutant <ccoutant@gmail.com>
979 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast.
980 (Bits::has_unsigned_overflow): Remove unnecessary static_cast.
982 2016-02-06 Cary Coutant <ccoutant@gmail.com>
985 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed
987 (Bits::has_unsigned_overflow): Likewise.
989 2016-02-06 Marcin KoĆcielnicki <koriakin@0x04.net>
991 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
993 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
994 and view_size to is_call_to_non_split.
995 * target.cc (Target::is_call_to_non_split): Add view and view_size
997 * target.h (class Target): Likewise.
999 2016-02-05 Sriraman Tallam <tmsriram@google.com>
1001 * icf.cc (get_rel_addend): New function.
1002 (get_section_contents): Move merge section addend computation to a
1003 new function. Ignore negative values for SHT_REL and SHT_RELA addends.
1004 Fix bug to not read past the length of the section.
1006 2016-02-05 Cary Coutant <ccoutant@gmail.com>
1007 Andrew Senkevich <andrew.senkevich@intel.com>
1010 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow
1011 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and
1013 * testsuite/Makefile.am (x86_64_overflow_pc32): New test.
1014 * testsuite/x86_64_overflow_pc32.sh: New test script.
1015 * testsuite/x86_64_overflow_pc32.s: New source file.
1017 2016-02-05 Cary Coutant <ccoutant@gmail.com>
1020 * reloc.h (Relocate_functions::Address): New typedef.
1021 (Relocate_functions::Addendtype): New typedef.
1022 (Relocate_functions::Overflow_check): New enum type.
1023 (Relocate_functions::Reloc_status): New enum type.
1024 (Relocate_functions::check_overflow): New function template.
1025 (Relocate_functions::rel): Add check parameter; check for overflow.
1026 (Relocate_functions::rel_unaligned): Likewise.
1027 (Relocate_functions::rela): Likewise.
1028 (Relocate_functions::pcrel): Likewise.
1029 (Relocate_functions::pcrel_unaligned): Likewise.
1030 (Relocate_functions::pcrela): Likewise.
1031 (Relocate_functions::rel8): Adjust parameter types.
1032 (Relocate_functions::rela8): Likewise.
1033 (Relocate_functions::pcrel8): Likewise.
1034 (Relocate_functions::pcrela8): Likewise.
1035 (Relocate_functions::rel16): Likewise.
1036 (Relocate_functions::rela168): Likewise.
1037 (Relocate_functions::pcrel16): Likewise.
1038 (Relocate_functions::pcrela16): Likewise.
1039 (Relocate_functions::rel32): Likewise.
1040 (Relocate_functions::rel32_unaligned): Likewise.
1041 (Relocate_functions::rela32): Likewise.
1042 (Relocate_functions::pcrel32): Likewise.
1043 (Relocate_functions::pcrel32_unaligned): Likewise.
1044 (Relocate_functions::pcrela32): Likewise.
1045 (Relocate_functions::rel8_check): New function.
1046 (Relocate_functions::rela8_check): New function.
1047 (Relocate_functions::pcrel8_check): New function.
1048 (Relocate_functions::pcrela8_check): New function.
1049 (Relocate_functions::rel16_check): New function.
1050 (Relocate_functions::rela168_check): New function.
1051 (Relocate_functions::pcrel16_check): New function.
1052 (Relocate_functions::pcrela16_check): New function.
1053 (Relocate_functions::rel32_check): New function.
1054 (Relocate_functions::rel32_unaligned_check): New function.
1055 (Relocate_functions::rela32_check): New function.
1056 (Relocate_functions::pcrel32_check): New function.
1057 (Relocate_functions::pcrel32_unaligned_check): New function.
1058 (Relocate_functions::pcrela32_check): New function.
1059 (Bits::has_unsigned_overflow32): New function.
1060 (Bits::has_unsigned_overflow): New function.
1061 * testsuite/Makefile.am (overflow_unittest): New test.
1062 * testsuite/Makefile.in: Regenerate.
1063 * testsuite/overflow_unittest.cc: New source file.
1065 2016-02-04 Alan Modra <amodra@gmail.com>
1067 * powerpc.cc (relocate): Adjust last patch for big-endian.
1069 2016-02-02 Alan Modra <amodra@gmail.com>
1071 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
1073 2016-01-15 Han Shen <shenhan@google.com>
1075 PR gold/19472 - need pc-relative stubs.
1077 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
1078 stub type for DSOs and pie executables.
1080 2016-01-12 H.J. Lu <hongjiu.lu@intel.com>
1082 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
1085 2016-01-12 Cary Coutant <ccoutant@gmail.com>
1087 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
1088 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
1089 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
1090 specializations) New method.
1092 2016-01-11 Cary Coutant <ccoutant@gmail.com>
1095 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
1096 we have a TLS segment for GD-to-IE optimization.
1097 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
1099 (Target_i386::tls_desc_gd_to_ie): Likewise.
1100 (Target_i386::relocate_tls): Don't insist that we have a TLS segment
1101 for TLSDESC GD-to-IE optimizations.
1102 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
1104 (Target_x86_64::tls_desc_gd_to_ie): Likewise.
1105 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
1106 for TLSDESC GD-to-IE optimizations.
1108 2016-01-11 Cary Coutant <ccoutant@gmail.com>
1110 Refactor gold to enable support for MIPS-64 relocation format.
1112 * gc.h (get_embedded_addend_size): Remove sh_type parameter.
1113 (gc_process_relocs): Remove sh_type template parameter.
1114 Use Classify_reloc to access r_sym, r_type, and r_addend fields.
1115 * object.h (Sized_relobj_file::split_stack_adjust): Add target
1117 (Sized_relobj_file::split_stack_adjust_reltype): Likewise.
1118 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
1119 specializations) Remove.
1120 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
1121 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
1122 (Sized_relobj_file::emit_relocs_scan_reltype): Remove.
1123 (Sized_relobj_file::split_stack_adjust): Add target parameter.
1125 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
1126 Target::get_r_sym() to get r_sym field from relocations.
1127 (Track_relocs::next_symndx): Call Target::get_r_sym().
1128 * target-reloc.h (scan_relocs): Remove sh_type template parameter;
1129 add Classify_reloc template parameter. Use for accessing r_sym and
1131 (relocate_section): Likewise.
1132 (Default_classify_reloc): New class (renamed and moved from reloc.cc).
1133 (Default_scan_relocatable_relocs): Remove sh_type template parameter.
1134 (Default_scan_relocatable_relocs::Reltype): New typedef.
1135 (Default_scan_relocatable_relocs::reloc_size): New const.
1136 (Default_scan_relocatable_relocs::sh_type): New const.
1137 (Default_scan_relocatable_relocs::get_r_sym): New method.
1138 (Default_scan_relocatable_relocs::get_r_type): New method.
1139 (Default_emit_relocs_strategy): New class.
1140 (scan_relocatable_relocs): Replace sh_type template parameter with
1141 Scan_relocatable_relocs class. Use it to access r_sym and r_type
1143 (relocate_relocs): Replace sh_type template parameter with
1144 Classify_reloc class. Use it to access r_sym and r_type fields.
1145 * target.h (Target::is_call_to_non_split): Replace r_type parameter
1146 with pointer to relocation. Adjust all callers.
1147 (Target::do_is_call_to_non_split): Likewise.
1148 (Target::emit_relocs_scan): New virtual method.
1149 (Sized_target::get_r_sym): New virtual method.
1150 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
1151 with pointer to relocation.
1153 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
1154 (Target_aarch64::Relocatable_size_for_reloc): Remove.
1155 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
1156 (Target_aarch64::scan_relocs): Likewise.
1157 (Target_aarch64::relocate_section): Likewise.
1158 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
1160 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
1161 (Target_aarch64::relocate_relocs): Use Default_classify_reloc.
1162 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
1164 (Target_arm::emit_relocs_scan): New method.
1165 (Target_arm::Relocatable_size_for_reloc): Replace with...
1166 (Target_arm::Classify_reloc): ...this.
1167 (Target_arm::gc_process_relocs): Use Classify_reloc.
1168 (Target_arm::scan_relocs): Likewise.
1169 (Target_arm::relocate_section): Likewise.
1170 (Target_arm::scan_relocatable_relocs): Likewise.
1171 (Target_arm::relocate_relocs): Likewise.
1172 * i386.cc (Target_i386::emit_relocs_scan): New method.
1173 (Target_i386::Relocatable_size_for_reloc): Replace with...
1174 (Target_i386::Classify_reloc): ...this.
1175 (Target_i386::gc_process_relocs): Use Classify_reloc.
1176 (Target_i386::scan_relocs): Likewise.
1177 (Target_i386::relocate_section): Likewise.
1178 (Target_i386::scan_relocatable_relocs): Likewise.
1179 (Target_i386::relocate_relocs): Likewise.
1180 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
1182 (Mips_reloc_types): New class template.
1183 (Mips_classify_reloc): New class template.
1184 (Target_mips::Reltype): New typedef.
1185 (Target_mips::Relatype): New typedef.
1186 (Target_mips::emit_relocs_scan): New method.
1187 (Target_mips::get_r_sym): New method.
1188 (Target_mips::Relocatable_size_for_reloc): Replace with
1189 Mips_classify_reloc.
1190 (Target_mips::copy_reloc): Use Mips_classify_reloc.
1191 (Target_mips::gc_process_relocs): Likewise.
1192 (Target_mips::scan_relocs): Likewise.
1193 (Target_mips::relocate_section): Likewise.
1194 (Target_mips::scan_relocatable_relocs): Likewise.
1195 (Target_mips::relocate_relocs): Likewise.
1196 (mips_get_size_for_reloc): New function, factored out from
1197 Relocatable_size_for_reloc::get_size_for_reloc.
1198 (Target_mips::Scan::local): Use Mips_classify_reloc.
1199 (Target_mips::Scan::global): Likewise.
1200 (Target_mips::Relocate::relocate): Likewise.
1201 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
1202 (Target_powerpc::Relocatable_size_for_reloc): Remove.
1203 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
1204 (Target_powerpc::scan_relocs): Likewise.
1205 (Target_powerpc::relocate_section): Likewise.
1206 (Powerpc_scan_relocatable_reloc): Convert to class template.
1207 (Powerpc_scan_relocatable_reloc::Reltype): New typedef.
1208 (Powerpc_scan_relocatable_reloc::reloc_size): New const.
1209 (Powerpc_scan_relocatable_reloc::sh_type): New const.
1210 (Powerpc_scan_relocatable_reloc::get_r_sym): New method.
1211 (Powerpc_scan_relocatable_reloc::get_r_type): New method.
1212 (Target_powerpc::scan_relocatable_relocs): Use
1213 Powerpc_scan_relocatable_reloc.
1214 (Target_powerpc::relocate_relocs): Use Default_classify_reloc.
1215 * s390.cc (Target_s390::emit_relocs_scan): New method.
1216 (Target_s390::Relocatable_size_for_reloc): Remove.
1217 (Target_s390::gc_process_relocs): Use Default_classify_reloc.
1218 (Target_s390::scan_relocs): Likewise.
1219 (Target_s390::relocate_section): Likewise.
1220 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
1222 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
1223 (Target_s390::relocate_relocs): Use Default_classify_reloc.
1224 * sparc.cc (Target_sparc::emit_relocs_scan): New method.
1225 (Target_sparc::Relocatable_size_for_reloc): Remove.
1226 (Target_sparc::gc_process_relocs): Use Default_classify_reloc.
1227 (Target_sparc::scan_relocs): Likewise.
1228 (Target_sparc::relocate_section): Likewise.
1229 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
1231 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
1232 (Target_sparc::relocate_relocs): Use Default_classify_reloc.
1233 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
1234 (Target_tilegx::Relocatable_size_for_reloc): Remove.
1235 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
1236 (Target_tilegx::scan_relocs): Likewise.
1237 (Target_tilegx::relocate_section): Likewise.
1238 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
1240 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
1241 (Target_tilegx::relocate_relocs): Use Default_classify_reloc.
1242 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
1243 (Target_x86_64::Relocatable_size_for_reloc): Remove.
1244 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
1245 (Target_x86_64::scan_relocs): Likewise.
1246 (Target_x86_64::relocate_section): Likewise.
1247 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
1249 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
1250 (Target_x86_64::relocate_relocs): Use Default_classify_reloc.
1252 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
1254 2016-01-01 Alan Modra <amodra@gmail.com>
1256 Update year range in copyright notice of all files.
1258 For older changes see ChangeLog-0815
1260 Copyright (C) 2016 Free Software Foundation, Inc.
1262 Copying and distribution of this file, with or without modification,
1263 are permitted in any medium without royalty provided the copyright
1264 notice and this notice are preserved.
1270 version-control: never