1 2016-05-19 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
3 * mips.cc (Mips_got_entry::Mips_got_entry): Remove object argument
4 for global got symbols, and set addend to 0.
5 (Mips_got_entry::hash): Change hash algorithm.
6 (Mips_got_entry::equals): Refactor.
7 (Mips_got_entry::object): Return input object for local got symbols
9 (Mips_got_entry::addend): Change return of the relocation addend.
10 (Mips_got_entry::addend_): Move from union d.
11 (Mips_got_entry::object_): Move into union d.
12 (class Mips_symbol_hash): New class.
13 (Mips_got_info::Global_got_entry_set): New type.
14 (Mips_got_info::global_got_symbols): Change return type to
16 (Mips_got_info::global_got_symbols_): Change type to
18 (Mips_symbol::hash): New method.
19 (Mips_output_data_la25_stub::symbols_): Change type to std::vector.
20 (Mips_output_data_mips_stubs::Mips_stubs_entry_set): New type.
21 (Mips_output_data_mips_stubs::symbols_): Change type to
23 (Mips_got_info::record_global_got_symbol): Don't pass object
24 argument when creating global got symbol.
25 (Mips_got_info::record_got_entry): Remove find before inserting
27 (Mips_got_info::add_reloc_only_entries): Change type of iterator
28 to Global_got_entry_set.
29 (Mips_got_info::count_got_symbols): Likewise.
30 (Mips_output_data_la25_stub::create_la25_stub): Use push_back
31 for adding entries to symbols_.
32 (Mips_output_data_la25_stub::do_write): Change type of iterator
34 (Mips_output_data_mips_stubs::set_lazy_stub_offsets): Change type
35 of iterator to Mips_stubs_entry_set.
36 (Mips_output_data_mips_stubs::set_needs_dynsym_value): Likewise.
37 (Mips_output_data_mips_stubs::do_write): Likewise.
39 2016-05-06 Han Shen <shenhan@google.com>
43 * aarch64-reloc.def: New relocation type.
44 * aarch64.cc (AArch64_relocate_functions::Page): Changed to public.
45 (Target_aarch64::Scan::local): Add R_AARCH64_LD64_GOTPAGE_LO15.
46 (Target_aarch64::Scan::global): Add R_AARCH64_LD64_GOTPAGE_LO15.
47 (Target_aarch64::Relocate::relocate): Implement R_AARCH64_LD64_GOTPAGE_LO15.
49 2016-04-28 Nick Clifton <nickc@redhat.com>
51 * po/zh_CN.po: Updated Chinese (simplified) translation.
53 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
55 * Makefile.in: Regenerated with automake 1.11.6.
56 * aclocal.m4: Likewise.
57 * testsuite/Makefile.in: Likewise.
59 2016-03-30 Cary Coutant <ccoutant@gmail.com>
62 * symtab.cc (Symbol_table::define_default_version): Check for case
63 where symbols are both in different shared objects.
65 2016-03-27 Cary Coutant <ccoutant@gmail.com>
68 * i386.cc (Target_i386): Add check for fully-resolved symbol for
71 2016-03-22 Nick Clifton <nickc@redhat.com>
73 * configure: Regenerate.
75 2016-03-21 Cary Coutant <ccoutant@gmail.com>
78 * errors.cc (Errors::undefined_symbol): Add info message when
79 symbol should have been provided by a plugin.
80 * target-reloc.h (issue_undefined_symbol_error): Check for
81 placeholder symbols defined in discarded sections.
82 * testsuite/Makefile.am (plugin_test_9b): New test case.
83 * testsuite/Makefile.in: Regenerate.
84 * testsuite/plugin_test_9b_elf.cc: New test source file.
85 * testsuite/plugin_test_9b_ir.cc: New test source file.
87 2016-03-20 Cary Coutant <ccoutant@gmail.com>
90 * ehframe.cc (Eh_frame::read_fde): Check for dropped functions.
91 * testsuite/Makefile.am (eh_test_2): New test.
92 * testsuite/Makefile.in: Regenerate.
93 * testsuite/eh_test_2.sh: New test script.
94 * testsuite/eh_test_a.cc (bar): Make it comdat.
95 * testsuite/eh_test_b.cc (bar): Add a duplicate copy.
97 2016-03-18 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
99 * mips.cc (Mips_relobj::is_n64_): Remove.
100 (Target_mips::ei_class_): Likewise.
101 (Mips_relobj::is_newabi): Call methods.
102 (Mips_relobj::is_n64): Change checking for N64 ABI.
103 (Target_mips::is_output_n64): Likewise.
104 (Target_mips::merge_processor_specific_flags): Remove ei_class
105 argument, and remove comparing ei_class.
106 (Target_mips::do_adjust_elf_header): Remove setting EI_CLASS field
108 (Target_mips::do_finalize_sections): Don't pass ei_class argument
109 to merge_processor_specific_flags.
110 (Target_mips::elf_mips_abi_name): Remove ei_class argument, and
111 change checking for N64 ABI.
113 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
115 * mips.cc (enum Special_relocation_symbol): New enum type.
116 (is_readonly_section): New function.
117 (eh_reloc): Likewise.
118 (Mips_got_entry::is_section_symbol_): New member.
119 (Mips_got_entry::is_section_symbol): New method.
120 (Mips_got_info::record_local_got_symbol): Add is_section_symbol
122 (Mips_relobj::mips_elf_options_section_name): New method.
123 (Mips_output_data_got::record_local_got_symbol): Add
124 is_section_symbol argument, and pass it to
125 Mips_got_info::record_local_got_symbol.
126 (Mips_output_data_got::got_offset): Add addend argument, and pass
127 it to Relobj::local_got_offset.
128 (struct Mips_output_reloc_writer): New type.
129 (class Mips_output_data_reloc): New class.
130 (Mips_output_data_plt::Reloc_section): Change type to
131 Mips_output_data_reloc.
132 (Target_mips::Reloc_section): Likewise.
133 (Mips_reloc_types::get_r_addend): Remove unsigned from return type.
134 (Mips_classify_reloc::get_r_type2): New method.
135 (Mips_classify_reloc::get_r_type3): Likewise.
136 (Mips_classify_reloc::get_r_ssym): Likewise.
137 (Target_mips::Reloca_section): Remove.
138 (Relocate::should_apply_static_reloc): Rename from
139 should_apply_r_mips_32_reloc.
140 (Target_mips::copy_reloc): Replace Reltype parameter with r_type
142 (Mips_relocate_functions::Valtype): New type.
143 (Mips_relocate_functions::Valtype64): New type.
144 (Mips_relocate_functions::check_overflow): New method.
145 (Mips_relocate_functions::mips_reloc_unshuffle): Move to public
147 (Mips_relocate_functions::mips_reloc_shuffle): Likewise.
148 (Mips_relocate_functions::rel16): Add support for resolving
149 relocations for Mips64.
150 (Mips_relocate_functions::rel32): Likewise.
151 (Mips_relocate_functions::reljalr): Likewise.
152 (Mips_relocate_functions::relpc32): Likewise.
153 (Mips_relocate_functions::rel26): Likewise.
154 (Mips_relocate_functions::relpc16): Likewise.
155 (Mips_relocate_functions::relmicromips_pc7_s1): Likewise.
156 (Mips_relocate_functions::relmicromips_pc10_s1): Likewise.
157 (Mips_relocate_functions::relmicromips_pc16_s1): Likewise.
158 (Mips_relocate_functions::do_relhi16): Likewise.
159 (Mips_relocate_functions::do_relgot16_local): Likewise.
160 (Mips_relocate_functions::rello16): Likewise.
161 (Mips_relocate_functions::relgot): Likewise.
162 (Mips_relocate_functions::relgotpage): Likewise.
163 (Mips_relocate_functions::relgotofst): Likewise.
164 (Mips_relocate_functions::relgot_hi16): Likewise.
165 (Mips_relocate_functions::relgot_lo16): Likewise.
166 (Mips_relocate_functions::relgprel): Likewise.
167 (Mips_relocate_functions::relgprel32): Likewise.
168 (Mips_relocate_functions::tlsrelhi16): Likewise.
169 (Mips_relocate_functions::tlsrello16): Likewise.
170 (Mips_relocate_functions::tlsrel32): Likewise.
171 (Mips_relocate_functions::relsub): Likewise.
172 (Mips_relocate_functions::releh): New method.
173 (Mips_relocate_functions::rel64): Likewise.
174 (Mips_got_info::record_local_got_symbol): Add is_section_symbol and
175 pass it to Mips_got_entry.
176 (Mips_got_info::add_local_entries): Pass addend argument
177 to code functions, and for STT_SECTION symbols call
178 add_symbolless_local_addend.
179 (Mips_got_info::add_tls_entries): Pass addend argument to code
181 (Mips_relobj::do_read_symbols): Read gp value that was used to
183 (Mips_output_data_plt::plt_entry): Remove opcode from l[wd]
184 instruction. Opcode for instruction will be selected later.
185 (Target_mips::gc_process_relocs): Add case for SHT_RELA.
186 (Target_mips::scan_relocatable_relocs): Likewise.
187 (Target_mips::emit_relocs_scan): Likewise.
188 (Target_mips::relocate_relocs): Likewise.
189 (Target_mips::do_finalize_sections): Skip objects for merging
190 processor specific flags in which all input sections will be
192 (mips_get_size_for_reloc): Add case for R_MIPS_EH.
193 (Target_mips::Scan::get_reference_flags): Likewise.
194 (Target_mips::relocate_special_relocatable): Call rel26 method with
195 calculate_only and calculated_value arguments.
196 (Target_mips::Scan::local): Add case for R_MIPS_EH. Don't create a
197 dynamic relocation against a readonly sections, and pass
198 is_section_symbol to Mips_got_info::record_local_got_symbol.
199 (Target_mips::Scan::global): Add case for R_MIPS_EH. Don't create a
200 dynamic relocation against a readonly sections, and pass r_type
201 and r_offset to Target_mips::copy_reloc.
202 (Target_mips::Relocate::relocate): Add support for resolving
203 relocations for Mips64.
204 (Target_mips::mips_info): Add case for Mips64 default dynamic
206 (Target_selector_mips): Correct emulation names.
208 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
210 * mips.cc (class Mips_output_data_la25_stub): Add
211 do_print_to_mapfile function.
213 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
215 * mips.cc (Mips_classify_reloc::put_r_info): Call 32bit version of
218 2016-03-09 H.J. Lu <hongjiu.lu@intel.com>
220 * testsuite/plugin_layout_with_alignment.cc: Renamed to ..
221 * testsuite/plugin_layout_with_alignment.c: This.
222 * testsuite/Makefile.am (plugin_layout_with_alignment.o): Updated.
223 (plugin_layout_with_alignment): Likewise.
224 * testsuite/Makefile.in: Regenerated.
226 2016-03-08 Cary Coutant <ccoutant@gmail.com>
229 * testsuite/Makefile.am (retain_symbols_file_test): Remove check
231 * testsuite/Makefile.in: Regenerate.
232 * testsuite/dynamic_list.sh: Likewise.
233 * testsuite/retain_symbols_file_test.sh: Likewise.
235 2016-03-08 Cary Coutant <ccoutant@gmail.com>
238 * arm.cc (Reloc_stub::Key::name): Add unused attribute.
239 * dirsearch.cc (Dir_caches::~Dir_caches): Likewise.
241 2016-03-08 Cary Coutant <ccoutant@gmail.com>
242 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
244 * output.cc (Output_reloc_writer): New type.
245 (Output_data_reloc_base::do_write): Move implementation to template
246 in output.h and replace with invocation of template.
247 * output.h (Output_file): Move to top of file.
248 (Output_reloc::get_symbol_index): Move to public interface.
249 (Output_reloc::get_address): Likewise.
250 (Output_data_reloc_base::do_write_generic): New function template.
252 2016-03-04 Cary Coutant <ccoutant@gmail.com>
256 * symtab.cc: Instantiate Sized_symbol::init_constant and
257 Sized_symbol::init_undefined.
259 2016-03-03 Cary Coutant <ccoutant@gmail.com>
262 * layout.h (Layout::add_target_specific_dynamic_tag): New function.
263 * layout.cc (Layout::add_target_specific_dynamic_tag): New function.
264 * mips.cc (Target_mips::make_symbol): Adjust function signature.
265 * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_.
266 (Target_sparc::do_is_defined_by_abi): Remove test for
268 (Target_sparc::Register_symbol): New struct type.
269 (Target_sparc::register_syms_): New data member.
270 (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true.
271 (Target_sparc::make_symbol): New function.
272 (Target_sparc::do_finalize_sections): Add register symbols and new
273 dynamic table entries.
274 * symtab.h (Sized_symbol::init_undefined): Add value parameter.
275 (Symbol_table::add_target_global_symbol): New function.
276 (Symbol_table::target_symbols_): New data member.
277 * symtab.cc (Sized_symbol::init_undefined): Add value parameter.
278 (Symbol_table::Symbol_table): Initialize target_symbols_.
279 (Symbol_table::add_from_object): Pass additional parameters to
281 (Symbol_table::define_special_symbol): Likewise.
282 (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for
283 undefined symbol value.
284 (Symbol_table::set_dynsym_indexes): Process target-specific symbols.
285 (Symbol_table::sized_finalize): Likewise.
286 (Symbol_table::sized_write_globals): Likewise.
287 * target.h (Sized_target::make_symbol): Add name, st_type, object,
288 st_shndx, and value parameters.
290 2016-03-03 Rafael Ăvila de EspĂndola <rafael.espindola@gmail.com>
292 * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and
293 LDPK_WEAKUNDEF symbols.
295 2016-03-03 Than McIntosh <thanm@google.com>
297 * plugin.cc (Plugin::load): Include hooks for get_input_section_size
298 and get_input_section_alignment in transfer vector.
299 (get_input_section_alignment): New function.
300 (get_input_section_size): New function.
301 * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test.
302 * testsuite/Makefile.in: [Regenerate.]
303 * testsuite/plugin_section_alignment.cc: New test file.
304 * testsuite/plugin_layout_with_alignment.cc: New test file.
305 * testsuite/plugin_layout_with_alignment.sh: New test file.
307 2016-03-03 Evgenii Stepanov <eugenis@google.com>
309 * plugin.h (Pluginobj::get_symbol_resolution_info): Add version
311 * plugin.cc (get_symbols_v3): New function.
312 (Plugin::load): Add LDPT_GET_SYMBOLS_V3.
313 (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using
316 2016-02-26 Egor Kochetov <egor.kochetov@intel.com>
317 Cary Coutant <ccoutant@gmail.com>
320 * ehframe.h (Cie::fde_encoding): New method.
321 * ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length
324 2016-02-15 H.J. Lu <hongjiu.lu@intel.com>
326 * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
327 -mrelax-relocations=yes to $(TEST_AS).
328 (x86_64_mov_to_lea6.o): Likewise.
329 (x86_64_overflow_pc32.o): Remove duplicated target.
330 * testsuite/Makefile.in: Regenerated.
332 2016-02-15 Marcin KoĆcielnicki <koriakin@0x04.net>
334 * s390.cc (Target_s390::match_view_u): New helper method.
335 (Target_s390::do_is_call_to_non_split): New method.
336 (Target_s390::ss_code_st_r14): New const.
337 (Target_s390::ss_code_l_r14): New const.
338 (Target_s390::ss_code_bras_8): New const.
339 (Target_s390::ss_code_l_basr): New const.
340 (Target_s390::ss_code_a_basr): New const.
341 (Target_s390::ss_code_ear): New const.
342 (Target_s390::ss_code_c): New const.
343 (Target_s390::ss_code_larl): New const.
344 (Target_s390::ss_code_brasl): New const.
345 (Target_s390::ss_code_jg): New const.
346 (Target_s390::ss_code_jgl): New const.
347 (Target_s390::ss_match_mcount): New helper method.
348 (Target_s390::ss_match_l): New helper method.
349 (Target_s390::ss_match_ahi): New helper method.
350 (Target_s390::ss_match_alfi): New helper method.
351 (Target_s390::ss_match_cr): New helper method.
352 (Target_s390::do_calls_non_split): New method.
353 * testsuite/Makefile.am: Added new tests.
354 * testsuite/Makefile.in: Regenerate.
355 * testsuite/split_s390.sh: New test.
356 * testsuite/split_s390_1_a1.s: New test.
357 * testsuite/split_s390_1_a2.s: New test.
358 * testsuite/split_s390_1_n1.s: New test.
359 * testsuite/split_s390_1_n2.s: New test.
360 * testsuite/split_s390_1_z1.s: New test.
361 * testsuite/split_s390_1_z2.s: New test.
362 * testsuite/split_s390_1_z3.s: New test.
363 * testsuite/split_s390_1_z4.s: New test.
364 * testsuite/split_s390_2_ns.s: New test.
365 * testsuite/split_s390_2_s.s: New test.
366 * testsuite/split_s390x_1_a1.s: New test.
367 * testsuite/split_s390x_1_a2.s: New test.
368 * testsuite/split_s390x_1_n1.s: New test.
369 * testsuite/split_s390x_1_n2.s: New test.
370 * testsuite/split_s390x_1_z1.s: New test.
371 * testsuite/split_s390x_1_z2.s: New test.
372 * testsuite/split_s390x_1_z3.s: New test.
373 * testsuite/split_s390x_1_z4.s: New test.
374 * testsuite/split_s390x_2_ns.s: New test.
375 * testsuite/split_s390x_2_s.s: New test.
377 2016-02-11 Rahul Chaudhry <rahulchaudhry@google.com>
379 * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove
380 info message for every erratum 843419 found and fixed.
382 2016-02-07 Cary Coutant <ccoutant@gmail.com>
385 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional
386 information to relocation overflow errors.
388 2016-02-06 Cary Coutant <ccoutant@gmail.com>
391 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32
392 overflow checking when symbol value + addend < 0.
394 2016-02-06 Cary Coutant <ccoutant@gmail.com>
397 * reloc.h (Limits): New class.
398 (Bits::has_overflow32): Use min/max values from Limits.
399 (Bits::has_unsigned_overflow32): Likewise.
400 (Bits::has_signed_unsigned_overflow32): Likewise.
401 (Bits::has_overflow): Likewise.
402 (Bits::has_unsigned_overflow): Likewise.
403 (Bits::has_signed_unsigned_overflow64): Likewise.
405 2016-02-06 Cary Coutant <ccoutant@gmail.com>
408 * reloc.h (Relocate_functions::Overflow_check): Add comments.
409 * x86_64.cc (X86_64_relocate_functions): New class.
410 (Target_x86_64::Relocate::relocate): Use the new class.
411 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option.
412 (x32_overflow_pc32): New test case.
413 * testsuite/Makefile.in: Regenerate.
414 * testsuite/x32_overflow_pc32.sh: New script.
415 * testsuite/x86_64_overflow_pc32.s: Remove .space directive.
417 2016-02-06 Cary Coutant <ccoutant@gmail.com>
420 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast.
421 (Bits::has_unsigned_overflow): Remove unnecessary static_cast.
423 2016-02-06 Cary Coutant <ccoutant@gmail.com>
426 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed
428 (Bits::has_unsigned_overflow): Likewise.
430 2016-02-06 Marcin KoĆcielnicki <koriakin@0x04.net>
432 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
434 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
435 and view_size to is_call_to_non_split.
436 * target.cc (Target::is_call_to_non_split): Add view and view_size
438 * target.h (class Target): Likewise.
440 2016-02-05 Sriraman Tallam <tmsriram@google.com>
442 * icf.cc (get_rel_addend): New function.
443 (get_section_contents): Move merge section addend computation to a
444 new function. Ignore negative values for SHT_REL and SHT_RELA addends.
445 Fix bug to not read past the length of the section.
447 2016-02-05 Cary Coutant <ccoutant@gmail.com>
448 Andrew Senkevich <andrew.senkevich@intel.com>
451 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow
452 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and
454 * testsuite/Makefile.am (x86_64_overflow_pc32): New test.
455 * testsuite/x86_64_overflow_pc32.sh: New test script.
456 * testsuite/x86_64_overflow_pc32.s: New source file.
458 2016-02-05 Cary Coutant <ccoutant@gmail.com>
461 * reloc.h (Relocate_functions::Address): New typedef.
462 (Relocate_functions::Addendtype): New typedef.
463 (Relocate_functions::Overflow_check): New enum type.
464 (Relocate_functions::Reloc_status): New enum type.
465 (Relocate_functions::check_overflow): New function template.
466 (Relocate_functions::rel): Add check parameter; check for overflow.
467 (Relocate_functions::rel_unaligned): Likewise.
468 (Relocate_functions::rela): Likewise.
469 (Relocate_functions::pcrel): Likewise.
470 (Relocate_functions::pcrel_unaligned): Likewise.
471 (Relocate_functions::pcrela): Likewise.
472 (Relocate_functions::rel8): Adjust parameter types.
473 (Relocate_functions::rela8): Likewise.
474 (Relocate_functions::pcrel8): Likewise.
475 (Relocate_functions::pcrela8): Likewise.
476 (Relocate_functions::rel16): Likewise.
477 (Relocate_functions::rela168): Likewise.
478 (Relocate_functions::pcrel16): Likewise.
479 (Relocate_functions::pcrela16): Likewise.
480 (Relocate_functions::rel32): Likewise.
481 (Relocate_functions::rel32_unaligned): Likewise.
482 (Relocate_functions::rela32): Likewise.
483 (Relocate_functions::pcrel32): Likewise.
484 (Relocate_functions::pcrel32_unaligned): Likewise.
485 (Relocate_functions::pcrela32): Likewise.
486 (Relocate_functions::rel8_check): New function.
487 (Relocate_functions::rela8_check): New function.
488 (Relocate_functions::pcrel8_check): New function.
489 (Relocate_functions::pcrela8_check): New function.
490 (Relocate_functions::rel16_check): New function.
491 (Relocate_functions::rela168_check): New function.
492 (Relocate_functions::pcrel16_check): New function.
493 (Relocate_functions::pcrela16_check): New function.
494 (Relocate_functions::rel32_check): New function.
495 (Relocate_functions::rel32_unaligned_check): New function.
496 (Relocate_functions::rela32_check): New function.
497 (Relocate_functions::pcrel32_check): New function.
498 (Relocate_functions::pcrel32_unaligned_check): New function.
499 (Relocate_functions::pcrela32_check): New function.
500 (Bits::has_unsigned_overflow32): New function.
501 (Bits::has_unsigned_overflow): New function.
502 * testsuite/Makefile.am (overflow_unittest): New test.
503 * testsuite/Makefile.in: Regenerate.
504 * testsuite/overflow_unittest.cc: New source file.
506 2016-02-04 Alan Modra <amodra@gmail.com>
508 * powerpc.cc (relocate): Adjust last patch for big-endian.
510 2016-02-02 Alan Modra <amodra@gmail.com>
512 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
514 2016-01-15 Han Shen <shenhan@google.com>
516 PR gold/19472 - need pc-relative stubs.
518 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
519 stub type for DSOs and pie executables.
521 2016-01-12 H.J. Lu <hongjiu.lu@intel.com>
523 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
526 2016-01-12 Cary Coutant <ccoutant@gmail.com>
528 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
529 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
530 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
531 specializations) New method.
533 2016-01-11 Cary Coutant <ccoutant@gmail.com>
536 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
537 we have a TLS segment for GD-to-IE optimization.
538 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
540 (Target_i386::tls_desc_gd_to_ie): Likewise.
541 (Target_i386::relocate_tls): Don't insist that we have a TLS segment
542 for TLSDESC GD-to-IE optimizations.
543 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
545 (Target_x86_64::tls_desc_gd_to_ie): Likewise.
546 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
547 for TLSDESC GD-to-IE optimizations.
549 2016-01-11 Cary Coutant <ccoutant@gmail.com>
551 Refactor gold to enable support for MIPS-64 relocation format.
553 * gc.h (get_embedded_addend_size): Remove sh_type parameter.
554 (gc_process_relocs): Remove sh_type template parameter.
555 Use Classify_reloc to access r_sym, r_type, and r_addend fields.
556 * object.h (Sized_relobj_file::split_stack_adjust): Add target
558 (Sized_relobj_file::split_stack_adjust_reltype): Likewise.
559 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
560 specializations) Remove.
561 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
562 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
563 (Sized_relobj_file::emit_relocs_scan_reltype): Remove.
564 (Sized_relobj_file::split_stack_adjust): Add target parameter.
566 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
567 Target::get_r_sym() to get r_sym field from relocations.
568 (Track_relocs::next_symndx): Call Target::get_r_sym().
569 * target-reloc.h (scan_relocs): Remove sh_type template parameter;
570 add Classify_reloc template parameter. Use for accessing r_sym and
572 (relocate_section): Likewise.
573 (Default_classify_reloc): New class (renamed and moved from reloc.cc).
574 (Default_scan_relocatable_relocs): Remove sh_type template parameter.
575 (Default_scan_relocatable_relocs::Reltype): New typedef.
576 (Default_scan_relocatable_relocs::reloc_size): New const.
577 (Default_scan_relocatable_relocs::sh_type): New const.
578 (Default_scan_relocatable_relocs::get_r_sym): New method.
579 (Default_scan_relocatable_relocs::get_r_type): New method.
580 (Default_emit_relocs_strategy): New class.
581 (scan_relocatable_relocs): Replace sh_type template parameter with
582 Scan_relocatable_relocs class. Use it to access r_sym and r_type
584 (relocate_relocs): Replace sh_type template parameter with
585 Classify_reloc class. Use it to access r_sym and r_type fields.
586 * target.h (Target::is_call_to_non_split): Replace r_type parameter
587 with pointer to relocation. Adjust all callers.
588 (Target::do_is_call_to_non_split): Likewise.
589 (Target::emit_relocs_scan): New virtual method.
590 (Sized_target::get_r_sym): New virtual method.
591 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
592 with pointer to relocation.
594 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
595 (Target_aarch64::Relocatable_size_for_reloc): Remove.
596 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
597 (Target_aarch64::scan_relocs): Likewise.
598 (Target_aarch64::relocate_section): Likewise.
599 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
601 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
602 (Target_aarch64::relocate_relocs): Use Default_classify_reloc.
603 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
605 (Target_arm::emit_relocs_scan): New method.
606 (Target_arm::Relocatable_size_for_reloc): Replace with...
607 (Target_arm::Classify_reloc): ...this.
608 (Target_arm::gc_process_relocs): Use Classify_reloc.
609 (Target_arm::scan_relocs): Likewise.
610 (Target_arm::relocate_section): Likewise.
611 (Target_arm::scan_relocatable_relocs): Likewise.
612 (Target_arm::relocate_relocs): Likewise.
613 * i386.cc (Target_i386::emit_relocs_scan): New method.
614 (Target_i386::Relocatable_size_for_reloc): Replace with...
615 (Target_i386::Classify_reloc): ...this.
616 (Target_i386::gc_process_relocs): Use Classify_reloc.
617 (Target_i386::scan_relocs): Likewise.
618 (Target_i386::relocate_section): Likewise.
619 (Target_i386::scan_relocatable_relocs): Likewise.
620 (Target_i386::relocate_relocs): Likewise.
621 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
623 (Mips_reloc_types): New class template.
624 (Mips_classify_reloc): New class template.
625 (Target_mips::Reltype): New typedef.
626 (Target_mips::Relatype): New typedef.
627 (Target_mips::emit_relocs_scan): New method.
628 (Target_mips::get_r_sym): New method.
629 (Target_mips::Relocatable_size_for_reloc): Replace with
631 (Target_mips::copy_reloc): Use Mips_classify_reloc.
632 (Target_mips::gc_process_relocs): Likewise.
633 (Target_mips::scan_relocs): Likewise.
634 (Target_mips::relocate_section): Likewise.
635 (Target_mips::scan_relocatable_relocs): Likewise.
636 (Target_mips::relocate_relocs): Likewise.
637 (mips_get_size_for_reloc): New function, factored out from
638 Relocatable_size_for_reloc::get_size_for_reloc.
639 (Target_mips::Scan::local): Use Mips_classify_reloc.
640 (Target_mips::Scan::global): Likewise.
641 (Target_mips::Relocate::relocate): Likewise.
642 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
643 (Target_powerpc::Relocatable_size_for_reloc): Remove.
644 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
645 (Target_powerpc::scan_relocs): Likewise.
646 (Target_powerpc::relocate_section): Likewise.
647 (Powerpc_scan_relocatable_reloc): Convert to class template.
648 (Powerpc_scan_relocatable_reloc::Reltype): New typedef.
649 (Powerpc_scan_relocatable_reloc::reloc_size): New const.
650 (Powerpc_scan_relocatable_reloc::sh_type): New const.
651 (Powerpc_scan_relocatable_reloc::get_r_sym): New method.
652 (Powerpc_scan_relocatable_reloc::get_r_type): New method.
653 (Target_powerpc::scan_relocatable_relocs): Use
654 Powerpc_scan_relocatable_reloc.
655 (Target_powerpc::relocate_relocs): Use Default_classify_reloc.
656 * s390.cc (Target_s390::emit_relocs_scan): New method.
657 (Target_s390::Relocatable_size_for_reloc): Remove.
658 (Target_s390::gc_process_relocs): Use Default_classify_reloc.
659 (Target_s390::scan_relocs): Likewise.
660 (Target_s390::relocate_section): Likewise.
661 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
663 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
664 (Target_s390::relocate_relocs): Use Default_classify_reloc.
665 * sparc.cc (Target_sparc::emit_relocs_scan): New method.
666 (Target_sparc::Relocatable_size_for_reloc): Remove.
667 (Target_sparc::gc_process_relocs): Use Default_classify_reloc.
668 (Target_sparc::scan_relocs): Likewise.
669 (Target_sparc::relocate_section): Likewise.
670 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
672 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
673 (Target_sparc::relocate_relocs): Use Default_classify_reloc.
674 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
675 (Target_tilegx::Relocatable_size_for_reloc): Remove.
676 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
677 (Target_tilegx::scan_relocs): Likewise.
678 (Target_tilegx::relocate_section): Likewise.
679 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
681 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
682 (Target_tilegx::relocate_relocs): Use Default_classify_reloc.
683 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
684 (Target_x86_64::Relocatable_size_for_reloc): Remove.
685 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
686 (Target_x86_64::scan_relocs): Likewise.
687 (Target_x86_64::relocate_section): Likewise.
688 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
690 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
691 (Target_x86_64::relocate_relocs): Use Default_classify_reloc.
693 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
695 2016-01-01 Alan Modra <amodra@gmail.com>
697 Update year range in copyright notice of all files.
699 For older changes see ChangeLog-0815
701 Copyright (C) 2016 Free Software Foundation, Inc.
703 Copying and distribution of this file, with or without modification,
704 are permitted in any medium without royalty provided the copyright
705 notice and this notice are preserved.
711 version-control: never