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