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