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