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