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