1 2016-04-28 Nick Clifton <nickc@redhat.com>
3 * po/zh_CN.po: Updated Chinese (simplified) translation.
5 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
7 * Makefile.in: Regenerated with automake 1.11.6.
8 * aclocal.m4: Likewise.
9 * testsuite/Makefile.in: Likewise.
11 2016-03-30 Cary Coutant <ccoutant@gmail.com>
14 * symtab.cc (Symbol_table::define_default_version): Check for case
15 where symbols are both in different shared objects.
17 2016-03-27 Cary Coutant <ccoutant@gmail.com>
20 * i386.cc (Target_i386): Add check for fully-resolved symbol for
23 2016-03-22 Nick Clifton <nickc@redhat.com>
25 * configure: Regenerate.
27 2016-03-21 Cary Coutant <ccoutant@gmail.com>
30 * errors.cc (Errors::undefined_symbol): Add info message when
31 symbol should have been provided by a plugin.
32 * target-reloc.h (issue_undefined_symbol_error): Check for
33 placeholder symbols defined in discarded sections.
34 * testsuite/Makefile.am (plugin_test_9b): New test case.
35 * testsuite/Makefile.in: Regenerate.
36 * testsuite/plugin_test_9b_elf.cc: New test source file.
37 * testsuite/plugin_test_9b_ir.cc: New test source file.
39 2016-03-20 Cary Coutant <ccoutant@gmail.com>
42 * ehframe.cc (Eh_frame::read_fde): Check for dropped functions.
43 * testsuite/Makefile.am (eh_test_2): New test.
44 * testsuite/Makefile.in: Regenerate.
45 * testsuite/eh_test_2.sh: New test script.
46 * testsuite/eh_test_a.cc (bar): Make it comdat.
47 * testsuite/eh_test_b.cc (bar): Add a duplicate copy.
49 2016-03-18 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
51 * mips.cc (Mips_relobj::is_n64_): Remove.
52 (Target_mips::ei_class_): Likewise.
53 (Mips_relobj::is_newabi): Call methods.
54 (Mips_relobj::is_n64): Change checking for N64 ABI.
55 (Target_mips::is_output_n64): Likewise.
56 (Target_mips::merge_processor_specific_flags): Remove ei_class
57 argument, and remove comparing ei_class.
58 (Target_mips::do_adjust_elf_header): Remove setting EI_CLASS field
60 (Target_mips::do_finalize_sections): Don't pass ei_class argument
61 to merge_processor_specific_flags.
62 (Target_mips::elf_mips_abi_name): Remove ei_class argument, and
63 change checking for N64 ABI.
65 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
67 * mips.cc (enum Special_relocation_symbol): New enum type.
68 (is_readonly_section): New function.
70 (Mips_got_entry::is_section_symbol_): New member.
71 (Mips_got_entry::is_section_symbol): New method.
72 (Mips_got_info::record_local_got_symbol): Add is_section_symbol
74 (Mips_relobj::mips_elf_options_section_name): New method.
75 (Mips_output_data_got::record_local_got_symbol): Add
76 is_section_symbol argument, and pass it to
77 Mips_got_info::record_local_got_symbol.
78 (Mips_output_data_got::got_offset): Add addend argument, and pass
79 it to Relobj::local_got_offset.
80 (struct Mips_output_reloc_writer): New type.
81 (class Mips_output_data_reloc): New class.
82 (Mips_output_data_plt::Reloc_section): Change type to
83 Mips_output_data_reloc.
84 (Target_mips::Reloc_section): Likewise.
85 (Mips_reloc_types::get_r_addend): Remove unsigned from return type.
86 (Mips_classify_reloc::get_r_type2): New method.
87 (Mips_classify_reloc::get_r_type3): Likewise.
88 (Mips_classify_reloc::get_r_ssym): Likewise.
89 (Target_mips::Reloca_section): Remove.
90 (Relocate::should_apply_static_reloc): Rename from
91 should_apply_r_mips_32_reloc.
92 (Target_mips::copy_reloc): Replace Reltype parameter with r_type
94 (Mips_relocate_functions::Valtype): New type.
95 (Mips_relocate_functions::Valtype64): New type.
96 (Mips_relocate_functions::check_overflow): New method.
97 (Mips_relocate_functions::mips_reloc_unshuffle): Move to public
99 (Mips_relocate_functions::mips_reloc_shuffle): Likewise.
100 (Mips_relocate_functions::rel16): Add support for resolving
101 relocations for Mips64.
102 (Mips_relocate_functions::rel32): Likewise.
103 (Mips_relocate_functions::reljalr): Likewise.
104 (Mips_relocate_functions::relpc32): Likewise.
105 (Mips_relocate_functions::rel26): Likewise.
106 (Mips_relocate_functions::relpc16): Likewise.
107 (Mips_relocate_functions::relmicromips_pc7_s1): Likewise.
108 (Mips_relocate_functions::relmicromips_pc10_s1): Likewise.
109 (Mips_relocate_functions::relmicromips_pc16_s1): Likewise.
110 (Mips_relocate_functions::do_relhi16): Likewise.
111 (Mips_relocate_functions::do_relgot16_local): Likewise.
112 (Mips_relocate_functions::rello16): Likewise.
113 (Mips_relocate_functions::relgot): Likewise.
114 (Mips_relocate_functions::relgotpage): Likewise.
115 (Mips_relocate_functions::relgotofst): Likewise.
116 (Mips_relocate_functions::relgot_hi16): Likewise.
117 (Mips_relocate_functions::relgot_lo16): Likewise.
118 (Mips_relocate_functions::relgprel): Likewise.
119 (Mips_relocate_functions::relgprel32): Likewise.
120 (Mips_relocate_functions::tlsrelhi16): Likewise.
121 (Mips_relocate_functions::tlsrello16): Likewise.
122 (Mips_relocate_functions::tlsrel32): Likewise.
123 (Mips_relocate_functions::relsub): Likewise.
124 (Mips_relocate_functions::releh): New method.
125 (Mips_relocate_functions::rel64): Likewise.
126 (Mips_got_info::record_local_got_symbol): Add is_section_symbol and
127 pass it to Mips_got_entry.
128 (Mips_got_info::add_local_entries): Pass addend argument
129 to code functions, and for STT_SECTION symbols call
130 add_symbolless_local_addend.
131 (Mips_got_info::add_tls_entries): Pass addend argument to code
133 (Mips_relobj::do_read_symbols): Read gp value that was used to
135 (Mips_output_data_plt::plt_entry): Remove opcode from l[wd]
136 instruction. Opcode for instruction will be selected later.
137 (Target_mips::gc_process_relocs): Add case for SHT_RELA.
138 (Target_mips::scan_relocatable_relocs): Likewise.
139 (Target_mips::emit_relocs_scan): Likewise.
140 (Target_mips::relocate_relocs): Likewise.
141 (Target_mips::do_finalize_sections): Skip objects for merging
142 processor specific flags in which all input sections will be
144 (mips_get_size_for_reloc): Add case for R_MIPS_EH.
145 (Target_mips::Scan::get_reference_flags): Likewise.
146 (Target_mips::relocate_special_relocatable): Call rel26 method with
147 calculate_only and calculated_value arguments.
148 (Target_mips::Scan::local): Add case for R_MIPS_EH. Don't create a
149 dynamic relocation against a readonly sections, and pass
150 is_section_symbol to Mips_got_info::record_local_got_symbol.
151 (Target_mips::Scan::global): Add case for R_MIPS_EH. Don't create a
152 dynamic relocation against a readonly sections, and pass r_type
153 and r_offset to Target_mips::copy_reloc.
154 (Target_mips::Relocate::relocate): Add support for resolving
155 relocations for Mips64.
156 (Target_mips::mips_info): Add case for Mips64 default dynamic
158 (Target_selector_mips): Correct emulation names.
160 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
162 * mips.cc (class Mips_output_data_la25_stub): Add
163 do_print_to_mapfile function.
165 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
167 * mips.cc (Mips_classify_reloc::put_r_info): Call 32bit version of
170 2016-03-09 H.J. Lu <hongjiu.lu@intel.com>
172 * testsuite/plugin_layout_with_alignment.cc: Renamed to ..
173 * testsuite/plugin_layout_with_alignment.c: This.
174 * testsuite/Makefile.am (plugin_layout_with_alignment.o): Updated.
175 (plugin_layout_with_alignment): Likewise.
176 * testsuite/Makefile.in: Regenerated.
178 2016-03-08 Cary Coutant <ccoutant@gmail.com>
181 * testsuite/Makefile.am (retain_symbols_file_test): Remove check
183 * testsuite/Makefile.in: Regenerate.
184 * testsuite/dynamic_list.sh: Likewise.
185 * testsuite/retain_symbols_file_test.sh: Likewise.
187 2016-03-08 Cary Coutant <ccoutant@gmail.com>
190 * arm.cc (Reloc_stub::Key::name): Add unused attribute.
191 * dirsearch.cc (Dir_caches::~Dir_caches): Likewise.
193 2016-03-08 Cary Coutant <ccoutant@gmail.com>
194 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
196 * output.cc (Output_reloc_writer): New type.
197 (Output_data_reloc_base::do_write): Move implementation to template
198 in output.h and replace with invocation of template.
199 * output.h (Output_file): Move to top of file.
200 (Output_reloc::get_symbol_index): Move to public interface.
201 (Output_reloc::get_address): Likewise.
202 (Output_data_reloc_base::do_write_generic): New function template.
204 2016-03-04 Cary Coutant <ccoutant@gmail.com>
208 * symtab.cc: Instantiate Sized_symbol::init_constant and
209 Sized_symbol::init_undefined.
211 2016-03-03 Cary Coutant <ccoutant@gmail.com>
214 * layout.h (Layout::add_target_specific_dynamic_tag): New function.
215 * layout.cc (Layout::add_target_specific_dynamic_tag): New function.
216 * mips.cc (Target_mips::make_symbol): Adjust function signature.
217 * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_.
218 (Target_sparc::do_is_defined_by_abi): Remove test for
220 (Target_sparc::Register_symbol): New struct type.
221 (Target_sparc::register_syms_): New data member.
222 (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true.
223 (Target_sparc::make_symbol): New function.
224 (Target_sparc::do_finalize_sections): Add register symbols and new
225 dynamic table entries.
226 * symtab.h (Sized_symbol::init_undefined): Add value parameter.
227 (Symbol_table::add_target_global_symbol): New function.
228 (Symbol_table::target_symbols_): New data member.
229 * symtab.cc (Sized_symbol::init_undefined): Add value parameter.
230 (Symbol_table::Symbol_table): Initialize target_symbols_.
231 (Symbol_table::add_from_object): Pass additional parameters to
233 (Symbol_table::define_special_symbol): Likewise.
234 (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for
235 undefined symbol value.
236 (Symbol_table::set_dynsym_indexes): Process target-specific symbols.
237 (Symbol_table::sized_finalize): Likewise.
238 (Symbol_table::sized_write_globals): Likewise.
239 * target.h (Sized_target::make_symbol): Add name, st_type, object,
240 st_shndx, and value parameters.
242 2016-03-03 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
244 * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and
245 LDPK_WEAKUNDEF symbols.
247 2016-03-03 Than McIntosh <thanm@google.com>
249 * plugin.cc (Plugin::load): Include hooks for get_input_section_size
250 and get_input_section_alignment in transfer vector.
251 (get_input_section_alignment): New function.
252 (get_input_section_size): New function.
253 * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test.
254 * testsuite/Makefile.in: [Regenerate.]
255 * testsuite/plugin_section_alignment.cc: New test file.
256 * testsuite/plugin_layout_with_alignment.cc: New test file.
257 * testsuite/plugin_layout_with_alignment.sh: New test file.
259 2016-03-03 Evgenii Stepanov <eugenis@google.com>
261 * plugin.h (Pluginobj::get_symbol_resolution_info): Add version
263 * plugin.cc (get_symbols_v3): New function.
264 (Plugin::load): Add LDPT_GET_SYMBOLS_V3.
265 (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using
268 2016-02-26 Egor Kochetov <egor.kochetov@intel.com>
269 Cary Coutant <ccoutant@gmail.com>
272 * ehframe.h (Cie::fde_encoding): New method.
273 * ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length
276 2016-02-15 H.J. Lu <hongjiu.lu@intel.com>
278 * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
279 -mrelax-relocations=yes to $(TEST_AS).
280 (x86_64_mov_to_lea6.o): Likewise.
281 (x86_64_overflow_pc32.o): Remove duplicated target.
282 * testsuite/Makefile.in: Regenerated.
284 2016-02-15 Marcin Kościelnicki <koriakin@0x04.net>
286 * s390.cc (Target_s390::match_view_u): New helper method.
287 (Target_s390::do_is_call_to_non_split): New method.
288 (Target_s390::ss_code_st_r14): New const.
289 (Target_s390::ss_code_l_r14): New const.
290 (Target_s390::ss_code_bras_8): New const.
291 (Target_s390::ss_code_l_basr): New const.
292 (Target_s390::ss_code_a_basr): New const.
293 (Target_s390::ss_code_ear): New const.
294 (Target_s390::ss_code_c): New const.
295 (Target_s390::ss_code_larl): New const.
296 (Target_s390::ss_code_brasl): New const.
297 (Target_s390::ss_code_jg): New const.
298 (Target_s390::ss_code_jgl): New const.
299 (Target_s390::ss_match_mcount): New helper method.
300 (Target_s390::ss_match_l): New helper method.
301 (Target_s390::ss_match_ahi): New helper method.
302 (Target_s390::ss_match_alfi): New helper method.
303 (Target_s390::ss_match_cr): New helper method.
304 (Target_s390::do_calls_non_split): New method.
305 * testsuite/Makefile.am: Added new tests.
306 * testsuite/Makefile.in: Regenerate.
307 * testsuite/split_s390.sh: New test.
308 * testsuite/split_s390_1_a1.s: New test.
309 * testsuite/split_s390_1_a2.s: New test.
310 * testsuite/split_s390_1_n1.s: New test.
311 * testsuite/split_s390_1_n2.s: New test.
312 * testsuite/split_s390_1_z1.s: New test.
313 * testsuite/split_s390_1_z2.s: New test.
314 * testsuite/split_s390_1_z3.s: New test.
315 * testsuite/split_s390_1_z4.s: New test.
316 * testsuite/split_s390_2_ns.s: New test.
317 * testsuite/split_s390_2_s.s: New test.
318 * testsuite/split_s390x_1_a1.s: New test.
319 * testsuite/split_s390x_1_a2.s: New test.
320 * testsuite/split_s390x_1_n1.s: New test.
321 * testsuite/split_s390x_1_n2.s: New test.
322 * testsuite/split_s390x_1_z1.s: New test.
323 * testsuite/split_s390x_1_z2.s: New test.
324 * testsuite/split_s390x_1_z3.s: New test.
325 * testsuite/split_s390x_1_z4.s: New test.
326 * testsuite/split_s390x_2_ns.s: New test.
327 * testsuite/split_s390x_2_s.s: New test.
329 2016-02-11 Rahul Chaudhry <rahulchaudhry@google.com>
331 * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove
332 info message for every erratum 843419 found and fixed.
334 2016-02-07 Cary Coutant <ccoutant@gmail.com>
337 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional
338 information to relocation overflow errors.
340 2016-02-06 Cary Coutant <ccoutant@gmail.com>
343 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32
344 overflow checking when symbol value + addend < 0.
346 2016-02-06 Cary Coutant <ccoutant@gmail.com>
349 * reloc.h (Limits): New class.
350 (Bits::has_overflow32): Use min/max values from Limits.
351 (Bits::has_unsigned_overflow32): Likewise.
352 (Bits::has_signed_unsigned_overflow32): Likewise.
353 (Bits::has_overflow): Likewise.
354 (Bits::has_unsigned_overflow): Likewise.
355 (Bits::has_signed_unsigned_overflow64): Likewise.
357 2016-02-06 Cary Coutant <ccoutant@gmail.com>
360 * reloc.h (Relocate_functions::Overflow_check): Add comments.
361 * x86_64.cc (X86_64_relocate_functions): New class.
362 (Target_x86_64::Relocate::relocate): Use the new class.
363 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option.
364 (x32_overflow_pc32): New test case.
365 * testsuite/Makefile.in: Regenerate.
366 * testsuite/x32_overflow_pc32.sh: New script.
367 * testsuite/x86_64_overflow_pc32.s: Remove .space directive.
369 2016-02-06 Cary Coutant <ccoutant@gmail.com>
372 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast.
373 (Bits::has_unsigned_overflow): Remove unnecessary static_cast.
375 2016-02-06 Cary Coutant <ccoutant@gmail.com>
378 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed
380 (Bits::has_unsigned_overflow): Likewise.
382 2016-02-06 Marcin Kościelnicki <koriakin@0x04.net>
384 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
386 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
387 and view_size to is_call_to_non_split.
388 * target.cc (Target::is_call_to_non_split): Add view and view_size
390 * target.h (class Target): Likewise.
392 2016-02-05 Sriraman Tallam <tmsriram@google.com>
394 * icf.cc (get_rel_addend): New function.
395 (get_section_contents): Move merge section addend computation to a
396 new function. Ignore negative values for SHT_REL and SHT_RELA addends.
397 Fix bug to not read past the length of the section.
399 2016-02-05 Cary Coutant <ccoutant@gmail.com>
400 Andrew Senkevich <andrew.senkevich@intel.com>
403 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow
404 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and
406 * testsuite/Makefile.am (x86_64_overflow_pc32): New test.
407 * testsuite/x86_64_overflow_pc32.sh: New test script.
408 * testsuite/x86_64_overflow_pc32.s: New source file.
410 2016-02-05 Cary Coutant <ccoutant@gmail.com>
413 * reloc.h (Relocate_functions::Address): New typedef.
414 (Relocate_functions::Addendtype): New typedef.
415 (Relocate_functions::Overflow_check): New enum type.
416 (Relocate_functions::Reloc_status): New enum type.
417 (Relocate_functions::check_overflow): New function template.
418 (Relocate_functions::rel): Add check parameter; check for overflow.
419 (Relocate_functions::rel_unaligned): Likewise.
420 (Relocate_functions::rela): Likewise.
421 (Relocate_functions::pcrel): Likewise.
422 (Relocate_functions::pcrel_unaligned): Likewise.
423 (Relocate_functions::pcrela): Likewise.
424 (Relocate_functions::rel8): Adjust parameter types.
425 (Relocate_functions::rela8): Likewise.
426 (Relocate_functions::pcrel8): Likewise.
427 (Relocate_functions::pcrela8): Likewise.
428 (Relocate_functions::rel16): Likewise.
429 (Relocate_functions::rela168): Likewise.
430 (Relocate_functions::pcrel16): Likewise.
431 (Relocate_functions::pcrela16): Likewise.
432 (Relocate_functions::rel32): Likewise.
433 (Relocate_functions::rel32_unaligned): Likewise.
434 (Relocate_functions::rela32): Likewise.
435 (Relocate_functions::pcrel32): Likewise.
436 (Relocate_functions::pcrel32_unaligned): Likewise.
437 (Relocate_functions::pcrela32): Likewise.
438 (Relocate_functions::rel8_check): New function.
439 (Relocate_functions::rela8_check): New function.
440 (Relocate_functions::pcrel8_check): New function.
441 (Relocate_functions::pcrela8_check): New function.
442 (Relocate_functions::rel16_check): New function.
443 (Relocate_functions::rela168_check): New function.
444 (Relocate_functions::pcrel16_check): New function.
445 (Relocate_functions::pcrela16_check): New function.
446 (Relocate_functions::rel32_check): New function.
447 (Relocate_functions::rel32_unaligned_check): New function.
448 (Relocate_functions::rela32_check): New function.
449 (Relocate_functions::pcrel32_check): New function.
450 (Relocate_functions::pcrel32_unaligned_check): New function.
451 (Relocate_functions::pcrela32_check): New function.
452 (Bits::has_unsigned_overflow32): New function.
453 (Bits::has_unsigned_overflow): New function.
454 * testsuite/Makefile.am (overflow_unittest): New test.
455 * testsuite/Makefile.in: Regenerate.
456 * testsuite/overflow_unittest.cc: New source file.
458 2016-02-04 Alan Modra <amodra@gmail.com>
460 * powerpc.cc (relocate): Adjust last patch for big-endian.
462 2016-02-02 Alan Modra <amodra@gmail.com>
464 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
466 2016-01-15 Han Shen <shenhan@google.com>
468 PR gold/19472 - need pc-relative stubs.
470 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
471 stub type for DSOs and pie executables.
473 2016-01-12 H.J. Lu <hongjiu.lu@intel.com>
475 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
478 2016-01-12 Cary Coutant <ccoutant@gmail.com>
480 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
481 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
482 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
483 specializations) New method.
485 2016-01-11 Cary Coutant <ccoutant@gmail.com>
488 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
489 we have a TLS segment for GD-to-IE optimization.
490 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
492 (Target_i386::tls_desc_gd_to_ie): Likewise.
493 (Target_i386::relocate_tls): Don't insist that we have a TLS segment
494 for TLSDESC GD-to-IE optimizations.
495 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
497 (Target_x86_64::tls_desc_gd_to_ie): Likewise.
498 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
499 for TLSDESC GD-to-IE optimizations.
501 2016-01-11 Cary Coutant <ccoutant@gmail.com>
503 Refactor gold to enable support for MIPS-64 relocation format.
505 * gc.h (get_embedded_addend_size): Remove sh_type parameter.
506 (gc_process_relocs): Remove sh_type template parameter.
507 Use Classify_reloc to access r_sym, r_type, and r_addend fields.
508 * object.h (Sized_relobj_file::split_stack_adjust): Add target
510 (Sized_relobj_file::split_stack_adjust_reltype): Likewise.
511 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
512 specializations) Remove.
513 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
514 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
515 (Sized_relobj_file::emit_relocs_scan_reltype): Remove.
516 (Sized_relobj_file::split_stack_adjust): Add target parameter.
518 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
519 Target::get_r_sym() to get r_sym field from relocations.
520 (Track_relocs::next_symndx): Call Target::get_r_sym().
521 * target-reloc.h (scan_relocs): Remove sh_type template parameter;
522 add Classify_reloc template parameter. Use for accessing r_sym and
524 (relocate_section): Likewise.
525 (Default_classify_reloc): New class (renamed and moved from reloc.cc).
526 (Default_scan_relocatable_relocs): Remove sh_type template parameter.
527 (Default_scan_relocatable_relocs::Reltype): New typedef.
528 (Default_scan_relocatable_relocs::reloc_size): New const.
529 (Default_scan_relocatable_relocs::sh_type): New const.
530 (Default_scan_relocatable_relocs::get_r_sym): New method.
531 (Default_scan_relocatable_relocs::get_r_type): New method.
532 (Default_emit_relocs_strategy): New class.
533 (scan_relocatable_relocs): Replace sh_type template parameter with
534 Scan_relocatable_relocs class. Use it to access r_sym and r_type
536 (relocate_relocs): Replace sh_type template parameter with
537 Classify_reloc class. Use it to access r_sym and r_type fields.
538 * target.h (Target::is_call_to_non_split): Replace r_type parameter
539 with pointer to relocation. Adjust all callers.
540 (Target::do_is_call_to_non_split): Likewise.
541 (Target::emit_relocs_scan): New virtual method.
542 (Sized_target::get_r_sym): New virtual method.
543 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
544 with pointer to relocation.
546 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
547 (Target_aarch64::Relocatable_size_for_reloc): Remove.
548 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
549 (Target_aarch64::scan_relocs): Likewise.
550 (Target_aarch64::relocate_section): Likewise.
551 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
553 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
554 (Target_aarch64::relocate_relocs): Use Default_classify_reloc.
555 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
557 (Target_arm::emit_relocs_scan): New method.
558 (Target_arm::Relocatable_size_for_reloc): Replace with...
559 (Target_arm::Classify_reloc): ...this.
560 (Target_arm::gc_process_relocs): Use Classify_reloc.
561 (Target_arm::scan_relocs): Likewise.
562 (Target_arm::relocate_section): Likewise.
563 (Target_arm::scan_relocatable_relocs): Likewise.
564 (Target_arm::relocate_relocs): Likewise.
565 * i386.cc (Target_i386::emit_relocs_scan): New method.
566 (Target_i386::Relocatable_size_for_reloc): Replace with...
567 (Target_i386::Classify_reloc): ...this.
568 (Target_i386::gc_process_relocs): Use Classify_reloc.
569 (Target_i386::scan_relocs): Likewise.
570 (Target_i386::relocate_section): Likewise.
571 (Target_i386::scan_relocatable_relocs): Likewise.
572 (Target_i386::relocate_relocs): Likewise.
573 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
575 (Mips_reloc_types): New class template.
576 (Mips_classify_reloc): New class template.
577 (Target_mips::Reltype): New typedef.
578 (Target_mips::Relatype): New typedef.
579 (Target_mips::emit_relocs_scan): New method.
580 (Target_mips::get_r_sym): New method.
581 (Target_mips::Relocatable_size_for_reloc): Replace with
583 (Target_mips::copy_reloc): Use Mips_classify_reloc.
584 (Target_mips::gc_process_relocs): Likewise.
585 (Target_mips::scan_relocs): Likewise.
586 (Target_mips::relocate_section): Likewise.
587 (Target_mips::scan_relocatable_relocs): Likewise.
588 (Target_mips::relocate_relocs): Likewise.
589 (mips_get_size_for_reloc): New function, factored out from
590 Relocatable_size_for_reloc::get_size_for_reloc.
591 (Target_mips::Scan::local): Use Mips_classify_reloc.
592 (Target_mips::Scan::global): Likewise.
593 (Target_mips::Relocate::relocate): Likewise.
594 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
595 (Target_powerpc::Relocatable_size_for_reloc): Remove.
596 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
597 (Target_powerpc::scan_relocs): Likewise.
598 (Target_powerpc::relocate_section): Likewise.
599 (Powerpc_scan_relocatable_reloc): Convert to class template.
600 (Powerpc_scan_relocatable_reloc::Reltype): New typedef.
601 (Powerpc_scan_relocatable_reloc::reloc_size): New const.
602 (Powerpc_scan_relocatable_reloc::sh_type): New const.
603 (Powerpc_scan_relocatable_reloc::get_r_sym): New method.
604 (Powerpc_scan_relocatable_reloc::get_r_type): New method.
605 (Target_powerpc::scan_relocatable_relocs): Use
606 Powerpc_scan_relocatable_reloc.
607 (Target_powerpc::relocate_relocs): Use Default_classify_reloc.
608 * s390.cc (Target_s390::emit_relocs_scan): New method.
609 (Target_s390::Relocatable_size_for_reloc): Remove.
610 (Target_s390::gc_process_relocs): Use Default_classify_reloc.
611 (Target_s390::scan_relocs): Likewise.
612 (Target_s390::relocate_section): Likewise.
613 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
615 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
616 (Target_s390::relocate_relocs): Use Default_classify_reloc.
617 * sparc.cc (Target_sparc::emit_relocs_scan): New method.
618 (Target_sparc::Relocatable_size_for_reloc): Remove.
619 (Target_sparc::gc_process_relocs): Use Default_classify_reloc.
620 (Target_sparc::scan_relocs): Likewise.
621 (Target_sparc::relocate_section): Likewise.
622 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
624 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
625 (Target_sparc::relocate_relocs): Use Default_classify_reloc.
626 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
627 (Target_tilegx::Relocatable_size_for_reloc): Remove.
628 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
629 (Target_tilegx::scan_relocs): Likewise.
630 (Target_tilegx::relocate_section): Likewise.
631 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
633 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
634 (Target_tilegx::relocate_relocs): Use Default_classify_reloc.
635 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
636 (Target_x86_64::Relocatable_size_for_reloc): Remove.
637 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
638 (Target_x86_64::scan_relocs): Likewise.
639 (Target_x86_64::relocate_section): Likewise.
640 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
642 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
643 (Target_x86_64::relocate_relocs): Use Default_classify_reloc.
645 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
647 2016-01-01 Alan Modra <amodra@gmail.com>
649 Update year range in copyright notice of all files.
651 For older changes see ChangeLog-0815
653 Copyright (C) 2016 Free Software Foundation, Inc.
655 Copying and distribution of this file, with or without modification,
656 are permitted in any medium without royalty provided the copyright
657 notice and this notice are preserved.
663 version-control: never