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