a5bb5c6c94b1620baeb3e7c60a607a12ca70f4b8
[deliverable/binutils-gdb.git] / gold / ChangeLog
1 2016-03-04 Cary Coutant <ccoutant@gmail.com>
2
3 PR gold/19019
4 PR gold/19763
5 * symtab.cc: Instantiate Sized_symbol::init_constant and
6 Sized_symbol::init_undefined.
7
8 2016-03-03 Cary Coutant <ccoutant@gmail.com>
9
10 PR gold/19019
11 * layout.h (Layout::add_target_specific_dynamic_tag): New function.
12 * layout.cc (Layout::add_target_specific_dynamic_tag): New function.
13 * mips.cc (Target_mips::make_symbol): Adjust function signature.
14 * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_.
15 (Target_sparc::do_is_defined_by_abi): Remove test for
16 STT_SPARC_REGISTER.
17 (Target_sparc::Register_symbol): New struct type.
18 (Target_sparc::register_syms_): New data member.
19 (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true.
20 (Target_sparc::make_symbol): New function.
21 (Target_sparc::do_finalize_sections): Add register symbols and new
22 dynamic table entries.
23 * symtab.h (Sized_symbol::init_undefined): Add value parameter.
24 (Symbol_table::add_target_global_symbol): New function.
25 (Symbol_table::target_symbols_): New data member.
26 * symtab.cc (Sized_symbol::init_undefined): Add value parameter.
27 (Symbol_table::Symbol_table): Initialize target_symbols_.
28 (Symbol_table::add_from_object): Pass additional parameters to
29 Target::make_symbol.
30 (Symbol_table::define_special_symbol): Likewise.
31 (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for
32 undefined symbol value.
33 (Symbol_table::set_dynsym_indexes): Process target-specific symbols.
34 (Symbol_table::sized_finalize): Likewise.
35 (Symbol_table::sized_write_globals): Likewise.
36 * target.h (Sized_target::make_symbol): Add name, st_type, object,
37 st_shndx, and value parameters.
38
39 2015-03-03 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
40
41 * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and
42 LDPK_WEAKUNDEF symbols.
43
44 2016-03-03 Than McIntosh <thanm@google.com>
45
46 * plugin.cc (Plugin::load): Include hooks for get_input_section_size
47 and get_input_section_alignment in transfer vector.
48 (get_input_section_alignment): New function.
49 (get_input_section_size): New function.
50 * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test.
51 * testsuite/Makefile.in: [Regenerate.]
52 * testsuite/plugin_section_alignment.cc: New test file.
53 * testsuite/plugin_layout_with_alignment.cc: New test file.
54 * testsuite/plugin_layout_with_alignment.sh: New test file.
55
56 2015-03-03 Evgenii Stepanov <eugenis@google.com>
57
58 * plugin.h (Pluginobj::get_symbol_resolution_info): Add version
59 parameter.
60 * plugin.cc (get_symbols_v3): New function.
61 (Plugin::load): Add LDPT_GET_SYMBOLS_V3.
62 (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using
63 new version.
64
65 2016-02-26 Egor Kochetov <egor.kochetov@intel.com>
66 Cary Coutant <ccoutant@gmail.com>
67
68 PR gold/19735
69 * ehframe.h (Cie::fde_encoding): New method.
70 * ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length
71 address ranges.
72
73 2016-02-15 H.J. Lu <hongjiu.lu@intel.com>
74
75 * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
76 -mrelax-relocations=yes to $(TEST_AS).
77 (x86_64_mov_to_lea6.o): Likewise.
78 (x86_64_overflow_pc32.o): Remove duplicated target.
79 * testsuite/Makefile.in: Regenerated.
80
81 2016-02-15 Marcin Kościelnicki <koriakin@0x04.net>
82
83 * s390.cc (Target_s390::match_view_u): New helper method.
84 (Target_s390::do_is_call_to_non_split): New method.
85 (Target_s390::ss_code_st_r14): New const.
86 (Target_s390::ss_code_l_r14): New const.
87 (Target_s390::ss_code_bras_8): New const.
88 (Target_s390::ss_code_l_basr): New const.
89 (Target_s390::ss_code_a_basr): New const.
90 (Target_s390::ss_code_ear): New const.
91 (Target_s390::ss_code_c): New const.
92 (Target_s390::ss_code_larl): New const.
93 (Target_s390::ss_code_brasl): New const.
94 (Target_s390::ss_code_jg): New const.
95 (Target_s390::ss_code_jgl): New const.
96 (Target_s390::ss_match_mcount): New helper method.
97 (Target_s390::ss_match_l): New helper method.
98 (Target_s390::ss_match_ahi): New helper method.
99 (Target_s390::ss_match_alfi): New helper method.
100 (Target_s390::ss_match_cr): New helper method.
101 (Target_s390::do_calls_non_split): New method.
102 * testsuite/Makefile.am: Added new tests.
103 * testsuite/Makefile.in: Regenerate.
104 * testsuite/split_s390.sh: New test.
105 * testsuite/split_s390_1_a1.s: New test.
106 * testsuite/split_s390_1_a2.s: New test.
107 * testsuite/split_s390_1_n1.s: New test.
108 * testsuite/split_s390_1_n2.s: New test.
109 * testsuite/split_s390_1_z1.s: New test.
110 * testsuite/split_s390_1_z2.s: New test.
111 * testsuite/split_s390_1_z3.s: New test.
112 * testsuite/split_s390_1_z4.s: New test.
113 * testsuite/split_s390_2_ns.s: New test.
114 * testsuite/split_s390_2_s.s: New test.
115 * testsuite/split_s390x_1_a1.s: New test.
116 * testsuite/split_s390x_1_a2.s: New test.
117 * testsuite/split_s390x_1_n1.s: New test.
118 * testsuite/split_s390x_1_n2.s: New test.
119 * testsuite/split_s390x_1_z1.s: New test.
120 * testsuite/split_s390x_1_z2.s: New test.
121 * testsuite/split_s390x_1_z3.s: New test.
122 * testsuite/split_s390x_1_z4.s: New test.
123 * testsuite/split_s390x_2_ns.s: New test.
124 * testsuite/split_s390x_2_s.s: New test.
125
126 2016-02-11 Rahul Chaudhry <rahulchaudhry@google.com>
127
128 * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove
129 info message for every erratum 843419 found and fixed.
130
131 2016-02-07 Cary Coutant <ccoutant@gmail.com>
132
133 PR gold/18695
134 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional
135 information to relocation overflow errors.
136
137 2016-02-06 Cary Coutant <ccoutant@gmail.com>
138
139 PR gold/18695
140 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32
141 overflow checking when symbol value + addend < 0.
142
143 2016-02-06 Cary Coutant <ccoutant@gmail.com>
144
145 PR gold/19577
146 * reloc.h (Limits): New class.
147 (Bits::has_overflow32): Use min/max values from Limits.
148 (Bits::has_unsigned_overflow32): Likewise.
149 (Bits::has_signed_unsigned_overflow32): Likewise.
150 (Bits::has_overflow): Likewise.
151 (Bits::has_unsigned_overflow): Likewise.
152 (Bits::has_signed_unsigned_overflow64): Likewise.
153
154 2016-02-06 Cary Coutant <ccoutant@gmail.com>
155
156 PR gold/19567
157 * reloc.h (Relocate_functions::Overflow_check): Add comments.
158 * x86_64.cc (X86_64_relocate_functions): New class.
159 (Target_x86_64::Relocate::relocate): Use the new class.
160 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option.
161 (x32_overflow_pc32): New test case.
162 * testsuite/Makefile.in: Regenerate.
163 * testsuite/x32_overflow_pc32.sh: New script.
164 * testsuite/x86_64_overflow_pc32.s: Remove .space directive.
165
166 2016-02-06 Cary Coutant <ccoutant@gmail.com>
167
168 PR gold/19577
169 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast.
170 (Bits::has_unsigned_overflow): Remove unnecessary static_cast.
171
172 2016-02-06 Cary Coutant <ccoutant@gmail.com>
173
174 PR gold/19577
175 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed
176 comparison.
177 (Bits::has_unsigned_overflow): Likewise.
178
179 2016-02-06 Marcin Kościelnicki <koriakin@0x04.net>
180
181 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
182 parameters.
183 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
184 and view_size to is_call_to_non_split.
185 * target.cc (Target::is_call_to_non_split): Add view and view_size
186 parameters.
187 * target.h (class Target): Likewise.
188
189 2016-02-05 Sriraman Tallam <tmsriram@google.com>
190
191 * icf.cc (get_rel_addend): New function.
192 (get_section_contents): Move merge section addend computation to a
193 new function. Ignore negative values for SHT_REL and SHT_RELA addends.
194 Fix bug to not read past the length of the section.
195
196 2016-02-05 Cary Coutant <ccoutant@gmail.com>
197 Andrew Senkevich <andrew.senkevich@intel.com>
198
199 PR gold/18695
200 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow
201 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and
202 R_X86_64_PLT32.
203 * testsuite/Makefile.am (x86_64_overflow_pc32): New test.
204 * testsuite/x86_64_overflow_pc32.sh: New test script.
205 * testsuite/x86_64_overflow_pc32.s: New source file.
206
207 2016-02-05 Cary Coutant <ccoutant@gmail.com>
208
209 PR gold/18695
210 * reloc.h (Relocate_functions::Address): New typedef.
211 (Relocate_functions::Addendtype): New typedef.
212 (Relocate_functions::Overflow_check): New enum type.
213 (Relocate_functions::Reloc_status): New enum type.
214 (Relocate_functions::check_overflow): New function template.
215 (Relocate_functions::rel): Add check parameter; check for overflow.
216 (Relocate_functions::rel_unaligned): Likewise.
217 (Relocate_functions::rela): Likewise.
218 (Relocate_functions::pcrel): Likewise.
219 (Relocate_functions::pcrel_unaligned): Likewise.
220 (Relocate_functions::pcrela): Likewise.
221 (Relocate_functions::rel8): Adjust parameter types.
222 (Relocate_functions::rela8): Likewise.
223 (Relocate_functions::pcrel8): Likewise.
224 (Relocate_functions::pcrela8): Likewise.
225 (Relocate_functions::rel16): Likewise.
226 (Relocate_functions::rela168): Likewise.
227 (Relocate_functions::pcrel16): Likewise.
228 (Relocate_functions::pcrela16): Likewise.
229 (Relocate_functions::rel32): Likewise.
230 (Relocate_functions::rel32_unaligned): Likewise.
231 (Relocate_functions::rela32): Likewise.
232 (Relocate_functions::pcrel32): Likewise.
233 (Relocate_functions::pcrel32_unaligned): Likewise.
234 (Relocate_functions::pcrela32): Likewise.
235 (Relocate_functions::rel8_check): New function.
236 (Relocate_functions::rela8_check): New function.
237 (Relocate_functions::pcrel8_check): New function.
238 (Relocate_functions::pcrela8_check): New function.
239 (Relocate_functions::rel16_check): New function.
240 (Relocate_functions::rela168_check): New function.
241 (Relocate_functions::pcrel16_check): New function.
242 (Relocate_functions::pcrela16_check): New function.
243 (Relocate_functions::rel32_check): New function.
244 (Relocate_functions::rel32_unaligned_check): New function.
245 (Relocate_functions::rela32_check): New function.
246 (Relocate_functions::pcrel32_check): New function.
247 (Relocate_functions::pcrel32_unaligned_check): New function.
248 (Relocate_functions::pcrela32_check): New function.
249 (Bits::has_unsigned_overflow32): New function.
250 (Bits::has_unsigned_overflow): New function.
251 * testsuite/Makefile.am (overflow_unittest): New test.
252 * testsuite/Makefile.in: Regenerate.
253 * testsuite/overflow_unittest.cc: New source file.
254
255 2016-02-04 Alan Modra <amodra@gmail.com>
256
257 * powerpc.cc (relocate): Adjust last patch for big-endian.
258
259 2016-02-02 Alan Modra <amodra@gmail.com>
260
261 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
262
263 2016-01-15 Han Shen <shenhan@google.com>
264
265 PR gold/19472 - need pc-relative stubs.
266
267 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
268 stub type for DSOs and pie executables.
269
270 2016-01-12 H.J. Lu <hongjiu.lu@intel.com>
271
272 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
273 'typename'.
274
275 2016-01-12 Cary Coutant <ccoutant@gmail.com>
276
277 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
278 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
279 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
280 specializations) New method.
281
282 2016-01-11 Cary Coutant <ccoutant@gmail.com>
283
284 PR gold/19353
285 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
286 we have a TLS segment for GD-to-IE optimization.
287 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
288 Adjust all calls.
289 (Target_i386::tls_desc_gd_to_ie): Likewise.
290 (Target_i386::relocate_tls): Don't insist that we have a TLS segment
291 for TLSDESC GD-to-IE optimizations.
292 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
293 Adjust all calls.
294 (Target_x86_64::tls_desc_gd_to_ie): Likewise.
295 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
296 for TLSDESC GD-to-IE optimizations.
297
298 2016-01-11 Cary Coutant <ccoutant@gmail.com>
299
300 Refactor gold to enable support for MIPS-64 relocation format.
301
302 * gc.h (get_embedded_addend_size): Remove sh_type parameter.
303 (gc_process_relocs): Remove sh_type template parameter.
304 Use Classify_reloc to access r_sym, r_type, and r_addend fields.
305 * object.h (Sized_relobj_file::split_stack_adjust): Add target
306 parameter.
307 (Sized_relobj_file::split_stack_adjust_reltype): Likewise.
308 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
309 specializations) Remove.
310 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
311 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
312 (Sized_relobj_file::emit_relocs_scan_reltype): Remove.
313 (Sized_relobj_file::split_stack_adjust): Add target parameter.
314 Adjust all callers.
315 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
316 Target::get_r_sym() to get r_sym field from relocations.
317 (Track_relocs::next_symndx): Call Target::get_r_sym().
318 * target-reloc.h (scan_relocs): Remove sh_type template parameter;
319 add Classify_reloc template parameter. Use for accessing r_sym and
320 r_type.
321 (relocate_section): Likewise.
322 (Default_classify_reloc): New class (renamed and moved from reloc.cc).
323 (Default_scan_relocatable_relocs): Remove sh_type template parameter.
324 (Default_scan_relocatable_relocs::Reltype): New typedef.
325 (Default_scan_relocatable_relocs::reloc_size): New const.
326 (Default_scan_relocatable_relocs::sh_type): New const.
327 (Default_scan_relocatable_relocs::get_r_sym): New method.
328 (Default_scan_relocatable_relocs::get_r_type): New method.
329 (Default_emit_relocs_strategy): New class.
330 (scan_relocatable_relocs): Replace sh_type template parameter with
331 Scan_relocatable_relocs class. Use it to access r_sym and r_type
332 fields.
333 (relocate_relocs): Replace sh_type template parameter with
334 Classify_reloc class. Use it to access r_sym and r_type fields.
335 * target.h (Target::is_call_to_non_split): Replace r_type parameter
336 with pointer to relocation. Adjust all callers.
337 (Target::do_is_call_to_non_split): Likewise.
338 (Target::emit_relocs_scan): New virtual method.
339 (Sized_target::get_r_sym): New virtual method.
340 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
341 with pointer to relocation.
342
343 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
344 (Target_aarch64::Relocatable_size_for_reloc): Remove.
345 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
346 (Target_aarch64::scan_relocs): Likewise.
347 (Target_aarch64::relocate_section): Likewise.
348 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
349 Remove.
350 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
351 (Target_aarch64::relocate_relocs): Use Default_classify_reloc.
352 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
353 template parameter.
354 (Target_arm::emit_relocs_scan): New method.
355 (Target_arm::Relocatable_size_for_reloc): Replace with...
356 (Target_arm::Classify_reloc): ...this.
357 (Target_arm::gc_process_relocs): Use Classify_reloc.
358 (Target_arm::scan_relocs): Likewise.
359 (Target_arm::relocate_section): Likewise.
360 (Target_arm::scan_relocatable_relocs): Likewise.
361 (Target_arm::relocate_relocs): Likewise.
362 * i386.cc (Target_i386::emit_relocs_scan): New method.
363 (Target_i386::Relocatable_size_for_reloc): Replace with...
364 (Target_i386::Classify_reloc): ...this.
365 (Target_i386::gc_process_relocs): Use Classify_reloc.
366 (Target_i386::scan_relocs): Likewise.
367 (Target_i386::relocate_section): Likewise.
368 (Target_i386::scan_relocatable_relocs): Likewise.
369 (Target_i386::relocate_relocs): Likewise.
370 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
371 parameter.
372 (Mips_reloc_types): New class template.
373 (Mips_classify_reloc): New class template.
374 (Target_mips::Reltype): New typedef.
375 (Target_mips::Relatype): New typedef.
376 (Target_mips::emit_relocs_scan): New method.
377 (Target_mips::get_r_sym): New method.
378 (Target_mips::Relocatable_size_for_reloc): Replace with
379 Mips_classify_reloc.
380 (Target_mips::copy_reloc): Use Mips_classify_reloc.
381 (Target_mips::gc_process_relocs): Likewise.
382 (Target_mips::scan_relocs): Likewise.
383 (Target_mips::relocate_section): Likewise.
384 (Target_mips::scan_relocatable_relocs): Likewise.
385 (Target_mips::relocate_relocs): Likewise.
386 (mips_get_size_for_reloc): New function, factored out from
387 Relocatable_size_for_reloc::get_size_for_reloc.
388 (Target_mips::Scan::local): Use Mips_classify_reloc.
389 (Target_mips::Scan::global): Likewise.
390 (Target_mips::Relocate::relocate): Likewise.
391 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
392 (Target_powerpc::Relocatable_size_for_reloc): Remove.
393 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
394 (Target_powerpc::scan_relocs): Likewise.
395 (Target_powerpc::relocate_section): Likewise.
396 (Powerpc_scan_relocatable_reloc): Convert to class template.
397 (Powerpc_scan_relocatable_reloc::Reltype): New typedef.
398 (Powerpc_scan_relocatable_reloc::reloc_size): New const.
399 (Powerpc_scan_relocatable_reloc::sh_type): New const.
400 (Powerpc_scan_relocatable_reloc::get_r_sym): New method.
401 (Powerpc_scan_relocatable_reloc::get_r_type): New method.
402 (Target_powerpc::scan_relocatable_relocs): Use
403 Powerpc_scan_relocatable_reloc.
404 (Target_powerpc::relocate_relocs): Use Default_classify_reloc.
405 * s390.cc (Target_s390::emit_relocs_scan): New method.
406 (Target_s390::Relocatable_size_for_reloc): Remove.
407 (Target_s390::gc_process_relocs): Use Default_classify_reloc.
408 (Target_s390::scan_relocs): Likewise.
409 (Target_s390::relocate_section): Likewise.
410 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
411 Remove.
412 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
413 (Target_s390::relocate_relocs): Use Default_classify_reloc.
414 * sparc.cc (Target_sparc::emit_relocs_scan): New method.
415 (Target_sparc::Relocatable_size_for_reloc): Remove.
416 (Target_sparc::gc_process_relocs): Use Default_classify_reloc.
417 (Target_sparc::scan_relocs): Likewise.
418 (Target_sparc::relocate_section): Likewise.
419 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
420 Remove.
421 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
422 (Target_sparc::relocate_relocs): Use Default_classify_reloc.
423 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
424 (Target_tilegx::Relocatable_size_for_reloc): Remove.
425 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
426 (Target_tilegx::scan_relocs): Likewise.
427 (Target_tilegx::relocate_section): Likewise.
428 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
429 Remove.
430 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
431 (Target_tilegx::relocate_relocs): Use Default_classify_reloc.
432 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
433 (Target_x86_64::Relocatable_size_for_reloc): Remove.
434 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
435 (Target_x86_64::scan_relocs): Likewise.
436 (Target_x86_64::relocate_section): Likewise.
437 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
438 Remove.
439 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
440 (Target_x86_64::relocate_relocs): Use Default_classify_reloc.
441
442 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
443
444 2016-01-01 Alan Modra <amodra@gmail.com>
445
446 Update year range in copyright notice of all files.
447
448 For older changes see ChangeLog-0815
449 \f
450 Copyright (C) 2016 Free Software Foundation, Inc.
451
452 Copying and distribution of this file, with or without modification,
453 are permitted in any medium without royalty provided the copyright
454 notice and this notice are preserved.
455
456 Local Variables:
457 mode: change-log
458 left-margin: 8
459 fill-column: 74
460 version-control: never
461 End:
This page took 0.038267 seconds and 4 git commands to generate.