1 2016-03-18 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
3 * mips.cc (Mips_relobj::is_n64_): Remove.
4 (Target_mips::ei_class_): Likewise.
5 (Mips_relobj::is_newabi): Call methods.
6 (Mips_relobj::is_n64): Change checking for N64 ABI.
7 (Target_mips::is_output_n64): Likewise.
8 (Target_mips::merge_processor_specific_flags): Remove ei_class
9 argument, and remove comparing ei_class.
10 (Target_mips::do_adjust_elf_header): Remove setting EI_CLASS field
12 (Target_mips::do_finalize_sections): Don't pass ei_class argument
13 to merge_processor_specific_flags.
14 (Target_mips::elf_mips_abi_name): Remove ei_class argument, and
15 change checking for N64 ABI.
17 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
19 * mips.cc (enum Special_relocation_symbol): New enum type.
20 (is_readonly_section): New function.
22 (Mips_got_entry::is_section_symbol_): New member.
23 (Mips_got_entry::is_section_symbol): New method.
24 (Mips_got_info::record_local_got_symbol): Add is_section_symbol
26 (Mips_relobj::mips_elf_options_section_name): New method.
27 (Mips_output_data_got::record_local_got_symbol): Add
28 is_section_symbol argument, and pass it to
29 Mips_got_info::record_local_got_symbol.
30 (Mips_output_data_got::got_offset): Add addend argument, and pass
31 it to Relobj::local_got_offset.
32 (struct Mips_output_reloc_writer): New type.
33 (class Mips_output_data_reloc): New class.
34 (Mips_output_data_plt::Reloc_section): Change type to
35 Mips_output_data_reloc.
36 (Target_mips::Reloc_section): Likewise.
37 (Mips_reloc_types::get_r_addend): Remove unsigned from return type.
38 (Mips_classify_reloc::get_r_type2): New method.
39 (Mips_classify_reloc::get_r_type3): Likewise.
40 (Mips_classify_reloc::get_r_ssym): Likewise.
41 (Target_mips::Reloca_section): Remove.
42 (Relocate::should_apply_static_reloc): Rename from
43 should_apply_r_mips_32_reloc.
44 (Target_mips::copy_reloc): Replace Reltype parameter with r_type
46 (Mips_relocate_functions::Valtype): New type.
47 (Mips_relocate_functions::Valtype64): New type.
48 (Mips_relocate_functions::check_overflow): New method.
49 (Mips_relocate_functions::mips_reloc_unshuffle): Move to public
51 (Mips_relocate_functions::mips_reloc_shuffle): Likewise.
52 (Mips_relocate_functions::rel16): Add support for resolving
53 relocations for Mips64.
54 (Mips_relocate_functions::rel32): Likewise.
55 (Mips_relocate_functions::reljalr): Likewise.
56 (Mips_relocate_functions::relpc32): Likewise.
57 (Mips_relocate_functions::rel26): Likewise.
58 (Mips_relocate_functions::relpc16): Likewise.
59 (Mips_relocate_functions::relmicromips_pc7_s1): Likewise.
60 (Mips_relocate_functions::relmicromips_pc10_s1): Likewise.
61 (Mips_relocate_functions::relmicromips_pc16_s1): Likewise.
62 (Mips_relocate_functions::do_relhi16): Likewise.
63 (Mips_relocate_functions::do_relgot16_local): Likewise.
64 (Mips_relocate_functions::rello16): Likewise.
65 (Mips_relocate_functions::relgot): Likewise.
66 (Mips_relocate_functions::relgotpage): Likewise.
67 (Mips_relocate_functions::relgotofst): Likewise.
68 (Mips_relocate_functions::relgot_hi16): Likewise.
69 (Mips_relocate_functions::relgot_lo16): Likewise.
70 (Mips_relocate_functions::relgprel): Likewise.
71 (Mips_relocate_functions::relgprel32): Likewise.
72 (Mips_relocate_functions::tlsrelhi16): Likewise.
73 (Mips_relocate_functions::tlsrello16): Likewise.
74 (Mips_relocate_functions::tlsrel32): Likewise.
75 (Mips_relocate_functions::relsub): Likewise.
76 (Mips_relocate_functions::releh): New method.
77 (Mips_relocate_functions::rel64): Likewise.
78 (Mips_got_info::record_local_got_symbol): Add is_section_symbol and
79 pass it to Mips_got_entry.
80 (Mips_got_info::add_local_entries): Pass addend argument
81 to code functions, and for STT_SECTION symbols call
82 add_symbolless_local_addend.
83 (Mips_got_info::add_tls_entries): Pass addend argument to code
85 (Mips_relobj::do_read_symbols): Read gp value that was used to
87 (Mips_output_data_plt::plt_entry): Remove opcode from l[wd]
88 instruction. Opcode for instruction will be selected later.
89 (Target_mips::gc_process_relocs): Add case for SHT_RELA.
90 (Target_mips::scan_relocatable_relocs): Likewise.
91 (Target_mips::emit_relocs_scan): Likewise.
92 (Target_mips::relocate_relocs): Likewise.
93 (Target_mips::do_finalize_sections): Skip objects for merging
94 processor specific flags in which all input sections will be
96 (mips_get_size_for_reloc): Add case for R_MIPS_EH.
97 (Target_mips::Scan::get_reference_flags): Likewise.
98 (Target_mips::relocate_special_relocatable): Call rel26 method with
99 calculate_only and calculated_value arguments.
100 (Target_mips::Scan::local): Add case for R_MIPS_EH. Don't create a
101 dynamic relocation against a readonly sections, and pass
102 is_section_symbol to Mips_got_info::record_local_got_symbol.
103 (Target_mips::Scan::global): Add case for R_MIPS_EH. Don't create a
104 dynamic relocation against a readonly sections, and pass r_type
105 and r_offset to Target_mips::copy_reloc.
106 (Target_mips::Relocate::relocate): Add support for resolving
107 relocations for Mips64.
108 (Target_mips::mips_info): Add case for Mips64 default dynamic
110 (Target_selector_mips): Correct emulation names.
112 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
114 * mips.cc (class Mips_output_data_la25_stub): Add
115 do_print_to_mapfile function.
117 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
119 * mips.cc (Mips_classify_reloc::put_r_info): Call 32bit version of
122 2016-03-09 H.J. Lu <hongjiu.lu@intel.com>
124 * testsuite/plugin_layout_with_alignment.cc: Renamed to ..
125 * testsuite/plugin_layout_with_alignment.c: This.
126 * testsuite/Makefile.am (plugin_layout_with_alignment.o): Updated.
127 (plugin_layout_with_alignment): Likewise.
128 * testsuite/Makefile.in: Regenerated.
130 2016-03-08 Cary Coutant <ccoutant@gmail.com>
133 * testsuite/Makefile.am (retain_symbols_file_test): Remove check
135 * testsuite/Makefile.in: Regenerate.
136 * testsuite/dynamic_list.sh: Likewise.
137 * testsuite/retain_symbols_file_test.sh: Likewise.
139 2016-03-08 Cary Coutant <ccoutant@gmail.com>
142 * arm.cc (Reloc_stub::Key::name): Add unused attribute.
143 * dirsearch.cc (Dir_caches::~Dir_caches): Likewise.
145 2016-03-08 Cary Coutant <ccoutant@gmail.com>
146 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
148 * output.cc (Output_reloc_writer): New type.
149 (Output_data_reloc_base::do_write): Move implementation to template
150 in output.h and replace with invocation of template.
151 * output.h (Output_file): Move to top of file.
152 (Output_reloc::get_symbol_index): Move to public interface.
153 (Output_reloc::get_address): Likewise.
154 (Output_data_reloc_base::do_write_generic): New function template.
156 2016-03-04 Cary Coutant <ccoutant@gmail.com>
160 * symtab.cc: Instantiate Sized_symbol::init_constant and
161 Sized_symbol::init_undefined.
163 2016-03-03 Cary Coutant <ccoutant@gmail.com>
166 * layout.h (Layout::add_target_specific_dynamic_tag): New function.
167 * layout.cc (Layout::add_target_specific_dynamic_tag): New function.
168 * mips.cc (Target_mips::make_symbol): Adjust function signature.
169 * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_.
170 (Target_sparc::do_is_defined_by_abi): Remove test for
172 (Target_sparc::Register_symbol): New struct type.
173 (Target_sparc::register_syms_): New data member.
174 (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true.
175 (Target_sparc::make_symbol): New function.
176 (Target_sparc::do_finalize_sections): Add register symbols and new
177 dynamic table entries.
178 * symtab.h (Sized_symbol::init_undefined): Add value parameter.
179 (Symbol_table::add_target_global_symbol): New function.
180 (Symbol_table::target_symbols_): New data member.
181 * symtab.cc (Sized_symbol::init_undefined): Add value parameter.
182 (Symbol_table::Symbol_table): Initialize target_symbols_.
183 (Symbol_table::add_from_object): Pass additional parameters to
185 (Symbol_table::define_special_symbol): Likewise.
186 (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for
187 undefined symbol value.
188 (Symbol_table::set_dynsym_indexes): Process target-specific symbols.
189 (Symbol_table::sized_finalize): Likewise.
190 (Symbol_table::sized_write_globals): Likewise.
191 * target.h (Sized_target::make_symbol): Add name, st_type, object,
192 st_shndx, and value parameters.
194 2016-03-03 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
196 * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and
197 LDPK_WEAKUNDEF symbols.
199 2016-03-03 Than McIntosh <thanm@google.com>
201 * plugin.cc (Plugin::load): Include hooks for get_input_section_size
202 and get_input_section_alignment in transfer vector.
203 (get_input_section_alignment): New function.
204 (get_input_section_size): New function.
205 * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test.
206 * testsuite/Makefile.in: [Regenerate.]
207 * testsuite/plugin_section_alignment.cc: New test file.
208 * testsuite/plugin_layout_with_alignment.cc: New test file.
209 * testsuite/plugin_layout_with_alignment.sh: New test file.
211 2016-03-03 Evgenii Stepanov <eugenis@google.com>
213 * plugin.h (Pluginobj::get_symbol_resolution_info): Add version
215 * plugin.cc (get_symbols_v3): New function.
216 (Plugin::load): Add LDPT_GET_SYMBOLS_V3.
217 (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using
220 2016-02-26 Egor Kochetov <egor.kochetov@intel.com>
221 Cary Coutant <ccoutant@gmail.com>
224 * ehframe.h (Cie::fde_encoding): New method.
225 * ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length
228 2016-02-15 H.J. Lu <hongjiu.lu@intel.com>
230 * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
231 -mrelax-relocations=yes to $(TEST_AS).
232 (x86_64_mov_to_lea6.o): Likewise.
233 (x86_64_overflow_pc32.o): Remove duplicated target.
234 * testsuite/Makefile.in: Regenerated.
236 2016-02-15 Marcin Kościelnicki <koriakin@0x04.net>
238 * s390.cc (Target_s390::match_view_u): New helper method.
239 (Target_s390::do_is_call_to_non_split): New method.
240 (Target_s390::ss_code_st_r14): New const.
241 (Target_s390::ss_code_l_r14): New const.
242 (Target_s390::ss_code_bras_8): New const.
243 (Target_s390::ss_code_l_basr): New const.
244 (Target_s390::ss_code_a_basr): New const.
245 (Target_s390::ss_code_ear): New const.
246 (Target_s390::ss_code_c): New const.
247 (Target_s390::ss_code_larl): New const.
248 (Target_s390::ss_code_brasl): New const.
249 (Target_s390::ss_code_jg): New const.
250 (Target_s390::ss_code_jgl): New const.
251 (Target_s390::ss_match_mcount): New helper method.
252 (Target_s390::ss_match_l): New helper method.
253 (Target_s390::ss_match_ahi): New helper method.
254 (Target_s390::ss_match_alfi): New helper method.
255 (Target_s390::ss_match_cr): New helper method.
256 (Target_s390::do_calls_non_split): New method.
257 * testsuite/Makefile.am: Added new tests.
258 * testsuite/Makefile.in: Regenerate.
259 * testsuite/split_s390.sh: New test.
260 * testsuite/split_s390_1_a1.s: New test.
261 * testsuite/split_s390_1_a2.s: New test.
262 * testsuite/split_s390_1_n1.s: New test.
263 * testsuite/split_s390_1_n2.s: New test.
264 * testsuite/split_s390_1_z1.s: New test.
265 * testsuite/split_s390_1_z2.s: New test.
266 * testsuite/split_s390_1_z3.s: New test.
267 * testsuite/split_s390_1_z4.s: New test.
268 * testsuite/split_s390_2_ns.s: New test.
269 * testsuite/split_s390_2_s.s: New test.
270 * testsuite/split_s390x_1_a1.s: New test.
271 * testsuite/split_s390x_1_a2.s: New test.
272 * testsuite/split_s390x_1_n1.s: New test.
273 * testsuite/split_s390x_1_n2.s: New test.
274 * testsuite/split_s390x_1_z1.s: New test.
275 * testsuite/split_s390x_1_z2.s: New test.
276 * testsuite/split_s390x_1_z3.s: New test.
277 * testsuite/split_s390x_1_z4.s: New test.
278 * testsuite/split_s390x_2_ns.s: New test.
279 * testsuite/split_s390x_2_s.s: New test.
281 2016-02-11 Rahul Chaudhry <rahulchaudhry@google.com>
283 * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove
284 info message for every erratum 843419 found and fixed.
286 2016-02-07 Cary Coutant <ccoutant@gmail.com>
289 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional
290 information to relocation overflow errors.
292 2016-02-06 Cary Coutant <ccoutant@gmail.com>
295 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32
296 overflow checking when symbol value + addend < 0.
298 2016-02-06 Cary Coutant <ccoutant@gmail.com>
301 * reloc.h (Limits): New class.
302 (Bits::has_overflow32): Use min/max values from Limits.
303 (Bits::has_unsigned_overflow32): Likewise.
304 (Bits::has_signed_unsigned_overflow32): Likewise.
305 (Bits::has_overflow): Likewise.
306 (Bits::has_unsigned_overflow): Likewise.
307 (Bits::has_signed_unsigned_overflow64): Likewise.
309 2016-02-06 Cary Coutant <ccoutant@gmail.com>
312 * reloc.h (Relocate_functions::Overflow_check): Add comments.
313 * x86_64.cc (X86_64_relocate_functions): New class.
314 (Target_x86_64::Relocate::relocate): Use the new class.
315 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option.
316 (x32_overflow_pc32): New test case.
317 * testsuite/Makefile.in: Regenerate.
318 * testsuite/x32_overflow_pc32.sh: New script.
319 * testsuite/x86_64_overflow_pc32.s: Remove .space directive.
321 2016-02-06 Cary Coutant <ccoutant@gmail.com>
324 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast.
325 (Bits::has_unsigned_overflow): Remove unnecessary static_cast.
327 2016-02-06 Cary Coutant <ccoutant@gmail.com>
330 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed
332 (Bits::has_unsigned_overflow): Likewise.
334 2016-02-06 Marcin Kościelnicki <koriakin@0x04.net>
336 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
338 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
339 and view_size to is_call_to_non_split.
340 * target.cc (Target::is_call_to_non_split): Add view and view_size
342 * target.h (class Target): Likewise.
344 2016-02-05 Sriraman Tallam <tmsriram@google.com>
346 * icf.cc (get_rel_addend): New function.
347 (get_section_contents): Move merge section addend computation to a
348 new function. Ignore negative values for SHT_REL and SHT_RELA addends.
349 Fix bug to not read past the length of the section.
351 2016-02-05 Cary Coutant <ccoutant@gmail.com>
352 Andrew Senkevich <andrew.senkevich@intel.com>
355 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow
356 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and
358 * testsuite/Makefile.am (x86_64_overflow_pc32): New test.
359 * testsuite/x86_64_overflow_pc32.sh: New test script.
360 * testsuite/x86_64_overflow_pc32.s: New source file.
362 2016-02-05 Cary Coutant <ccoutant@gmail.com>
365 * reloc.h (Relocate_functions::Address): New typedef.
366 (Relocate_functions::Addendtype): New typedef.
367 (Relocate_functions::Overflow_check): New enum type.
368 (Relocate_functions::Reloc_status): New enum type.
369 (Relocate_functions::check_overflow): New function template.
370 (Relocate_functions::rel): Add check parameter; check for overflow.
371 (Relocate_functions::rel_unaligned): Likewise.
372 (Relocate_functions::rela): Likewise.
373 (Relocate_functions::pcrel): Likewise.
374 (Relocate_functions::pcrel_unaligned): Likewise.
375 (Relocate_functions::pcrela): Likewise.
376 (Relocate_functions::rel8): Adjust parameter types.
377 (Relocate_functions::rela8): Likewise.
378 (Relocate_functions::pcrel8): Likewise.
379 (Relocate_functions::pcrela8): Likewise.
380 (Relocate_functions::rel16): Likewise.
381 (Relocate_functions::rela168): Likewise.
382 (Relocate_functions::pcrel16): Likewise.
383 (Relocate_functions::pcrela16): Likewise.
384 (Relocate_functions::rel32): Likewise.
385 (Relocate_functions::rel32_unaligned): Likewise.
386 (Relocate_functions::rela32): Likewise.
387 (Relocate_functions::pcrel32): Likewise.
388 (Relocate_functions::pcrel32_unaligned): Likewise.
389 (Relocate_functions::pcrela32): Likewise.
390 (Relocate_functions::rel8_check): New function.
391 (Relocate_functions::rela8_check): New function.
392 (Relocate_functions::pcrel8_check): New function.
393 (Relocate_functions::pcrela8_check): New function.
394 (Relocate_functions::rel16_check): New function.
395 (Relocate_functions::rela168_check): New function.
396 (Relocate_functions::pcrel16_check): New function.
397 (Relocate_functions::pcrela16_check): New function.
398 (Relocate_functions::rel32_check): New function.
399 (Relocate_functions::rel32_unaligned_check): New function.
400 (Relocate_functions::rela32_check): New function.
401 (Relocate_functions::pcrel32_check): New function.
402 (Relocate_functions::pcrel32_unaligned_check): New function.
403 (Relocate_functions::pcrela32_check): New function.
404 (Bits::has_unsigned_overflow32): New function.
405 (Bits::has_unsigned_overflow): New function.
406 * testsuite/Makefile.am (overflow_unittest): New test.
407 * testsuite/Makefile.in: Regenerate.
408 * testsuite/overflow_unittest.cc: New source file.
410 2016-02-04 Alan Modra <amodra@gmail.com>
412 * powerpc.cc (relocate): Adjust last patch for big-endian.
414 2016-02-02 Alan Modra <amodra@gmail.com>
416 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
418 2016-01-15 Han Shen <shenhan@google.com>
420 PR gold/19472 - need pc-relative stubs.
422 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
423 stub type for DSOs and pie executables.
425 2016-01-12 H.J. Lu <hongjiu.lu@intel.com>
427 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
430 2016-01-12 Cary Coutant <ccoutant@gmail.com>
432 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
433 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
434 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
435 specializations) New method.
437 2016-01-11 Cary Coutant <ccoutant@gmail.com>
440 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
441 we have a TLS segment for GD-to-IE optimization.
442 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
444 (Target_i386::tls_desc_gd_to_ie): Likewise.
445 (Target_i386::relocate_tls): Don't insist that we have a TLS segment
446 for TLSDESC GD-to-IE optimizations.
447 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
449 (Target_x86_64::tls_desc_gd_to_ie): Likewise.
450 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
451 for TLSDESC GD-to-IE optimizations.
453 2016-01-11 Cary Coutant <ccoutant@gmail.com>
455 Refactor gold to enable support for MIPS-64 relocation format.
457 * gc.h (get_embedded_addend_size): Remove sh_type parameter.
458 (gc_process_relocs): Remove sh_type template parameter.
459 Use Classify_reloc to access r_sym, r_type, and r_addend fields.
460 * object.h (Sized_relobj_file::split_stack_adjust): Add target
462 (Sized_relobj_file::split_stack_adjust_reltype): Likewise.
463 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
464 specializations) Remove.
465 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
466 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
467 (Sized_relobj_file::emit_relocs_scan_reltype): Remove.
468 (Sized_relobj_file::split_stack_adjust): Add target parameter.
470 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
471 Target::get_r_sym() to get r_sym field from relocations.
472 (Track_relocs::next_symndx): Call Target::get_r_sym().
473 * target-reloc.h (scan_relocs): Remove sh_type template parameter;
474 add Classify_reloc template parameter. Use for accessing r_sym and
476 (relocate_section): Likewise.
477 (Default_classify_reloc): New class (renamed and moved from reloc.cc).
478 (Default_scan_relocatable_relocs): Remove sh_type template parameter.
479 (Default_scan_relocatable_relocs::Reltype): New typedef.
480 (Default_scan_relocatable_relocs::reloc_size): New const.
481 (Default_scan_relocatable_relocs::sh_type): New const.
482 (Default_scan_relocatable_relocs::get_r_sym): New method.
483 (Default_scan_relocatable_relocs::get_r_type): New method.
484 (Default_emit_relocs_strategy): New class.
485 (scan_relocatable_relocs): Replace sh_type template parameter with
486 Scan_relocatable_relocs class. Use it to access r_sym and r_type
488 (relocate_relocs): Replace sh_type template parameter with
489 Classify_reloc class. Use it to access r_sym and r_type fields.
490 * target.h (Target::is_call_to_non_split): Replace r_type parameter
491 with pointer to relocation. Adjust all callers.
492 (Target::do_is_call_to_non_split): Likewise.
493 (Target::emit_relocs_scan): New virtual method.
494 (Sized_target::get_r_sym): New virtual method.
495 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
496 with pointer to relocation.
498 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
499 (Target_aarch64::Relocatable_size_for_reloc): Remove.
500 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
501 (Target_aarch64::scan_relocs): Likewise.
502 (Target_aarch64::relocate_section): Likewise.
503 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
505 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
506 (Target_aarch64::relocate_relocs): Use Default_classify_reloc.
507 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
509 (Target_arm::emit_relocs_scan): New method.
510 (Target_arm::Relocatable_size_for_reloc): Replace with...
511 (Target_arm::Classify_reloc): ...this.
512 (Target_arm::gc_process_relocs): Use Classify_reloc.
513 (Target_arm::scan_relocs): Likewise.
514 (Target_arm::relocate_section): Likewise.
515 (Target_arm::scan_relocatable_relocs): Likewise.
516 (Target_arm::relocate_relocs): Likewise.
517 * i386.cc (Target_i386::emit_relocs_scan): New method.
518 (Target_i386::Relocatable_size_for_reloc): Replace with...
519 (Target_i386::Classify_reloc): ...this.
520 (Target_i386::gc_process_relocs): Use Classify_reloc.
521 (Target_i386::scan_relocs): Likewise.
522 (Target_i386::relocate_section): Likewise.
523 (Target_i386::scan_relocatable_relocs): Likewise.
524 (Target_i386::relocate_relocs): Likewise.
525 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
527 (Mips_reloc_types): New class template.
528 (Mips_classify_reloc): New class template.
529 (Target_mips::Reltype): New typedef.
530 (Target_mips::Relatype): New typedef.
531 (Target_mips::emit_relocs_scan): New method.
532 (Target_mips::get_r_sym): New method.
533 (Target_mips::Relocatable_size_for_reloc): Replace with
535 (Target_mips::copy_reloc): Use Mips_classify_reloc.
536 (Target_mips::gc_process_relocs): Likewise.
537 (Target_mips::scan_relocs): Likewise.
538 (Target_mips::relocate_section): Likewise.
539 (Target_mips::scan_relocatable_relocs): Likewise.
540 (Target_mips::relocate_relocs): Likewise.
541 (mips_get_size_for_reloc): New function, factored out from
542 Relocatable_size_for_reloc::get_size_for_reloc.
543 (Target_mips::Scan::local): Use Mips_classify_reloc.
544 (Target_mips::Scan::global): Likewise.
545 (Target_mips::Relocate::relocate): Likewise.
546 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
547 (Target_powerpc::Relocatable_size_for_reloc): Remove.
548 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
549 (Target_powerpc::scan_relocs): Likewise.
550 (Target_powerpc::relocate_section): Likewise.
551 (Powerpc_scan_relocatable_reloc): Convert to class template.
552 (Powerpc_scan_relocatable_reloc::Reltype): New typedef.
553 (Powerpc_scan_relocatable_reloc::reloc_size): New const.
554 (Powerpc_scan_relocatable_reloc::sh_type): New const.
555 (Powerpc_scan_relocatable_reloc::get_r_sym): New method.
556 (Powerpc_scan_relocatable_reloc::get_r_type): New method.
557 (Target_powerpc::scan_relocatable_relocs): Use
558 Powerpc_scan_relocatable_reloc.
559 (Target_powerpc::relocate_relocs): Use Default_classify_reloc.
560 * s390.cc (Target_s390::emit_relocs_scan): New method.
561 (Target_s390::Relocatable_size_for_reloc): Remove.
562 (Target_s390::gc_process_relocs): Use Default_classify_reloc.
563 (Target_s390::scan_relocs): Likewise.
564 (Target_s390::relocate_section): Likewise.
565 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
567 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
568 (Target_s390::relocate_relocs): Use Default_classify_reloc.
569 * sparc.cc (Target_sparc::emit_relocs_scan): New method.
570 (Target_sparc::Relocatable_size_for_reloc): Remove.
571 (Target_sparc::gc_process_relocs): Use Default_classify_reloc.
572 (Target_sparc::scan_relocs): Likewise.
573 (Target_sparc::relocate_section): Likewise.
574 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
576 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
577 (Target_sparc::relocate_relocs): Use Default_classify_reloc.
578 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
579 (Target_tilegx::Relocatable_size_for_reloc): Remove.
580 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
581 (Target_tilegx::scan_relocs): Likewise.
582 (Target_tilegx::relocate_section): Likewise.
583 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
585 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
586 (Target_tilegx::relocate_relocs): Use Default_classify_reloc.
587 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
588 (Target_x86_64::Relocatable_size_for_reloc): Remove.
589 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
590 (Target_x86_64::scan_relocs): Likewise.
591 (Target_x86_64::relocate_section): Likewise.
592 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
594 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
595 (Target_x86_64::relocate_relocs): Use Default_classify_reloc.
597 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
599 2016-01-01 Alan Modra <amodra@gmail.com>
601 Update year range in copyright notice of all files.
603 For older changes see ChangeLog-0815
605 Copyright (C) 2016 Free Software Foundation, Inc.
607 Copying and distribution of this file, with or without modification,
608 are permitted in any medium without royalty provided the copyright
609 notice and this notice are preserved.
615 version-control: never