1 2016-06-23 Igor Kudrin <ikudrin@accesssoftek.com>
3 * gold-threads.cc (impl_threads::Lock_impl_threads): Fix typos.
5 2016-06-22 H.J. Lu <hongjiu.lu@intel.com>
8 * NEWS: Mention --enable-relro.
9 * configure.ac: Add --enable-relro.
10 (DEFAULT_LD_Z_RELRO): New. Set by --enable-relro and default
12 * config.in: Regenerated.
13 * configure: Likewise.
14 * options.h (General_options::relro): Default to
17 2016-06-20 Cary Coutant <ccoutant@gmail.com>
19 * NEWS: Add new features in 1.12.
20 * version.cc (version_string): Bump to 1.12.
22 2016-06-20 H.J. Lu <hongjiu.lu@intel.com>
25 * i386.cc (Target_i386::first_plt_entry_offset): Return 0 if
27 (Target_i386::plt_entry_size): Likewise.
28 (Target_x86_64<size>::first_plt_entry_offset): Likewise.
29 (Target_x86_64<size>::plt_entry_size): Likewise.
31 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
33 * mips.cc (Target_mips::Target_mips): Initialize rld_map_.
34 (Target_mips::rld_map_): New data member.
35 (Target_mips::do_finalize_sections): Add support for
36 DT_MIPS_RLD_MAP and DT_MIPS_RLD_MAP_REL dynamic tags,
37 .rld_map section, and __RLD_MAP symbol.
38 (Target_mips::do_dynamic_tag_custom_value): Add support for
39 DT_MIPS_RLD_MAP_REL dynamic tag.
40 * output.cc (Output_data_dynamic::get_entry_offset): New method
42 * output.h (Output_data_dynamic::get_entry_offset): New method
45 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
47 * mips.cc (Mips_relocate_functions::relpc16): Add unaligned check.
49 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
51 * mips.cc (relocation_needs_la25_stub): Add support for relocs:
52 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
53 (hi16_reloc): Add support for R_MIPS_PCHI16 relocation.
54 (is_matching_lo16_reloc): Likewise.
55 (lo16_reloc): Add support for R_MIPS_PCLO16 relocation.
56 (Mips_output_data_plt::plt_entry_r6): New static data member for
58 (Target_mips::is_output_r6): New method.
59 (Target_mips::Mips_mach): Add new enum constants.
60 (Mips_relocate_functions::Status): Likewise.
61 (Mips_relocate_functions::pchi16_relocs): New static data member.
62 (Mips_relocate_functions::relpc21): New method.
63 (Mips_relocate_functions::relpc26): Likewise.
64 (Mips_relocate_functions::relpc18): Likewise.
65 (Mips_relocate_functions::relpc19): Likewise.
66 (Mips_relocate_functions::relpchi16): Likewise.
67 (Mips_relocate_functions::do_relpchi16): Likewise.
68 (Mips_relocate_functions::relpclo16): Likewise.
69 (Mips_output_data_plt::do_write): Add support for Mips r6 plt
71 (Target_mips::mips_32bit_flags): Add E_MIPS_ARCH_32R6 support.
72 (Target_mips::elf_mips_mach): Add E_MIPS_ARCH_32R6 and
73 E_MIPS_ARCH_64R6 support.
74 (Target_mips::update_abiflags_isa): Likewise.
75 (mips_get_size_for_reloc): Add support for relocs: R_MIPS_PCHI16,
76 R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3 and
78 (Target_mips::Scan::local): Add support for relocs: R_MIPS_PCHI16
80 (Target_mips::Scan::global): Add support for relocs:
81 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
82 (Target_mips::Relocate::relocate): Call functions for resolving
83 Mips32r6 and Mips64r6 relocations, and print error message for
84 STATUS_PCREL_UNALIGNED.
85 (Target_mips::Scan::get_reference_flags): Add support for relocs:
86 R_MIPS_PCHI16, R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2,
87 R_MIPS_PC18_S3 and R_MIPS_PC19_S2.
88 (Target_mips::elf_mips_mach_name): Add E_MIPS_ARCH_32R6 and
89 E_MIPS_ARCH_64R6 support.
91 2016-06-13 H.J. Lu <hongjiu.lu@intel.com>
94 * testsuite/script_test_2.t: Add .got.plt after .got.
96 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
98 * mips.cc (struct Mips_abiflags): New struct.
99 (Mips_relobj::Mips_relobj): Initialize attributes_section_data_
101 (Mips_relobj::~Mips_relobj): Delete object pointed by
102 attributes_section_data_.
103 (Mips_relobj::abiflags): New method.
104 (Mips_relobj::attributes_section_data): Likewise.
105 (Mips_relobj::attributes_section_data_): New data member.
106 (Mips_relobj::abiflags_): Likewise.
107 (class Mips_output_section_abiflags): New class.
108 (Target_mips::Target_mips): Initialize attributes_section_data_,
109 abiflags_ and has_abiflags_section_.
110 (Target_mips::do_should_include_section): Don't emit input
111 .MIPS.abiflags sections to output .MIPS.abiflags.
112 (Target_mips::Mips_mach): Add new enum constants.
113 (Target_mips::mips_isa_ext_mach): New method.
114 (Target_mips::mips_isa_ext): Likewise.
115 (Target_mips::update_abiflags_isa): Likewise.
116 (Target_mips::infer_abiflags): Likewise.
117 (Target_mips::create_abiflags): Likewise.
118 (Target_mips::fp_abi_string): Likewise.
119 (Target_mips::select_fp_abi): Likewise.
120 (Target_mips::merge_obj_attributes): Likewise.
121 (Target_mips::merge_obj_abiflags): Likewise.
122 (Target_mips::level_rev): Likewise.
123 (Target_mips::merge_obj_e_flags): Rename from
124 merge_processor_specific_flags. Remove dyn_obj argument,
125 call update_abiflags_isa when needed, compare NaN encodings and
127 (Target_mips::add_machine_extensions): Add two machine extensions
129 (Target_mips::attributes_section_data_): New data member.
130 (Target_mips::abiflags_): Likewise.
131 (Target_mips::has_abiflags_section_): Likewise.
132 (Mips_relobj::do_read_symbols): Read .gnu.attributes and
133 .MIPS.abiflags sections if they exists.
134 (Target_mips::elf_mips_mach): Add E_MIPS_MACH_5900 and
135 E_MIPS_MACH_OCTEON3 support.
136 (Target_mips::do_adjust_elf_header): Setup EI_ABIVERSION flag.
137 (Target_mips::do_finalize_sections): Merge .gnu.attributes and
138 .MIPS.abiflags sections from input. Create these sections if
140 (Target_mips::elf_mips_mach_name): Add E_MIPS_MACH_5900 and
141 E_MIPS_MACH_OCTEON3 support, and change strings for
142 E_MIPS_MACH_LS2E, E_MIPS_MACH_LS2F and E_MIPS_MACH_LS3A just
145 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
147 * mips.cc (Mips_relobj::Mips_relobj): Initialize
148 has_reginfo_section_.
149 (Mips_relobj::has_reginfo_section_): New data member.
150 (Mips_relobj::has_reginfo_section): New method.
151 (class Mips_output_section_reginfo): Change base class to
152 Output_section_data, and set masks of the output .reginfo section
154 (Mips_output_section_reginfo::as_mips_output_section_reginfo):
156 (Mips_output_section_reginfo::set_masks): Likewise.
157 (Mips_output_section_reginfo::set_final_data_size): Likewise.
158 (Mips_output_section_reginfo::do_print_to_mapfile): New method.
159 (Target_mips::do_make_output_section): Remove.
160 (Mips_relobj::do_read_symbols): Set has_reginfo_section_ to true
161 if the object contains a .reginfo section.
162 (Target_mips::do_finalize_sections): Create a .reginfo output
165 2016-06-09 Artemiy Volkov <artemiyv@acm.org>
167 * mips.cc (Mips_output_data_got::do_write): Add missing template
170 2016-05-30 Marcin KoĆcielnicki <koriakin@0x04.net>
173 * s390.cc (Target_s390::ss_code_st_r14): Removed.
174 (Target_s390::ss_code_l_r14): Removed.
175 (Target_s390::ss_code_ear): Removed.
176 (Target_s390::ss_code_c): Removed.
177 (Target_s390::ss_match_st_r14): New function.
178 (Target_s390::ss_match_l_r14): New function.
179 (Target_s390::ss_match_mcount): Call ss_match_{l,st}_r14 instead
180 of matching code directly.
181 (Target_s390::ss_match_ear): New function.
182 (Target_s390::ss_match_c): New function.
183 (Target_s390::do_calls_non_split): Call ss_match_{ear,c} instead
184 of matching code directly.
186 2016-05-19 Cary Coutant <ccoutant@gmail.com>
189 * copy-relocs.cc (Copy_relocs::make_copy_reloc): Add object
190 parameter; check for protected symbol.
191 * copy-relocs.h (Copy_relocs::make_copy_reloc): Add object parameter.
192 * mips.cc (Mips_copy_relocs): Adjust call to make_copy_reloc.
193 * symtab.cc (Symbol::init_fields): Initialize is_protected_.
194 (Symbol_table::add_from_dynobj): Mark protected symbols.
195 * symtab.h (Symbol::is_protected): New method.
196 (Symbol::set_is_protected): New method.
197 (Symbol::is_protected_): New data member.
199 * testsuite/Makefile.am (copy_test_protected): New test.
200 * testsuite/Makefile.in: Regenerate.
201 * testsuite/copy_test.cc (main): Add legal reference to protected
203 * testsuite/copy_test_v1.cc (main): Likewise.
204 * testsuite/copy_test_2.cc (ip): Add protected symbol.
205 * testsuite/copy_test_protected.cc: New test source file.
206 * testsuite/copy_test_protected.sh: New test script.
208 2016-05-19 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
210 * mips.cc (Mips_got_entry::Mips_got_entry): Remove object argument
211 for global got symbols, and set addend to 0.
212 (Mips_got_entry::hash): Change hash algorithm.
213 (Mips_got_entry::equals): Refactor.
214 (Mips_got_entry::object): Return input object for local got symbols
216 (Mips_got_entry::addend): Change return of the relocation addend.
217 (Mips_got_entry::addend_): Move from union d.
218 (Mips_got_entry::object_): Move into union d.
219 (class Mips_symbol_hash): New class.
220 (Mips_got_info::Global_got_entry_set): New type.
221 (Mips_got_info::global_got_symbols): Change return type to
222 Global_got_entry_set.
223 (Mips_got_info::global_got_symbols_): Change type to
224 Global_got_entry_set.
225 (Mips_symbol::hash): New method.
226 (Mips_output_data_la25_stub::symbols_): Change type to std::vector.
227 (Mips_output_data_mips_stubs::Mips_stubs_entry_set): New type.
228 (Mips_output_data_mips_stubs::symbols_): Change type to
229 Mips_stubs_entry_set.
230 (Mips_got_info::record_global_got_symbol): Don't pass object
231 argument when creating global got symbol.
232 (Mips_got_info::record_got_entry): Remove find before inserting
234 (Mips_got_info::add_reloc_only_entries): Change type of iterator
235 to Global_got_entry_set.
236 (Mips_got_info::count_got_symbols): Likewise.
237 (Mips_output_data_la25_stub::create_la25_stub): Use push_back
238 for adding entries to symbols_.
239 (Mips_output_data_la25_stub::do_write): Change type of iterator
241 (Mips_output_data_mips_stubs::set_lazy_stub_offsets): Change type
242 of iterator to Mips_stubs_entry_set.
243 (Mips_output_data_mips_stubs::set_needs_dynsym_value): Likewise.
244 (Mips_output_data_mips_stubs::do_write): Likewise.
246 2016-05-06 Han Shen <shenhan@google.com>
250 * aarch64-reloc.def: New relocation type.
251 * aarch64.cc (AArch64_relocate_functions::Page): Changed to public.
252 (Target_aarch64::Scan::local): Add R_AARCH64_LD64_GOTPAGE_LO15.
253 (Target_aarch64::Scan::global): Add R_AARCH64_LD64_GOTPAGE_LO15.
254 (Target_aarch64::Relocate::relocate): Implement R_AARCH64_LD64_GOTPAGE_LO15.
256 2016-04-28 Nick Clifton <nickc@redhat.com>
258 * po/zh_CN.po: Updated Chinese (simplified) translation.
260 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
262 * Makefile.in: Regenerated with automake 1.11.6.
263 * aclocal.m4: Likewise.
264 * testsuite/Makefile.in: Likewise.
266 2016-03-30 Cary Coutant <ccoutant@gmail.com>
269 * symtab.cc (Symbol_table::define_default_version): Check for case
270 where symbols are both in different shared objects.
272 2016-03-27 Cary Coutant <ccoutant@gmail.com>
275 * i386.cc (Target_i386): Add check for fully-resolved symbol for
278 2016-03-22 Nick Clifton <nickc@redhat.com>
280 * configure: Regenerate.
282 2016-03-21 Cary Coutant <ccoutant@gmail.com>
285 * errors.cc (Errors::undefined_symbol): Add info message when
286 symbol should have been provided by a plugin.
287 * target-reloc.h (issue_undefined_symbol_error): Check for
288 placeholder symbols defined in discarded sections.
289 * testsuite/Makefile.am (plugin_test_9b): New test case.
290 * testsuite/Makefile.in: Regenerate.
291 * testsuite/plugin_test_9b_elf.cc: New test source file.
292 * testsuite/plugin_test_9b_ir.cc: New test source file.
294 2016-03-20 Cary Coutant <ccoutant@gmail.com>
297 * ehframe.cc (Eh_frame::read_fde): Check for dropped functions.
298 * testsuite/Makefile.am (eh_test_2): New test.
299 * testsuite/Makefile.in: Regenerate.
300 * testsuite/eh_test_2.sh: New test script.
301 * testsuite/eh_test_a.cc (bar): Make it comdat.
302 * testsuite/eh_test_b.cc (bar): Add a duplicate copy.
304 2016-03-18 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
306 * mips.cc (Mips_relobj::is_n64_): Remove.
307 (Target_mips::ei_class_): Likewise.
308 (Mips_relobj::is_newabi): Call methods.
309 (Mips_relobj::is_n64): Change checking for N64 ABI.
310 (Target_mips::is_output_n64): Likewise.
311 (Target_mips::merge_processor_specific_flags): Remove ei_class
312 argument, and remove comparing ei_class.
313 (Target_mips::do_adjust_elf_header): Remove setting EI_CLASS field
315 (Target_mips::do_finalize_sections): Don't pass ei_class argument
316 to merge_processor_specific_flags.
317 (Target_mips::elf_mips_abi_name): Remove ei_class argument, and
318 change checking for N64 ABI.
320 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
322 * mips.cc (enum Special_relocation_symbol): New enum type.
323 (is_readonly_section): New function.
324 (eh_reloc): Likewise.
325 (Mips_got_entry::is_section_symbol_): New member.
326 (Mips_got_entry::is_section_symbol): New method.
327 (Mips_got_info::record_local_got_symbol): Add is_section_symbol
329 (Mips_relobj::mips_elf_options_section_name): New method.
330 (Mips_output_data_got::record_local_got_symbol): Add
331 is_section_symbol argument, and pass it to
332 Mips_got_info::record_local_got_symbol.
333 (Mips_output_data_got::got_offset): Add addend argument, and pass
334 it to Relobj::local_got_offset.
335 (struct Mips_output_reloc_writer): New type.
336 (class Mips_output_data_reloc): New class.
337 (Mips_output_data_plt::Reloc_section): Change type to
338 Mips_output_data_reloc.
339 (Target_mips::Reloc_section): Likewise.
340 (Mips_reloc_types::get_r_addend): Remove unsigned from return type.
341 (Mips_classify_reloc::get_r_type2): New method.
342 (Mips_classify_reloc::get_r_type3): Likewise.
343 (Mips_classify_reloc::get_r_ssym): Likewise.
344 (Target_mips::Reloca_section): Remove.
345 (Relocate::should_apply_static_reloc): Rename from
346 should_apply_r_mips_32_reloc.
347 (Target_mips::copy_reloc): Replace Reltype parameter with r_type
349 (Mips_relocate_functions::Valtype): New type.
350 (Mips_relocate_functions::Valtype64): New type.
351 (Mips_relocate_functions::check_overflow): New method.
352 (Mips_relocate_functions::mips_reloc_unshuffle): Move to public
354 (Mips_relocate_functions::mips_reloc_shuffle): Likewise.
355 (Mips_relocate_functions::rel16): Add support for resolving
356 relocations for Mips64.
357 (Mips_relocate_functions::rel32): Likewise.
358 (Mips_relocate_functions::reljalr): Likewise.
359 (Mips_relocate_functions::relpc32): Likewise.
360 (Mips_relocate_functions::rel26): Likewise.
361 (Mips_relocate_functions::relpc16): Likewise.
362 (Mips_relocate_functions::relmicromips_pc7_s1): Likewise.
363 (Mips_relocate_functions::relmicromips_pc10_s1): Likewise.
364 (Mips_relocate_functions::relmicromips_pc16_s1): Likewise.
365 (Mips_relocate_functions::do_relhi16): Likewise.
366 (Mips_relocate_functions::do_relgot16_local): Likewise.
367 (Mips_relocate_functions::rello16): Likewise.
368 (Mips_relocate_functions::relgot): Likewise.
369 (Mips_relocate_functions::relgotpage): Likewise.
370 (Mips_relocate_functions::relgotofst): Likewise.
371 (Mips_relocate_functions::relgot_hi16): Likewise.
372 (Mips_relocate_functions::relgot_lo16): Likewise.
373 (Mips_relocate_functions::relgprel): Likewise.
374 (Mips_relocate_functions::relgprel32): Likewise.
375 (Mips_relocate_functions::tlsrelhi16): Likewise.
376 (Mips_relocate_functions::tlsrello16): Likewise.
377 (Mips_relocate_functions::tlsrel32): Likewise.
378 (Mips_relocate_functions::relsub): Likewise.
379 (Mips_relocate_functions::releh): New method.
380 (Mips_relocate_functions::rel64): Likewise.
381 (Mips_got_info::record_local_got_symbol): Add is_section_symbol and
382 pass it to Mips_got_entry.
383 (Mips_got_info::add_local_entries): Pass addend argument
384 to code functions, and for STT_SECTION symbols call
385 add_symbolless_local_addend.
386 (Mips_got_info::add_tls_entries): Pass addend argument to code
388 (Mips_relobj::do_read_symbols): Read gp value that was used to
390 (Mips_output_data_plt::plt_entry): Remove opcode from l[wd]
391 instruction. Opcode for instruction will be selected later.
392 (Target_mips::gc_process_relocs): Add case for SHT_RELA.
393 (Target_mips::scan_relocatable_relocs): Likewise.
394 (Target_mips::emit_relocs_scan): Likewise.
395 (Target_mips::relocate_relocs): Likewise.
396 (Target_mips::do_finalize_sections): Skip objects for merging
397 processor specific flags in which all input sections will be
399 (mips_get_size_for_reloc): Add case for R_MIPS_EH.
400 (Target_mips::Scan::get_reference_flags): Likewise.
401 (Target_mips::relocate_special_relocatable): Call rel26 method with
402 calculate_only and calculated_value arguments.
403 (Target_mips::Scan::local): Add case for R_MIPS_EH. Don't create a
404 dynamic relocation against a readonly sections, and pass
405 is_section_symbol to Mips_got_info::record_local_got_symbol.
406 (Target_mips::Scan::global): Add case for R_MIPS_EH. Don't create a
407 dynamic relocation against a readonly sections, and pass r_type
408 and r_offset to Target_mips::copy_reloc.
409 (Target_mips::Relocate::relocate): Add support for resolving
410 relocations for Mips64.
411 (Target_mips::mips_info): Add case for Mips64 default dynamic
413 (Target_selector_mips): Correct emulation names.
415 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
417 * mips.cc (class Mips_output_data_la25_stub): Add
418 do_print_to_mapfile function.
420 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
422 * mips.cc (Mips_classify_reloc::put_r_info): Call 32bit version of
425 2016-03-09 H.J. Lu <hongjiu.lu@intel.com>
427 * testsuite/plugin_layout_with_alignment.cc: Renamed to ..
428 * testsuite/plugin_layout_with_alignment.c: This.
429 * testsuite/Makefile.am (plugin_layout_with_alignment.o): Updated.
430 (plugin_layout_with_alignment): Likewise.
431 * testsuite/Makefile.in: Regenerated.
433 2016-03-08 Cary Coutant <ccoutant@gmail.com>
436 * testsuite/Makefile.am (retain_symbols_file_test): Remove check
438 * testsuite/Makefile.in: Regenerate.
439 * testsuite/dynamic_list.sh: Likewise.
440 * testsuite/retain_symbols_file_test.sh: Likewise.
442 2016-03-08 Cary Coutant <ccoutant@gmail.com>
445 * arm.cc (Reloc_stub::Key::name): Add unused attribute.
446 * dirsearch.cc (Dir_caches::~Dir_caches): Likewise.
448 2016-03-08 Cary Coutant <ccoutant@gmail.com>
449 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
451 * output.cc (Output_reloc_writer): New type.
452 (Output_data_reloc_base::do_write): Move implementation to template
453 in output.h and replace with invocation of template.
454 * output.h (Output_file): Move to top of file.
455 (Output_reloc::get_symbol_index): Move to public interface.
456 (Output_reloc::get_address): Likewise.
457 (Output_data_reloc_base::do_write_generic): New function template.
459 2016-03-04 Cary Coutant <ccoutant@gmail.com>
463 * symtab.cc: Instantiate Sized_symbol::init_constant and
464 Sized_symbol::init_undefined.
466 2016-03-03 Cary Coutant <ccoutant@gmail.com>
469 * layout.h (Layout::add_target_specific_dynamic_tag): New function.
470 * layout.cc (Layout::add_target_specific_dynamic_tag): New function.
471 * mips.cc (Target_mips::make_symbol): Adjust function signature.
472 * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_.
473 (Target_sparc::do_is_defined_by_abi): Remove test for
475 (Target_sparc::Register_symbol): New struct type.
476 (Target_sparc::register_syms_): New data member.
477 (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true.
478 (Target_sparc::make_symbol): New function.
479 (Target_sparc::do_finalize_sections): Add register symbols and new
480 dynamic table entries.
481 * symtab.h (Sized_symbol::init_undefined): Add value parameter.
482 (Symbol_table::add_target_global_symbol): New function.
483 (Symbol_table::target_symbols_): New data member.
484 * symtab.cc (Sized_symbol::init_undefined): Add value parameter.
485 (Symbol_table::Symbol_table): Initialize target_symbols_.
486 (Symbol_table::add_from_object): Pass additional parameters to
488 (Symbol_table::define_special_symbol): Likewise.
489 (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for
490 undefined symbol value.
491 (Symbol_table::set_dynsym_indexes): Process target-specific symbols.
492 (Symbol_table::sized_finalize): Likewise.
493 (Symbol_table::sized_write_globals): Likewise.
494 * target.h (Sized_target::make_symbol): Add name, st_type, object,
495 st_shndx, and value parameters.
497 2016-03-03 Rafael Ăvila de EspĂndola <rafael.espindola@gmail.com>
499 * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and
500 LDPK_WEAKUNDEF symbols.
502 2016-03-03 Than McIntosh <thanm@google.com>
504 * plugin.cc (Plugin::load): Include hooks for get_input_section_size
505 and get_input_section_alignment in transfer vector.
506 (get_input_section_alignment): New function.
507 (get_input_section_size): New function.
508 * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test.
509 * testsuite/Makefile.in: [Regenerate.]
510 * testsuite/plugin_section_alignment.cc: New test file.
511 * testsuite/plugin_layout_with_alignment.cc: New test file.
512 * testsuite/plugin_layout_with_alignment.sh: New test file.
514 2016-03-03 Evgenii Stepanov <eugenis@google.com>
516 * plugin.h (Pluginobj::get_symbol_resolution_info): Add version
518 * plugin.cc (get_symbols_v3): New function.
519 (Plugin::load): Add LDPT_GET_SYMBOLS_V3.
520 (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using
523 2016-02-26 Egor Kochetov <egor.kochetov@intel.com>
524 Cary Coutant <ccoutant@gmail.com>
527 * ehframe.h (Cie::fde_encoding): New method.
528 * ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length
531 2016-02-15 H.J. Lu <hongjiu.lu@intel.com>
533 * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
534 -mrelax-relocations=yes to $(TEST_AS).
535 (x86_64_mov_to_lea6.o): Likewise.
536 (x86_64_overflow_pc32.o): Remove duplicated target.
537 * testsuite/Makefile.in: Regenerated.
539 2016-02-15 Marcin KoĆcielnicki <koriakin@0x04.net>
541 * s390.cc (Target_s390::match_view_u): New helper method.
542 (Target_s390::do_is_call_to_non_split): New method.
543 (Target_s390::ss_code_st_r14): New const.
544 (Target_s390::ss_code_l_r14): New const.
545 (Target_s390::ss_code_bras_8): New const.
546 (Target_s390::ss_code_l_basr): New const.
547 (Target_s390::ss_code_a_basr): New const.
548 (Target_s390::ss_code_ear): New const.
549 (Target_s390::ss_code_c): New const.
550 (Target_s390::ss_code_larl): New const.
551 (Target_s390::ss_code_brasl): New const.
552 (Target_s390::ss_code_jg): New const.
553 (Target_s390::ss_code_jgl): New const.
554 (Target_s390::ss_match_mcount): New helper method.
555 (Target_s390::ss_match_l): New helper method.
556 (Target_s390::ss_match_ahi): New helper method.
557 (Target_s390::ss_match_alfi): New helper method.
558 (Target_s390::ss_match_cr): New helper method.
559 (Target_s390::do_calls_non_split): New method.
560 * testsuite/Makefile.am: Added new tests.
561 * testsuite/Makefile.in: Regenerate.
562 * testsuite/split_s390.sh: New test.
563 * testsuite/split_s390_1_a1.s: New test.
564 * testsuite/split_s390_1_a2.s: New test.
565 * testsuite/split_s390_1_n1.s: New test.
566 * testsuite/split_s390_1_n2.s: New test.
567 * testsuite/split_s390_1_z1.s: New test.
568 * testsuite/split_s390_1_z2.s: New test.
569 * testsuite/split_s390_1_z3.s: New test.
570 * testsuite/split_s390_1_z4.s: New test.
571 * testsuite/split_s390_2_ns.s: New test.
572 * testsuite/split_s390_2_s.s: New test.
573 * testsuite/split_s390x_1_a1.s: New test.
574 * testsuite/split_s390x_1_a2.s: New test.
575 * testsuite/split_s390x_1_n1.s: New test.
576 * testsuite/split_s390x_1_n2.s: New test.
577 * testsuite/split_s390x_1_z1.s: New test.
578 * testsuite/split_s390x_1_z2.s: New test.
579 * testsuite/split_s390x_1_z3.s: New test.
580 * testsuite/split_s390x_1_z4.s: New test.
581 * testsuite/split_s390x_2_ns.s: New test.
582 * testsuite/split_s390x_2_s.s: New test.
584 2016-02-11 Rahul Chaudhry <rahulchaudhry@google.com>
586 * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove
587 info message for every erratum 843419 found and fixed.
589 2016-02-07 Cary Coutant <ccoutant@gmail.com>
592 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional
593 information to relocation overflow errors.
595 2016-02-06 Cary Coutant <ccoutant@gmail.com>
598 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32
599 overflow checking when symbol value + addend < 0.
601 2016-02-06 Cary Coutant <ccoutant@gmail.com>
604 * reloc.h (Limits): New class.
605 (Bits::has_overflow32): Use min/max values from Limits.
606 (Bits::has_unsigned_overflow32): Likewise.
607 (Bits::has_signed_unsigned_overflow32): Likewise.
608 (Bits::has_overflow): Likewise.
609 (Bits::has_unsigned_overflow): Likewise.
610 (Bits::has_signed_unsigned_overflow64): Likewise.
612 2016-02-06 Cary Coutant <ccoutant@gmail.com>
615 * reloc.h (Relocate_functions::Overflow_check): Add comments.
616 * x86_64.cc (X86_64_relocate_functions): New class.
617 (Target_x86_64::Relocate::relocate): Use the new class.
618 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option.
619 (x32_overflow_pc32): New test case.
620 * testsuite/Makefile.in: Regenerate.
621 * testsuite/x32_overflow_pc32.sh: New script.
622 * testsuite/x86_64_overflow_pc32.s: Remove .space directive.
624 2016-02-06 Cary Coutant <ccoutant@gmail.com>
627 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast.
628 (Bits::has_unsigned_overflow): Remove unnecessary static_cast.
630 2016-02-06 Cary Coutant <ccoutant@gmail.com>
633 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed
635 (Bits::has_unsigned_overflow): Likewise.
637 2016-02-06 Marcin KoĆcielnicki <koriakin@0x04.net>
639 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
641 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
642 and view_size to is_call_to_non_split.
643 * target.cc (Target::is_call_to_non_split): Add view and view_size
645 * target.h (class Target): Likewise.
647 2016-02-05 Sriraman Tallam <tmsriram@google.com>
649 * icf.cc (get_rel_addend): New function.
650 (get_section_contents): Move merge section addend computation to a
651 new function. Ignore negative values for SHT_REL and SHT_RELA addends.
652 Fix bug to not read past the length of the section.
654 2016-02-05 Cary Coutant <ccoutant@gmail.com>
655 Andrew Senkevich <andrew.senkevich@intel.com>
658 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow
659 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and
661 * testsuite/Makefile.am (x86_64_overflow_pc32): New test.
662 * testsuite/x86_64_overflow_pc32.sh: New test script.
663 * testsuite/x86_64_overflow_pc32.s: New source file.
665 2016-02-05 Cary Coutant <ccoutant@gmail.com>
668 * reloc.h (Relocate_functions::Address): New typedef.
669 (Relocate_functions::Addendtype): New typedef.
670 (Relocate_functions::Overflow_check): New enum type.
671 (Relocate_functions::Reloc_status): New enum type.
672 (Relocate_functions::check_overflow): New function template.
673 (Relocate_functions::rel): Add check parameter; check for overflow.
674 (Relocate_functions::rel_unaligned): Likewise.
675 (Relocate_functions::rela): Likewise.
676 (Relocate_functions::pcrel): Likewise.
677 (Relocate_functions::pcrel_unaligned): Likewise.
678 (Relocate_functions::pcrela): Likewise.
679 (Relocate_functions::rel8): Adjust parameter types.
680 (Relocate_functions::rela8): Likewise.
681 (Relocate_functions::pcrel8): Likewise.
682 (Relocate_functions::pcrela8): Likewise.
683 (Relocate_functions::rel16): Likewise.
684 (Relocate_functions::rela168): Likewise.
685 (Relocate_functions::pcrel16): Likewise.
686 (Relocate_functions::pcrela16): Likewise.
687 (Relocate_functions::rel32): Likewise.
688 (Relocate_functions::rel32_unaligned): Likewise.
689 (Relocate_functions::rela32): Likewise.
690 (Relocate_functions::pcrel32): Likewise.
691 (Relocate_functions::pcrel32_unaligned): Likewise.
692 (Relocate_functions::pcrela32): Likewise.
693 (Relocate_functions::rel8_check): New function.
694 (Relocate_functions::rela8_check): New function.
695 (Relocate_functions::pcrel8_check): New function.
696 (Relocate_functions::pcrela8_check): New function.
697 (Relocate_functions::rel16_check): New function.
698 (Relocate_functions::rela168_check): New function.
699 (Relocate_functions::pcrel16_check): New function.
700 (Relocate_functions::pcrela16_check): New function.
701 (Relocate_functions::rel32_check): New function.
702 (Relocate_functions::rel32_unaligned_check): New function.
703 (Relocate_functions::rela32_check): New function.
704 (Relocate_functions::pcrel32_check): New function.
705 (Relocate_functions::pcrel32_unaligned_check): New function.
706 (Relocate_functions::pcrela32_check): New function.
707 (Bits::has_unsigned_overflow32): New function.
708 (Bits::has_unsigned_overflow): New function.
709 * testsuite/Makefile.am (overflow_unittest): New test.
710 * testsuite/Makefile.in: Regenerate.
711 * testsuite/overflow_unittest.cc: New source file.
713 2016-02-04 Alan Modra <amodra@gmail.com>
715 * powerpc.cc (relocate): Adjust last patch for big-endian.
717 2016-02-02 Alan Modra <amodra@gmail.com>
719 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
721 2016-01-15 Han Shen <shenhan@google.com>
723 PR gold/19472 - need pc-relative stubs.
725 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
726 stub type for DSOs and pie executables.
728 2016-01-12 H.J. Lu <hongjiu.lu@intel.com>
730 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
733 2016-01-12 Cary Coutant <ccoutant@gmail.com>
735 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
736 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
737 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
738 specializations) New method.
740 2016-01-11 Cary Coutant <ccoutant@gmail.com>
743 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
744 we have a TLS segment for GD-to-IE optimization.
745 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
747 (Target_i386::tls_desc_gd_to_ie): Likewise.
748 (Target_i386::relocate_tls): Don't insist that we have a TLS segment
749 for TLSDESC GD-to-IE optimizations.
750 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
752 (Target_x86_64::tls_desc_gd_to_ie): Likewise.
753 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
754 for TLSDESC GD-to-IE optimizations.
756 2016-01-11 Cary Coutant <ccoutant@gmail.com>
758 Refactor gold to enable support for MIPS-64 relocation format.
760 * gc.h (get_embedded_addend_size): Remove sh_type parameter.
761 (gc_process_relocs): Remove sh_type template parameter.
762 Use Classify_reloc to access r_sym, r_type, and r_addend fields.
763 * object.h (Sized_relobj_file::split_stack_adjust): Add target
765 (Sized_relobj_file::split_stack_adjust_reltype): Likewise.
766 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
767 specializations) Remove.
768 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
769 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
770 (Sized_relobj_file::emit_relocs_scan_reltype): Remove.
771 (Sized_relobj_file::split_stack_adjust): Add target parameter.
773 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
774 Target::get_r_sym() to get r_sym field from relocations.
775 (Track_relocs::next_symndx): Call Target::get_r_sym().
776 * target-reloc.h (scan_relocs): Remove sh_type template parameter;
777 add Classify_reloc template parameter. Use for accessing r_sym and
779 (relocate_section): Likewise.
780 (Default_classify_reloc): New class (renamed and moved from reloc.cc).
781 (Default_scan_relocatable_relocs): Remove sh_type template parameter.
782 (Default_scan_relocatable_relocs::Reltype): New typedef.
783 (Default_scan_relocatable_relocs::reloc_size): New const.
784 (Default_scan_relocatable_relocs::sh_type): New const.
785 (Default_scan_relocatable_relocs::get_r_sym): New method.
786 (Default_scan_relocatable_relocs::get_r_type): New method.
787 (Default_emit_relocs_strategy): New class.
788 (scan_relocatable_relocs): Replace sh_type template parameter with
789 Scan_relocatable_relocs class. Use it to access r_sym and r_type
791 (relocate_relocs): Replace sh_type template parameter with
792 Classify_reloc class. Use it to access r_sym and r_type fields.
793 * target.h (Target::is_call_to_non_split): Replace r_type parameter
794 with pointer to relocation. Adjust all callers.
795 (Target::do_is_call_to_non_split): Likewise.
796 (Target::emit_relocs_scan): New virtual method.
797 (Sized_target::get_r_sym): New virtual method.
798 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
799 with pointer to relocation.
801 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
802 (Target_aarch64::Relocatable_size_for_reloc): Remove.
803 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
804 (Target_aarch64::scan_relocs): Likewise.
805 (Target_aarch64::relocate_section): Likewise.
806 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
808 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
809 (Target_aarch64::relocate_relocs): Use Default_classify_reloc.
810 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
812 (Target_arm::emit_relocs_scan): New method.
813 (Target_arm::Relocatable_size_for_reloc): Replace with...
814 (Target_arm::Classify_reloc): ...this.
815 (Target_arm::gc_process_relocs): Use Classify_reloc.
816 (Target_arm::scan_relocs): Likewise.
817 (Target_arm::relocate_section): Likewise.
818 (Target_arm::scan_relocatable_relocs): Likewise.
819 (Target_arm::relocate_relocs): Likewise.
820 * i386.cc (Target_i386::emit_relocs_scan): New method.
821 (Target_i386::Relocatable_size_for_reloc): Replace with...
822 (Target_i386::Classify_reloc): ...this.
823 (Target_i386::gc_process_relocs): Use Classify_reloc.
824 (Target_i386::scan_relocs): Likewise.
825 (Target_i386::relocate_section): Likewise.
826 (Target_i386::scan_relocatable_relocs): Likewise.
827 (Target_i386::relocate_relocs): Likewise.
828 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
830 (Mips_reloc_types): New class template.
831 (Mips_classify_reloc): New class template.
832 (Target_mips::Reltype): New typedef.
833 (Target_mips::Relatype): New typedef.
834 (Target_mips::emit_relocs_scan): New method.
835 (Target_mips::get_r_sym): New method.
836 (Target_mips::Relocatable_size_for_reloc): Replace with
838 (Target_mips::copy_reloc): Use Mips_classify_reloc.
839 (Target_mips::gc_process_relocs): Likewise.
840 (Target_mips::scan_relocs): Likewise.
841 (Target_mips::relocate_section): Likewise.
842 (Target_mips::scan_relocatable_relocs): Likewise.
843 (Target_mips::relocate_relocs): Likewise.
844 (mips_get_size_for_reloc): New function, factored out from
845 Relocatable_size_for_reloc::get_size_for_reloc.
846 (Target_mips::Scan::local): Use Mips_classify_reloc.
847 (Target_mips::Scan::global): Likewise.
848 (Target_mips::Relocate::relocate): Likewise.
849 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
850 (Target_powerpc::Relocatable_size_for_reloc): Remove.
851 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
852 (Target_powerpc::scan_relocs): Likewise.
853 (Target_powerpc::relocate_section): Likewise.
854 (Powerpc_scan_relocatable_reloc): Convert to class template.
855 (Powerpc_scan_relocatable_reloc::Reltype): New typedef.
856 (Powerpc_scan_relocatable_reloc::reloc_size): New const.
857 (Powerpc_scan_relocatable_reloc::sh_type): New const.
858 (Powerpc_scan_relocatable_reloc::get_r_sym): New method.
859 (Powerpc_scan_relocatable_reloc::get_r_type): New method.
860 (Target_powerpc::scan_relocatable_relocs): Use
861 Powerpc_scan_relocatable_reloc.
862 (Target_powerpc::relocate_relocs): Use Default_classify_reloc.
863 * s390.cc (Target_s390::emit_relocs_scan): New method.
864 (Target_s390::Relocatable_size_for_reloc): Remove.
865 (Target_s390::gc_process_relocs): Use Default_classify_reloc.
866 (Target_s390::scan_relocs): Likewise.
867 (Target_s390::relocate_section): Likewise.
868 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
870 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
871 (Target_s390::relocate_relocs): Use Default_classify_reloc.
872 * sparc.cc (Target_sparc::emit_relocs_scan): New method.
873 (Target_sparc::Relocatable_size_for_reloc): Remove.
874 (Target_sparc::gc_process_relocs): Use Default_classify_reloc.
875 (Target_sparc::scan_relocs): Likewise.
876 (Target_sparc::relocate_section): Likewise.
877 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
879 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
880 (Target_sparc::relocate_relocs): Use Default_classify_reloc.
881 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
882 (Target_tilegx::Relocatable_size_for_reloc): Remove.
883 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
884 (Target_tilegx::scan_relocs): Likewise.
885 (Target_tilegx::relocate_section): Likewise.
886 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
888 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
889 (Target_tilegx::relocate_relocs): Use Default_classify_reloc.
890 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
891 (Target_x86_64::Relocatable_size_for_reloc): Remove.
892 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
893 (Target_x86_64::scan_relocs): Likewise.
894 (Target_x86_64::relocate_section): Likewise.
895 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
897 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
898 (Target_x86_64::relocate_relocs): Use Default_classify_reloc.
900 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
902 2016-01-01 Alan Modra <amodra@gmail.com>
904 Update year range in copyright notice of all files.
906 For older changes see ChangeLog-0815
908 Copyright (C) 2016 Free Software Foundation, Inc.
910 Copying and distribution of this file, with or without modification,
911 are permitted in any medium without royalty provided the copyright
912 notice and this notice are preserved.
918 version-control: never