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