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