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