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