1 2016-08-30 Alan Modra <amodra@gmail.com>
4 * powerpc.cc (class Stub_control): Add has14_. Comment owner_.
5 (Stub_control::can_add_to_stub_group): Correct grouping of
6 sections containing 14-bit external branches. When returning
7 false, set state_ to reflect the fact that we have one section
8 for the next group. Rewrite most of function for clarity.
9 Add and expand comments.
10 (Target_powerpc::do_relax): Print stub group size retry in hex.
12 2016-08-26 Han Shen <shenhan@google.com>
14 PR gold/20529 - relaxing loop never ends.
16 * powerpc.cc (Stub_table::min_size_threshold_): New member to
18 (Stub_table::set_min_size_threshold): New member function.
19 (Stub_table::set_address_and_size): Add code to only allow size
21 (Target_powerpc::do_relax): Add code to record last size.
23 2016-08-23 Roland McGrath <roland@hack.frob.com>
25 * options.h (General_options): Grok -z stack-size.
26 * output.h (Output_segment::set_size): New method.
27 * layout.cc (Layout::create_executable_stack_info): Renamed to ...
28 (Layout::create_stack_segment): ... this. Always create the
29 segment if -z stack-size was used.
30 (Layout::set_segment_offsets): Don't call ->set_offset on the
33 2016-08-15 Bharathi Seshadri <bseshadr@cisco.com>
35 * options.h (General_options): Add --be8 option.
36 * arm.cc (Arm_relobj::do_relocate_sections): Add code to swap for be8.
37 (Output_data_plt_arm_standard::do_fill_first_plt_entry): Likewise.
38 (Output_data_plt_arm_short::do_fill_plt_entry): Likewise.
39 (Output_data_plt_arm_long::do_fill_plt_entry): Likewise.
40 (Target_arm::do_adjust_elf_header): Do EF_ARM_BE8 adjustment.
42 2016-08-17 Cary Coutant <ccoutant@gmail.com>
44 * i386.cc (Target_i386): Reset skip_call_tls_get_addr_ after printing
46 * testsuite/Makefile.am (pr20216a): Add missing dependencies.
47 (pr20308a): Add -Bgcctestdir/ to compile rules.
48 * testsuite/Makefile.in: Regenerate.
50 2016-08-12 Roland McGrath <roland@hack.frob.com>
53 * script-sections.cc (Script_sections::release_segments):
54 Reset this->segments_created_.
56 2016-08-12 Roland McGrath <roland@hack.frob.com>
58 * yyscript.y (HIDDEN): New %token.
59 (assignment): Handle HIDDEN(string = expr) syntax.
60 * script.cc (script_keyword_parsecodes): Add HIDDEN.
62 2016-08-10 Cary Coutant <ccoutant@gmail.com>
65 * x86_64.cc (Target_x86_64::Relocate::relocate): Add check for
66 R_X86_64_GOTPCREL. Reset skip_call_tls_get_addr_ after printing
68 * testsuite/Makefile.am (pr20216_gd.o): Add -Bgcctestdir/.
69 (pr20216_ld.o): Likewise.
70 * testsuite/Makefile.in: Regenerate.
72 2016-08-10 James Clarke <jrtc27@jrtc27.com>
75 * symtab.cc (Symbol_table::add_from_relobj): Handle NULL symbols,
76 which will be present for STT_SPARC_REGISTER.
77 (Symbol_table::add_from_pluginobj): Likewise.
78 (Symbol_table::add_from_dynobj): Likewise.
79 (Symbol_table::add_from_incrobj): Removed dead code.
81 2016-08-10 James Clarke <jrtc27@jrtc27.com>
84 * sparc.cc (Target_sparc::Relocate::relocate): R_SPARC_GOTDATA_OP_LOX10
85 should fall back on R_SPARC_GOT10, not R_SPARC_GOT13.
87 2016-08-10 James Clarke <jrtc27@jrtc27.com>
90 * sparc.cc (Target_sparc::Scan::check_non_pic): Allow R_SPARC_32 on
93 2016-06-29 Cary Coutant <ccoutant@gmail.com>
96 * testsuite/dynamic_list.sh: Remove check for _ZdlPv.
98 2016-06-29 Cary Coutant <ccoutant@gmail.com>
100 * testsuite/Makefile.am (MOSTLYCLEANFILES): Add eh_test_2.
101 * testsuite/Makefile.in: Regenerate.
103 2016-06-30 Alan Modra <amodra@gmail.com>
105 * testsuite/Makefile.am (memory_test, memory_test_2): Pass
106 -Wl,-z to gcc, not plain -z.
107 * testsuite/Makefile.in: Regenerate.
109 2016-06-29 H.J. Lu <hongjiu.lu@intel.com>
112 * i386.cc (Target_i386::Relocate::relocate): Allow
113 R_386_GOT32X relocation against ___tls_get_addr.
114 (Target_i386::Relocate::tls_gd_to_ie): Support indirect
115 call to __tls_get_addr.
116 (Target_i386::Relocate::tls_gd_to_le): Likewise.
117 (Target_i386::Relocate::tls_ld_to_le): Likewise.
118 * testsuite/Makefile.am (check_PROGRAMS): Add pr20308a_test,
119 pr20308b_test, pr20308c_test, pr20308d_test, pr20308e_test.
120 (pr20308a_test_SOURCES): New.
121 (pr20308a_test_DEPENDENCIES): Likewise.
122 (pr20308a_test_CFLAGS): Likewise.
123 (pr20308a_test_LDFLAGS): Likewise.
124 (pr20308a_test_LDADD): Likewise.
125 (pr20308b_test_SOURCES): Likewise.
126 (pr20308b_test_DEPENDENCIES): Likewise.
127 (pr20308b_test_CFLAGS): Likewise.
128 (pr20308b_test_LDFLAGS): Likewise.
129 (pr20308b_test_LDADD): Likewise.
130 (pr20308c_test_SOURCES): Likewise.
131 (pr20308c_test_DEPENDENCIES): Likewise.
132 (pr20308c_test_CFLAGS): Likewise.
133 (pr20308c_test_LDFLAGS): Likewise.
134 (pr20308c_test_LDADD): Likewise.
135 (pr20308d_test_SOURCES): Likewise.
136 (pr20308d_test_DEPENDENCIES): Likewise.
137 (pr20308d_test_CFLAGS): Likewise.
138 (pr20308d_test_LDFLAGS): Likewise.
139 (pr20308d_test_LDADD): Likewise.
140 (pr20308e_test_SOURCES): Likewise.
141 (pr20308e_test_DEPENDENCIES): Likewise.
142 (pr20308e_test_CFLAGS): Likewise.
143 (pr20308e_test_LDFLAGS): Likewise.
144 (pr20308e_test_LDADD): Likewise.
145 (pr20308a.so): Likewise.
146 (pr20308b.so): Likewise.
147 (pr20308_gd.o): Likewise.
148 (pr20308_ld.o): Likewise.
149 (MOSTLYCLEANFILES): Add pr20308a.so pr20308b.so.
150 * testsuite/Makefile.in: Regenerated.
151 * testsuite/pr20308_def.c: New file.
152 * testsuite/pr20308_gd.S: Likewise.
153 * testsuite/pr20308_ld.S: Likewise.
154 * testsuite/pr20308_main.c: Likewise.
156 2016-06-29 H.J. Lu <hongjiu.lu@intel.com>
159 * configure.ac (DEFAULT_TARGET_X86_64_OR_X32): New
161 * configure: Regenerated.
162 * x86_64.cc (Target_x86_64<size>::Relocate::relocate): Allow
163 R_X86_64_GOTPCRELX relocation against __tls_get_addr.
164 (Target_x86_64<size>::Relocate::tls_gd_to_ie): Support indirect
165 call to __tls_get_addr.
166 (Target_x86_64<size>::Relocate::tls_gd_to_le): Likewise.
167 (Target_x86_64<size>::Relocate::tls_ld_to_le): Likewise.
168 * testsuite/Makefile.am (check_PROGRAMS): Add pr20216a_test,
169 pr20216b_test, pr20216c_test, pr20216d_test, pr20216e_test.
170 (pr20216a_test_SOURCES): New.
171 (pr20216a_test_DEPENDENCIES): Likewise.
172 (pr20216a_test_CFLAGS): Likewise.
173 (pr20216a_test_LDFLAGS): Likewise.
174 (pr20216a_test_LDADD): Likewise.
175 (pr20216b_test_SOURCES): Likewise.
176 (pr20216b_test_DEPENDENCIES): Likewise.
177 (pr20216b_test_CFLAGS): Likewise.
178 (pr20216b_test_LDFLAGS): Likewise.
179 (pr20216b_test_LDADD): Likewise.
180 (pr20216c_test_SOURCES): Likewise.
181 (pr20216c_test_DEPENDENCIES): Likewise.
182 (pr20216c_test_CFLAGS): Likewise.
183 (pr20216c_test_LDFLAGS): Likewise.
184 (pr20216c_test_LDADD): Likewise.
185 (pr20216d_test_SOURCES): Likewise.
186 (pr20216d_test_DEPENDENCIES): Likewise.
187 (pr20216d_test_CFLAGS): Likewise.
188 (pr20216d_test_LDFLAGS): Likewise.
189 (pr20216d_test_LDADD): Likewise.
190 (pr20216e_test_SOURCES): Likewise.
191 (pr20216e_test_DEPENDENCIES): Likewise.
192 (pr20216e_test_CFLAGS): Likewise.
193 (pr20216e_test_LDFLAGS): Likewise.
194 (pr20216e_test_LDADD): Likewise.
195 (pr20216a.so): Likewise.
196 (pr20216b.so): Likewise.
197 (pr20216_gd.o): Likewise.
198 (pr20216_ld.o): Likewise.
199 (MOSTLYCLEANFILES): Add pr20216a.so pr20216b.so.
200 * testsuite/Makefile.in: Regenerated.
201 * testsuite/pr20216_def.c: New file.
202 * testsuite/pr20216_gd.S: Likewise.
203 * testsuite/pr20216_ld.S: Likewise.
204 * testsuite/pr20216_main.c: Likewise.
206 2016-06-29 Alan Modra <amodra@gmail.com>
208 * script_test_12.t: Delete .plt, specify 64k page size.
209 * script_test_12i.t: Likewise.
211 2016-06-29 Alan Modra <amodra@gmail.com>
213 * testsuite/plugin_layout_with_alignment.c: Explicitly align all
216 2016-06-29 Alan Modra <amodra@gmail.com>
218 * testsuite/Makefile.am (copy_test_protected): Disable for powerpc.
219 * testsuite/Makefile.in: Regenerate.
221 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
223 * aarch64-reloc.def (NONE): New relocation.
224 * aarch64.cc (Target_aarch64::Scan::local): Handle R_AARCH64_NONE.
225 (Target_aarch64::Scan::global): Likewise.
226 * testsuite/Makefile.am (aarch64_reloc_none): New test.
227 * testsuite/Makefile.in: Regenerate.
228 * testsuite/aarch64_reloc_none.s: New test source file.
229 * testsuite/aarch64_reloc_none.sh: New test script.
231 2016-06-28 Sriraman Tallam <tmsriram@google.com>
233 * x86_64.cc (Lazy_view): New class.
234 (can_convert_mov_to_lea): Templatize function. Make the function
235 check for appropriate relocation types and use the view parameter
236 to get section contents.
237 (can_convert_callq_to_direct): New function.
238 (Target_x86_64<size>::Scan::global): Refactor.
239 (Target_x86_64<size>::Relocate::relocate): Refactor. Change any indirect
240 call via GOT that can be converted.
241 * testsuite/Makefile.am (x86_64_indirect_call_to_direct.sh): New test.
242 * testsuite/Makefile.in: Regenerate.
243 * testsuite/x86_64_indirect_call_to_direct1.s: New file.
244 * testsuite/x86_64_indirect_jump_to_direct1.s: New file.
246 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
248 * aarch64.cc (Target_aarch64::Scan::local): Move the call to got_section
249 from the top level to the places of its use.
251 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
254 * script-c.h (Sort_wildcard): Add SORT_WILDCARD_BY_INIT_PRIORITY.
255 * script-sections.cc (Input_section_sorter::get_init_priority): New method.
256 (Input_section_sorter::operator()): Handle SORT_WILDCARD_BY_INIT_PRIORITY.
257 (Output_section_element_input::print): Likewise.
258 * script.cc (script_keyword_parsecodes): Add entry SORT_BY_INIT_PRIORITY.
259 * yyscript.y (SORT_BY_INIT_PRIORITY): New token.
260 (wildcard_section): Handle SORT_BY_INIT_PRIORITY.
262 * testsuite/Makefile.am (script_test_14): New test.
263 * testsuite/Makefile.in: Regenerate.
264 * testsuite/script_test_14.s: New test source file.
265 * testsuite/script_test_14.sh: New test script.
266 * testsuite/script_test_14.t: New test linker script.
268 2016-06-28 James Clarke <jrtc27@jrtc27.com>
270 * sparc.cc (Target_sparc::Scan::local): Don't convert R_SPARC_32
271 to R_SPARC_RELATIVE if class is ELFCLASS64.
272 (Target_sparc::Scan::global): Likewise.
274 2016-06-23 Cary Coutant <ccoutant@gmail.com>
275 Igor Kudrin <ikudrin@accesssoftek.com>
279 (Output_section_element_input::set_section_addresses): Keep bin_count
280 separate from input_pattern_count.
281 * testsuite/script_test_12.t: Add another section .x4.
282 * testsuite/script_test_12i.t: Likewise.
283 * testsuite/script_test_12a.c: Likewise.
284 * testsuite/script_test_12b.c: Likewise.
286 2016-06-23 Igor Kudrin <ikudrin@accesssoftek.com>
288 * gold-threads.cc (impl_threads::Lock_impl_threads): Fix typos.
290 2016-06-22 H.J. Lu <hongjiu.lu@intel.com>
293 * NEWS: Mention --enable-relro.
294 * configure.ac: Add --enable-relro.
295 (DEFAULT_LD_Z_RELRO): New. Set by --enable-relro and default
297 * config.in: Regenerated.
298 * configure: Likewise.
299 * options.h (General_options::relro): Default to
302 2016-06-20 Cary Coutant <ccoutant@gmail.com>
304 * NEWS: Add new features in 1.12.
305 * version.cc (version_string): Bump to 1.12.
307 2016-06-20 H.J. Lu <hongjiu.lu@intel.com>
310 * i386.cc (Target_i386::first_plt_entry_offset): Return 0 if
312 (Target_i386::plt_entry_size): Likewise.
313 (Target_x86_64<size>::first_plt_entry_offset): Likewise.
314 (Target_x86_64<size>::plt_entry_size): Likewise.
316 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
318 * mips.cc (Target_mips::Target_mips): Initialize rld_map_.
319 (Target_mips::rld_map_): New data member.
320 (Target_mips::do_finalize_sections): Add support for
321 DT_MIPS_RLD_MAP and DT_MIPS_RLD_MAP_REL dynamic tags,
322 .rld_map section, and __RLD_MAP symbol.
323 (Target_mips::do_dynamic_tag_custom_value): Add support for
324 DT_MIPS_RLD_MAP_REL dynamic tag.
325 * output.cc (Output_data_dynamic::get_entry_offset): New method
327 * output.h (Output_data_dynamic::get_entry_offset): New method
330 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
332 * mips.cc (Mips_relocate_functions::relpc16): Add unaligned check.
334 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
336 * mips.cc (relocation_needs_la25_stub): Add support for relocs:
337 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
338 (hi16_reloc): Add support for R_MIPS_PCHI16 relocation.
339 (is_matching_lo16_reloc): Likewise.
340 (lo16_reloc): Add support for R_MIPS_PCLO16 relocation.
341 (Mips_output_data_plt::plt_entry_r6): New static data member for
343 (Target_mips::is_output_r6): New method.
344 (Target_mips::Mips_mach): Add new enum constants.
345 (Mips_relocate_functions::Status): Likewise.
346 (Mips_relocate_functions::pchi16_relocs): New static data member.
347 (Mips_relocate_functions::relpc21): New method.
348 (Mips_relocate_functions::relpc26): Likewise.
349 (Mips_relocate_functions::relpc18): Likewise.
350 (Mips_relocate_functions::relpc19): Likewise.
351 (Mips_relocate_functions::relpchi16): Likewise.
352 (Mips_relocate_functions::do_relpchi16): Likewise.
353 (Mips_relocate_functions::relpclo16): Likewise.
354 (Mips_output_data_plt::do_write): Add support for Mips r6 plt
356 (Target_mips::mips_32bit_flags): Add E_MIPS_ARCH_32R6 support.
357 (Target_mips::elf_mips_mach): Add E_MIPS_ARCH_32R6 and
358 E_MIPS_ARCH_64R6 support.
359 (Target_mips::update_abiflags_isa): Likewise.
360 (mips_get_size_for_reloc): Add support for relocs: R_MIPS_PCHI16,
361 R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3 and
363 (Target_mips::Scan::local): Add support for relocs: R_MIPS_PCHI16
365 (Target_mips::Scan::global): Add support for relocs:
366 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
367 (Target_mips::Relocate::relocate): Call functions for resolving
368 Mips32r6 and Mips64r6 relocations, and print error message for
369 STATUS_PCREL_UNALIGNED.
370 (Target_mips::Scan::get_reference_flags): Add support for relocs:
371 R_MIPS_PCHI16, R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2,
372 R_MIPS_PC18_S3 and R_MIPS_PC19_S2.
373 (Target_mips::elf_mips_mach_name): Add E_MIPS_ARCH_32R6 and
374 E_MIPS_ARCH_64R6 support.
376 2016-06-13 H.J. Lu <hongjiu.lu@intel.com>
379 * testsuite/script_test_2.t: Add .got.plt after .got.
381 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
383 * mips.cc (struct Mips_abiflags): New struct.
384 (Mips_relobj::Mips_relobj): Initialize attributes_section_data_
386 (Mips_relobj::~Mips_relobj): Delete object pointed by
387 attributes_section_data_.
388 (Mips_relobj::abiflags): New method.
389 (Mips_relobj::attributes_section_data): Likewise.
390 (Mips_relobj::attributes_section_data_): New data member.
391 (Mips_relobj::abiflags_): Likewise.
392 (class Mips_output_section_abiflags): New class.
393 (Target_mips::Target_mips): Initialize attributes_section_data_,
394 abiflags_ and has_abiflags_section_.
395 (Target_mips::do_should_include_section): Don't emit input
396 .MIPS.abiflags sections to output .MIPS.abiflags.
397 (Target_mips::Mips_mach): Add new enum constants.
398 (Target_mips::mips_isa_ext_mach): New method.
399 (Target_mips::mips_isa_ext): Likewise.
400 (Target_mips::update_abiflags_isa): Likewise.
401 (Target_mips::infer_abiflags): Likewise.
402 (Target_mips::create_abiflags): Likewise.
403 (Target_mips::fp_abi_string): Likewise.
404 (Target_mips::select_fp_abi): Likewise.
405 (Target_mips::merge_obj_attributes): Likewise.
406 (Target_mips::merge_obj_abiflags): Likewise.
407 (Target_mips::level_rev): Likewise.
408 (Target_mips::merge_obj_e_flags): Rename from
409 merge_processor_specific_flags. Remove dyn_obj argument,
410 call update_abiflags_isa when needed, compare NaN encodings and
412 (Target_mips::add_machine_extensions): Add two machine extensions
414 (Target_mips::attributes_section_data_): New data member.
415 (Target_mips::abiflags_): Likewise.
416 (Target_mips::has_abiflags_section_): Likewise.
417 (Mips_relobj::do_read_symbols): Read .gnu.attributes and
418 .MIPS.abiflags sections if they exists.
419 (Target_mips::elf_mips_mach): Add E_MIPS_MACH_5900 and
420 E_MIPS_MACH_OCTEON3 support.
421 (Target_mips::do_adjust_elf_header): Setup EI_ABIVERSION flag.
422 (Target_mips::do_finalize_sections): Merge .gnu.attributes and
423 .MIPS.abiflags sections from input. Create these sections if
425 (Target_mips::elf_mips_mach_name): Add E_MIPS_MACH_5900 and
426 E_MIPS_MACH_OCTEON3 support, and change strings for
427 E_MIPS_MACH_LS2E, E_MIPS_MACH_LS2F and E_MIPS_MACH_LS3A just
430 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
432 * mips.cc (Mips_relobj::Mips_relobj): Initialize
433 has_reginfo_section_.
434 (Mips_relobj::has_reginfo_section_): New data member.
435 (Mips_relobj::has_reginfo_section): New method.
436 (class Mips_output_section_reginfo): Change base class to
437 Output_section_data, and set masks of the output .reginfo section
439 (Mips_output_section_reginfo::as_mips_output_section_reginfo):
441 (Mips_output_section_reginfo::set_masks): Likewise.
442 (Mips_output_section_reginfo::set_final_data_size): Likewise.
443 (Mips_output_section_reginfo::do_print_to_mapfile): New method.
444 (Target_mips::do_make_output_section): Remove.
445 (Mips_relobj::do_read_symbols): Set has_reginfo_section_ to true
446 if the object contains a .reginfo section.
447 (Target_mips::do_finalize_sections): Create a .reginfo output
450 2016-06-09 Artemiy Volkov <artemiyv@acm.org>
452 * mips.cc (Mips_output_data_got::do_write): Add missing template
455 2016-05-30 Marcin KoĆcielnicki <koriakin@0x04.net>
458 * s390.cc (Target_s390::ss_code_st_r14): Removed.
459 (Target_s390::ss_code_l_r14): Removed.
460 (Target_s390::ss_code_ear): Removed.
461 (Target_s390::ss_code_c): Removed.
462 (Target_s390::ss_match_st_r14): New function.
463 (Target_s390::ss_match_l_r14): New function.
464 (Target_s390::ss_match_mcount): Call ss_match_{l,st}_r14 instead
465 of matching code directly.
466 (Target_s390::ss_match_ear): New function.
467 (Target_s390::ss_match_c): New function.
468 (Target_s390::do_calls_non_split): Call ss_match_{ear,c} instead
469 of matching code directly.
471 2016-05-19 Cary Coutant <ccoutant@gmail.com>
474 * copy-relocs.cc (Copy_relocs::make_copy_reloc): Add object
475 parameter; check for protected symbol.
476 * copy-relocs.h (Copy_relocs::make_copy_reloc): Add object parameter.
477 * mips.cc (Mips_copy_relocs): Adjust call to make_copy_reloc.
478 * symtab.cc (Symbol::init_fields): Initialize is_protected_.
479 (Symbol_table::add_from_dynobj): Mark protected symbols.
480 * symtab.h (Symbol::is_protected): New method.
481 (Symbol::set_is_protected): New method.
482 (Symbol::is_protected_): New data member.
484 * testsuite/Makefile.am (copy_test_protected): New test.
485 * testsuite/Makefile.in: Regenerate.
486 * testsuite/copy_test.cc (main): Add legal reference to protected
488 * testsuite/copy_test_v1.cc (main): Likewise.
489 * testsuite/copy_test_2.cc (ip): Add protected symbol.
490 * testsuite/copy_test_protected.cc: New test source file.
491 * testsuite/copy_test_protected.sh: New test script.
493 2016-05-19 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
495 * mips.cc (Mips_got_entry::Mips_got_entry): Remove object argument
496 for global got symbols, and set addend to 0.
497 (Mips_got_entry::hash): Change hash algorithm.
498 (Mips_got_entry::equals): Refactor.
499 (Mips_got_entry::object): Return input object for local got symbols
501 (Mips_got_entry::addend): Change return of the relocation addend.
502 (Mips_got_entry::addend_): Move from union d.
503 (Mips_got_entry::object_): Move into union d.
504 (class Mips_symbol_hash): New class.
505 (Mips_got_info::Global_got_entry_set): New type.
506 (Mips_got_info::global_got_symbols): Change return type to
507 Global_got_entry_set.
508 (Mips_got_info::global_got_symbols_): Change type to
509 Global_got_entry_set.
510 (Mips_symbol::hash): New method.
511 (Mips_output_data_la25_stub::symbols_): Change type to std::vector.
512 (Mips_output_data_mips_stubs::Mips_stubs_entry_set): New type.
513 (Mips_output_data_mips_stubs::symbols_): Change type to
514 Mips_stubs_entry_set.
515 (Mips_got_info::record_global_got_symbol): Don't pass object
516 argument when creating global got symbol.
517 (Mips_got_info::record_got_entry): Remove find before inserting
519 (Mips_got_info::add_reloc_only_entries): Change type of iterator
520 to Global_got_entry_set.
521 (Mips_got_info::count_got_symbols): Likewise.
522 (Mips_output_data_la25_stub::create_la25_stub): Use push_back
523 for adding entries to symbols_.
524 (Mips_output_data_la25_stub::do_write): Change type of iterator
526 (Mips_output_data_mips_stubs::set_lazy_stub_offsets): Change type
527 of iterator to Mips_stubs_entry_set.
528 (Mips_output_data_mips_stubs::set_needs_dynsym_value): Likewise.
529 (Mips_output_data_mips_stubs::do_write): Likewise.
531 2016-05-06 Han Shen <shenhan@google.com>
535 * aarch64-reloc.def: New relocation type.
536 * aarch64.cc (AArch64_relocate_functions::Page): Changed to public.
537 (Target_aarch64::Scan::local): Add R_AARCH64_LD64_GOTPAGE_LO15.
538 (Target_aarch64::Scan::global): Add R_AARCH64_LD64_GOTPAGE_LO15.
539 (Target_aarch64::Relocate::relocate): Implement R_AARCH64_LD64_GOTPAGE_LO15.
541 2016-04-28 Nick Clifton <nickc@redhat.com>
543 * po/zh_CN.po: Updated Chinese (simplified) translation.
545 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
547 * Makefile.in: Regenerated with automake 1.11.6.
548 * aclocal.m4: Likewise.
549 * testsuite/Makefile.in: Likewise.
551 2016-03-30 Cary Coutant <ccoutant@gmail.com>
554 * symtab.cc (Symbol_table::define_default_version): Check for case
555 where symbols are both in different shared objects.
557 2016-03-27 Cary Coutant <ccoutant@gmail.com>
560 * i386.cc (Target_i386): Add check for fully-resolved symbol for
563 2016-03-22 Nick Clifton <nickc@redhat.com>
565 * configure: Regenerate.
567 2016-03-21 Cary Coutant <ccoutant@gmail.com>
570 * errors.cc (Errors::undefined_symbol): Add info message when
571 symbol should have been provided by a plugin.
572 * target-reloc.h (issue_undefined_symbol_error): Check for
573 placeholder symbols defined in discarded sections.
574 * testsuite/Makefile.am (plugin_test_9b): New test case.
575 * testsuite/Makefile.in: Regenerate.
576 * testsuite/plugin_test_9b_elf.cc: New test source file.
577 * testsuite/plugin_test_9b_ir.cc: New test source file.
579 2016-03-20 Cary Coutant <ccoutant@gmail.com>
582 * ehframe.cc (Eh_frame::read_fde): Check for dropped functions.
583 * testsuite/Makefile.am (eh_test_2): New test.
584 * testsuite/Makefile.in: Regenerate.
585 * testsuite/eh_test_2.sh: New test script.
586 * testsuite/eh_test_a.cc (bar): Make it comdat.
587 * testsuite/eh_test_b.cc (bar): Add a duplicate copy.
589 2016-03-18 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
591 * mips.cc (Mips_relobj::is_n64_): Remove.
592 (Target_mips::ei_class_): Likewise.
593 (Mips_relobj::is_newabi): Call methods.
594 (Mips_relobj::is_n64): Change checking for N64 ABI.
595 (Target_mips::is_output_n64): Likewise.
596 (Target_mips::merge_processor_specific_flags): Remove ei_class
597 argument, and remove comparing ei_class.
598 (Target_mips::do_adjust_elf_header): Remove setting EI_CLASS field
600 (Target_mips::do_finalize_sections): Don't pass ei_class argument
601 to merge_processor_specific_flags.
602 (Target_mips::elf_mips_abi_name): Remove ei_class argument, and
603 change checking for N64 ABI.
605 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
607 * mips.cc (enum Special_relocation_symbol): New enum type.
608 (is_readonly_section): New function.
609 (eh_reloc): Likewise.
610 (Mips_got_entry::is_section_symbol_): New member.
611 (Mips_got_entry::is_section_symbol): New method.
612 (Mips_got_info::record_local_got_symbol): Add is_section_symbol
614 (Mips_relobj::mips_elf_options_section_name): New method.
615 (Mips_output_data_got::record_local_got_symbol): Add
616 is_section_symbol argument, and pass it to
617 Mips_got_info::record_local_got_symbol.
618 (Mips_output_data_got::got_offset): Add addend argument, and pass
619 it to Relobj::local_got_offset.
620 (struct Mips_output_reloc_writer): New type.
621 (class Mips_output_data_reloc): New class.
622 (Mips_output_data_plt::Reloc_section): Change type to
623 Mips_output_data_reloc.
624 (Target_mips::Reloc_section): Likewise.
625 (Mips_reloc_types::get_r_addend): Remove unsigned from return type.
626 (Mips_classify_reloc::get_r_type2): New method.
627 (Mips_classify_reloc::get_r_type3): Likewise.
628 (Mips_classify_reloc::get_r_ssym): Likewise.
629 (Target_mips::Reloca_section): Remove.
630 (Relocate::should_apply_static_reloc): Rename from
631 should_apply_r_mips_32_reloc.
632 (Target_mips::copy_reloc): Replace Reltype parameter with r_type
634 (Mips_relocate_functions::Valtype): New type.
635 (Mips_relocate_functions::Valtype64): New type.
636 (Mips_relocate_functions::check_overflow): New method.
637 (Mips_relocate_functions::mips_reloc_unshuffle): Move to public
639 (Mips_relocate_functions::mips_reloc_shuffle): Likewise.
640 (Mips_relocate_functions::rel16): Add support for resolving
641 relocations for Mips64.
642 (Mips_relocate_functions::rel32): Likewise.
643 (Mips_relocate_functions::reljalr): Likewise.
644 (Mips_relocate_functions::relpc32): Likewise.
645 (Mips_relocate_functions::rel26): Likewise.
646 (Mips_relocate_functions::relpc16): Likewise.
647 (Mips_relocate_functions::relmicromips_pc7_s1): Likewise.
648 (Mips_relocate_functions::relmicromips_pc10_s1): Likewise.
649 (Mips_relocate_functions::relmicromips_pc16_s1): Likewise.
650 (Mips_relocate_functions::do_relhi16): Likewise.
651 (Mips_relocate_functions::do_relgot16_local): Likewise.
652 (Mips_relocate_functions::rello16): Likewise.
653 (Mips_relocate_functions::relgot): Likewise.
654 (Mips_relocate_functions::relgotpage): Likewise.
655 (Mips_relocate_functions::relgotofst): Likewise.
656 (Mips_relocate_functions::relgot_hi16): Likewise.
657 (Mips_relocate_functions::relgot_lo16): Likewise.
658 (Mips_relocate_functions::relgprel): Likewise.
659 (Mips_relocate_functions::relgprel32): Likewise.
660 (Mips_relocate_functions::tlsrelhi16): Likewise.
661 (Mips_relocate_functions::tlsrello16): Likewise.
662 (Mips_relocate_functions::tlsrel32): Likewise.
663 (Mips_relocate_functions::relsub): Likewise.
664 (Mips_relocate_functions::releh): New method.
665 (Mips_relocate_functions::rel64): Likewise.
666 (Mips_got_info::record_local_got_symbol): Add is_section_symbol and
667 pass it to Mips_got_entry.
668 (Mips_got_info::add_local_entries): Pass addend argument
669 to code functions, and for STT_SECTION symbols call
670 add_symbolless_local_addend.
671 (Mips_got_info::add_tls_entries): Pass addend argument to code
673 (Mips_relobj::do_read_symbols): Read gp value that was used to
675 (Mips_output_data_plt::plt_entry): Remove opcode from l[wd]
676 instruction. Opcode for instruction will be selected later.
677 (Target_mips::gc_process_relocs): Add case for SHT_RELA.
678 (Target_mips::scan_relocatable_relocs): Likewise.
679 (Target_mips::emit_relocs_scan): Likewise.
680 (Target_mips::relocate_relocs): Likewise.
681 (Target_mips::do_finalize_sections): Skip objects for merging
682 processor specific flags in which all input sections will be
684 (mips_get_size_for_reloc): Add case for R_MIPS_EH.
685 (Target_mips::Scan::get_reference_flags): Likewise.
686 (Target_mips::relocate_special_relocatable): Call rel26 method with
687 calculate_only and calculated_value arguments.
688 (Target_mips::Scan::local): Add case for R_MIPS_EH. Don't create a
689 dynamic relocation against a readonly sections, and pass
690 is_section_symbol to Mips_got_info::record_local_got_symbol.
691 (Target_mips::Scan::global): Add case for R_MIPS_EH. Don't create a
692 dynamic relocation against a readonly sections, and pass r_type
693 and r_offset to Target_mips::copy_reloc.
694 (Target_mips::Relocate::relocate): Add support for resolving
695 relocations for Mips64.
696 (Target_mips::mips_info): Add case for Mips64 default dynamic
698 (Target_selector_mips): Correct emulation names.
700 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
702 * mips.cc (class Mips_output_data_la25_stub): Add
703 do_print_to_mapfile function.
705 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
707 * mips.cc (Mips_classify_reloc::put_r_info): Call 32bit version of
710 2016-03-09 H.J. Lu <hongjiu.lu@intel.com>
712 * testsuite/plugin_layout_with_alignment.cc: Renamed to ..
713 * testsuite/plugin_layout_with_alignment.c: This.
714 * testsuite/Makefile.am (plugin_layout_with_alignment.o): Updated.
715 (plugin_layout_with_alignment): Likewise.
716 * testsuite/Makefile.in: Regenerated.
718 2016-03-08 Cary Coutant <ccoutant@gmail.com>
721 * testsuite/Makefile.am (retain_symbols_file_test): Remove check
723 * testsuite/Makefile.in: Regenerate.
724 * testsuite/dynamic_list.sh: Likewise.
725 * testsuite/retain_symbols_file_test.sh: Likewise.
727 2016-03-08 Cary Coutant <ccoutant@gmail.com>
730 * arm.cc (Reloc_stub::Key::name): Add unused attribute.
731 * dirsearch.cc (Dir_caches::~Dir_caches): Likewise.
733 2016-03-08 Cary Coutant <ccoutant@gmail.com>
734 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
736 * output.cc (Output_reloc_writer): New type.
737 (Output_data_reloc_base::do_write): Move implementation to template
738 in output.h and replace with invocation of template.
739 * output.h (Output_file): Move to top of file.
740 (Output_reloc::get_symbol_index): Move to public interface.
741 (Output_reloc::get_address): Likewise.
742 (Output_data_reloc_base::do_write_generic): New function template.
744 2016-03-04 Cary Coutant <ccoutant@gmail.com>
748 * symtab.cc: Instantiate Sized_symbol::init_constant and
749 Sized_symbol::init_undefined.
751 2016-03-03 Cary Coutant <ccoutant@gmail.com>
754 * layout.h (Layout::add_target_specific_dynamic_tag): New function.
755 * layout.cc (Layout::add_target_specific_dynamic_tag): New function.
756 * mips.cc (Target_mips::make_symbol): Adjust function signature.
757 * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_.
758 (Target_sparc::do_is_defined_by_abi): Remove test for
760 (Target_sparc::Register_symbol): New struct type.
761 (Target_sparc::register_syms_): New data member.
762 (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true.
763 (Target_sparc::make_symbol): New function.
764 (Target_sparc::do_finalize_sections): Add register symbols and new
765 dynamic table entries.
766 * symtab.h (Sized_symbol::init_undefined): Add value parameter.
767 (Symbol_table::add_target_global_symbol): New function.
768 (Symbol_table::target_symbols_): New data member.
769 * symtab.cc (Sized_symbol::init_undefined): Add value parameter.
770 (Symbol_table::Symbol_table): Initialize target_symbols_.
771 (Symbol_table::add_from_object): Pass additional parameters to
773 (Symbol_table::define_special_symbol): Likewise.
774 (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for
775 undefined symbol value.
776 (Symbol_table::set_dynsym_indexes): Process target-specific symbols.
777 (Symbol_table::sized_finalize): Likewise.
778 (Symbol_table::sized_write_globals): Likewise.
779 * target.h (Sized_target::make_symbol): Add name, st_type, object,
780 st_shndx, and value parameters.
782 2016-03-03 Rafael Ăvila de EspĂndola <rafael.espindola@gmail.com>
784 * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and
785 LDPK_WEAKUNDEF symbols.
787 2016-03-03 Than McIntosh <thanm@google.com>
789 * plugin.cc (Plugin::load): Include hooks for get_input_section_size
790 and get_input_section_alignment in transfer vector.
791 (get_input_section_alignment): New function.
792 (get_input_section_size): New function.
793 * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test.
794 * testsuite/Makefile.in: [Regenerate.]
795 * testsuite/plugin_section_alignment.cc: New test file.
796 * testsuite/plugin_layout_with_alignment.cc: New test file.
797 * testsuite/plugin_layout_with_alignment.sh: New test file.
799 2016-03-03 Evgenii Stepanov <eugenis@google.com>
801 * plugin.h (Pluginobj::get_symbol_resolution_info): Add version
803 * plugin.cc (get_symbols_v3): New function.
804 (Plugin::load): Add LDPT_GET_SYMBOLS_V3.
805 (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using
808 2016-02-26 Egor Kochetov <egor.kochetov@intel.com>
809 Cary Coutant <ccoutant@gmail.com>
812 * ehframe.h (Cie::fde_encoding): New method.
813 * ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length
816 2016-02-15 H.J. Lu <hongjiu.lu@intel.com>
818 * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
819 -mrelax-relocations=yes to $(TEST_AS).
820 (x86_64_mov_to_lea6.o): Likewise.
821 (x86_64_overflow_pc32.o): Remove duplicated target.
822 * testsuite/Makefile.in: Regenerated.
824 2016-02-15 Marcin KoĆcielnicki <koriakin@0x04.net>
826 * s390.cc (Target_s390::match_view_u): New helper method.
827 (Target_s390::do_is_call_to_non_split): New method.
828 (Target_s390::ss_code_st_r14): New const.
829 (Target_s390::ss_code_l_r14): New const.
830 (Target_s390::ss_code_bras_8): New const.
831 (Target_s390::ss_code_l_basr): New const.
832 (Target_s390::ss_code_a_basr): New const.
833 (Target_s390::ss_code_ear): New const.
834 (Target_s390::ss_code_c): New const.
835 (Target_s390::ss_code_larl): New const.
836 (Target_s390::ss_code_brasl): New const.
837 (Target_s390::ss_code_jg): New const.
838 (Target_s390::ss_code_jgl): New const.
839 (Target_s390::ss_match_mcount): New helper method.
840 (Target_s390::ss_match_l): New helper method.
841 (Target_s390::ss_match_ahi): New helper method.
842 (Target_s390::ss_match_alfi): New helper method.
843 (Target_s390::ss_match_cr): New helper method.
844 (Target_s390::do_calls_non_split): New method.
845 * testsuite/Makefile.am: Added new tests.
846 * testsuite/Makefile.in: Regenerate.
847 * testsuite/split_s390.sh: New test.
848 * testsuite/split_s390_1_a1.s: New test.
849 * testsuite/split_s390_1_a2.s: New test.
850 * testsuite/split_s390_1_n1.s: New test.
851 * testsuite/split_s390_1_n2.s: New test.
852 * testsuite/split_s390_1_z1.s: New test.
853 * testsuite/split_s390_1_z2.s: New test.
854 * testsuite/split_s390_1_z3.s: New test.
855 * testsuite/split_s390_1_z4.s: New test.
856 * testsuite/split_s390_2_ns.s: New test.
857 * testsuite/split_s390_2_s.s: New test.
858 * testsuite/split_s390x_1_a1.s: New test.
859 * testsuite/split_s390x_1_a2.s: New test.
860 * testsuite/split_s390x_1_n1.s: New test.
861 * testsuite/split_s390x_1_n2.s: New test.
862 * testsuite/split_s390x_1_z1.s: New test.
863 * testsuite/split_s390x_1_z2.s: New test.
864 * testsuite/split_s390x_1_z3.s: New test.
865 * testsuite/split_s390x_1_z4.s: New test.
866 * testsuite/split_s390x_2_ns.s: New test.
867 * testsuite/split_s390x_2_s.s: New test.
869 2016-02-11 Rahul Chaudhry <rahulchaudhry@google.com>
871 * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove
872 info message for every erratum 843419 found and fixed.
874 2016-02-07 Cary Coutant <ccoutant@gmail.com>
877 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional
878 information to relocation overflow errors.
880 2016-02-06 Cary Coutant <ccoutant@gmail.com>
883 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32
884 overflow checking when symbol value + addend < 0.
886 2016-02-06 Cary Coutant <ccoutant@gmail.com>
889 * reloc.h (Limits): New class.
890 (Bits::has_overflow32): Use min/max values from Limits.
891 (Bits::has_unsigned_overflow32): Likewise.
892 (Bits::has_signed_unsigned_overflow32): Likewise.
893 (Bits::has_overflow): Likewise.
894 (Bits::has_unsigned_overflow): Likewise.
895 (Bits::has_signed_unsigned_overflow64): Likewise.
897 2016-02-06 Cary Coutant <ccoutant@gmail.com>
900 * reloc.h (Relocate_functions::Overflow_check): Add comments.
901 * x86_64.cc (X86_64_relocate_functions): New class.
902 (Target_x86_64::Relocate::relocate): Use the new class.
903 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option.
904 (x32_overflow_pc32): New test case.
905 * testsuite/Makefile.in: Regenerate.
906 * testsuite/x32_overflow_pc32.sh: New script.
907 * testsuite/x86_64_overflow_pc32.s: Remove .space directive.
909 2016-02-06 Cary Coutant <ccoutant@gmail.com>
912 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast.
913 (Bits::has_unsigned_overflow): Remove unnecessary static_cast.
915 2016-02-06 Cary Coutant <ccoutant@gmail.com>
918 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed
920 (Bits::has_unsigned_overflow): Likewise.
922 2016-02-06 Marcin KoĆcielnicki <koriakin@0x04.net>
924 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
926 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
927 and view_size to is_call_to_non_split.
928 * target.cc (Target::is_call_to_non_split): Add view and view_size
930 * target.h (class Target): Likewise.
932 2016-02-05 Sriraman Tallam <tmsriram@google.com>
934 * icf.cc (get_rel_addend): New function.
935 (get_section_contents): Move merge section addend computation to a
936 new function. Ignore negative values for SHT_REL and SHT_RELA addends.
937 Fix bug to not read past the length of the section.
939 2016-02-05 Cary Coutant <ccoutant@gmail.com>
940 Andrew Senkevich <andrew.senkevich@intel.com>
943 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow
944 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and
946 * testsuite/Makefile.am (x86_64_overflow_pc32): New test.
947 * testsuite/x86_64_overflow_pc32.sh: New test script.
948 * testsuite/x86_64_overflow_pc32.s: New source file.
950 2016-02-05 Cary Coutant <ccoutant@gmail.com>
953 * reloc.h (Relocate_functions::Address): New typedef.
954 (Relocate_functions::Addendtype): New typedef.
955 (Relocate_functions::Overflow_check): New enum type.
956 (Relocate_functions::Reloc_status): New enum type.
957 (Relocate_functions::check_overflow): New function template.
958 (Relocate_functions::rel): Add check parameter; check for overflow.
959 (Relocate_functions::rel_unaligned): Likewise.
960 (Relocate_functions::rela): Likewise.
961 (Relocate_functions::pcrel): Likewise.
962 (Relocate_functions::pcrel_unaligned): Likewise.
963 (Relocate_functions::pcrela): Likewise.
964 (Relocate_functions::rel8): Adjust parameter types.
965 (Relocate_functions::rela8): Likewise.
966 (Relocate_functions::pcrel8): Likewise.
967 (Relocate_functions::pcrela8): Likewise.
968 (Relocate_functions::rel16): Likewise.
969 (Relocate_functions::rela168): Likewise.
970 (Relocate_functions::pcrel16): Likewise.
971 (Relocate_functions::pcrela16): Likewise.
972 (Relocate_functions::rel32): Likewise.
973 (Relocate_functions::rel32_unaligned): Likewise.
974 (Relocate_functions::rela32): Likewise.
975 (Relocate_functions::pcrel32): Likewise.
976 (Relocate_functions::pcrel32_unaligned): Likewise.
977 (Relocate_functions::pcrela32): Likewise.
978 (Relocate_functions::rel8_check): New function.
979 (Relocate_functions::rela8_check): New function.
980 (Relocate_functions::pcrel8_check): New function.
981 (Relocate_functions::pcrela8_check): New function.
982 (Relocate_functions::rel16_check): New function.
983 (Relocate_functions::rela168_check): New function.
984 (Relocate_functions::pcrel16_check): New function.
985 (Relocate_functions::pcrela16_check): New function.
986 (Relocate_functions::rel32_check): New function.
987 (Relocate_functions::rel32_unaligned_check): New function.
988 (Relocate_functions::rela32_check): New function.
989 (Relocate_functions::pcrel32_check): New function.
990 (Relocate_functions::pcrel32_unaligned_check): New function.
991 (Relocate_functions::pcrela32_check): New function.
992 (Bits::has_unsigned_overflow32): New function.
993 (Bits::has_unsigned_overflow): New function.
994 * testsuite/Makefile.am (overflow_unittest): New test.
995 * testsuite/Makefile.in: Regenerate.
996 * testsuite/overflow_unittest.cc: New source file.
998 2016-02-04 Alan Modra <amodra@gmail.com>
1000 * powerpc.cc (relocate): Adjust last patch for big-endian.
1002 2016-02-02 Alan Modra <amodra@gmail.com>
1004 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
1006 2016-01-15 Han Shen <shenhan@google.com>
1008 PR gold/19472 - need pc-relative stubs.
1010 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
1011 stub type for DSOs and pie executables.
1013 2016-01-12 H.J. Lu <hongjiu.lu@intel.com>
1015 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
1018 2016-01-12 Cary Coutant <ccoutant@gmail.com>
1020 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
1021 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
1022 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
1023 specializations) New method.
1025 2016-01-11 Cary Coutant <ccoutant@gmail.com>
1028 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
1029 we have a TLS segment for GD-to-IE optimization.
1030 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
1032 (Target_i386::tls_desc_gd_to_ie): Likewise.
1033 (Target_i386::relocate_tls): Don't insist that we have a TLS segment
1034 for TLSDESC GD-to-IE optimizations.
1035 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
1037 (Target_x86_64::tls_desc_gd_to_ie): Likewise.
1038 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
1039 for TLSDESC GD-to-IE optimizations.
1041 2016-01-11 Cary Coutant <ccoutant@gmail.com>
1043 Refactor gold to enable support for MIPS-64 relocation format.
1045 * gc.h (get_embedded_addend_size): Remove sh_type parameter.
1046 (gc_process_relocs): Remove sh_type template parameter.
1047 Use Classify_reloc to access r_sym, r_type, and r_addend fields.
1048 * object.h (Sized_relobj_file::split_stack_adjust): Add target
1050 (Sized_relobj_file::split_stack_adjust_reltype): Likewise.
1051 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
1052 specializations) Remove.
1053 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
1054 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
1055 (Sized_relobj_file::emit_relocs_scan_reltype): Remove.
1056 (Sized_relobj_file::split_stack_adjust): Add target parameter.
1058 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
1059 Target::get_r_sym() to get r_sym field from relocations.
1060 (Track_relocs::next_symndx): Call Target::get_r_sym().
1061 * target-reloc.h (scan_relocs): Remove sh_type template parameter;
1062 add Classify_reloc template parameter. Use for accessing r_sym and
1064 (relocate_section): Likewise.
1065 (Default_classify_reloc): New class (renamed and moved from reloc.cc).
1066 (Default_scan_relocatable_relocs): Remove sh_type template parameter.
1067 (Default_scan_relocatable_relocs::Reltype): New typedef.
1068 (Default_scan_relocatable_relocs::reloc_size): New const.
1069 (Default_scan_relocatable_relocs::sh_type): New const.
1070 (Default_scan_relocatable_relocs::get_r_sym): New method.
1071 (Default_scan_relocatable_relocs::get_r_type): New method.
1072 (Default_emit_relocs_strategy): New class.
1073 (scan_relocatable_relocs): Replace sh_type template parameter with
1074 Scan_relocatable_relocs class. Use it to access r_sym and r_type
1076 (relocate_relocs): Replace sh_type template parameter with
1077 Classify_reloc class. Use it to access r_sym and r_type fields.
1078 * target.h (Target::is_call_to_non_split): Replace r_type parameter
1079 with pointer to relocation. Adjust all callers.
1080 (Target::do_is_call_to_non_split): Likewise.
1081 (Target::emit_relocs_scan): New virtual method.
1082 (Sized_target::get_r_sym): New virtual method.
1083 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
1084 with pointer to relocation.
1086 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
1087 (Target_aarch64::Relocatable_size_for_reloc): Remove.
1088 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
1089 (Target_aarch64::scan_relocs): Likewise.
1090 (Target_aarch64::relocate_section): Likewise.
1091 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
1093 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
1094 (Target_aarch64::relocate_relocs): Use Default_classify_reloc.
1095 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
1097 (Target_arm::emit_relocs_scan): New method.
1098 (Target_arm::Relocatable_size_for_reloc): Replace with...
1099 (Target_arm::Classify_reloc): ...this.
1100 (Target_arm::gc_process_relocs): Use Classify_reloc.
1101 (Target_arm::scan_relocs): Likewise.
1102 (Target_arm::relocate_section): Likewise.
1103 (Target_arm::scan_relocatable_relocs): Likewise.
1104 (Target_arm::relocate_relocs): Likewise.
1105 * i386.cc (Target_i386::emit_relocs_scan): New method.
1106 (Target_i386::Relocatable_size_for_reloc): Replace with...
1107 (Target_i386::Classify_reloc): ...this.
1108 (Target_i386::gc_process_relocs): Use Classify_reloc.
1109 (Target_i386::scan_relocs): Likewise.
1110 (Target_i386::relocate_section): Likewise.
1111 (Target_i386::scan_relocatable_relocs): Likewise.
1112 (Target_i386::relocate_relocs): Likewise.
1113 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
1115 (Mips_reloc_types): New class template.
1116 (Mips_classify_reloc): New class template.
1117 (Target_mips::Reltype): New typedef.
1118 (Target_mips::Relatype): New typedef.
1119 (Target_mips::emit_relocs_scan): New method.
1120 (Target_mips::get_r_sym): New method.
1121 (Target_mips::Relocatable_size_for_reloc): Replace with
1122 Mips_classify_reloc.
1123 (Target_mips::copy_reloc): Use Mips_classify_reloc.
1124 (Target_mips::gc_process_relocs): Likewise.
1125 (Target_mips::scan_relocs): Likewise.
1126 (Target_mips::relocate_section): Likewise.
1127 (Target_mips::scan_relocatable_relocs): Likewise.
1128 (Target_mips::relocate_relocs): Likewise.
1129 (mips_get_size_for_reloc): New function, factored out from
1130 Relocatable_size_for_reloc::get_size_for_reloc.
1131 (Target_mips::Scan::local): Use Mips_classify_reloc.
1132 (Target_mips::Scan::global): Likewise.
1133 (Target_mips::Relocate::relocate): Likewise.
1134 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
1135 (Target_powerpc::Relocatable_size_for_reloc): Remove.
1136 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
1137 (Target_powerpc::scan_relocs): Likewise.
1138 (Target_powerpc::relocate_section): Likewise.
1139 (Powerpc_scan_relocatable_reloc): Convert to class template.
1140 (Powerpc_scan_relocatable_reloc::Reltype): New typedef.
1141 (Powerpc_scan_relocatable_reloc::reloc_size): New const.
1142 (Powerpc_scan_relocatable_reloc::sh_type): New const.
1143 (Powerpc_scan_relocatable_reloc::get_r_sym): New method.
1144 (Powerpc_scan_relocatable_reloc::get_r_type): New method.
1145 (Target_powerpc::scan_relocatable_relocs): Use
1146 Powerpc_scan_relocatable_reloc.
1147 (Target_powerpc::relocate_relocs): Use Default_classify_reloc.
1148 * s390.cc (Target_s390::emit_relocs_scan): New method.
1149 (Target_s390::Relocatable_size_for_reloc): Remove.
1150 (Target_s390::gc_process_relocs): Use Default_classify_reloc.
1151 (Target_s390::scan_relocs): Likewise.
1152 (Target_s390::relocate_section): Likewise.
1153 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
1155 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
1156 (Target_s390::relocate_relocs): Use Default_classify_reloc.
1157 * sparc.cc (Target_sparc::emit_relocs_scan): New method.
1158 (Target_sparc::Relocatable_size_for_reloc): Remove.
1159 (Target_sparc::gc_process_relocs): Use Default_classify_reloc.
1160 (Target_sparc::scan_relocs): Likewise.
1161 (Target_sparc::relocate_section): Likewise.
1162 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
1164 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
1165 (Target_sparc::relocate_relocs): Use Default_classify_reloc.
1166 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
1167 (Target_tilegx::Relocatable_size_for_reloc): Remove.
1168 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
1169 (Target_tilegx::scan_relocs): Likewise.
1170 (Target_tilegx::relocate_section): Likewise.
1171 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
1173 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
1174 (Target_tilegx::relocate_relocs): Use Default_classify_reloc.
1175 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
1176 (Target_x86_64::Relocatable_size_for_reloc): Remove.
1177 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
1178 (Target_x86_64::scan_relocs): Likewise.
1179 (Target_x86_64::relocate_section): Likewise.
1180 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
1182 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
1183 (Target_x86_64::relocate_relocs): Use Default_classify_reloc.
1185 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
1187 2016-01-01 Alan Modra <amodra@gmail.com>
1189 Update year range in copyright notice of all files.
1191 For older changes see ChangeLog-0815
1193 Copyright (C) 2016 Free Software Foundation, Inc.
1195 Copying and distribution of this file, with or without modification,
1196 are permitted in any medium without royalty provided the copyright
1197 notice and this notice are preserved.
1203 version-control: never