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