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