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