Add support for ARC instruction relaxation in the assembler.
[deliverable/binutils-gdb.git] / gold / ChangeLog
1 2016-02-07 Cary Coutant <ccoutant@gmail.com>
2
3 PR gold/18695
4 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional
5 information to relocation overflow errors.
6
7 2016-02-06 Cary Coutant <ccoutant@gmail.com>
8
9 PR gold/18695
10 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32
11 overflow checking when symbol value + addend < 0.
12
13 2016-02-06 Cary Coutant <ccoutant@gmail.com>
14
15 PR gold/19577
16 * reloc.h (Limits): New class.
17 (Bits::has_overflow32): Use min/max values from Limits.
18 (Bits::has_unsigned_overflow32): Likewise.
19 (Bits::has_signed_unsigned_overflow32): Likewise.
20 (Bits::has_overflow): Likewise.
21 (Bits::has_unsigned_overflow): Likewise.
22 (Bits::has_signed_unsigned_overflow64): Likewise.
23
24 2016-02-06 Cary Coutant <ccoutant@gmail.com>
25
26 PR gold/19567
27 * reloc.h (Relocate_functions::Overflow_check): Add comments.
28 * x86_64.cc (X86_64_relocate_functions): New class.
29 (Target_x86_64::Relocate::relocate): Use the new class.
30 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option.
31 (x32_overflow_pc32): New test case.
32 * testsuite/Makefile.in: Regenerate.
33 * testsuite/x32_overflow_pc32.sh: New script.
34 * testsuite/x86_64_overflow_pc32.s: Remove .space directive.
35
36 2016-02-06 Cary Coutant <ccoutant@gmail.com>
37
38 PR gold/19577
39 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast.
40 (Bits::has_unsigned_overflow): Remove unnecessary static_cast.
41
42 2016-02-06 Cary Coutant <ccoutant@gmail.com>
43
44 PR gold/19577
45 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed
46 comparison.
47 (Bits::has_unsigned_overflow): Likewise.
48
49 2016-02-06 Marcin Koƛcielnicki <koriakin@0x04.net>
50
51 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
52 parameters.
53 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
54 and view_size to is_call_to_non_split.
55 * target.cc (Target::is_call_to_non_split): Add view and view_size
56 parameters.
57 * target.h (class Target): Likewise.
58
59 2016-02-05 Sriraman Tallam <tmsriram@google.com>
60
61 * icf.cc (get_rel_addend): New function.
62 (get_section_contents): Move merge section addend computation to a
63 new function. Ignore negative values for SHT_REL and SHT_RELA addends.
64 Fix bug to not read past the length of the section.
65
66 2016-02-05 Cary Coutant <ccoutant@gmail.com>
67 Andrew Senkevich <andrew.senkevich@intel.com>
68
69 PR gold/18695
70 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow
71 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and
72 R_X86_64_PLT32.
73 * testsuite/Makefile.am (x86_64_overflow_pc32): New test.
74 * testsuite/x86_64_overflow_pc32.sh: New test script.
75 * testsuite/x86_64_overflow_pc32.s: New source file.
76
77 2016-02-05 Cary Coutant <ccoutant@gmail.com>
78
79 PR gold/18695
80 * reloc.h (Relocate_functions::Address): New typedef.
81 (Relocate_functions::Addendtype): New typedef.
82 (Relocate_functions::Overflow_check): New enum type.
83 (Relocate_functions::Reloc_status): New enum type.
84 (Relocate_functions::check_overflow): New function template.
85 (Relocate_functions::rel): Add check parameter; check for overflow.
86 (Relocate_functions::rel_unaligned): Likewise.
87 (Relocate_functions::rela): Likewise.
88 (Relocate_functions::pcrel): Likewise.
89 (Relocate_functions::pcrel_unaligned): Likewise.
90 (Relocate_functions::pcrela): Likewise.
91 (Relocate_functions::rel8): Adjust parameter types.
92 (Relocate_functions::rela8): Likewise.
93 (Relocate_functions::pcrel8): Likewise.
94 (Relocate_functions::pcrela8): Likewise.
95 (Relocate_functions::rel16): Likewise.
96 (Relocate_functions::rela168): Likewise.
97 (Relocate_functions::pcrel16): Likewise.
98 (Relocate_functions::pcrela16): Likewise.
99 (Relocate_functions::rel32): Likewise.
100 (Relocate_functions::rel32_unaligned): Likewise.
101 (Relocate_functions::rela32): Likewise.
102 (Relocate_functions::pcrel32): Likewise.
103 (Relocate_functions::pcrel32_unaligned): Likewise.
104 (Relocate_functions::pcrela32): Likewise.
105 (Relocate_functions::rel8_check): New function.
106 (Relocate_functions::rela8_check): New function.
107 (Relocate_functions::pcrel8_check): New function.
108 (Relocate_functions::pcrela8_check): New function.
109 (Relocate_functions::rel16_check): New function.
110 (Relocate_functions::rela168_check): New function.
111 (Relocate_functions::pcrel16_check): New function.
112 (Relocate_functions::pcrela16_check): New function.
113 (Relocate_functions::rel32_check): New function.
114 (Relocate_functions::rel32_unaligned_check): New function.
115 (Relocate_functions::rela32_check): New function.
116 (Relocate_functions::pcrel32_check): New function.
117 (Relocate_functions::pcrel32_unaligned_check): New function.
118 (Relocate_functions::pcrela32_check): New function.
119 (Bits::has_unsigned_overflow32): New function.
120 (Bits::has_unsigned_overflow): New function.
121 * testsuite/Makefile.am (overflow_unittest): New test.
122 * testsuite/Makefile.in: Regenerate.
123 * testsuite/overflow_unittest.cc: New source file.
124
125 2016-02-04 Alan Modra <amodra@gmail.com>
126
127 * powerpc.cc (relocate): Adjust last patch for big-endian.
128
129 2016-02-02 Alan Modra <amodra@gmail.com>
130
131 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
132
133 2016-01-15 Han Shen <shenhan@google.com>
134
135 PR gold/19472 - need pc-relative stubs.
136
137 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
138 stub type for DSOs and pie executables.
139
140 2016-01-12 H.J. Lu <hongjiu.lu@intel.com>
141
142 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
143 'typename'.
144
145 2016-01-12 Cary Coutant <ccoutant@gmail.com>
146
147 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
148 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
149 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
150 specializations) New method.
151
152 2016-01-11 Cary Coutant <ccoutant@gmail.com>
153
154 PR gold/19353
155 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
156 we have a TLS segment for GD-to-IE optimization.
157 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
158 Adjust all calls.
159 (Target_i386::tls_desc_gd_to_ie): Likewise.
160 (Target_i386::relocate_tls): Don't insist that we have a TLS segment
161 for TLSDESC GD-to-IE optimizations.
162 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
163 Adjust all calls.
164 (Target_x86_64::tls_desc_gd_to_ie): Likewise.
165 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
166 for TLSDESC GD-to-IE optimizations.
167
168 2016-01-11 Cary Coutant <ccoutant@gmail.com>
169
170 Refactor gold to enable support for MIPS-64 relocation format.
171
172 * gc.h (get_embedded_addend_size): Remove sh_type parameter.
173 (gc_process_relocs): Remove sh_type template parameter.
174 Use Classify_reloc to access r_sym, r_type, and r_addend fields.
175 * object.h (Sized_relobj_file::split_stack_adjust): Add target
176 parameter.
177 (Sized_relobj_file::split_stack_adjust_reltype): Likewise.
178 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
179 specializations) Remove.
180 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
181 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
182 (Sized_relobj_file::emit_relocs_scan_reltype): Remove.
183 (Sized_relobj_file::split_stack_adjust): Add target parameter.
184 Adjust all callers.
185 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
186 Target::get_r_sym() to get r_sym field from relocations.
187 (Track_relocs::next_symndx): Call Target::get_r_sym().
188 * target-reloc.h (scan_relocs): Remove sh_type template parameter;
189 add Classify_reloc template parameter. Use for accessing r_sym and
190 r_type.
191 (relocate_section): Likewise.
192 (Default_classify_reloc): New class (renamed and moved from reloc.cc).
193 (Default_scan_relocatable_relocs): Remove sh_type template parameter.
194 (Default_scan_relocatable_relocs::Reltype): New typedef.
195 (Default_scan_relocatable_relocs::reloc_size): New const.
196 (Default_scan_relocatable_relocs::sh_type): New const.
197 (Default_scan_relocatable_relocs::get_r_sym): New method.
198 (Default_scan_relocatable_relocs::get_r_type): New method.
199 (Default_emit_relocs_strategy): New class.
200 (scan_relocatable_relocs): Replace sh_type template parameter with
201 Scan_relocatable_relocs class. Use it to access r_sym and r_type
202 fields.
203 (relocate_relocs): Replace sh_type template parameter with
204 Classify_reloc class. Use it to access r_sym and r_type fields.
205 * target.h (Target::is_call_to_non_split): Replace r_type parameter
206 with pointer to relocation. Adjust all callers.
207 (Target::do_is_call_to_non_split): Likewise.
208 (Target::emit_relocs_scan): New virtual method.
209 (Sized_target::get_r_sym): New virtual method.
210 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
211 with pointer to relocation.
212
213 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
214 (Target_aarch64::Relocatable_size_for_reloc): Remove.
215 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
216 (Target_aarch64::scan_relocs): Likewise.
217 (Target_aarch64::relocate_section): Likewise.
218 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
219 Remove.
220 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
221 (Target_aarch64::relocate_relocs): Use Default_classify_reloc.
222 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
223 template parameter.
224 (Target_arm::emit_relocs_scan): New method.
225 (Target_arm::Relocatable_size_for_reloc): Replace with...
226 (Target_arm::Classify_reloc): ...this.
227 (Target_arm::gc_process_relocs): Use Classify_reloc.
228 (Target_arm::scan_relocs): Likewise.
229 (Target_arm::relocate_section): Likewise.
230 (Target_arm::scan_relocatable_relocs): Likewise.
231 (Target_arm::relocate_relocs): Likewise.
232 * i386.cc (Target_i386::emit_relocs_scan): New method.
233 (Target_i386::Relocatable_size_for_reloc): Replace with...
234 (Target_i386::Classify_reloc): ...this.
235 (Target_i386::gc_process_relocs): Use Classify_reloc.
236 (Target_i386::scan_relocs): Likewise.
237 (Target_i386::relocate_section): Likewise.
238 (Target_i386::scan_relocatable_relocs): Likewise.
239 (Target_i386::relocate_relocs): Likewise.
240 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
241 parameter.
242 (Mips_reloc_types): New class template.
243 (Mips_classify_reloc): New class template.
244 (Target_mips::Reltype): New typedef.
245 (Target_mips::Relatype): New typedef.
246 (Target_mips::emit_relocs_scan): New method.
247 (Target_mips::get_r_sym): New method.
248 (Target_mips::Relocatable_size_for_reloc): Replace with
249 Mips_classify_reloc.
250 (Target_mips::copy_reloc): Use Mips_classify_reloc.
251 (Target_mips::gc_process_relocs): Likewise.
252 (Target_mips::scan_relocs): Likewise.
253 (Target_mips::relocate_section): Likewise.
254 (Target_mips::scan_relocatable_relocs): Likewise.
255 (Target_mips::relocate_relocs): Likewise.
256 (mips_get_size_for_reloc): New function, factored out from
257 Relocatable_size_for_reloc::get_size_for_reloc.
258 (Target_mips::Scan::local): Use Mips_classify_reloc.
259 (Target_mips::Scan::global): Likewise.
260 (Target_mips::Relocate::relocate): Likewise.
261 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
262 (Target_powerpc::Relocatable_size_for_reloc): Remove.
263 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
264 (Target_powerpc::scan_relocs): Likewise.
265 (Target_powerpc::relocate_section): Likewise.
266 (Powerpc_scan_relocatable_reloc): Convert to class template.
267 (Powerpc_scan_relocatable_reloc::Reltype): New typedef.
268 (Powerpc_scan_relocatable_reloc::reloc_size): New const.
269 (Powerpc_scan_relocatable_reloc::sh_type): New const.
270 (Powerpc_scan_relocatable_reloc::get_r_sym): New method.
271 (Powerpc_scan_relocatable_reloc::get_r_type): New method.
272 (Target_powerpc::scan_relocatable_relocs): Use
273 Powerpc_scan_relocatable_reloc.
274 (Target_powerpc::relocate_relocs): Use Default_classify_reloc.
275 * s390.cc (Target_s390::emit_relocs_scan): New method.
276 (Target_s390::Relocatable_size_for_reloc): Remove.
277 (Target_s390::gc_process_relocs): Use Default_classify_reloc.
278 (Target_s390::scan_relocs): Likewise.
279 (Target_s390::relocate_section): Likewise.
280 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
281 Remove.
282 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
283 (Target_s390::relocate_relocs): Use Default_classify_reloc.
284 * sparc.cc (Target_sparc::emit_relocs_scan): New method.
285 (Target_sparc::Relocatable_size_for_reloc): Remove.
286 (Target_sparc::gc_process_relocs): Use Default_classify_reloc.
287 (Target_sparc::scan_relocs): Likewise.
288 (Target_sparc::relocate_section): Likewise.
289 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
290 Remove.
291 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
292 (Target_sparc::relocate_relocs): Use Default_classify_reloc.
293 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
294 (Target_tilegx::Relocatable_size_for_reloc): Remove.
295 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
296 (Target_tilegx::scan_relocs): Likewise.
297 (Target_tilegx::relocate_section): Likewise.
298 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
299 Remove.
300 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
301 (Target_tilegx::relocate_relocs): Use Default_classify_reloc.
302 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
303 (Target_x86_64::Relocatable_size_for_reloc): Remove.
304 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
305 (Target_x86_64::scan_relocs): Likewise.
306 (Target_x86_64::relocate_section): Likewise.
307 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
308 Remove.
309 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
310 (Target_x86_64::relocate_relocs): Use Default_classify_reloc.
311
312 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
313
314 2016-01-01 Alan Modra <amodra@gmail.com>
315
316 Update year range in copyright notice of all files.
317
318 For older changes see ChangeLog-0815
319 \f
320 Copyright (C) 2016 Free Software Foundation, Inc.
321
322 Copying and distribution of this file, with or without modification,
323 are permitted in any medium without royalty provided the copyright
324 notice and this notice are preserved.
325
326 Local Variables:
327 mode: change-log
328 left-margin: 8
329 fill-column: 74
330 version-control: never
331 End:
This page took 0.039893 seconds and 4 git commands to generate.