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