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