1 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
3 * mips.cc (relocation_needs_la25_stub): Add support for relocs:
4 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
5 (hi16_reloc): Add support for R_MIPS_PCHI16 relocation.
6 (is_matching_lo16_reloc): Likewise.
7 (lo16_reloc): Add support for R_MIPS_PCLO16 relocation.
8 (Mips_output_data_plt::plt_entry_r6): New static data member for
10 (Target_mips::is_output_r6): New method.
11 (Target_mips::Mips_mach): Add new enum constants.
12 (Mips_relocate_functions::Status): Likewise.
13 (Mips_relocate_functions::pchi16_relocs): New static data member.
14 (Mips_relocate_functions::relpc21): New method.
15 (Mips_relocate_functions::relpc26): Likewise.
16 (Mips_relocate_functions::relpc18): Likewise.
17 (Mips_relocate_functions::relpc19): Likewise.
18 (Mips_relocate_functions::relpchi16): Likewise.
19 (Mips_relocate_functions::do_relpchi16): Likewise.
20 (Mips_relocate_functions::relpclo16): Likewise.
21 (Mips_output_data_plt::do_write): Add support for Mips r6 plt
23 (Target_mips::mips_32bit_flags): Add E_MIPS_ARCH_32R6 support.
24 (Target_mips::elf_mips_mach): Add E_MIPS_ARCH_32R6 and
25 E_MIPS_ARCH_64R6 support.
26 (Target_mips::update_abiflags_isa): Likewise.
27 (mips_get_size_for_reloc): Add support for relocs: R_MIPS_PCHI16,
28 R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3 and
30 (Target_mips::Scan::local): Add support for relocs: R_MIPS_PCHI16
32 (Target_mips::Scan::global): Add support for relocs:
33 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
34 (Target_mips::Relocate::relocate): Call functions for resolving
35 Mips32r6 and Mips64r6 relocations, and print error message for
36 STATUS_PCREL_UNALIGNED.
37 (Target_mips::Scan::get_reference_flags): Add support for relocs:
38 R_MIPS_PCHI16, R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2,
39 R_MIPS_PC18_S3 and R_MIPS_PC19_S2.
40 (Target_mips::elf_mips_mach_name): Add E_MIPS_ARCH_32R6 and
41 E_MIPS_ARCH_64R6 support.
43 2016-06-13 H.J. Lu <hongjiu.lu@intel.com>
46 * testsuite/script_test_2.t: Add .got.plt after .got.
48 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
50 * mips.cc (struct Mips_abiflags): New struct.
51 (Mips_relobj::Mips_relobj): Initialize attributes_section_data_
53 (Mips_relobj::~Mips_relobj): Delete object pointed by
54 attributes_section_data_.
55 (Mips_relobj::abiflags): New method.
56 (Mips_relobj::attributes_section_data): Likewise.
57 (Mips_relobj::attributes_section_data_): New data member.
58 (Mips_relobj::abiflags_): Likewise.
59 (class Mips_output_section_abiflags): New class.
60 (Target_mips::Target_mips): Initialize attributes_section_data_,
61 abiflags_ and has_abiflags_section_.
62 (Target_mips::do_should_include_section): Don't emit input
63 .MIPS.abiflags sections to output .MIPS.abiflags.
64 (Target_mips::Mips_mach): Add new enum constants.
65 (Target_mips::mips_isa_ext_mach): New method.
66 (Target_mips::mips_isa_ext): Likewise.
67 (Target_mips::update_abiflags_isa): Likewise.
68 (Target_mips::infer_abiflags): Likewise.
69 (Target_mips::create_abiflags): Likewise.
70 (Target_mips::fp_abi_string): Likewise.
71 (Target_mips::select_fp_abi): Likewise.
72 (Target_mips::merge_obj_attributes): Likewise.
73 (Target_mips::merge_obj_abiflags): Likewise.
74 (Target_mips::level_rev): Likewise.
75 (Target_mips::merge_obj_e_flags): Rename from
76 merge_processor_specific_flags. Remove dyn_obj argument,
77 call update_abiflags_isa when needed, compare NaN encodings and
79 (Target_mips::add_machine_extensions): Add two machine extensions
81 (Target_mips::attributes_section_data_): New data member.
82 (Target_mips::abiflags_): Likewise.
83 (Target_mips::has_abiflags_section_): Likewise.
84 (Mips_relobj::do_read_symbols): Read .gnu.attributes and
85 .MIPS.abiflags sections if they exists.
86 (Target_mips::elf_mips_mach): Add E_MIPS_MACH_5900 and
87 E_MIPS_MACH_OCTEON3 support.
88 (Target_mips::do_adjust_elf_header): Setup EI_ABIVERSION flag.
89 (Target_mips::do_finalize_sections): Merge .gnu.attributes and
90 .MIPS.abiflags sections from input. Create these sections if
92 (Target_mips::elf_mips_mach_name): Add E_MIPS_MACH_5900 and
93 E_MIPS_MACH_OCTEON3 support, and change strings for
94 E_MIPS_MACH_LS2E, E_MIPS_MACH_LS2F and E_MIPS_MACH_LS3A just
97 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
99 * mips.cc (Mips_relobj::Mips_relobj): Initialize
100 has_reginfo_section_.
101 (Mips_relobj::has_reginfo_section_): New data member.
102 (Mips_relobj::has_reginfo_section): New method.
103 (class Mips_output_section_reginfo): Change base class to
104 Output_section_data, and set masks of the output .reginfo section
106 (Mips_output_section_reginfo::as_mips_output_section_reginfo):
108 (Mips_output_section_reginfo::set_masks): Likewise.
109 (Mips_output_section_reginfo::set_final_data_size): Likewise.
110 (Mips_output_section_reginfo::do_print_to_mapfile): New method.
111 (Target_mips::do_make_output_section): Remove.
112 (Mips_relobj::do_read_symbols): Set has_reginfo_section_ to true
113 if the object contains a .reginfo section.
114 (Target_mips::do_finalize_sections): Create a .reginfo output
117 2016-06-09 Artemiy Volkov <artemiyv@acm.org>
119 * mips.cc (Mips_output_data_got::do_write): Add missing template
122 2016-05-30 Marcin KoĆcielnicki <koriakin@0x04.net>
125 * s390.cc (Target_s390::ss_code_st_r14): Removed.
126 (Target_s390::ss_code_l_r14): Removed.
127 (Target_s390::ss_code_ear): Removed.
128 (Target_s390::ss_code_c): Removed.
129 (Target_s390::ss_match_st_r14): New function.
130 (Target_s390::ss_match_l_r14): New function.
131 (Target_s390::ss_match_mcount): Call ss_match_{l,st}_r14 instead
132 of matching code directly.
133 (Target_s390::ss_match_ear): New function.
134 (Target_s390::ss_match_c): New function.
135 (Target_s390::do_calls_non_split): Call ss_match_{ear,c} instead
136 of matching code directly.
138 2016-05-19 Cary Coutant <ccoutant@gmail.com>
141 * copy-relocs.cc (Copy_relocs::make_copy_reloc): Add object
142 parameter; check for protected symbol.
143 * copy-relocs.h (Copy_relocs::make_copy_reloc): Add object parameter.
144 * mips.cc (Mips_copy_relocs): Adjust call to make_copy_reloc.
145 * symtab.cc (Symbol::init_fields): Initialize is_protected_.
146 (Symbol_table::add_from_dynobj): Mark protected symbols.
147 * symtab.h (Symbol::is_protected): New method.
148 (Symbol::set_is_protected): New method.
149 (Symbol::is_protected_): New data member.
151 * testsuite/Makefile.am (copy_test_protected): New test.
152 * testsuite/Makefile.in: Regenerate.
153 * testsuite/copy_test.cc (main): Add legal reference to protected
155 * testsuite/copy_test_v1.cc (main): Likewise.
156 * testsuite/copy_test_2.cc (ip): Add protected symbol.
157 * testsuite/copy_test_protected.cc: New test source file.
158 * testsuite/copy_test_protected.sh: New test script.
160 2016-05-19 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
162 * mips.cc (Mips_got_entry::Mips_got_entry): Remove object argument
163 for global got symbols, and set addend to 0.
164 (Mips_got_entry::hash): Change hash algorithm.
165 (Mips_got_entry::equals): Refactor.
166 (Mips_got_entry::object): Return input object for local got symbols
168 (Mips_got_entry::addend): Change return of the relocation addend.
169 (Mips_got_entry::addend_): Move from union d.
170 (Mips_got_entry::object_): Move into union d.
171 (class Mips_symbol_hash): New class.
172 (Mips_got_info::Global_got_entry_set): New type.
173 (Mips_got_info::global_got_symbols): Change return type to
174 Global_got_entry_set.
175 (Mips_got_info::global_got_symbols_): Change type to
176 Global_got_entry_set.
177 (Mips_symbol::hash): New method.
178 (Mips_output_data_la25_stub::symbols_): Change type to std::vector.
179 (Mips_output_data_mips_stubs::Mips_stubs_entry_set): New type.
180 (Mips_output_data_mips_stubs::symbols_): Change type to
181 Mips_stubs_entry_set.
182 (Mips_got_info::record_global_got_symbol): Don't pass object
183 argument when creating global got symbol.
184 (Mips_got_info::record_got_entry): Remove find before inserting
186 (Mips_got_info::add_reloc_only_entries): Change type of iterator
187 to Global_got_entry_set.
188 (Mips_got_info::count_got_symbols): Likewise.
189 (Mips_output_data_la25_stub::create_la25_stub): Use push_back
190 for adding entries to symbols_.
191 (Mips_output_data_la25_stub::do_write): Change type of iterator
193 (Mips_output_data_mips_stubs::set_lazy_stub_offsets): Change type
194 of iterator to Mips_stubs_entry_set.
195 (Mips_output_data_mips_stubs::set_needs_dynsym_value): Likewise.
196 (Mips_output_data_mips_stubs::do_write): Likewise.
198 2016-05-06 Han Shen <shenhan@google.com>
202 * aarch64-reloc.def: New relocation type.
203 * aarch64.cc (AArch64_relocate_functions::Page): Changed to public.
204 (Target_aarch64::Scan::local): Add R_AARCH64_LD64_GOTPAGE_LO15.
205 (Target_aarch64::Scan::global): Add R_AARCH64_LD64_GOTPAGE_LO15.
206 (Target_aarch64::Relocate::relocate): Implement R_AARCH64_LD64_GOTPAGE_LO15.
208 2016-04-28 Nick Clifton <nickc@redhat.com>
210 * po/zh_CN.po: Updated Chinese (simplified) translation.
212 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
214 * Makefile.in: Regenerated with automake 1.11.6.
215 * aclocal.m4: Likewise.
216 * testsuite/Makefile.in: Likewise.
218 2016-03-30 Cary Coutant <ccoutant@gmail.com>
221 * symtab.cc (Symbol_table::define_default_version): Check for case
222 where symbols are both in different shared objects.
224 2016-03-27 Cary Coutant <ccoutant@gmail.com>
227 * i386.cc (Target_i386): Add check for fully-resolved symbol for
230 2016-03-22 Nick Clifton <nickc@redhat.com>
232 * configure: Regenerate.
234 2016-03-21 Cary Coutant <ccoutant@gmail.com>
237 * errors.cc (Errors::undefined_symbol): Add info message when
238 symbol should have been provided by a plugin.
239 * target-reloc.h (issue_undefined_symbol_error): Check for
240 placeholder symbols defined in discarded sections.
241 * testsuite/Makefile.am (plugin_test_9b): New test case.
242 * testsuite/Makefile.in: Regenerate.
243 * testsuite/plugin_test_9b_elf.cc: New test source file.
244 * testsuite/plugin_test_9b_ir.cc: New test source file.
246 2016-03-20 Cary Coutant <ccoutant@gmail.com>
249 * ehframe.cc (Eh_frame::read_fde): Check for dropped functions.
250 * testsuite/Makefile.am (eh_test_2): New test.
251 * testsuite/Makefile.in: Regenerate.
252 * testsuite/eh_test_2.sh: New test script.
253 * testsuite/eh_test_a.cc (bar): Make it comdat.
254 * testsuite/eh_test_b.cc (bar): Add a duplicate copy.
256 2016-03-18 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
258 * mips.cc (Mips_relobj::is_n64_): Remove.
259 (Target_mips::ei_class_): Likewise.
260 (Mips_relobj::is_newabi): Call methods.
261 (Mips_relobj::is_n64): Change checking for N64 ABI.
262 (Target_mips::is_output_n64): Likewise.
263 (Target_mips::merge_processor_specific_flags): Remove ei_class
264 argument, and remove comparing ei_class.
265 (Target_mips::do_adjust_elf_header): Remove setting EI_CLASS field
267 (Target_mips::do_finalize_sections): Don't pass ei_class argument
268 to merge_processor_specific_flags.
269 (Target_mips::elf_mips_abi_name): Remove ei_class argument, and
270 change checking for N64 ABI.
272 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
274 * mips.cc (enum Special_relocation_symbol): New enum type.
275 (is_readonly_section): New function.
276 (eh_reloc): Likewise.
277 (Mips_got_entry::is_section_symbol_): New member.
278 (Mips_got_entry::is_section_symbol): New method.
279 (Mips_got_info::record_local_got_symbol): Add is_section_symbol
281 (Mips_relobj::mips_elf_options_section_name): New method.
282 (Mips_output_data_got::record_local_got_symbol): Add
283 is_section_symbol argument, and pass it to
284 Mips_got_info::record_local_got_symbol.
285 (Mips_output_data_got::got_offset): Add addend argument, and pass
286 it to Relobj::local_got_offset.
287 (struct Mips_output_reloc_writer): New type.
288 (class Mips_output_data_reloc): New class.
289 (Mips_output_data_plt::Reloc_section): Change type to
290 Mips_output_data_reloc.
291 (Target_mips::Reloc_section): Likewise.
292 (Mips_reloc_types::get_r_addend): Remove unsigned from return type.
293 (Mips_classify_reloc::get_r_type2): New method.
294 (Mips_classify_reloc::get_r_type3): Likewise.
295 (Mips_classify_reloc::get_r_ssym): Likewise.
296 (Target_mips::Reloca_section): Remove.
297 (Relocate::should_apply_static_reloc): Rename from
298 should_apply_r_mips_32_reloc.
299 (Target_mips::copy_reloc): Replace Reltype parameter with r_type
301 (Mips_relocate_functions::Valtype): New type.
302 (Mips_relocate_functions::Valtype64): New type.
303 (Mips_relocate_functions::check_overflow): New method.
304 (Mips_relocate_functions::mips_reloc_unshuffle): Move to public
306 (Mips_relocate_functions::mips_reloc_shuffle): Likewise.
307 (Mips_relocate_functions::rel16): Add support for resolving
308 relocations for Mips64.
309 (Mips_relocate_functions::rel32): Likewise.
310 (Mips_relocate_functions::reljalr): Likewise.
311 (Mips_relocate_functions::relpc32): Likewise.
312 (Mips_relocate_functions::rel26): Likewise.
313 (Mips_relocate_functions::relpc16): Likewise.
314 (Mips_relocate_functions::relmicromips_pc7_s1): Likewise.
315 (Mips_relocate_functions::relmicromips_pc10_s1): Likewise.
316 (Mips_relocate_functions::relmicromips_pc16_s1): Likewise.
317 (Mips_relocate_functions::do_relhi16): Likewise.
318 (Mips_relocate_functions::do_relgot16_local): Likewise.
319 (Mips_relocate_functions::rello16): Likewise.
320 (Mips_relocate_functions::relgot): Likewise.
321 (Mips_relocate_functions::relgotpage): Likewise.
322 (Mips_relocate_functions::relgotofst): Likewise.
323 (Mips_relocate_functions::relgot_hi16): Likewise.
324 (Mips_relocate_functions::relgot_lo16): Likewise.
325 (Mips_relocate_functions::relgprel): Likewise.
326 (Mips_relocate_functions::relgprel32): Likewise.
327 (Mips_relocate_functions::tlsrelhi16): Likewise.
328 (Mips_relocate_functions::tlsrello16): Likewise.
329 (Mips_relocate_functions::tlsrel32): Likewise.
330 (Mips_relocate_functions::relsub): Likewise.
331 (Mips_relocate_functions::releh): New method.
332 (Mips_relocate_functions::rel64): Likewise.
333 (Mips_got_info::record_local_got_symbol): Add is_section_symbol and
334 pass it to Mips_got_entry.
335 (Mips_got_info::add_local_entries): Pass addend argument
336 to code functions, and for STT_SECTION symbols call
337 add_symbolless_local_addend.
338 (Mips_got_info::add_tls_entries): Pass addend argument to code
340 (Mips_relobj::do_read_symbols): Read gp value that was used to
342 (Mips_output_data_plt::plt_entry): Remove opcode from l[wd]
343 instruction. Opcode for instruction will be selected later.
344 (Target_mips::gc_process_relocs): Add case for SHT_RELA.
345 (Target_mips::scan_relocatable_relocs): Likewise.
346 (Target_mips::emit_relocs_scan): Likewise.
347 (Target_mips::relocate_relocs): Likewise.
348 (Target_mips::do_finalize_sections): Skip objects for merging
349 processor specific flags in which all input sections will be
351 (mips_get_size_for_reloc): Add case for R_MIPS_EH.
352 (Target_mips::Scan::get_reference_flags): Likewise.
353 (Target_mips::relocate_special_relocatable): Call rel26 method with
354 calculate_only and calculated_value arguments.
355 (Target_mips::Scan::local): Add case for R_MIPS_EH. Don't create a
356 dynamic relocation against a readonly sections, and pass
357 is_section_symbol to Mips_got_info::record_local_got_symbol.
358 (Target_mips::Scan::global): Add case for R_MIPS_EH. Don't create a
359 dynamic relocation against a readonly sections, and pass r_type
360 and r_offset to Target_mips::copy_reloc.
361 (Target_mips::Relocate::relocate): Add support for resolving
362 relocations for Mips64.
363 (Target_mips::mips_info): Add case for Mips64 default dynamic
365 (Target_selector_mips): Correct emulation names.
367 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
369 * mips.cc (class Mips_output_data_la25_stub): Add
370 do_print_to_mapfile function.
372 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
374 * mips.cc (Mips_classify_reloc::put_r_info): Call 32bit version of
377 2016-03-09 H.J. Lu <hongjiu.lu@intel.com>
379 * testsuite/plugin_layout_with_alignment.cc: Renamed to ..
380 * testsuite/plugin_layout_with_alignment.c: This.
381 * testsuite/Makefile.am (plugin_layout_with_alignment.o): Updated.
382 (plugin_layout_with_alignment): Likewise.
383 * testsuite/Makefile.in: Regenerated.
385 2016-03-08 Cary Coutant <ccoutant@gmail.com>
388 * testsuite/Makefile.am (retain_symbols_file_test): Remove check
390 * testsuite/Makefile.in: Regenerate.
391 * testsuite/dynamic_list.sh: Likewise.
392 * testsuite/retain_symbols_file_test.sh: Likewise.
394 2016-03-08 Cary Coutant <ccoutant@gmail.com>
397 * arm.cc (Reloc_stub::Key::name): Add unused attribute.
398 * dirsearch.cc (Dir_caches::~Dir_caches): Likewise.
400 2016-03-08 Cary Coutant <ccoutant@gmail.com>
401 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
403 * output.cc (Output_reloc_writer): New type.
404 (Output_data_reloc_base::do_write): Move implementation to template
405 in output.h and replace with invocation of template.
406 * output.h (Output_file): Move to top of file.
407 (Output_reloc::get_symbol_index): Move to public interface.
408 (Output_reloc::get_address): Likewise.
409 (Output_data_reloc_base::do_write_generic): New function template.
411 2016-03-04 Cary Coutant <ccoutant@gmail.com>
415 * symtab.cc: Instantiate Sized_symbol::init_constant and
416 Sized_symbol::init_undefined.
418 2016-03-03 Cary Coutant <ccoutant@gmail.com>
421 * layout.h (Layout::add_target_specific_dynamic_tag): New function.
422 * layout.cc (Layout::add_target_specific_dynamic_tag): New function.
423 * mips.cc (Target_mips::make_symbol): Adjust function signature.
424 * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_.
425 (Target_sparc::do_is_defined_by_abi): Remove test for
427 (Target_sparc::Register_symbol): New struct type.
428 (Target_sparc::register_syms_): New data member.
429 (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true.
430 (Target_sparc::make_symbol): New function.
431 (Target_sparc::do_finalize_sections): Add register symbols and new
432 dynamic table entries.
433 * symtab.h (Sized_symbol::init_undefined): Add value parameter.
434 (Symbol_table::add_target_global_symbol): New function.
435 (Symbol_table::target_symbols_): New data member.
436 * symtab.cc (Sized_symbol::init_undefined): Add value parameter.
437 (Symbol_table::Symbol_table): Initialize target_symbols_.
438 (Symbol_table::add_from_object): Pass additional parameters to
440 (Symbol_table::define_special_symbol): Likewise.
441 (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for
442 undefined symbol value.
443 (Symbol_table::set_dynsym_indexes): Process target-specific symbols.
444 (Symbol_table::sized_finalize): Likewise.
445 (Symbol_table::sized_write_globals): Likewise.
446 * target.h (Sized_target::make_symbol): Add name, st_type, object,
447 st_shndx, and value parameters.
449 2016-03-03 Rafael Ăvila de EspĂndola <rafael.espindola@gmail.com>
451 * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and
452 LDPK_WEAKUNDEF symbols.
454 2016-03-03 Than McIntosh <thanm@google.com>
456 * plugin.cc (Plugin::load): Include hooks for get_input_section_size
457 and get_input_section_alignment in transfer vector.
458 (get_input_section_alignment): New function.
459 (get_input_section_size): New function.
460 * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test.
461 * testsuite/Makefile.in: [Regenerate.]
462 * testsuite/plugin_section_alignment.cc: New test file.
463 * testsuite/plugin_layout_with_alignment.cc: New test file.
464 * testsuite/plugin_layout_with_alignment.sh: New test file.
466 2016-03-03 Evgenii Stepanov <eugenis@google.com>
468 * plugin.h (Pluginobj::get_symbol_resolution_info): Add version
470 * plugin.cc (get_symbols_v3): New function.
471 (Plugin::load): Add LDPT_GET_SYMBOLS_V3.
472 (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using
475 2016-02-26 Egor Kochetov <egor.kochetov@intel.com>
476 Cary Coutant <ccoutant@gmail.com>
479 * ehframe.h (Cie::fde_encoding): New method.
480 * ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length
483 2016-02-15 H.J. Lu <hongjiu.lu@intel.com>
485 * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
486 -mrelax-relocations=yes to $(TEST_AS).
487 (x86_64_mov_to_lea6.o): Likewise.
488 (x86_64_overflow_pc32.o): Remove duplicated target.
489 * testsuite/Makefile.in: Regenerated.
491 2016-02-15 Marcin KoĆcielnicki <koriakin@0x04.net>
493 * s390.cc (Target_s390::match_view_u): New helper method.
494 (Target_s390::do_is_call_to_non_split): New method.
495 (Target_s390::ss_code_st_r14): New const.
496 (Target_s390::ss_code_l_r14): New const.
497 (Target_s390::ss_code_bras_8): New const.
498 (Target_s390::ss_code_l_basr): New const.
499 (Target_s390::ss_code_a_basr): New const.
500 (Target_s390::ss_code_ear): New const.
501 (Target_s390::ss_code_c): New const.
502 (Target_s390::ss_code_larl): New const.
503 (Target_s390::ss_code_brasl): New const.
504 (Target_s390::ss_code_jg): New const.
505 (Target_s390::ss_code_jgl): New const.
506 (Target_s390::ss_match_mcount): New helper method.
507 (Target_s390::ss_match_l): New helper method.
508 (Target_s390::ss_match_ahi): New helper method.
509 (Target_s390::ss_match_alfi): New helper method.
510 (Target_s390::ss_match_cr): New helper method.
511 (Target_s390::do_calls_non_split): New method.
512 * testsuite/Makefile.am: Added new tests.
513 * testsuite/Makefile.in: Regenerate.
514 * testsuite/split_s390.sh: New test.
515 * testsuite/split_s390_1_a1.s: New test.
516 * testsuite/split_s390_1_a2.s: New test.
517 * testsuite/split_s390_1_n1.s: New test.
518 * testsuite/split_s390_1_n2.s: New test.
519 * testsuite/split_s390_1_z1.s: New test.
520 * testsuite/split_s390_1_z2.s: New test.
521 * testsuite/split_s390_1_z3.s: New test.
522 * testsuite/split_s390_1_z4.s: New test.
523 * testsuite/split_s390_2_ns.s: New test.
524 * testsuite/split_s390_2_s.s: New test.
525 * testsuite/split_s390x_1_a1.s: New test.
526 * testsuite/split_s390x_1_a2.s: New test.
527 * testsuite/split_s390x_1_n1.s: New test.
528 * testsuite/split_s390x_1_n2.s: New test.
529 * testsuite/split_s390x_1_z1.s: New test.
530 * testsuite/split_s390x_1_z2.s: New test.
531 * testsuite/split_s390x_1_z3.s: New test.
532 * testsuite/split_s390x_1_z4.s: New test.
533 * testsuite/split_s390x_2_ns.s: New test.
534 * testsuite/split_s390x_2_s.s: New test.
536 2016-02-11 Rahul Chaudhry <rahulchaudhry@google.com>
538 * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove
539 info message for every erratum 843419 found and fixed.
541 2016-02-07 Cary Coutant <ccoutant@gmail.com>
544 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional
545 information to relocation overflow errors.
547 2016-02-06 Cary Coutant <ccoutant@gmail.com>
550 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32
551 overflow checking when symbol value + addend < 0.
553 2016-02-06 Cary Coutant <ccoutant@gmail.com>
556 * reloc.h (Limits): New class.
557 (Bits::has_overflow32): Use min/max values from Limits.
558 (Bits::has_unsigned_overflow32): Likewise.
559 (Bits::has_signed_unsigned_overflow32): Likewise.
560 (Bits::has_overflow): Likewise.
561 (Bits::has_unsigned_overflow): Likewise.
562 (Bits::has_signed_unsigned_overflow64): Likewise.
564 2016-02-06 Cary Coutant <ccoutant@gmail.com>
567 * reloc.h (Relocate_functions::Overflow_check): Add comments.
568 * x86_64.cc (X86_64_relocate_functions): New class.
569 (Target_x86_64::Relocate::relocate): Use the new class.
570 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option.
571 (x32_overflow_pc32): New test case.
572 * testsuite/Makefile.in: Regenerate.
573 * testsuite/x32_overflow_pc32.sh: New script.
574 * testsuite/x86_64_overflow_pc32.s: Remove .space directive.
576 2016-02-06 Cary Coutant <ccoutant@gmail.com>
579 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast.
580 (Bits::has_unsigned_overflow): Remove unnecessary static_cast.
582 2016-02-06 Cary Coutant <ccoutant@gmail.com>
585 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed
587 (Bits::has_unsigned_overflow): Likewise.
589 2016-02-06 Marcin KoĆcielnicki <koriakin@0x04.net>
591 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
593 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
594 and view_size to is_call_to_non_split.
595 * target.cc (Target::is_call_to_non_split): Add view and view_size
597 * target.h (class Target): Likewise.
599 2016-02-05 Sriraman Tallam <tmsriram@google.com>
601 * icf.cc (get_rel_addend): New function.
602 (get_section_contents): Move merge section addend computation to a
603 new function. Ignore negative values for SHT_REL and SHT_RELA addends.
604 Fix bug to not read past the length of the section.
606 2016-02-05 Cary Coutant <ccoutant@gmail.com>
607 Andrew Senkevich <andrew.senkevich@intel.com>
610 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow
611 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and
613 * testsuite/Makefile.am (x86_64_overflow_pc32): New test.
614 * testsuite/x86_64_overflow_pc32.sh: New test script.
615 * testsuite/x86_64_overflow_pc32.s: New source file.
617 2016-02-05 Cary Coutant <ccoutant@gmail.com>
620 * reloc.h (Relocate_functions::Address): New typedef.
621 (Relocate_functions::Addendtype): New typedef.
622 (Relocate_functions::Overflow_check): New enum type.
623 (Relocate_functions::Reloc_status): New enum type.
624 (Relocate_functions::check_overflow): New function template.
625 (Relocate_functions::rel): Add check parameter; check for overflow.
626 (Relocate_functions::rel_unaligned): Likewise.
627 (Relocate_functions::rela): Likewise.
628 (Relocate_functions::pcrel): Likewise.
629 (Relocate_functions::pcrel_unaligned): Likewise.
630 (Relocate_functions::pcrela): Likewise.
631 (Relocate_functions::rel8): Adjust parameter types.
632 (Relocate_functions::rela8): Likewise.
633 (Relocate_functions::pcrel8): Likewise.
634 (Relocate_functions::pcrela8): Likewise.
635 (Relocate_functions::rel16): Likewise.
636 (Relocate_functions::rela168): Likewise.
637 (Relocate_functions::pcrel16): Likewise.
638 (Relocate_functions::pcrela16): Likewise.
639 (Relocate_functions::rel32): Likewise.
640 (Relocate_functions::rel32_unaligned): Likewise.
641 (Relocate_functions::rela32): Likewise.
642 (Relocate_functions::pcrel32): Likewise.
643 (Relocate_functions::pcrel32_unaligned): Likewise.
644 (Relocate_functions::pcrela32): Likewise.
645 (Relocate_functions::rel8_check): New function.
646 (Relocate_functions::rela8_check): New function.
647 (Relocate_functions::pcrel8_check): New function.
648 (Relocate_functions::pcrela8_check): New function.
649 (Relocate_functions::rel16_check): New function.
650 (Relocate_functions::rela168_check): New function.
651 (Relocate_functions::pcrel16_check): New function.
652 (Relocate_functions::pcrela16_check): New function.
653 (Relocate_functions::rel32_check): New function.
654 (Relocate_functions::rel32_unaligned_check): New function.
655 (Relocate_functions::rela32_check): New function.
656 (Relocate_functions::pcrel32_check): New function.
657 (Relocate_functions::pcrel32_unaligned_check): New function.
658 (Relocate_functions::pcrela32_check): New function.
659 (Bits::has_unsigned_overflow32): New function.
660 (Bits::has_unsigned_overflow): New function.
661 * testsuite/Makefile.am (overflow_unittest): New test.
662 * testsuite/Makefile.in: Regenerate.
663 * testsuite/overflow_unittest.cc: New source file.
665 2016-02-04 Alan Modra <amodra@gmail.com>
667 * powerpc.cc (relocate): Adjust last patch for big-endian.
669 2016-02-02 Alan Modra <amodra@gmail.com>
671 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
673 2016-01-15 Han Shen <shenhan@google.com>
675 PR gold/19472 - need pc-relative stubs.
677 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
678 stub type for DSOs and pie executables.
680 2016-01-12 H.J. Lu <hongjiu.lu@intel.com>
682 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
685 2016-01-12 Cary Coutant <ccoutant@gmail.com>
687 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
688 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
689 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
690 specializations) New method.
692 2016-01-11 Cary Coutant <ccoutant@gmail.com>
695 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
696 we have a TLS segment for GD-to-IE optimization.
697 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
699 (Target_i386::tls_desc_gd_to_ie): Likewise.
700 (Target_i386::relocate_tls): Don't insist that we have a TLS segment
701 for TLSDESC GD-to-IE optimizations.
702 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
704 (Target_x86_64::tls_desc_gd_to_ie): Likewise.
705 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
706 for TLSDESC GD-to-IE optimizations.
708 2016-01-11 Cary Coutant <ccoutant@gmail.com>
710 Refactor gold to enable support for MIPS-64 relocation format.
712 * gc.h (get_embedded_addend_size): Remove sh_type parameter.
713 (gc_process_relocs): Remove sh_type template parameter.
714 Use Classify_reloc to access r_sym, r_type, and r_addend fields.
715 * object.h (Sized_relobj_file::split_stack_adjust): Add target
717 (Sized_relobj_file::split_stack_adjust_reltype): Likewise.
718 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
719 specializations) Remove.
720 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
721 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
722 (Sized_relobj_file::emit_relocs_scan_reltype): Remove.
723 (Sized_relobj_file::split_stack_adjust): Add target parameter.
725 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
726 Target::get_r_sym() to get r_sym field from relocations.
727 (Track_relocs::next_symndx): Call Target::get_r_sym().
728 * target-reloc.h (scan_relocs): Remove sh_type template parameter;
729 add Classify_reloc template parameter. Use for accessing r_sym and
731 (relocate_section): Likewise.
732 (Default_classify_reloc): New class (renamed and moved from reloc.cc).
733 (Default_scan_relocatable_relocs): Remove sh_type template parameter.
734 (Default_scan_relocatable_relocs::Reltype): New typedef.
735 (Default_scan_relocatable_relocs::reloc_size): New const.
736 (Default_scan_relocatable_relocs::sh_type): New const.
737 (Default_scan_relocatable_relocs::get_r_sym): New method.
738 (Default_scan_relocatable_relocs::get_r_type): New method.
739 (Default_emit_relocs_strategy): New class.
740 (scan_relocatable_relocs): Replace sh_type template parameter with
741 Scan_relocatable_relocs class. Use it to access r_sym and r_type
743 (relocate_relocs): Replace sh_type template parameter with
744 Classify_reloc class. Use it to access r_sym and r_type fields.
745 * target.h (Target::is_call_to_non_split): Replace r_type parameter
746 with pointer to relocation. Adjust all callers.
747 (Target::do_is_call_to_non_split): Likewise.
748 (Target::emit_relocs_scan): New virtual method.
749 (Sized_target::get_r_sym): New virtual method.
750 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
751 with pointer to relocation.
753 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
754 (Target_aarch64::Relocatable_size_for_reloc): Remove.
755 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
756 (Target_aarch64::scan_relocs): Likewise.
757 (Target_aarch64::relocate_section): Likewise.
758 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
760 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
761 (Target_aarch64::relocate_relocs): Use Default_classify_reloc.
762 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
764 (Target_arm::emit_relocs_scan): New method.
765 (Target_arm::Relocatable_size_for_reloc): Replace with...
766 (Target_arm::Classify_reloc): ...this.
767 (Target_arm::gc_process_relocs): Use Classify_reloc.
768 (Target_arm::scan_relocs): Likewise.
769 (Target_arm::relocate_section): Likewise.
770 (Target_arm::scan_relocatable_relocs): Likewise.
771 (Target_arm::relocate_relocs): Likewise.
772 * i386.cc (Target_i386::emit_relocs_scan): New method.
773 (Target_i386::Relocatable_size_for_reloc): Replace with...
774 (Target_i386::Classify_reloc): ...this.
775 (Target_i386::gc_process_relocs): Use Classify_reloc.
776 (Target_i386::scan_relocs): Likewise.
777 (Target_i386::relocate_section): Likewise.
778 (Target_i386::scan_relocatable_relocs): Likewise.
779 (Target_i386::relocate_relocs): Likewise.
780 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
782 (Mips_reloc_types): New class template.
783 (Mips_classify_reloc): New class template.
784 (Target_mips::Reltype): New typedef.
785 (Target_mips::Relatype): New typedef.
786 (Target_mips::emit_relocs_scan): New method.
787 (Target_mips::get_r_sym): New method.
788 (Target_mips::Relocatable_size_for_reloc): Replace with
790 (Target_mips::copy_reloc): Use Mips_classify_reloc.
791 (Target_mips::gc_process_relocs): Likewise.
792 (Target_mips::scan_relocs): Likewise.
793 (Target_mips::relocate_section): Likewise.
794 (Target_mips::scan_relocatable_relocs): Likewise.
795 (Target_mips::relocate_relocs): Likewise.
796 (mips_get_size_for_reloc): New function, factored out from
797 Relocatable_size_for_reloc::get_size_for_reloc.
798 (Target_mips::Scan::local): Use Mips_classify_reloc.
799 (Target_mips::Scan::global): Likewise.
800 (Target_mips::Relocate::relocate): Likewise.
801 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
802 (Target_powerpc::Relocatable_size_for_reloc): Remove.
803 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
804 (Target_powerpc::scan_relocs): Likewise.
805 (Target_powerpc::relocate_section): Likewise.
806 (Powerpc_scan_relocatable_reloc): Convert to class template.
807 (Powerpc_scan_relocatable_reloc::Reltype): New typedef.
808 (Powerpc_scan_relocatable_reloc::reloc_size): New const.
809 (Powerpc_scan_relocatable_reloc::sh_type): New const.
810 (Powerpc_scan_relocatable_reloc::get_r_sym): New method.
811 (Powerpc_scan_relocatable_reloc::get_r_type): New method.
812 (Target_powerpc::scan_relocatable_relocs): Use
813 Powerpc_scan_relocatable_reloc.
814 (Target_powerpc::relocate_relocs): Use Default_classify_reloc.
815 * s390.cc (Target_s390::emit_relocs_scan): New method.
816 (Target_s390::Relocatable_size_for_reloc): Remove.
817 (Target_s390::gc_process_relocs): Use Default_classify_reloc.
818 (Target_s390::scan_relocs): Likewise.
819 (Target_s390::relocate_section): Likewise.
820 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
822 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
823 (Target_s390::relocate_relocs): Use Default_classify_reloc.
824 * sparc.cc (Target_sparc::emit_relocs_scan): New method.
825 (Target_sparc::Relocatable_size_for_reloc): Remove.
826 (Target_sparc::gc_process_relocs): Use Default_classify_reloc.
827 (Target_sparc::scan_relocs): Likewise.
828 (Target_sparc::relocate_section): Likewise.
829 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
831 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
832 (Target_sparc::relocate_relocs): Use Default_classify_reloc.
833 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
834 (Target_tilegx::Relocatable_size_for_reloc): Remove.
835 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
836 (Target_tilegx::scan_relocs): Likewise.
837 (Target_tilegx::relocate_section): Likewise.
838 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
840 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
841 (Target_tilegx::relocate_relocs): Use Default_classify_reloc.
842 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
843 (Target_x86_64::Relocatable_size_for_reloc): Remove.
844 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
845 (Target_x86_64::scan_relocs): Likewise.
846 (Target_x86_64::relocate_section): Likewise.
847 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
849 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
850 (Target_x86_64::relocate_relocs): Use Default_classify_reloc.
852 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
854 2016-01-01 Alan Modra <amodra@gmail.com>
856 Update year range in copyright notice of all files.
858 For older changes see ChangeLog-0815
860 Copyright (C) 2016 Free Software Foundation, Inc.
862 Copying and distribution of this file, with or without modification,
863 are permitted in any medium without royalty provided the copyright
864 notice and this notice are preserved.
870 version-control: never