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