1 2016-08-10 James Clarke <jrtc27@jrtc27.com>
4 * sparc.cc (Target_sparc::Scan::check_non_pic): Allow R_SPARC_32 on
7 2016-06-29 Cary Coutant <ccoutant@gmail.com>
10 * testsuite/dynamic_list.sh: Remove check for _ZdlPv.
12 2016-06-29 Cary Coutant <ccoutant@gmail.com>
14 * testsuite/Makefile.am (MOSTLYCLEANFILES): Add eh_test_2.
15 * testsuite/Makefile.in: Regenerate.
17 2016-06-30 Alan Modra <amodra@gmail.com>
19 * testsuite/Makefile.am (memory_test, memory_test_2): Pass
20 -Wl,-z to gcc, not plain -z.
21 * testsuite/Makefile.in: Regenerate.
23 2016-06-29 H.J. Lu <hongjiu.lu@intel.com>
26 * i386.cc (Target_i386::Relocate::relocate): Allow
27 R_386_GOT32X relocation against ___tls_get_addr.
28 (Target_i386::Relocate::tls_gd_to_ie): Support indirect
29 call to __tls_get_addr.
30 (Target_i386::Relocate::tls_gd_to_le): Likewise.
31 (Target_i386::Relocate::tls_ld_to_le): Likewise.
32 * testsuite/Makefile.am (check_PROGRAMS): Add pr20308a_test,
33 pr20308b_test, pr20308c_test, pr20308d_test, pr20308e_test.
34 (pr20308a_test_SOURCES): New.
35 (pr20308a_test_DEPENDENCIES): Likewise.
36 (pr20308a_test_CFLAGS): Likewise.
37 (pr20308a_test_LDFLAGS): Likewise.
38 (pr20308a_test_LDADD): Likewise.
39 (pr20308b_test_SOURCES): Likewise.
40 (pr20308b_test_DEPENDENCIES): Likewise.
41 (pr20308b_test_CFLAGS): Likewise.
42 (pr20308b_test_LDFLAGS): Likewise.
43 (pr20308b_test_LDADD): Likewise.
44 (pr20308c_test_SOURCES): Likewise.
45 (pr20308c_test_DEPENDENCIES): Likewise.
46 (pr20308c_test_CFLAGS): Likewise.
47 (pr20308c_test_LDFLAGS): Likewise.
48 (pr20308c_test_LDADD): Likewise.
49 (pr20308d_test_SOURCES): Likewise.
50 (pr20308d_test_DEPENDENCIES): Likewise.
51 (pr20308d_test_CFLAGS): Likewise.
52 (pr20308d_test_LDFLAGS): Likewise.
53 (pr20308d_test_LDADD): Likewise.
54 (pr20308e_test_SOURCES): Likewise.
55 (pr20308e_test_DEPENDENCIES): Likewise.
56 (pr20308e_test_CFLAGS): Likewise.
57 (pr20308e_test_LDFLAGS): Likewise.
58 (pr20308e_test_LDADD): Likewise.
59 (pr20308a.so): Likewise.
60 (pr20308b.so): Likewise.
61 (pr20308_gd.o): Likewise.
62 (pr20308_ld.o): Likewise.
63 (MOSTLYCLEANFILES): Add pr20308a.so pr20308b.so.
64 * testsuite/Makefile.in: Regenerated.
65 * testsuite/pr20308_def.c: New file.
66 * testsuite/pr20308_gd.S: Likewise.
67 * testsuite/pr20308_ld.S: Likewise.
68 * testsuite/pr20308_main.c: Likewise.
70 2016-06-29 H.J. Lu <hongjiu.lu@intel.com>
73 * configure.ac (DEFAULT_TARGET_X86_64_OR_X32): New
75 * configure: Regenerated.
76 * x86_64.cc (Target_x86_64<size>::Relocate::relocate): Allow
77 R_X86_64_GOTPCRELX relocation against __tls_get_addr.
78 (Target_x86_64<size>::Relocate::tls_gd_to_ie): Support indirect
79 call to __tls_get_addr.
80 (Target_x86_64<size>::Relocate::tls_gd_to_le): Likewise.
81 (Target_x86_64<size>::Relocate::tls_ld_to_le): Likewise.
82 * testsuite/Makefile.am (check_PROGRAMS): Add pr20216a_test,
83 pr20216b_test, pr20216c_test, pr20216d_test, pr20216e_test.
84 (pr20216a_test_SOURCES): New.
85 (pr20216a_test_DEPENDENCIES): Likewise.
86 (pr20216a_test_CFLAGS): Likewise.
87 (pr20216a_test_LDFLAGS): Likewise.
88 (pr20216a_test_LDADD): Likewise.
89 (pr20216b_test_SOURCES): Likewise.
90 (pr20216b_test_DEPENDENCIES): Likewise.
91 (pr20216b_test_CFLAGS): Likewise.
92 (pr20216b_test_LDFLAGS): Likewise.
93 (pr20216b_test_LDADD): Likewise.
94 (pr20216c_test_SOURCES): Likewise.
95 (pr20216c_test_DEPENDENCIES): Likewise.
96 (pr20216c_test_CFLAGS): Likewise.
97 (pr20216c_test_LDFLAGS): Likewise.
98 (pr20216c_test_LDADD): Likewise.
99 (pr20216d_test_SOURCES): Likewise.
100 (pr20216d_test_DEPENDENCIES): Likewise.
101 (pr20216d_test_CFLAGS): Likewise.
102 (pr20216d_test_LDFLAGS): Likewise.
103 (pr20216d_test_LDADD): Likewise.
104 (pr20216e_test_SOURCES): Likewise.
105 (pr20216e_test_DEPENDENCIES): Likewise.
106 (pr20216e_test_CFLAGS): Likewise.
107 (pr20216e_test_LDFLAGS): Likewise.
108 (pr20216e_test_LDADD): Likewise.
109 (pr20216a.so): Likewise.
110 (pr20216b.so): Likewise.
111 (pr20216_gd.o): Likewise.
112 (pr20216_ld.o): Likewise.
113 (MOSTLYCLEANFILES): Add pr20216a.so pr20216b.so.
114 * testsuite/Makefile.in: Regenerated.
115 * testsuite/pr20216_def.c: New file.
116 * testsuite/pr20216_gd.S: Likewise.
117 * testsuite/pr20216_ld.S: Likewise.
118 * testsuite/pr20216_main.c: Likewise.
120 2016-06-29 Alan Modra <amodra@gmail.com>
122 * script_test_12.t: Delete .plt, specify 64k page size.
123 * script_test_12i.t: Likewise.
125 2016-06-29 Alan Modra <amodra@gmail.com>
127 * testsuite/plugin_layout_with_alignment.c: Explicitly align all
130 2016-06-29 Alan Modra <amodra@gmail.com>
132 * testsuite/Makefile.am (copy_test_protected): Disable for powerpc.
133 * testsuite/Makefile.in: Regenerate.
135 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
137 * aarch64-reloc.def (NONE): New relocation.
138 * aarch64.cc (Target_aarch64::Scan::local): Handle R_AARCH64_NONE.
139 (Target_aarch64::Scan::global): Likewise.
140 * testsuite/Makefile.am (aarch64_reloc_none): New test.
141 * testsuite/Makefile.in: Regenerate.
142 * testsuite/aarch64_reloc_none.s: New test source file.
143 * testsuite/aarch64_reloc_none.sh: New test script.
145 2016-06-28 Sriraman Tallam <tmsriram@google.com>
147 * x86_64.cc (Lazy_view): New class.
148 (can_convert_mov_to_lea): Templatize function. Make the function
149 check for appropriate relocation types and use the view parameter
150 to get section contents.
151 (can_convert_callq_to_direct): New function.
152 (Target_x86_64<size>::Scan::global): Refactor.
153 (Target_x86_64<size>::Relocate::relocate): Refactor. Change any indirect
154 call via GOT that can be converted.
155 * testsuite/Makefile.am (x86_64_indirect_call_to_direct.sh): New test.
156 * testsuite/Makefile.in: Regenerate.
157 * testsuite/x86_64_indirect_call_to_direct1.s: New file.
158 * testsuite/x86_64_indirect_jump_to_direct1.s: New file.
160 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
162 * aarch64.cc (Target_aarch64::Scan::local): Move the call to got_section
163 from the top level to the places of its use.
165 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
168 * script-c.h (Sort_wildcard): Add SORT_WILDCARD_BY_INIT_PRIORITY.
169 * script-sections.cc (Input_section_sorter::get_init_priority): New method.
170 (Input_section_sorter::operator()): Handle SORT_WILDCARD_BY_INIT_PRIORITY.
171 (Output_section_element_input::print): Likewise.
172 * script.cc (script_keyword_parsecodes): Add entry SORT_BY_INIT_PRIORITY.
173 * yyscript.y (SORT_BY_INIT_PRIORITY): New token.
174 (wildcard_section): Handle SORT_BY_INIT_PRIORITY.
176 * testsuite/Makefile.am (script_test_14): New test.
177 * testsuite/Makefile.in: Regenerate.
178 * testsuite/script_test_14.s: New test source file.
179 * testsuite/script_test_14.sh: New test script.
180 * testsuite/script_test_14.t: New test linker script.
182 2016-06-28 James Clarke <jrtc27@jrtc27.com>
184 * sparc.cc (Target_sparc::Scan::local): Don't convert R_SPARC_32
185 to R_SPARC_RELATIVE if class is ELFCLASS64.
186 (Target_sparc::Scan::global): Likewise.
188 2016-06-23 Cary Coutant <ccoutant@gmail.com>
189 Igor Kudrin <ikudrin@accesssoftek.com>
193 (Output_section_element_input::set_section_addresses): Keep bin_count
194 separate from input_pattern_count.
195 * testsuite/script_test_12.t: Add another section .x4.
196 * testsuite/script_test_12i.t: Likewise.
197 * testsuite/script_test_12a.c: Likewise.
198 * testsuite/script_test_12b.c: Likewise.
200 2016-06-23 Igor Kudrin <ikudrin@accesssoftek.com>
202 * gold-threads.cc (impl_threads::Lock_impl_threads): Fix typos.
204 2016-06-22 H.J. Lu <hongjiu.lu@intel.com>
207 * NEWS: Mention --enable-relro.
208 * configure.ac: Add --enable-relro.
209 (DEFAULT_LD_Z_RELRO): New. Set by --enable-relro and default
211 * config.in: Regenerated.
212 * configure: Likewise.
213 * options.h (General_options::relro): Default to
216 2016-06-20 Cary Coutant <ccoutant@gmail.com>
218 * NEWS: Add new features in 1.12.
219 * version.cc (version_string): Bump to 1.12.
221 2016-06-20 H.J. Lu <hongjiu.lu@intel.com>
224 * i386.cc (Target_i386::first_plt_entry_offset): Return 0 if
226 (Target_i386::plt_entry_size): Likewise.
227 (Target_x86_64<size>::first_plt_entry_offset): Likewise.
228 (Target_x86_64<size>::plt_entry_size): Likewise.
230 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
232 * mips.cc (Target_mips::Target_mips): Initialize rld_map_.
233 (Target_mips::rld_map_): New data member.
234 (Target_mips::do_finalize_sections): Add support for
235 DT_MIPS_RLD_MAP and DT_MIPS_RLD_MAP_REL dynamic tags,
236 .rld_map section, and __RLD_MAP symbol.
237 (Target_mips::do_dynamic_tag_custom_value): Add support for
238 DT_MIPS_RLD_MAP_REL dynamic tag.
239 * output.cc (Output_data_dynamic::get_entry_offset): New method
241 * output.h (Output_data_dynamic::get_entry_offset): New method
244 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
246 * mips.cc (Mips_relocate_functions::relpc16): Add unaligned check.
248 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
250 * mips.cc (relocation_needs_la25_stub): Add support for relocs:
251 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
252 (hi16_reloc): Add support for R_MIPS_PCHI16 relocation.
253 (is_matching_lo16_reloc): Likewise.
254 (lo16_reloc): Add support for R_MIPS_PCLO16 relocation.
255 (Mips_output_data_plt::plt_entry_r6): New static data member for
257 (Target_mips::is_output_r6): New method.
258 (Target_mips::Mips_mach): Add new enum constants.
259 (Mips_relocate_functions::Status): Likewise.
260 (Mips_relocate_functions::pchi16_relocs): New static data member.
261 (Mips_relocate_functions::relpc21): New method.
262 (Mips_relocate_functions::relpc26): Likewise.
263 (Mips_relocate_functions::relpc18): Likewise.
264 (Mips_relocate_functions::relpc19): Likewise.
265 (Mips_relocate_functions::relpchi16): Likewise.
266 (Mips_relocate_functions::do_relpchi16): Likewise.
267 (Mips_relocate_functions::relpclo16): Likewise.
268 (Mips_output_data_plt::do_write): Add support for Mips r6 plt
270 (Target_mips::mips_32bit_flags): Add E_MIPS_ARCH_32R6 support.
271 (Target_mips::elf_mips_mach): Add E_MIPS_ARCH_32R6 and
272 E_MIPS_ARCH_64R6 support.
273 (Target_mips::update_abiflags_isa): Likewise.
274 (mips_get_size_for_reloc): Add support for relocs: R_MIPS_PCHI16,
275 R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3 and
277 (Target_mips::Scan::local): Add support for relocs: R_MIPS_PCHI16
279 (Target_mips::Scan::global): Add support for relocs:
280 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
281 (Target_mips::Relocate::relocate): Call functions for resolving
282 Mips32r6 and Mips64r6 relocations, and print error message for
283 STATUS_PCREL_UNALIGNED.
284 (Target_mips::Scan::get_reference_flags): Add support for relocs:
285 R_MIPS_PCHI16, R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2,
286 R_MIPS_PC18_S3 and R_MIPS_PC19_S2.
287 (Target_mips::elf_mips_mach_name): Add E_MIPS_ARCH_32R6 and
288 E_MIPS_ARCH_64R6 support.
290 2016-06-13 H.J. Lu <hongjiu.lu@intel.com>
293 * testsuite/script_test_2.t: Add .got.plt after .got.
295 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
297 * mips.cc (struct Mips_abiflags): New struct.
298 (Mips_relobj::Mips_relobj): Initialize attributes_section_data_
300 (Mips_relobj::~Mips_relobj): Delete object pointed by
301 attributes_section_data_.
302 (Mips_relobj::abiflags): New method.
303 (Mips_relobj::attributes_section_data): Likewise.
304 (Mips_relobj::attributes_section_data_): New data member.
305 (Mips_relobj::abiflags_): Likewise.
306 (class Mips_output_section_abiflags): New class.
307 (Target_mips::Target_mips): Initialize attributes_section_data_,
308 abiflags_ and has_abiflags_section_.
309 (Target_mips::do_should_include_section): Don't emit input
310 .MIPS.abiflags sections to output .MIPS.abiflags.
311 (Target_mips::Mips_mach): Add new enum constants.
312 (Target_mips::mips_isa_ext_mach): New method.
313 (Target_mips::mips_isa_ext): Likewise.
314 (Target_mips::update_abiflags_isa): Likewise.
315 (Target_mips::infer_abiflags): Likewise.
316 (Target_mips::create_abiflags): Likewise.
317 (Target_mips::fp_abi_string): Likewise.
318 (Target_mips::select_fp_abi): Likewise.
319 (Target_mips::merge_obj_attributes): Likewise.
320 (Target_mips::merge_obj_abiflags): Likewise.
321 (Target_mips::level_rev): Likewise.
322 (Target_mips::merge_obj_e_flags): Rename from
323 merge_processor_specific_flags. Remove dyn_obj argument,
324 call update_abiflags_isa when needed, compare NaN encodings and
326 (Target_mips::add_machine_extensions): Add two machine extensions
328 (Target_mips::attributes_section_data_): New data member.
329 (Target_mips::abiflags_): Likewise.
330 (Target_mips::has_abiflags_section_): Likewise.
331 (Mips_relobj::do_read_symbols): Read .gnu.attributes and
332 .MIPS.abiflags sections if they exists.
333 (Target_mips::elf_mips_mach): Add E_MIPS_MACH_5900 and
334 E_MIPS_MACH_OCTEON3 support.
335 (Target_mips::do_adjust_elf_header): Setup EI_ABIVERSION flag.
336 (Target_mips::do_finalize_sections): Merge .gnu.attributes and
337 .MIPS.abiflags sections from input. Create these sections if
339 (Target_mips::elf_mips_mach_name): Add E_MIPS_MACH_5900 and
340 E_MIPS_MACH_OCTEON3 support, and change strings for
341 E_MIPS_MACH_LS2E, E_MIPS_MACH_LS2F and E_MIPS_MACH_LS3A just
344 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
346 * mips.cc (Mips_relobj::Mips_relobj): Initialize
347 has_reginfo_section_.
348 (Mips_relobj::has_reginfo_section_): New data member.
349 (Mips_relobj::has_reginfo_section): New method.
350 (class Mips_output_section_reginfo): Change base class to
351 Output_section_data, and set masks of the output .reginfo section
353 (Mips_output_section_reginfo::as_mips_output_section_reginfo):
355 (Mips_output_section_reginfo::set_masks): Likewise.
356 (Mips_output_section_reginfo::set_final_data_size): Likewise.
357 (Mips_output_section_reginfo::do_print_to_mapfile): New method.
358 (Target_mips::do_make_output_section): Remove.
359 (Mips_relobj::do_read_symbols): Set has_reginfo_section_ to true
360 if the object contains a .reginfo section.
361 (Target_mips::do_finalize_sections): Create a .reginfo output
364 2016-06-09 Artemiy Volkov <artemiyv@acm.org>
366 * mips.cc (Mips_output_data_got::do_write): Add missing template
369 2016-05-30 Marcin Kościelnicki <koriakin@0x04.net>
372 * s390.cc (Target_s390::ss_code_st_r14): Removed.
373 (Target_s390::ss_code_l_r14): Removed.
374 (Target_s390::ss_code_ear): Removed.
375 (Target_s390::ss_code_c): Removed.
376 (Target_s390::ss_match_st_r14): New function.
377 (Target_s390::ss_match_l_r14): New function.
378 (Target_s390::ss_match_mcount): Call ss_match_{l,st}_r14 instead
379 of matching code directly.
380 (Target_s390::ss_match_ear): New function.
381 (Target_s390::ss_match_c): New function.
382 (Target_s390::do_calls_non_split): Call ss_match_{ear,c} instead
383 of matching code directly.
385 2016-05-19 Cary Coutant <ccoutant@gmail.com>
388 * copy-relocs.cc (Copy_relocs::make_copy_reloc): Add object
389 parameter; check for protected symbol.
390 * copy-relocs.h (Copy_relocs::make_copy_reloc): Add object parameter.
391 * mips.cc (Mips_copy_relocs): Adjust call to make_copy_reloc.
392 * symtab.cc (Symbol::init_fields): Initialize is_protected_.
393 (Symbol_table::add_from_dynobj): Mark protected symbols.
394 * symtab.h (Symbol::is_protected): New method.
395 (Symbol::set_is_protected): New method.
396 (Symbol::is_protected_): New data member.
398 * testsuite/Makefile.am (copy_test_protected): New test.
399 * testsuite/Makefile.in: Regenerate.
400 * testsuite/copy_test.cc (main): Add legal reference to protected
402 * testsuite/copy_test_v1.cc (main): Likewise.
403 * testsuite/copy_test_2.cc (ip): Add protected symbol.
404 * testsuite/copy_test_protected.cc: New test source file.
405 * testsuite/copy_test_protected.sh: New test script.
407 2016-05-19 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
409 * mips.cc (Mips_got_entry::Mips_got_entry): Remove object argument
410 for global got symbols, and set addend to 0.
411 (Mips_got_entry::hash): Change hash algorithm.
412 (Mips_got_entry::equals): Refactor.
413 (Mips_got_entry::object): Return input object for local got symbols
415 (Mips_got_entry::addend): Change return of the relocation addend.
416 (Mips_got_entry::addend_): Move from union d.
417 (Mips_got_entry::object_): Move into union d.
418 (class Mips_symbol_hash): New class.
419 (Mips_got_info::Global_got_entry_set): New type.
420 (Mips_got_info::global_got_symbols): Change return type to
421 Global_got_entry_set.
422 (Mips_got_info::global_got_symbols_): Change type to
423 Global_got_entry_set.
424 (Mips_symbol::hash): New method.
425 (Mips_output_data_la25_stub::symbols_): Change type to std::vector.
426 (Mips_output_data_mips_stubs::Mips_stubs_entry_set): New type.
427 (Mips_output_data_mips_stubs::symbols_): Change type to
428 Mips_stubs_entry_set.
429 (Mips_got_info::record_global_got_symbol): Don't pass object
430 argument when creating global got symbol.
431 (Mips_got_info::record_got_entry): Remove find before inserting
433 (Mips_got_info::add_reloc_only_entries): Change type of iterator
434 to Global_got_entry_set.
435 (Mips_got_info::count_got_symbols): Likewise.
436 (Mips_output_data_la25_stub::create_la25_stub): Use push_back
437 for adding entries to symbols_.
438 (Mips_output_data_la25_stub::do_write): Change type of iterator
440 (Mips_output_data_mips_stubs::set_lazy_stub_offsets): Change type
441 of iterator to Mips_stubs_entry_set.
442 (Mips_output_data_mips_stubs::set_needs_dynsym_value): Likewise.
443 (Mips_output_data_mips_stubs::do_write): Likewise.
445 2016-05-06 Han Shen <shenhan@google.com>
449 * aarch64-reloc.def: New relocation type.
450 * aarch64.cc (AArch64_relocate_functions::Page): Changed to public.
451 (Target_aarch64::Scan::local): Add R_AARCH64_LD64_GOTPAGE_LO15.
452 (Target_aarch64::Scan::global): Add R_AARCH64_LD64_GOTPAGE_LO15.
453 (Target_aarch64::Relocate::relocate): Implement R_AARCH64_LD64_GOTPAGE_LO15.
455 2016-04-28 Nick Clifton <nickc@redhat.com>
457 * po/zh_CN.po: Updated Chinese (simplified) translation.
459 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
461 * Makefile.in: Regenerated with automake 1.11.6.
462 * aclocal.m4: Likewise.
463 * testsuite/Makefile.in: Likewise.
465 2016-03-30 Cary Coutant <ccoutant@gmail.com>
468 * symtab.cc (Symbol_table::define_default_version): Check for case
469 where symbols are both in different shared objects.
471 2016-03-27 Cary Coutant <ccoutant@gmail.com>
474 * i386.cc (Target_i386): Add check for fully-resolved symbol for
477 2016-03-22 Nick Clifton <nickc@redhat.com>
479 * configure: Regenerate.
481 2016-03-21 Cary Coutant <ccoutant@gmail.com>
484 * errors.cc (Errors::undefined_symbol): Add info message when
485 symbol should have been provided by a plugin.
486 * target-reloc.h (issue_undefined_symbol_error): Check for
487 placeholder symbols defined in discarded sections.
488 * testsuite/Makefile.am (plugin_test_9b): New test case.
489 * testsuite/Makefile.in: Regenerate.
490 * testsuite/plugin_test_9b_elf.cc: New test source file.
491 * testsuite/plugin_test_9b_ir.cc: New test source file.
493 2016-03-20 Cary Coutant <ccoutant@gmail.com>
496 * ehframe.cc (Eh_frame::read_fde): Check for dropped functions.
497 * testsuite/Makefile.am (eh_test_2): New test.
498 * testsuite/Makefile.in: Regenerate.
499 * testsuite/eh_test_2.sh: New test script.
500 * testsuite/eh_test_a.cc (bar): Make it comdat.
501 * testsuite/eh_test_b.cc (bar): Add a duplicate copy.
503 2016-03-18 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
505 * mips.cc (Mips_relobj::is_n64_): Remove.
506 (Target_mips::ei_class_): Likewise.
507 (Mips_relobj::is_newabi): Call methods.
508 (Mips_relobj::is_n64): Change checking for N64 ABI.
509 (Target_mips::is_output_n64): Likewise.
510 (Target_mips::merge_processor_specific_flags): Remove ei_class
511 argument, and remove comparing ei_class.
512 (Target_mips::do_adjust_elf_header): Remove setting EI_CLASS field
514 (Target_mips::do_finalize_sections): Don't pass ei_class argument
515 to merge_processor_specific_flags.
516 (Target_mips::elf_mips_abi_name): Remove ei_class argument, and
517 change checking for N64 ABI.
519 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
521 * mips.cc (enum Special_relocation_symbol): New enum type.
522 (is_readonly_section): New function.
523 (eh_reloc): Likewise.
524 (Mips_got_entry::is_section_symbol_): New member.
525 (Mips_got_entry::is_section_symbol): New method.
526 (Mips_got_info::record_local_got_symbol): Add is_section_symbol
528 (Mips_relobj::mips_elf_options_section_name): New method.
529 (Mips_output_data_got::record_local_got_symbol): Add
530 is_section_symbol argument, and pass it to
531 Mips_got_info::record_local_got_symbol.
532 (Mips_output_data_got::got_offset): Add addend argument, and pass
533 it to Relobj::local_got_offset.
534 (struct Mips_output_reloc_writer): New type.
535 (class Mips_output_data_reloc): New class.
536 (Mips_output_data_plt::Reloc_section): Change type to
537 Mips_output_data_reloc.
538 (Target_mips::Reloc_section): Likewise.
539 (Mips_reloc_types::get_r_addend): Remove unsigned from return type.
540 (Mips_classify_reloc::get_r_type2): New method.
541 (Mips_classify_reloc::get_r_type3): Likewise.
542 (Mips_classify_reloc::get_r_ssym): Likewise.
543 (Target_mips::Reloca_section): Remove.
544 (Relocate::should_apply_static_reloc): Rename from
545 should_apply_r_mips_32_reloc.
546 (Target_mips::copy_reloc): Replace Reltype parameter with r_type
548 (Mips_relocate_functions::Valtype): New type.
549 (Mips_relocate_functions::Valtype64): New type.
550 (Mips_relocate_functions::check_overflow): New method.
551 (Mips_relocate_functions::mips_reloc_unshuffle): Move to public
553 (Mips_relocate_functions::mips_reloc_shuffle): Likewise.
554 (Mips_relocate_functions::rel16): Add support for resolving
555 relocations for Mips64.
556 (Mips_relocate_functions::rel32): Likewise.
557 (Mips_relocate_functions::reljalr): Likewise.
558 (Mips_relocate_functions::relpc32): Likewise.
559 (Mips_relocate_functions::rel26): Likewise.
560 (Mips_relocate_functions::relpc16): Likewise.
561 (Mips_relocate_functions::relmicromips_pc7_s1): Likewise.
562 (Mips_relocate_functions::relmicromips_pc10_s1): Likewise.
563 (Mips_relocate_functions::relmicromips_pc16_s1): Likewise.
564 (Mips_relocate_functions::do_relhi16): Likewise.
565 (Mips_relocate_functions::do_relgot16_local): Likewise.
566 (Mips_relocate_functions::rello16): Likewise.
567 (Mips_relocate_functions::relgot): Likewise.
568 (Mips_relocate_functions::relgotpage): Likewise.
569 (Mips_relocate_functions::relgotofst): Likewise.
570 (Mips_relocate_functions::relgot_hi16): Likewise.
571 (Mips_relocate_functions::relgot_lo16): Likewise.
572 (Mips_relocate_functions::relgprel): Likewise.
573 (Mips_relocate_functions::relgprel32): Likewise.
574 (Mips_relocate_functions::tlsrelhi16): Likewise.
575 (Mips_relocate_functions::tlsrello16): Likewise.
576 (Mips_relocate_functions::tlsrel32): Likewise.
577 (Mips_relocate_functions::relsub): Likewise.
578 (Mips_relocate_functions::releh): New method.
579 (Mips_relocate_functions::rel64): Likewise.
580 (Mips_got_info::record_local_got_symbol): Add is_section_symbol and
581 pass it to Mips_got_entry.
582 (Mips_got_info::add_local_entries): Pass addend argument
583 to code functions, and for STT_SECTION symbols call
584 add_symbolless_local_addend.
585 (Mips_got_info::add_tls_entries): Pass addend argument to code
587 (Mips_relobj::do_read_symbols): Read gp value that was used to
589 (Mips_output_data_plt::plt_entry): Remove opcode from l[wd]
590 instruction. Opcode for instruction will be selected later.
591 (Target_mips::gc_process_relocs): Add case for SHT_RELA.
592 (Target_mips::scan_relocatable_relocs): Likewise.
593 (Target_mips::emit_relocs_scan): Likewise.
594 (Target_mips::relocate_relocs): Likewise.
595 (Target_mips::do_finalize_sections): Skip objects for merging
596 processor specific flags in which all input sections will be
598 (mips_get_size_for_reloc): Add case for R_MIPS_EH.
599 (Target_mips::Scan::get_reference_flags): Likewise.
600 (Target_mips::relocate_special_relocatable): Call rel26 method with
601 calculate_only and calculated_value arguments.
602 (Target_mips::Scan::local): Add case for R_MIPS_EH. Don't create a
603 dynamic relocation against a readonly sections, and pass
604 is_section_symbol to Mips_got_info::record_local_got_symbol.
605 (Target_mips::Scan::global): Add case for R_MIPS_EH. Don't create a
606 dynamic relocation against a readonly sections, and pass r_type
607 and r_offset to Target_mips::copy_reloc.
608 (Target_mips::Relocate::relocate): Add support for resolving
609 relocations for Mips64.
610 (Target_mips::mips_info): Add case for Mips64 default dynamic
612 (Target_selector_mips): Correct emulation names.
614 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
616 * mips.cc (class Mips_output_data_la25_stub): Add
617 do_print_to_mapfile function.
619 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
621 * mips.cc (Mips_classify_reloc::put_r_info): Call 32bit version of
624 2016-03-09 H.J. Lu <hongjiu.lu@intel.com>
626 * testsuite/plugin_layout_with_alignment.cc: Renamed to ..
627 * testsuite/plugin_layout_with_alignment.c: This.
628 * testsuite/Makefile.am (plugin_layout_with_alignment.o): Updated.
629 (plugin_layout_with_alignment): Likewise.
630 * testsuite/Makefile.in: Regenerated.
632 2016-03-08 Cary Coutant <ccoutant@gmail.com>
635 * testsuite/Makefile.am (retain_symbols_file_test): Remove check
637 * testsuite/Makefile.in: Regenerate.
638 * testsuite/dynamic_list.sh: Likewise.
639 * testsuite/retain_symbols_file_test.sh: Likewise.
641 2016-03-08 Cary Coutant <ccoutant@gmail.com>
644 * arm.cc (Reloc_stub::Key::name): Add unused attribute.
645 * dirsearch.cc (Dir_caches::~Dir_caches): Likewise.
647 2016-03-08 Cary Coutant <ccoutant@gmail.com>
648 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
650 * output.cc (Output_reloc_writer): New type.
651 (Output_data_reloc_base::do_write): Move implementation to template
652 in output.h and replace with invocation of template.
653 * output.h (Output_file): Move to top of file.
654 (Output_reloc::get_symbol_index): Move to public interface.
655 (Output_reloc::get_address): Likewise.
656 (Output_data_reloc_base::do_write_generic): New function template.
658 2016-03-04 Cary Coutant <ccoutant@gmail.com>
662 * symtab.cc: Instantiate Sized_symbol::init_constant and
663 Sized_symbol::init_undefined.
665 2016-03-03 Cary Coutant <ccoutant@gmail.com>
668 * layout.h (Layout::add_target_specific_dynamic_tag): New function.
669 * layout.cc (Layout::add_target_specific_dynamic_tag): New function.
670 * mips.cc (Target_mips::make_symbol): Adjust function signature.
671 * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_.
672 (Target_sparc::do_is_defined_by_abi): Remove test for
674 (Target_sparc::Register_symbol): New struct type.
675 (Target_sparc::register_syms_): New data member.
676 (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true.
677 (Target_sparc::make_symbol): New function.
678 (Target_sparc::do_finalize_sections): Add register symbols and new
679 dynamic table entries.
680 * symtab.h (Sized_symbol::init_undefined): Add value parameter.
681 (Symbol_table::add_target_global_symbol): New function.
682 (Symbol_table::target_symbols_): New data member.
683 * symtab.cc (Sized_symbol::init_undefined): Add value parameter.
684 (Symbol_table::Symbol_table): Initialize target_symbols_.
685 (Symbol_table::add_from_object): Pass additional parameters to
687 (Symbol_table::define_special_symbol): Likewise.
688 (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for
689 undefined symbol value.
690 (Symbol_table::set_dynsym_indexes): Process target-specific symbols.
691 (Symbol_table::sized_finalize): Likewise.
692 (Symbol_table::sized_write_globals): Likewise.
693 * target.h (Sized_target::make_symbol): Add name, st_type, object,
694 st_shndx, and value parameters.
696 2016-03-03 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
698 * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and
699 LDPK_WEAKUNDEF symbols.
701 2016-03-03 Than McIntosh <thanm@google.com>
703 * plugin.cc (Plugin::load): Include hooks for get_input_section_size
704 and get_input_section_alignment in transfer vector.
705 (get_input_section_alignment): New function.
706 (get_input_section_size): New function.
707 * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test.
708 * testsuite/Makefile.in: [Regenerate.]
709 * testsuite/plugin_section_alignment.cc: New test file.
710 * testsuite/plugin_layout_with_alignment.cc: New test file.
711 * testsuite/plugin_layout_with_alignment.sh: New test file.
713 2016-03-03 Evgenii Stepanov <eugenis@google.com>
715 * plugin.h (Pluginobj::get_symbol_resolution_info): Add version
717 * plugin.cc (get_symbols_v3): New function.
718 (Plugin::load): Add LDPT_GET_SYMBOLS_V3.
719 (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using
722 2016-02-26 Egor Kochetov <egor.kochetov@intel.com>
723 Cary Coutant <ccoutant@gmail.com>
726 * ehframe.h (Cie::fde_encoding): New method.
727 * ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length
730 2016-02-15 H.J. Lu <hongjiu.lu@intel.com>
732 * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
733 -mrelax-relocations=yes to $(TEST_AS).
734 (x86_64_mov_to_lea6.o): Likewise.
735 (x86_64_overflow_pc32.o): Remove duplicated target.
736 * testsuite/Makefile.in: Regenerated.
738 2016-02-15 Marcin Kościelnicki <koriakin@0x04.net>
740 * s390.cc (Target_s390::match_view_u): New helper method.
741 (Target_s390::do_is_call_to_non_split): New method.
742 (Target_s390::ss_code_st_r14): New const.
743 (Target_s390::ss_code_l_r14): New const.
744 (Target_s390::ss_code_bras_8): New const.
745 (Target_s390::ss_code_l_basr): New const.
746 (Target_s390::ss_code_a_basr): New const.
747 (Target_s390::ss_code_ear): New const.
748 (Target_s390::ss_code_c): New const.
749 (Target_s390::ss_code_larl): New const.
750 (Target_s390::ss_code_brasl): New const.
751 (Target_s390::ss_code_jg): New const.
752 (Target_s390::ss_code_jgl): New const.
753 (Target_s390::ss_match_mcount): New helper method.
754 (Target_s390::ss_match_l): New helper method.
755 (Target_s390::ss_match_ahi): New helper method.
756 (Target_s390::ss_match_alfi): New helper method.
757 (Target_s390::ss_match_cr): New helper method.
758 (Target_s390::do_calls_non_split): New method.
759 * testsuite/Makefile.am: Added new tests.
760 * testsuite/Makefile.in: Regenerate.
761 * testsuite/split_s390.sh: New test.
762 * testsuite/split_s390_1_a1.s: New test.
763 * testsuite/split_s390_1_a2.s: New test.
764 * testsuite/split_s390_1_n1.s: New test.
765 * testsuite/split_s390_1_n2.s: New test.
766 * testsuite/split_s390_1_z1.s: New test.
767 * testsuite/split_s390_1_z2.s: New test.
768 * testsuite/split_s390_1_z3.s: New test.
769 * testsuite/split_s390_1_z4.s: New test.
770 * testsuite/split_s390_2_ns.s: New test.
771 * testsuite/split_s390_2_s.s: New test.
772 * testsuite/split_s390x_1_a1.s: New test.
773 * testsuite/split_s390x_1_a2.s: New test.
774 * testsuite/split_s390x_1_n1.s: New test.
775 * testsuite/split_s390x_1_n2.s: New test.
776 * testsuite/split_s390x_1_z1.s: New test.
777 * testsuite/split_s390x_1_z2.s: New test.
778 * testsuite/split_s390x_1_z3.s: New test.
779 * testsuite/split_s390x_1_z4.s: New test.
780 * testsuite/split_s390x_2_ns.s: New test.
781 * testsuite/split_s390x_2_s.s: New test.
783 2016-02-11 Rahul Chaudhry <rahulchaudhry@google.com>
785 * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove
786 info message for every erratum 843419 found and fixed.
788 2016-02-07 Cary Coutant <ccoutant@gmail.com>
791 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional
792 information to relocation overflow errors.
794 2016-02-06 Cary Coutant <ccoutant@gmail.com>
797 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32
798 overflow checking when symbol value + addend < 0.
800 2016-02-06 Cary Coutant <ccoutant@gmail.com>
803 * reloc.h (Limits): New class.
804 (Bits::has_overflow32): Use min/max values from Limits.
805 (Bits::has_unsigned_overflow32): Likewise.
806 (Bits::has_signed_unsigned_overflow32): Likewise.
807 (Bits::has_overflow): Likewise.
808 (Bits::has_unsigned_overflow): Likewise.
809 (Bits::has_signed_unsigned_overflow64): Likewise.
811 2016-02-06 Cary Coutant <ccoutant@gmail.com>
814 * reloc.h (Relocate_functions::Overflow_check): Add comments.
815 * x86_64.cc (X86_64_relocate_functions): New class.
816 (Target_x86_64::Relocate::relocate): Use the new class.
817 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option.
818 (x32_overflow_pc32): New test case.
819 * testsuite/Makefile.in: Regenerate.
820 * testsuite/x32_overflow_pc32.sh: New script.
821 * testsuite/x86_64_overflow_pc32.s: Remove .space directive.
823 2016-02-06 Cary Coutant <ccoutant@gmail.com>
826 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast.
827 (Bits::has_unsigned_overflow): Remove unnecessary static_cast.
829 2016-02-06 Cary Coutant <ccoutant@gmail.com>
832 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed
834 (Bits::has_unsigned_overflow): Likewise.
836 2016-02-06 Marcin Kościelnicki <koriakin@0x04.net>
838 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
840 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
841 and view_size to is_call_to_non_split.
842 * target.cc (Target::is_call_to_non_split): Add view and view_size
844 * target.h (class Target): Likewise.
846 2016-02-05 Sriraman Tallam <tmsriram@google.com>
848 * icf.cc (get_rel_addend): New function.
849 (get_section_contents): Move merge section addend computation to a
850 new function. Ignore negative values for SHT_REL and SHT_RELA addends.
851 Fix bug to not read past the length of the section.
853 2016-02-05 Cary Coutant <ccoutant@gmail.com>
854 Andrew Senkevich <andrew.senkevich@intel.com>
857 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow
858 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and
860 * testsuite/Makefile.am (x86_64_overflow_pc32): New test.
861 * testsuite/x86_64_overflow_pc32.sh: New test script.
862 * testsuite/x86_64_overflow_pc32.s: New source file.
864 2016-02-05 Cary Coutant <ccoutant@gmail.com>
867 * reloc.h (Relocate_functions::Address): New typedef.
868 (Relocate_functions::Addendtype): New typedef.
869 (Relocate_functions::Overflow_check): New enum type.
870 (Relocate_functions::Reloc_status): New enum type.
871 (Relocate_functions::check_overflow): New function template.
872 (Relocate_functions::rel): Add check parameter; check for overflow.
873 (Relocate_functions::rel_unaligned): Likewise.
874 (Relocate_functions::rela): Likewise.
875 (Relocate_functions::pcrel): Likewise.
876 (Relocate_functions::pcrel_unaligned): Likewise.
877 (Relocate_functions::pcrela): Likewise.
878 (Relocate_functions::rel8): Adjust parameter types.
879 (Relocate_functions::rela8): Likewise.
880 (Relocate_functions::pcrel8): Likewise.
881 (Relocate_functions::pcrela8): Likewise.
882 (Relocate_functions::rel16): Likewise.
883 (Relocate_functions::rela168): Likewise.
884 (Relocate_functions::pcrel16): Likewise.
885 (Relocate_functions::pcrela16): Likewise.
886 (Relocate_functions::rel32): Likewise.
887 (Relocate_functions::rel32_unaligned): Likewise.
888 (Relocate_functions::rela32): Likewise.
889 (Relocate_functions::pcrel32): Likewise.
890 (Relocate_functions::pcrel32_unaligned): Likewise.
891 (Relocate_functions::pcrela32): Likewise.
892 (Relocate_functions::rel8_check): New function.
893 (Relocate_functions::rela8_check): New function.
894 (Relocate_functions::pcrel8_check): New function.
895 (Relocate_functions::pcrela8_check): New function.
896 (Relocate_functions::rel16_check): New function.
897 (Relocate_functions::rela168_check): New function.
898 (Relocate_functions::pcrel16_check): New function.
899 (Relocate_functions::pcrela16_check): New function.
900 (Relocate_functions::rel32_check): New function.
901 (Relocate_functions::rel32_unaligned_check): New function.
902 (Relocate_functions::rela32_check): New function.
903 (Relocate_functions::pcrel32_check): New function.
904 (Relocate_functions::pcrel32_unaligned_check): New function.
905 (Relocate_functions::pcrela32_check): New function.
906 (Bits::has_unsigned_overflow32): New function.
907 (Bits::has_unsigned_overflow): New function.
908 * testsuite/Makefile.am (overflow_unittest): New test.
909 * testsuite/Makefile.in: Regenerate.
910 * testsuite/overflow_unittest.cc: New source file.
912 2016-02-04 Alan Modra <amodra@gmail.com>
914 * powerpc.cc (relocate): Adjust last patch for big-endian.
916 2016-02-02 Alan Modra <amodra@gmail.com>
918 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
920 2016-01-15 Han Shen <shenhan@google.com>
922 PR gold/19472 - need pc-relative stubs.
924 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
925 stub type for DSOs and pie executables.
927 2016-01-12 H.J. Lu <hongjiu.lu@intel.com>
929 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
932 2016-01-12 Cary Coutant <ccoutant@gmail.com>
934 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
935 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
936 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
937 specializations) New method.
939 2016-01-11 Cary Coutant <ccoutant@gmail.com>
942 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
943 we have a TLS segment for GD-to-IE optimization.
944 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
946 (Target_i386::tls_desc_gd_to_ie): Likewise.
947 (Target_i386::relocate_tls): Don't insist that we have a TLS segment
948 for TLSDESC GD-to-IE optimizations.
949 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
951 (Target_x86_64::tls_desc_gd_to_ie): Likewise.
952 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
953 for TLSDESC GD-to-IE optimizations.
955 2016-01-11 Cary Coutant <ccoutant@gmail.com>
957 Refactor gold to enable support for MIPS-64 relocation format.
959 * gc.h (get_embedded_addend_size): Remove sh_type parameter.
960 (gc_process_relocs): Remove sh_type template parameter.
961 Use Classify_reloc to access r_sym, r_type, and r_addend fields.
962 * object.h (Sized_relobj_file::split_stack_adjust): Add target
964 (Sized_relobj_file::split_stack_adjust_reltype): Likewise.
965 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
966 specializations) Remove.
967 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
968 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
969 (Sized_relobj_file::emit_relocs_scan_reltype): Remove.
970 (Sized_relobj_file::split_stack_adjust): Add target parameter.
972 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
973 Target::get_r_sym() to get r_sym field from relocations.
974 (Track_relocs::next_symndx): Call Target::get_r_sym().
975 * target-reloc.h (scan_relocs): Remove sh_type template parameter;
976 add Classify_reloc template parameter. Use for accessing r_sym and
978 (relocate_section): Likewise.
979 (Default_classify_reloc): New class (renamed and moved from reloc.cc).
980 (Default_scan_relocatable_relocs): Remove sh_type template parameter.
981 (Default_scan_relocatable_relocs::Reltype): New typedef.
982 (Default_scan_relocatable_relocs::reloc_size): New const.
983 (Default_scan_relocatable_relocs::sh_type): New const.
984 (Default_scan_relocatable_relocs::get_r_sym): New method.
985 (Default_scan_relocatable_relocs::get_r_type): New method.
986 (Default_emit_relocs_strategy): New class.
987 (scan_relocatable_relocs): Replace sh_type template parameter with
988 Scan_relocatable_relocs class. Use it to access r_sym and r_type
990 (relocate_relocs): Replace sh_type template parameter with
991 Classify_reloc class. Use it to access r_sym and r_type fields.
992 * target.h (Target::is_call_to_non_split): Replace r_type parameter
993 with pointer to relocation. Adjust all callers.
994 (Target::do_is_call_to_non_split): Likewise.
995 (Target::emit_relocs_scan): New virtual method.
996 (Sized_target::get_r_sym): New virtual method.
997 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
998 with pointer to relocation.
1000 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
1001 (Target_aarch64::Relocatable_size_for_reloc): Remove.
1002 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
1003 (Target_aarch64::scan_relocs): Likewise.
1004 (Target_aarch64::relocate_section): Likewise.
1005 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
1007 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
1008 (Target_aarch64::relocate_relocs): Use Default_classify_reloc.
1009 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
1011 (Target_arm::emit_relocs_scan): New method.
1012 (Target_arm::Relocatable_size_for_reloc): Replace with...
1013 (Target_arm::Classify_reloc): ...this.
1014 (Target_arm::gc_process_relocs): Use Classify_reloc.
1015 (Target_arm::scan_relocs): Likewise.
1016 (Target_arm::relocate_section): Likewise.
1017 (Target_arm::scan_relocatable_relocs): Likewise.
1018 (Target_arm::relocate_relocs): Likewise.
1019 * i386.cc (Target_i386::emit_relocs_scan): New method.
1020 (Target_i386::Relocatable_size_for_reloc): Replace with...
1021 (Target_i386::Classify_reloc): ...this.
1022 (Target_i386::gc_process_relocs): Use Classify_reloc.
1023 (Target_i386::scan_relocs): Likewise.
1024 (Target_i386::relocate_section): Likewise.
1025 (Target_i386::scan_relocatable_relocs): Likewise.
1026 (Target_i386::relocate_relocs): Likewise.
1027 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
1029 (Mips_reloc_types): New class template.
1030 (Mips_classify_reloc): New class template.
1031 (Target_mips::Reltype): New typedef.
1032 (Target_mips::Relatype): New typedef.
1033 (Target_mips::emit_relocs_scan): New method.
1034 (Target_mips::get_r_sym): New method.
1035 (Target_mips::Relocatable_size_for_reloc): Replace with
1036 Mips_classify_reloc.
1037 (Target_mips::copy_reloc): Use Mips_classify_reloc.
1038 (Target_mips::gc_process_relocs): Likewise.
1039 (Target_mips::scan_relocs): Likewise.
1040 (Target_mips::relocate_section): Likewise.
1041 (Target_mips::scan_relocatable_relocs): Likewise.
1042 (Target_mips::relocate_relocs): Likewise.
1043 (mips_get_size_for_reloc): New function, factored out from
1044 Relocatable_size_for_reloc::get_size_for_reloc.
1045 (Target_mips::Scan::local): Use Mips_classify_reloc.
1046 (Target_mips::Scan::global): Likewise.
1047 (Target_mips::Relocate::relocate): Likewise.
1048 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
1049 (Target_powerpc::Relocatable_size_for_reloc): Remove.
1050 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
1051 (Target_powerpc::scan_relocs): Likewise.
1052 (Target_powerpc::relocate_section): Likewise.
1053 (Powerpc_scan_relocatable_reloc): Convert to class template.
1054 (Powerpc_scan_relocatable_reloc::Reltype): New typedef.
1055 (Powerpc_scan_relocatable_reloc::reloc_size): New const.
1056 (Powerpc_scan_relocatable_reloc::sh_type): New const.
1057 (Powerpc_scan_relocatable_reloc::get_r_sym): New method.
1058 (Powerpc_scan_relocatable_reloc::get_r_type): New method.
1059 (Target_powerpc::scan_relocatable_relocs): Use
1060 Powerpc_scan_relocatable_reloc.
1061 (Target_powerpc::relocate_relocs): Use Default_classify_reloc.
1062 * s390.cc (Target_s390::emit_relocs_scan): New method.
1063 (Target_s390::Relocatable_size_for_reloc): Remove.
1064 (Target_s390::gc_process_relocs): Use Default_classify_reloc.
1065 (Target_s390::scan_relocs): Likewise.
1066 (Target_s390::relocate_section): Likewise.
1067 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
1069 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
1070 (Target_s390::relocate_relocs): Use Default_classify_reloc.
1071 * sparc.cc (Target_sparc::emit_relocs_scan): New method.
1072 (Target_sparc::Relocatable_size_for_reloc): Remove.
1073 (Target_sparc::gc_process_relocs): Use Default_classify_reloc.
1074 (Target_sparc::scan_relocs): Likewise.
1075 (Target_sparc::relocate_section): Likewise.
1076 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
1078 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
1079 (Target_sparc::relocate_relocs): Use Default_classify_reloc.
1080 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
1081 (Target_tilegx::Relocatable_size_for_reloc): Remove.
1082 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
1083 (Target_tilegx::scan_relocs): Likewise.
1084 (Target_tilegx::relocate_section): Likewise.
1085 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
1087 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
1088 (Target_tilegx::relocate_relocs): Use Default_classify_reloc.
1089 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
1090 (Target_x86_64::Relocatable_size_for_reloc): Remove.
1091 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
1092 (Target_x86_64::scan_relocs): Likewise.
1093 (Target_x86_64::relocate_section): Likewise.
1094 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
1096 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
1097 (Target_x86_64::relocate_relocs): Use Default_classify_reloc.
1099 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
1101 2016-01-01 Alan Modra <amodra@gmail.com>
1103 Update year range in copyright notice of all files.
1105 For older changes see ChangeLog-0815
1107 Copyright (C) 2016 Free Software Foundation, Inc.
1109 Copying and distribution of this file, with or without modification,
1110 are permitted in any medium without royalty provided the copyright
1111 notice and this notice are preserved.
1117 version-control: never