PR gold/20529 - relaxing loop never ends.
[deliverable/binutils-gdb.git] / gold / ChangeLog
1 2016-08-26 Han Shen <shenhan@google.com>
2
3 PR gold/20529 - relaxing loop never ends.
4
5 * powerpc.cc (Stub_table::min_size_threshold_): New member to
6 limit size.
7 (Stub_table::set_min_size_threshold): New member function.
8 (Stub_table::set_address_and_size): Add code to only allow size
9 increase.
10 (Target_powerpc::do_relax): Add code to record last size.
11
12 2016-08-23 Roland McGrath <roland@hack.frob.com>
13
14 * options.h (General_options): Grok -z stack-size.
15 * output.h (Output_segment::set_size): New method.
16 * layout.cc (Layout::create_executable_stack_info): Renamed to ...
17 (Layout::create_stack_segment): ... this. Always create the
18 segment if -z stack-size was used.
19 (Layout::set_segment_offsets): Don't call ->set_offset on the
20 PT_GNU_STACK segment.
21
22 2016-08-15 Bharathi Seshadri <bseshadr@cisco.com>
23
24 * options.h (General_options): Add --be8 option.
25 * arm.cc (Arm_relobj::do_relocate_sections): Add code to swap for be8.
26 (Output_data_plt_arm_standard::do_fill_first_plt_entry): Likewise.
27 (Output_data_plt_arm_short::do_fill_plt_entry): Likewise.
28 (Output_data_plt_arm_long::do_fill_plt_entry): Likewise.
29 (Target_arm::do_adjust_elf_header): Do EF_ARM_BE8 adjustment.
30
31 2016-08-17 Cary Coutant <ccoutant@gmail.com>
32
33 * i386.cc (Target_i386): Reset skip_call_tls_get_addr_ after printing
34 error message.
35 * testsuite/Makefile.am (pr20216a): Add missing dependencies.
36 (pr20308a): Add -Bgcctestdir/ to compile rules.
37 * testsuite/Makefile.in: Regenerate.
38
39 2016-08-12 Roland McGrath <roland@hack.frob.com>
40
41 PR gold/20462
42 * script-sections.cc (Script_sections::release_segments):
43 Reset this->segments_created_.
44
45 2016-08-12 Roland McGrath <roland@hack.frob.com>
46
47 * yyscript.y (HIDDEN): New %token.
48 (assignment): Handle HIDDEN(string = expr) syntax.
49 * script.cc (script_keyword_parsecodes): Add HIDDEN.
50
51 2016-08-10 Cary Coutant <ccoutant@gmail.com>
52
53 PR gold/20216
54 * x86_64.cc (Target_x86_64::Relocate::relocate): Add check for
55 R_X86_64_GOTPCREL. Reset skip_call_tls_get_addr_ after printing
56 error message.
57 * testsuite/Makefile.am (pr20216_gd.o): Add -Bgcctestdir/.
58 (pr20216_ld.o): Likewise.
59 * testsuite/Makefile.in: Regenerate.
60
61 2016-08-10 James Clarke <jrtc27@jrtc27.com>
62
63 PR gold/20443
64 * symtab.cc (Symbol_table::add_from_relobj): Handle NULL symbols,
65 which will be present for STT_SPARC_REGISTER.
66 (Symbol_table::add_from_pluginobj): Likewise.
67 (Symbol_table::add_from_dynobj): Likewise.
68 (Symbol_table::add_from_incrobj): Removed dead code.
69
70 2016-08-10 James Clarke <jrtc27@jrtc27.com>
71
72 PR gold/20442
73 * sparc.cc (Target_sparc::Relocate::relocate): R_SPARC_GOTDATA_OP_LOX10
74 should fall back on R_SPARC_GOT10, not R_SPARC_GOT13.
75
76 2016-08-10 James Clarke <jrtc27@jrtc27.com>
77
78 PR gold/20441
79 * sparc.cc (Target_sparc::Scan::check_non_pic): Allow R_SPARC_32 on
80 sparc64.
81
82 2016-06-29 Cary Coutant <ccoutant@gmail.com>
83
84 PR gold/20310
85 * testsuite/dynamic_list.sh: Remove check for _ZdlPv.
86
87 2016-06-29 Cary Coutant <ccoutant@gmail.com>
88
89 * testsuite/Makefile.am (MOSTLYCLEANFILES): Add eh_test_2.
90 * testsuite/Makefile.in: Regenerate.
91
92 2016-06-30 Alan Modra <amodra@gmail.com>
93
94 * testsuite/Makefile.am (memory_test, memory_test_2): Pass
95 -Wl,-z to gcc, not plain -z.
96 * testsuite/Makefile.in: Regenerate.
97
98 2016-06-29 H.J. Lu <hongjiu.lu@intel.com>
99
100 PR gold/20308
101 * i386.cc (Target_i386::Relocate::relocate): Allow
102 R_386_GOT32X relocation against ___tls_get_addr.
103 (Target_i386::Relocate::tls_gd_to_ie): Support indirect
104 call to __tls_get_addr.
105 (Target_i386::Relocate::tls_gd_to_le): Likewise.
106 (Target_i386::Relocate::tls_ld_to_le): Likewise.
107 * testsuite/Makefile.am (check_PROGRAMS): Add pr20308a_test,
108 pr20308b_test, pr20308c_test, pr20308d_test, pr20308e_test.
109 (pr20308a_test_SOURCES): New.
110 (pr20308a_test_DEPENDENCIES): Likewise.
111 (pr20308a_test_CFLAGS): Likewise.
112 (pr20308a_test_LDFLAGS): Likewise.
113 (pr20308a_test_LDADD): Likewise.
114 (pr20308b_test_SOURCES): Likewise.
115 (pr20308b_test_DEPENDENCIES): Likewise.
116 (pr20308b_test_CFLAGS): Likewise.
117 (pr20308b_test_LDFLAGS): Likewise.
118 (pr20308b_test_LDADD): Likewise.
119 (pr20308c_test_SOURCES): Likewise.
120 (pr20308c_test_DEPENDENCIES): Likewise.
121 (pr20308c_test_CFLAGS): Likewise.
122 (pr20308c_test_LDFLAGS): Likewise.
123 (pr20308c_test_LDADD): Likewise.
124 (pr20308d_test_SOURCES): Likewise.
125 (pr20308d_test_DEPENDENCIES): Likewise.
126 (pr20308d_test_CFLAGS): Likewise.
127 (pr20308d_test_LDFLAGS): Likewise.
128 (pr20308d_test_LDADD): Likewise.
129 (pr20308e_test_SOURCES): Likewise.
130 (pr20308e_test_DEPENDENCIES): Likewise.
131 (pr20308e_test_CFLAGS): Likewise.
132 (pr20308e_test_LDFLAGS): Likewise.
133 (pr20308e_test_LDADD): Likewise.
134 (pr20308a.so): Likewise.
135 (pr20308b.so): Likewise.
136 (pr20308_gd.o): Likewise.
137 (pr20308_ld.o): Likewise.
138 (MOSTLYCLEANFILES): Add pr20308a.so pr20308b.so.
139 * testsuite/Makefile.in: Regenerated.
140 * testsuite/pr20308_def.c: New file.
141 * testsuite/pr20308_gd.S: Likewise.
142 * testsuite/pr20308_ld.S: Likewise.
143 * testsuite/pr20308_main.c: Likewise.
144
145 2016-06-29 H.J. Lu <hongjiu.lu@intel.com>
146
147 PR gold/20216
148 * configure.ac (DEFAULT_TARGET_X86_64_OR_X32): New
149 AM_CONDITIONAL.
150 * configure: Regenerated.
151 * x86_64.cc (Target_x86_64<size>::Relocate::relocate): Allow
152 R_X86_64_GOTPCRELX relocation against __tls_get_addr.
153 (Target_x86_64<size>::Relocate::tls_gd_to_ie): Support indirect
154 call to __tls_get_addr.
155 (Target_x86_64<size>::Relocate::tls_gd_to_le): Likewise.
156 (Target_x86_64<size>::Relocate::tls_ld_to_le): Likewise.
157 * testsuite/Makefile.am (check_PROGRAMS): Add pr20216a_test,
158 pr20216b_test, pr20216c_test, pr20216d_test, pr20216e_test.
159 (pr20216a_test_SOURCES): New.
160 (pr20216a_test_DEPENDENCIES): Likewise.
161 (pr20216a_test_CFLAGS): Likewise.
162 (pr20216a_test_LDFLAGS): Likewise.
163 (pr20216a_test_LDADD): Likewise.
164 (pr20216b_test_SOURCES): Likewise.
165 (pr20216b_test_DEPENDENCIES): Likewise.
166 (pr20216b_test_CFLAGS): Likewise.
167 (pr20216b_test_LDFLAGS): Likewise.
168 (pr20216b_test_LDADD): Likewise.
169 (pr20216c_test_SOURCES): Likewise.
170 (pr20216c_test_DEPENDENCIES): Likewise.
171 (pr20216c_test_CFLAGS): Likewise.
172 (pr20216c_test_LDFLAGS): Likewise.
173 (pr20216c_test_LDADD): Likewise.
174 (pr20216d_test_SOURCES): Likewise.
175 (pr20216d_test_DEPENDENCIES): Likewise.
176 (pr20216d_test_CFLAGS): Likewise.
177 (pr20216d_test_LDFLAGS): Likewise.
178 (pr20216d_test_LDADD): Likewise.
179 (pr20216e_test_SOURCES): Likewise.
180 (pr20216e_test_DEPENDENCIES): Likewise.
181 (pr20216e_test_CFLAGS): Likewise.
182 (pr20216e_test_LDFLAGS): Likewise.
183 (pr20216e_test_LDADD): Likewise.
184 (pr20216a.so): Likewise.
185 (pr20216b.so): Likewise.
186 (pr20216_gd.o): Likewise.
187 (pr20216_ld.o): Likewise.
188 (MOSTLYCLEANFILES): Add pr20216a.so pr20216b.so.
189 * testsuite/Makefile.in: Regenerated.
190 * testsuite/pr20216_def.c: New file.
191 * testsuite/pr20216_gd.S: Likewise.
192 * testsuite/pr20216_ld.S: Likewise.
193 * testsuite/pr20216_main.c: Likewise.
194
195 2016-06-29 Alan Modra <amodra@gmail.com>
196
197 * script_test_12.t: Delete .plt, specify 64k page size.
198 * script_test_12i.t: Likewise.
199
200 2016-06-29 Alan Modra <amodra@gmail.com>
201
202 * testsuite/plugin_layout_with_alignment.c: Explicitly align all
203 variables.
204
205 2016-06-29 Alan Modra <amodra@gmail.com>
206
207 * testsuite/Makefile.am (copy_test_protected): Disable for powerpc.
208 * testsuite/Makefile.in: Regenerate.
209
210 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
211
212 * aarch64-reloc.def (NONE): New relocation.
213 * aarch64.cc (Target_aarch64::Scan::local): Handle R_AARCH64_NONE.
214 (Target_aarch64::Scan::global): Likewise.
215 * testsuite/Makefile.am (aarch64_reloc_none): New test.
216 * testsuite/Makefile.in: Regenerate.
217 * testsuite/aarch64_reloc_none.s: New test source file.
218 * testsuite/aarch64_reloc_none.sh: New test script.
219
220 2016-06-28 Sriraman Tallam <tmsriram@google.com>
221
222 * x86_64.cc (Lazy_view): New class.
223 (can_convert_mov_to_lea): Templatize function. Make the function
224 check for appropriate relocation types and use the view parameter
225 to get section contents.
226 (can_convert_callq_to_direct): New function.
227 (Target_x86_64<size>::Scan::global): Refactor.
228 (Target_x86_64<size>::Relocate::relocate): Refactor. Change any indirect
229 call via GOT that can be converted.
230 * testsuite/Makefile.am (x86_64_indirect_call_to_direct.sh): New test.
231 * testsuite/Makefile.in: Regenerate.
232 * testsuite/x86_64_indirect_call_to_direct1.s: New file.
233 * testsuite/x86_64_indirect_jump_to_direct1.s: New file.
234
235 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
236
237 * aarch64.cc (Target_aarch64::Scan::local): Move the call to got_section
238 from the top level to the places of its use.
239
240 2016-06-28 Igor Kudrin <ikudrin@accesssoftek.com>
241
242 PR gold/18098
243 * script-c.h (Sort_wildcard): Add SORT_WILDCARD_BY_INIT_PRIORITY.
244 * script-sections.cc (Input_section_sorter::get_init_priority): New method.
245 (Input_section_sorter::operator()): Handle SORT_WILDCARD_BY_INIT_PRIORITY.
246 (Output_section_element_input::print): Likewise.
247 * script.cc (script_keyword_parsecodes): Add entry SORT_BY_INIT_PRIORITY.
248 * yyscript.y (SORT_BY_INIT_PRIORITY): New token.
249 (wildcard_section): Handle SORT_BY_INIT_PRIORITY.
250
251 * testsuite/Makefile.am (script_test_14): New test.
252 * testsuite/Makefile.in: Regenerate.
253 * testsuite/script_test_14.s: New test source file.
254 * testsuite/script_test_14.sh: New test script.
255 * testsuite/script_test_14.t: New test linker script.
256
257 2016-06-28 James Clarke <jrtc27@jrtc27.com>
258
259 * sparc.cc (Target_sparc::Scan::local): Don't convert R_SPARC_32
260 to R_SPARC_RELATIVE if class is ELFCLASS64.
261 (Target_sparc::Scan::global): Likewise.
262
263 2016-06-23 Cary Coutant <ccoutant@gmail.com>
264 Igor Kudrin <ikudrin@accesssoftek.com>
265
266 PR gold/15370
267 * script-sections.cc
268 (Output_section_element_input::set_section_addresses): Keep bin_count
269 separate from input_pattern_count.
270 * testsuite/script_test_12.t: Add another section .x4.
271 * testsuite/script_test_12i.t: Likewise.
272 * testsuite/script_test_12a.c: Likewise.
273 * testsuite/script_test_12b.c: Likewise.
274
275 2016-06-23 Igor Kudrin <ikudrin@accesssoftek.com>
276
277 * gold-threads.cc (impl_threads::Lock_impl_threads): Fix typos.
278
279 2016-06-22 H.J. Lu <hongjiu.lu@intel.com>
280
281 PR ld/20283
282 * NEWS: Mention --enable-relro.
283 * configure.ac: Add --enable-relro.
284 (DEFAULT_LD_Z_RELRO): New. Set by --enable-relro and default
285 to 1.
286 * config.in: Regenerated.
287 * configure: Likewise.
288 * options.h (General_options::relro): Default to
289 DEFAULT_LD_Z_RELRO.
290
291 2016-06-20 Cary Coutant <ccoutant@gmail.com>
292
293 * NEWS: Add new features in 1.12.
294 * version.cc (version_string): Bump to 1.12.
295
296 2016-06-20 H.J. Lu <hongjiu.lu@intel.com>
297
298 PR gold/20245
299 * i386.cc (Target_i386::first_plt_entry_offset): Return 0 if
300 plt_ is NULL.
301 (Target_i386::plt_entry_size): Likewise.
302 (Target_x86_64<size>::first_plt_entry_offset): Likewise.
303 (Target_x86_64<size>::plt_entry_size): Likewise.
304
305 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
306
307 * mips.cc (Target_mips::Target_mips): Initialize rld_map_.
308 (Target_mips::rld_map_): New data member.
309 (Target_mips::do_finalize_sections): Add support for
310 DT_MIPS_RLD_MAP and DT_MIPS_RLD_MAP_REL dynamic tags,
311 .rld_map section, and __RLD_MAP symbol.
312 (Target_mips::do_dynamic_tag_custom_value): Add support for
313 DT_MIPS_RLD_MAP_REL dynamic tag.
314 * output.cc (Output_data_dynamic::get_entry_offset): New method
315 definition.
316 * output.h (Output_data_dynamic::get_entry_offset): New method
317 declaration.
318
319 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
320
321 * mips.cc (Mips_relocate_functions::relpc16): Add unaligned check.
322
323 2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
324
325 * mips.cc (relocation_needs_la25_stub): Add support for relocs:
326 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
327 (hi16_reloc): Add support for R_MIPS_PCHI16 relocation.
328 (is_matching_lo16_reloc): Likewise.
329 (lo16_reloc): Add support for R_MIPS_PCLO16 relocation.
330 (Mips_output_data_plt::plt_entry_r6): New static data member for
331 R6 PLT entry.
332 (Target_mips::is_output_r6): New method.
333 (Target_mips::Mips_mach): Add new enum constants.
334 (Mips_relocate_functions::Status): Likewise.
335 (Mips_relocate_functions::pchi16_relocs): New static data member.
336 (Mips_relocate_functions::relpc21): New method.
337 (Mips_relocate_functions::relpc26): Likewise.
338 (Mips_relocate_functions::relpc18): Likewise.
339 (Mips_relocate_functions::relpc19): Likewise.
340 (Mips_relocate_functions::relpchi16): Likewise.
341 (Mips_relocate_functions::do_relpchi16): Likewise.
342 (Mips_relocate_functions::relpclo16): Likewise.
343 (Mips_output_data_plt::do_write): Add support for Mips r6 plt
344 entry.
345 (Target_mips::mips_32bit_flags): Add E_MIPS_ARCH_32R6 support.
346 (Target_mips::elf_mips_mach): Add E_MIPS_ARCH_32R6 and
347 E_MIPS_ARCH_64R6 support.
348 (Target_mips::update_abiflags_isa): Likewise.
349 (mips_get_size_for_reloc): Add support for relocs: R_MIPS_PCHI16,
350 R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3 and
351 R_MIPS_PC19_S2.
352 (Target_mips::Scan::local): Add support for relocs: R_MIPS_PCHI16
353 and R_MIPS_PCLO16.
354 (Target_mips::Scan::global): Add support for relocs:
355 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
356 (Target_mips::Relocate::relocate): Call functions for resolving
357 Mips32r6 and Mips64r6 relocations, and print error message for
358 STATUS_PCREL_UNALIGNED.
359 (Target_mips::Scan::get_reference_flags): Add support for relocs:
360 R_MIPS_PCHI16, R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2,
361 R_MIPS_PC18_S3 and R_MIPS_PC19_S2.
362 (Target_mips::elf_mips_mach_name): Add E_MIPS_ARCH_32R6 and
363 E_MIPS_ARCH_64R6 support.
364
365 2016-06-13 H.J. Lu <hongjiu.lu@intel.com>
366
367 PR gold/20246
368 * testsuite/script_test_2.t: Add .got.plt after .got.
369
370 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
371
372 * mips.cc (struct Mips_abiflags): New struct.
373 (Mips_relobj::Mips_relobj): Initialize attributes_section_data_
374 and abiflags_.
375 (Mips_relobj::~Mips_relobj): Delete object pointed by
376 attributes_section_data_.
377 (Mips_relobj::abiflags): New method.
378 (Mips_relobj::attributes_section_data): Likewise.
379 (Mips_relobj::attributes_section_data_): New data member.
380 (Mips_relobj::abiflags_): Likewise.
381 (class Mips_output_section_abiflags): New class.
382 (Target_mips::Target_mips): Initialize attributes_section_data_,
383 abiflags_ and has_abiflags_section_.
384 (Target_mips::do_should_include_section): Don't emit input
385 .MIPS.abiflags sections to output .MIPS.abiflags.
386 (Target_mips::Mips_mach): Add new enum constants.
387 (Target_mips::mips_isa_ext_mach): New method.
388 (Target_mips::mips_isa_ext): Likewise.
389 (Target_mips::update_abiflags_isa): Likewise.
390 (Target_mips::infer_abiflags): Likewise.
391 (Target_mips::create_abiflags): Likewise.
392 (Target_mips::fp_abi_string): Likewise.
393 (Target_mips::select_fp_abi): Likewise.
394 (Target_mips::merge_obj_attributes): Likewise.
395 (Target_mips::merge_obj_abiflags): Likewise.
396 (Target_mips::level_rev): Likewise.
397 (Target_mips::merge_obj_e_flags): Rename from
398 merge_processor_specific_flags. Remove dyn_obj argument,
399 call update_abiflags_isa when needed, compare NaN encodings and
400 compare FP64 state.
401 (Target_mips::add_machine_extensions): Add two machine extensions
402 and fix one.
403 (Target_mips::attributes_section_data_): New data member.
404 (Target_mips::abiflags_): Likewise.
405 (Target_mips::has_abiflags_section_): Likewise.
406 (Mips_relobj::do_read_symbols): Read .gnu.attributes and
407 .MIPS.abiflags sections if they exists.
408 (Target_mips::elf_mips_mach): Add E_MIPS_MACH_5900 and
409 E_MIPS_MACH_OCTEON3 support.
410 (Target_mips::do_adjust_elf_header): Setup EI_ABIVERSION flag.
411 (Target_mips::do_finalize_sections): Merge .gnu.attributes and
412 .MIPS.abiflags sections from input. Create these sections if
413 needed.
414 (Target_mips::elf_mips_mach_name): Add E_MIPS_MACH_5900 and
415 E_MIPS_MACH_OCTEON3 support, and change strings for
416 E_MIPS_MACH_LS2E, E_MIPS_MACH_LS2F and E_MIPS_MACH_LS3A just
417 to match bfd.
418
419 2016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
420
421 * mips.cc (Mips_relobj::Mips_relobj): Initialize
422 has_reginfo_section_.
423 (Mips_relobj::has_reginfo_section_): New data member.
424 (Mips_relobj::has_reginfo_section): New method.
425 (class Mips_output_section_reginfo): Change base class to
426 Output_section_data, and set masks of the output .reginfo section
427 in constructor.
428 (Mips_output_section_reginfo::as_mips_output_section_reginfo):
429 Remove.
430 (Mips_output_section_reginfo::set_masks): Likewise.
431 (Mips_output_section_reginfo::set_final_data_size): Likewise.
432 (Mips_output_section_reginfo::do_print_to_mapfile): New method.
433 (Target_mips::do_make_output_section): Remove.
434 (Mips_relobj::do_read_symbols): Set has_reginfo_section_ to true
435 if the object contains a .reginfo section.
436 (Target_mips::do_finalize_sections): Create a .reginfo output
437 section if needed.
438
439 2016-06-09 Artemiy Volkov <artemiyv@acm.org>
440
441 * mips.cc (Mips_output_data_got::do_write): Add missing template
442 args via typedef.
443
444 2016-05-30 Marcin Koƛcielnicki <koriakin@0x04.net>
445
446 PR/19960
447 * s390.cc (Target_s390::ss_code_st_r14): Removed.
448 (Target_s390::ss_code_l_r14): Removed.
449 (Target_s390::ss_code_ear): Removed.
450 (Target_s390::ss_code_c): Removed.
451 (Target_s390::ss_match_st_r14): New function.
452 (Target_s390::ss_match_l_r14): New function.
453 (Target_s390::ss_match_mcount): Call ss_match_{l,st}_r14 instead
454 of matching code directly.
455 (Target_s390::ss_match_ear): New function.
456 (Target_s390::ss_match_c): New function.
457 (Target_s390::do_calls_non_split): Call ss_match_{ear,c} instead
458 of matching code directly.
459
460 2016-05-19 Cary Coutant <ccoutant@gmail.com>
461
462 PR gold/19823
463 * copy-relocs.cc (Copy_relocs::make_copy_reloc): Add object
464 parameter; check for protected symbol.
465 * copy-relocs.h (Copy_relocs::make_copy_reloc): Add object parameter.
466 * mips.cc (Mips_copy_relocs): Adjust call to make_copy_reloc.
467 * symtab.cc (Symbol::init_fields): Initialize is_protected_.
468 (Symbol_table::add_from_dynobj): Mark protected symbols.
469 * symtab.h (Symbol::is_protected): New method.
470 (Symbol::set_is_protected): New method.
471 (Symbol::is_protected_): New data member.
472
473 * testsuite/Makefile.am (copy_test_protected): New test.
474 * testsuite/Makefile.in: Regenerate.
475 * testsuite/copy_test.cc (main): Add legal reference to protected
476 symbol.
477 * testsuite/copy_test_v1.cc (main): Likewise.
478 * testsuite/copy_test_2.cc (ip): Add protected symbol.
479 * testsuite/copy_test_protected.cc: New test source file.
480 * testsuite/copy_test_protected.sh: New test script.
481
482 2016-05-19 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
483
484 * mips.cc (Mips_got_entry::Mips_got_entry): Remove object argument
485 for global got symbols, and set addend to 0.
486 (Mips_got_entry::hash): Change hash algorithm.
487 (Mips_got_entry::equals): Refactor.
488 (Mips_got_entry::object): Return input object for local got symbols
489 from union d.
490 (Mips_got_entry::addend): Change return of the relocation addend.
491 (Mips_got_entry::addend_): Move from union d.
492 (Mips_got_entry::object_): Move into union d.
493 (class Mips_symbol_hash): New class.
494 (Mips_got_info::Global_got_entry_set): New type.
495 (Mips_got_info::global_got_symbols): Change return type to
496 Global_got_entry_set.
497 (Mips_got_info::global_got_symbols_): Change type to
498 Global_got_entry_set.
499 (Mips_symbol::hash): New method.
500 (Mips_output_data_la25_stub::symbols_): Change type to std::vector.
501 (Mips_output_data_mips_stubs::Mips_stubs_entry_set): New type.
502 (Mips_output_data_mips_stubs::symbols_): Change type to
503 Mips_stubs_entry_set.
504 (Mips_got_info::record_global_got_symbol): Don't pass object
505 argument when creating global got symbol.
506 (Mips_got_info::record_got_entry): Remove find before inserting
507 got entries.
508 (Mips_got_info::add_reloc_only_entries): Change type of iterator
509 to Global_got_entry_set.
510 (Mips_got_info::count_got_symbols): Likewise.
511 (Mips_output_data_la25_stub::create_la25_stub): Use push_back
512 for adding entries to symbols_.
513 (Mips_output_data_la25_stub::do_write): Change type of iterator
514 to std::vector.
515 (Mips_output_data_mips_stubs::set_lazy_stub_offsets): Change type
516 of iterator to Mips_stubs_entry_set.
517 (Mips_output_data_mips_stubs::set_needs_dynsym_value): Likewise.
518 (Mips_output_data_mips_stubs::do_write): Likewise.
519
520 2016-05-06 Han Shen <shenhan@google.com>
521
522 PR gold/19987.
523
524 * aarch64-reloc.def: New relocation type.
525 * aarch64.cc (AArch64_relocate_functions::Page): Changed to public.
526 (Target_aarch64::Scan::local): Add R_AARCH64_LD64_GOTPAGE_LO15.
527 (Target_aarch64::Scan::global): Add R_AARCH64_LD64_GOTPAGE_LO15.
528 (Target_aarch64::Relocate::relocate): Implement R_AARCH64_LD64_GOTPAGE_LO15.
529
530 2016-04-28 Nick Clifton <nickc@redhat.com>
531
532 * po/zh_CN.po: Updated Chinese (simplified) translation.
533
534 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
535
536 * Makefile.in: Regenerated with automake 1.11.6.
537 * aclocal.m4: Likewise.
538 * testsuite/Makefile.in: Likewise.
539
540 2016-03-30 Cary Coutant <ccoutant@gmail.com>
541
542 PR gold/16979
543 * symtab.cc (Symbol_table::define_default_version): Check for case
544 where symbols are both in different shared objects.
545
546 2016-03-27 Cary Coutant <ccoutant@gmail.com>
547
548 PR gold/16111
549 * i386.cc (Target_i386): Add check for fully-resolved symbol for
550 R_386_GOTOFF.
551
552 2016-03-22 Nick Clifton <nickc@redhat.com>
553
554 * configure: Regenerate.
555
556 2016-03-21 Cary Coutant <ccoutant@gmail.com>
557
558 PR gold/19842
559 * errors.cc (Errors::undefined_symbol): Add info message when
560 symbol should have been provided by a plugin.
561 * target-reloc.h (issue_undefined_symbol_error): Check for
562 placeholder symbols defined in discarded sections.
563 * testsuite/Makefile.am (plugin_test_9b): New test case.
564 * testsuite/Makefile.in: Regenerate.
565 * testsuite/plugin_test_9b_elf.cc: New test source file.
566 * testsuite/plugin_test_9b_ir.cc: New test source file.
567
568 2016-03-20 Cary Coutant <ccoutant@gmail.com>
569
570 PR gold/19002
571 * ehframe.cc (Eh_frame::read_fde): Check for dropped functions.
572 * testsuite/Makefile.am (eh_test_2): New test.
573 * testsuite/Makefile.in: Regenerate.
574 * testsuite/eh_test_2.sh: New test script.
575 * testsuite/eh_test_a.cc (bar): Make it comdat.
576 * testsuite/eh_test_b.cc (bar): Add a duplicate copy.
577
578 2016-03-18 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
579
580 * mips.cc (Mips_relobj::is_n64_): Remove.
581 (Target_mips::ei_class_): Likewise.
582 (Mips_relobj::is_newabi): Call methods.
583 (Mips_relobj::is_n64): Change checking for N64 ABI.
584 (Target_mips::is_output_n64): Likewise.
585 (Target_mips::merge_processor_specific_flags): Remove ei_class
586 argument, and remove comparing ei_class.
587 (Target_mips::do_adjust_elf_header): Remove setting EI_CLASS field
588 of the ELF header.
589 (Target_mips::do_finalize_sections): Don't pass ei_class argument
590 to merge_processor_specific_flags.
591 (Target_mips::elf_mips_abi_name): Remove ei_class argument, and
592 change checking for N64 ABI.
593
594 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
595
596 * mips.cc (enum Special_relocation_symbol): New enum type.
597 (is_readonly_section): New function.
598 (eh_reloc): Likewise.
599 (Mips_got_entry::is_section_symbol_): New member.
600 (Mips_got_entry::is_section_symbol): New method.
601 (Mips_got_info::record_local_got_symbol): Add is_section_symbol
602 argument.
603 (Mips_relobj::mips_elf_options_section_name): New method.
604 (Mips_output_data_got::record_local_got_symbol): Add
605 is_section_symbol argument, and pass it to
606 Mips_got_info::record_local_got_symbol.
607 (Mips_output_data_got::got_offset): Add addend argument, and pass
608 it to Relobj::local_got_offset.
609 (struct Mips_output_reloc_writer): New type.
610 (class Mips_output_data_reloc): New class.
611 (Mips_output_data_plt::Reloc_section): Change type to
612 Mips_output_data_reloc.
613 (Target_mips::Reloc_section): Likewise.
614 (Mips_reloc_types::get_r_addend): Remove unsigned from return type.
615 (Mips_classify_reloc::get_r_type2): New method.
616 (Mips_classify_reloc::get_r_type3): Likewise.
617 (Mips_classify_reloc::get_r_ssym): Likewise.
618 (Target_mips::Reloca_section): Remove.
619 (Relocate::should_apply_static_reloc): Rename from
620 should_apply_r_mips_32_reloc.
621 (Target_mips::copy_reloc): Replace Reltype parameter with r_type
622 and r_offset.
623 (Mips_relocate_functions::Valtype): New type.
624 (Mips_relocate_functions::Valtype64): New type.
625 (Mips_relocate_functions::check_overflow): New method.
626 (Mips_relocate_functions::mips_reloc_unshuffle): Move to public
627 interface.
628 (Mips_relocate_functions::mips_reloc_shuffle): Likewise.
629 (Mips_relocate_functions::rel16): Add support for resolving
630 relocations for Mips64.
631 (Mips_relocate_functions::rel32): Likewise.
632 (Mips_relocate_functions::reljalr): Likewise.
633 (Mips_relocate_functions::relpc32): Likewise.
634 (Mips_relocate_functions::rel26): Likewise.
635 (Mips_relocate_functions::relpc16): Likewise.
636 (Mips_relocate_functions::relmicromips_pc7_s1): Likewise.
637 (Mips_relocate_functions::relmicromips_pc10_s1): Likewise.
638 (Mips_relocate_functions::relmicromips_pc16_s1): Likewise.
639 (Mips_relocate_functions::do_relhi16): Likewise.
640 (Mips_relocate_functions::do_relgot16_local): Likewise.
641 (Mips_relocate_functions::rello16): Likewise.
642 (Mips_relocate_functions::relgot): Likewise.
643 (Mips_relocate_functions::relgotpage): Likewise.
644 (Mips_relocate_functions::relgotofst): Likewise.
645 (Mips_relocate_functions::relgot_hi16): Likewise.
646 (Mips_relocate_functions::relgot_lo16): Likewise.
647 (Mips_relocate_functions::relgprel): Likewise.
648 (Mips_relocate_functions::relgprel32): Likewise.
649 (Mips_relocate_functions::tlsrelhi16): Likewise.
650 (Mips_relocate_functions::tlsrello16): Likewise.
651 (Mips_relocate_functions::tlsrel32): Likewise.
652 (Mips_relocate_functions::relsub): Likewise.
653 (Mips_relocate_functions::releh): New method.
654 (Mips_relocate_functions::rel64): Likewise.
655 (Mips_got_info::record_local_got_symbol): Add is_section_symbol and
656 pass it to Mips_got_entry.
657 (Mips_got_info::add_local_entries): Pass addend argument
658 to code functions, and for STT_SECTION symbols call
659 add_symbolless_local_addend.
660 (Mips_got_info::add_tls_entries): Pass addend argument to code
661 functions.
662 (Mips_relobj::do_read_symbols): Read gp value that was used to
663 create object.
664 (Mips_output_data_plt::plt_entry): Remove opcode from l[wd]
665 instruction. Opcode for instruction will be selected later.
666 (Target_mips::gc_process_relocs): Add case for SHT_RELA.
667 (Target_mips::scan_relocatable_relocs): Likewise.
668 (Target_mips::emit_relocs_scan): Likewise.
669 (Target_mips::relocate_relocs): Likewise.
670 (Target_mips::do_finalize_sections): Skip objects for merging
671 processor specific flags in which all input sections will be
672 discarded.
673 (mips_get_size_for_reloc): Add case for R_MIPS_EH.
674 (Target_mips::Scan::get_reference_flags): Likewise.
675 (Target_mips::relocate_special_relocatable): Call rel26 method with
676 calculate_only and calculated_value arguments.
677 (Target_mips::Scan::local): Add case for R_MIPS_EH. Don't create a
678 dynamic relocation against a readonly sections, and pass
679 is_section_symbol to Mips_got_info::record_local_got_symbol.
680 (Target_mips::Scan::global): Add case for R_MIPS_EH. Don't create a
681 dynamic relocation against a readonly sections, and pass r_type
682 and r_offset to Target_mips::copy_reloc.
683 (Target_mips::Relocate::relocate): Add support for resolving
684 relocations for Mips64.
685 (Target_mips::mips_info): Add case for Mips64 default dynamic
686 linker name.
687 (Target_selector_mips): Correct emulation names.
688
689 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
690
691 * mips.cc (class Mips_output_data_la25_stub): Add
692 do_print_to_mapfile function.
693
694 2016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
695
696 * mips.cc (Mips_classify_reloc::put_r_info): Call 32bit version of
697 elf_r_info.
698
699 2016-03-09 H.J. Lu <hongjiu.lu@intel.com>
700
701 * testsuite/plugin_layout_with_alignment.cc: Renamed to ..
702 * testsuite/plugin_layout_with_alignment.c: This.
703 * testsuite/Makefile.am (plugin_layout_with_alignment.o): Updated.
704 (plugin_layout_with_alignment): Likewise.
705 * testsuite/Makefile.in: Regenerated.
706
707 2016-03-08 Cary Coutant <ccoutant@gmail.com>
708
709 PR 19751
710 * testsuite/Makefile.am (retain_symbols_file_test): Remove check
711 for constructor.
712 * testsuite/Makefile.in: Regenerate.
713 * testsuite/dynamic_list.sh: Likewise.
714 * testsuite/retain_symbols_file_test.sh: Likewise.
715
716 2016-03-08 Cary Coutant <ccoutant@gmail.com>
717
718 PR 19751
719 * arm.cc (Reloc_stub::Key::name): Add unused attribute.
720 * dirsearch.cc (Dir_caches::~Dir_caches): Likewise.
721
722 2016-03-08 Cary Coutant <ccoutant@gmail.com>
723 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com>
724
725 * output.cc (Output_reloc_writer): New type.
726 (Output_data_reloc_base::do_write): Move implementation to template
727 in output.h and replace with invocation of template.
728 * output.h (Output_file): Move to top of file.
729 (Output_reloc::get_symbol_index): Move to public interface.
730 (Output_reloc::get_address): Likewise.
731 (Output_data_reloc_base::do_write_generic): New function template.
732
733 2016-03-04 Cary Coutant <ccoutant@gmail.com>
734
735 PR gold/19019
736 PR gold/19763
737 * symtab.cc: Instantiate Sized_symbol::init_constant and
738 Sized_symbol::init_undefined.
739
740 2016-03-03 Cary Coutant <ccoutant@gmail.com>
741
742 PR gold/19019
743 * layout.h (Layout::add_target_specific_dynamic_tag): New function.
744 * layout.cc (Layout::add_target_specific_dynamic_tag): New function.
745 * mips.cc (Target_mips::make_symbol): Adjust function signature.
746 * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_.
747 (Target_sparc::do_is_defined_by_abi): Remove test for
748 STT_SPARC_REGISTER.
749 (Target_sparc::Register_symbol): New struct type.
750 (Target_sparc::register_syms_): New data member.
751 (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true.
752 (Target_sparc::make_symbol): New function.
753 (Target_sparc::do_finalize_sections): Add register symbols and new
754 dynamic table entries.
755 * symtab.h (Sized_symbol::init_undefined): Add value parameter.
756 (Symbol_table::add_target_global_symbol): New function.
757 (Symbol_table::target_symbols_): New data member.
758 * symtab.cc (Sized_symbol::init_undefined): Add value parameter.
759 (Symbol_table::Symbol_table): Initialize target_symbols_.
760 (Symbol_table::add_from_object): Pass additional parameters to
761 Target::make_symbol.
762 (Symbol_table::define_special_symbol): Likewise.
763 (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for
764 undefined symbol value.
765 (Symbol_table::set_dynsym_indexes): Process target-specific symbols.
766 (Symbol_table::sized_finalize): Likewise.
767 (Symbol_table::sized_write_globals): Likewise.
768 * target.h (Sized_target::make_symbol): Add name, st_type, object,
769 st_shndx, and value parameters.
770
771 2016-03-03 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
772
773 * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and
774 LDPK_WEAKUNDEF symbols.
775
776 2016-03-03 Than McIntosh <thanm@google.com>
777
778 * plugin.cc (Plugin::load): Include hooks for get_input_section_size
779 and get_input_section_alignment in transfer vector.
780 (get_input_section_alignment): New function.
781 (get_input_section_size): New function.
782 * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test.
783 * testsuite/Makefile.in: [Regenerate.]
784 * testsuite/plugin_section_alignment.cc: New test file.
785 * testsuite/plugin_layout_with_alignment.cc: New test file.
786 * testsuite/plugin_layout_with_alignment.sh: New test file.
787
788 2016-03-03 Evgenii Stepanov <eugenis@google.com>
789
790 * plugin.h (Pluginobj::get_symbol_resolution_info): Add version
791 parameter.
792 * plugin.cc (get_symbols_v3): New function.
793 (Plugin::load): Add LDPT_GET_SYMBOLS_V3.
794 (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using
795 new version.
796
797 2016-02-26 Egor Kochetov <egor.kochetov@intel.com>
798 Cary Coutant <ccoutant@gmail.com>
799
800 PR gold/19735
801 * ehframe.h (Cie::fde_encoding): New method.
802 * ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length
803 address ranges.
804
805 2016-02-15 H.J. Lu <hongjiu.lu@intel.com>
806
807 * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
808 -mrelax-relocations=yes to $(TEST_AS).
809 (x86_64_mov_to_lea6.o): Likewise.
810 (x86_64_overflow_pc32.o): Remove duplicated target.
811 * testsuite/Makefile.in: Regenerated.
812
813 2016-02-15 Marcin Koƛcielnicki <koriakin@0x04.net>
814
815 * s390.cc (Target_s390::match_view_u): New helper method.
816 (Target_s390::do_is_call_to_non_split): New method.
817 (Target_s390::ss_code_st_r14): New const.
818 (Target_s390::ss_code_l_r14): New const.
819 (Target_s390::ss_code_bras_8): New const.
820 (Target_s390::ss_code_l_basr): New const.
821 (Target_s390::ss_code_a_basr): New const.
822 (Target_s390::ss_code_ear): New const.
823 (Target_s390::ss_code_c): New const.
824 (Target_s390::ss_code_larl): New const.
825 (Target_s390::ss_code_brasl): New const.
826 (Target_s390::ss_code_jg): New const.
827 (Target_s390::ss_code_jgl): New const.
828 (Target_s390::ss_match_mcount): New helper method.
829 (Target_s390::ss_match_l): New helper method.
830 (Target_s390::ss_match_ahi): New helper method.
831 (Target_s390::ss_match_alfi): New helper method.
832 (Target_s390::ss_match_cr): New helper method.
833 (Target_s390::do_calls_non_split): New method.
834 * testsuite/Makefile.am: Added new tests.
835 * testsuite/Makefile.in: Regenerate.
836 * testsuite/split_s390.sh: New test.
837 * testsuite/split_s390_1_a1.s: New test.
838 * testsuite/split_s390_1_a2.s: New test.
839 * testsuite/split_s390_1_n1.s: New test.
840 * testsuite/split_s390_1_n2.s: New test.
841 * testsuite/split_s390_1_z1.s: New test.
842 * testsuite/split_s390_1_z2.s: New test.
843 * testsuite/split_s390_1_z3.s: New test.
844 * testsuite/split_s390_1_z4.s: New test.
845 * testsuite/split_s390_2_ns.s: New test.
846 * testsuite/split_s390_2_s.s: New test.
847 * testsuite/split_s390x_1_a1.s: New test.
848 * testsuite/split_s390x_1_a2.s: New test.
849 * testsuite/split_s390x_1_n1.s: New test.
850 * testsuite/split_s390x_1_n2.s: New test.
851 * testsuite/split_s390x_1_z1.s: New test.
852 * testsuite/split_s390x_1_z2.s: New test.
853 * testsuite/split_s390x_1_z3.s: New test.
854 * testsuite/split_s390x_1_z4.s: New test.
855 * testsuite/split_s390x_2_ns.s: New test.
856 * testsuite/split_s390x_2_s.s: New test.
857
858 2016-02-11 Rahul Chaudhry <rahulchaudhry@google.com>
859
860 * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove
861 info message for every erratum 843419 found and fixed.
862
863 2016-02-07 Cary Coutant <ccoutant@gmail.com>
864
865 PR gold/18695
866 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional
867 information to relocation overflow errors.
868
869 2016-02-06 Cary Coutant <ccoutant@gmail.com>
870
871 PR gold/18695
872 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32
873 overflow checking when symbol value + addend < 0.
874
875 2016-02-06 Cary Coutant <ccoutant@gmail.com>
876
877 PR gold/19577
878 * reloc.h (Limits): New class.
879 (Bits::has_overflow32): Use min/max values from Limits.
880 (Bits::has_unsigned_overflow32): Likewise.
881 (Bits::has_signed_unsigned_overflow32): Likewise.
882 (Bits::has_overflow): Likewise.
883 (Bits::has_unsigned_overflow): Likewise.
884 (Bits::has_signed_unsigned_overflow64): Likewise.
885
886 2016-02-06 Cary Coutant <ccoutant@gmail.com>
887
888 PR gold/19567
889 * reloc.h (Relocate_functions::Overflow_check): Add comments.
890 * x86_64.cc (X86_64_relocate_functions): New class.
891 (Target_x86_64::Relocate::relocate): Use the new class.
892 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option.
893 (x32_overflow_pc32): New test case.
894 * testsuite/Makefile.in: Regenerate.
895 * testsuite/x32_overflow_pc32.sh: New script.
896 * testsuite/x86_64_overflow_pc32.s: Remove .space directive.
897
898 2016-02-06 Cary Coutant <ccoutant@gmail.com>
899
900 PR gold/19577
901 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast.
902 (Bits::has_unsigned_overflow): Remove unnecessary static_cast.
903
904 2016-02-06 Cary Coutant <ccoutant@gmail.com>
905
906 PR gold/19577
907 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed
908 comparison.
909 (Bits::has_unsigned_overflow): Likewise.
910
911 2016-02-06 Marcin Koƛcielnicki <koriakin@0x04.net>
912
913 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
914 parameters.
915 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
916 and view_size to is_call_to_non_split.
917 * target.cc (Target::is_call_to_non_split): Add view and view_size
918 parameters.
919 * target.h (class Target): Likewise.
920
921 2016-02-05 Sriraman Tallam <tmsriram@google.com>
922
923 * icf.cc (get_rel_addend): New function.
924 (get_section_contents): Move merge section addend computation to a
925 new function. Ignore negative values for SHT_REL and SHT_RELA addends.
926 Fix bug to not read past the length of the section.
927
928 2016-02-05 Cary Coutant <ccoutant@gmail.com>
929 Andrew Senkevich <andrew.senkevich@intel.com>
930
931 PR gold/18695
932 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow
933 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and
934 R_X86_64_PLT32.
935 * testsuite/Makefile.am (x86_64_overflow_pc32): New test.
936 * testsuite/x86_64_overflow_pc32.sh: New test script.
937 * testsuite/x86_64_overflow_pc32.s: New source file.
938
939 2016-02-05 Cary Coutant <ccoutant@gmail.com>
940
941 PR gold/18695
942 * reloc.h (Relocate_functions::Address): New typedef.
943 (Relocate_functions::Addendtype): New typedef.
944 (Relocate_functions::Overflow_check): New enum type.
945 (Relocate_functions::Reloc_status): New enum type.
946 (Relocate_functions::check_overflow): New function template.
947 (Relocate_functions::rel): Add check parameter; check for overflow.
948 (Relocate_functions::rel_unaligned): Likewise.
949 (Relocate_functions::rela): Likewise.
950 (Relocate_functions::pcrel): Likewise.
951 (Relocate_functions::pcrel_unaligned): Likewise.
952 (Relocate_functions::pcrela): Likewise.
953 (Relocate_functions::rel8): Adjust parameter types.
954 (Relocate_functions::rela8): Likewise.
955 (Relocate_functions::pcrel8): Likewise.
956 (Relocate_functions::pcrela8): Likewise.
957 (Relocate_functions::rel16): Likewise.
958 (Relocate_functions::rela168): Likewise.
959 (Relocate_functions::pcrel16): Likewise.
960 (Relocate_functions::pcrela16): Likewise.
961 (Relocate_functions::rel32): Likewise.
962 (Relocate_functions::rel32_unaligned): Likewise.
963 (Relocate_functions::rela32): Likewise.
964 (Relocate_functions::pcrel32): Likewise.
965 (Relocate_functions::pcrel32_unaligned): Likewise.
966 (Relocate_functions::pcrela32): Likewise.
967 (Relocate_functions::rel8_check): New function.
968 (Relocate_functions::rela8_check): New function.
969 (Relocate_functions::pcrel8_check): New function.
970 (Relocate_functions::pcrela8_check): New function.
971 (Relocate_functions::rel16_check): New function.
972 (Relocate_functions::rela168_check): New function.
973 (Relocate_functions::pcrel16_check): New function.
974 (Relocate_functions::pcrela16_check): New function.
975 (Relocate_functions::rel32_check): New function.
976 (Relocate_functions::rel32_unaligned_check): New function.
977 (Relocate_functions::rela32_check): New function.
978 (Relocate_functions::pcrel32_check): New function.
979 (Relocate_functions::pcrel32_unaligned_check): New function.
980 (Relocate_functions::pcrela32_check): New function.
981 (Bits::has_unsigned_overflow32): New function.
982 (Bits::has_unsigned_overflow): New function.
983 * testsuite/Makefile.am (overflow_unittest): New test.
984 * testsuite/Makefile.in: Regenerate.
985 * testsuite/overflow_unittest.cc: New source file.
986
987 2016-02-04 Alan Modra <amodra@gmail.com>
988
989 * powerpc.cc (relocate): Adjust last patch for big-endian.
990
991 2016-02-02 Alan Modra <amodra@gmail.com>
992
993 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
994
995 2016-01-15 Han Shen <shenhan@google.com>
996
997 PR gold/19472 - need pc-relative stubs.
998
999 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
1000 stub type for DSOs and pie executables.
1001
1002 2016-01-12 H.J. Lu <hongjiu.lu@intel.com>
1003
1004 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
1005 'typename'.
1006
1007 2016-01-12 Cary Coutant <ccoutant@gmail.com>
1008
1009 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
1010 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
1011 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
1012 specializations) New method.
1013
1014 2016-01-11 Cary Coutant <ccoutant@gmail.com>
1015
1016 PR gold/19353
1017 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
1018 we have a TLS segment for GD-to-IE optimization.
1019 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
1020 Adjust all calls.
1021 (Target_i386::tls_desc_gd_to_ie): Likewise.
1022 (Target_i386::relocate_tls): Don't insist that we have a TLS segment
1023 for TLSDESC GD-to-IE optimizations.
1024 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
1025 Adjust all calls.
1026 (Target_x86_64::tls_desc_gd_to_ie): Likewise.
1027 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
1028 for TLSDESC GD-to-IE optimizations.
1029
1030 2016-01-11 Cary Coutant <ccoutant@gmail.com>
1031
1032 Refactor gold to enable support for MIPS-64 relocation format.
1033
1034 * gc.h (get_embedded_addend_size): Remove sh_type parameter.
1035 (gc_process_relocs): Remove sh_type template parameter.
1036 Use Classify_reloc to access r_sym, r_type, and r_addend fields.
1037 * object.h (Sized_relobj_file::split_stack_adjust): Add target
1038 parameter.
1039 (Sized_relobj_file::split_stack_adjust_reltype): Likewise.
1040 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
1041 specializations) Remove.
1042 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
1043 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
1044 (Sized_relobj_file::emit_relocs_scan_reltype): Remove.
1045 (Sized_relobj_file::split_stack_adjust): Add target parameter.
1046 Adjust all callers.
1047 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
1048 Target::get_r_sym() to get r_sym field from relocations.
1049 (Track_relocs::next_symndx): Call Target::get_r_sym().
1050 * target-reloc.h (scan_relocs): Remove sh_type template parameter;
1051 add Classify_reloc template parameter. Use for accessing r_sym and
1052 r_type.
1053 (relocate_section): Likewise.
1054 (Default_classify_reloc): New class (renamed and moved from reloc.cc).
1055 (Default_scan_relocatable_relocs): Remove sh_type template parameter.
1056 (Default_scan_relocatable_relocs::Reltype): New typedef.
1057 (Default_scan_relocatable_relocs::reloc_size): New const.
1058 (Default_scan_relocatable_relocs::sh_type): New const.
1059 (Default_scan_relocatable_relocs::get_r_sym): New method.
1060 (Default_scan_relocatable_relocs::get_r_type): New method.
1061 (Default_emit_relocs_strategy): New class.
1062 (scan_relocatable_relocs): Replace sh_type template parameter with
1063 Scan_relocatable_relocs class. Use it to access r_sym and r_type
1064 fields.
1065 (relocate_relocs): Replace sh_type template parameter with
1066 Classify_reloc class. Use it to access r_sym and r_type fields.
1067 * target.h (Target::is_call_to_non_split): Replace r_type parameter
1068 with pointer to relocation. Adjust all callers.
1069 (Target::do_is_call_to_non_split): Likewise.
1070 (Target::emit_relocs_scan): New virtual method.
1071 (Sized_target::get_r_sym): New virtual method.
1072 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
1073 with pointer to relocation.
1074
1075 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
1076 (Target_aarch64::Relocatable_size_for_reloc): Remove.
1077 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
1078 (Target_aarch64::scan_relocs): Likewise.
1079 (Target_aarch64::relocate_section): Likewise.
1080 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
1081 Remove.
1082 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
1083 (Target_aarch64::relocate_relocs): Use Default_classify_reloc.
1084 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
1085 template parameter.
1086 (Target_arm::emit_relocs_scan): New method.
1087 (Target_arm::Relocatable_size_for_reloc): Replace with...
1088 (Target_arm::Classify_reloc): ...this.
1089 (Target_arm::gc_process_relocs): Use Classify_reloc.
1090 (Target_arm::scan_relocs): Likewise.
1091 (Target_arm::relocate_section): Likewise.
1092 (Target_arm::scan_relocatable_relocs): Likewise.
1093 (Target_arm::relocate_relocs): Likewise.
1094 * i386.cc (Target_i386::emit_relocs_scan): New method.
1095 (Target_i386::Relocatable_size_for_reloc): Replace with...
1096 (Target_i386::Classify_reloc): ...this.
1097 (Target_i386::gc_process_relocs): Use Classify_reloc.
1098 (Target_i386::scan_relocs): Likewise.
1099 (Target_i386::relocate_section): Likewise.
1100 (Target_i386::scan_relocatable_relocs): Likewise.
1101 (Target_i386::relocate_relocs): Likewise.
1102 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
1103 parameter.
1104 (Mips_reloc_types): New class template.
1105 (Mips_classify_reloc): New class template.
1106 (Target_mips::Reltype): New typedef.
1107 (Target_mips::Relatype): New typedef.
1108 (Target_mips::emit_relocs_scan): New method.
1109 (Target_mips::get_r_sym): New method.
1110 (Target_mips::Relocatable_size_for_reloc): Replace with
1111 Mips_classify_reloc.
1112 (Target_mips::copy_reloc): Use Mips_classify_reloc.
1113 (Target_mips::gc_process_relocs): Likewise.
1114 (Target_mips::scan_relocs): Likewise.
1115 (Target_mips::relocate_section): Likewise.
1116 (Target_mips::scan_relocatable_relocs): Likewise.
1117 (Target_mips::relocate_relocs): Likewise.
1118 (mips_get_size_for_reloc): New function, factored out from
1119 Relocatable_size_for_reloc::get_size_for_reloc.
1120 (Target_mips::Scan::local): Use Mips_classify_reloc.
1121 (Target_mips::Scan::global): Likewise.
1122 (Target_mips::Relocate::relocate): Likewise.
1123 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
1124 (Target_powerpc::Relocatable_size_for_reloc): Remove.
1125 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
1126 (Target_powerpc::scan_relocs): Likewise.
1127 (Target_powerpc::relocate_section): Likewise.
1128 (Powerpc_scan_relocatable_reloc): Convert to class template.
1129 (Powerpc_scan_relocatable_reloc::Reltype): New typedef.
1130 (Powerpc_scan_relocatable_reloc::reloc_size): New const.
1131 (Powerpc_scan_relocatable_reloc::sh_type): New const.
1132 (Powerpc_scan_relocatable_reloc::get_r_sym): New method.
1133 (Powerpc_scan_relocatable_reloc::get_r_type): New method.
1134 (Target_powerpc::scan_relocatable_relocs): Use
1135 Powerpc_scan_relocatable_reloc.
1136 (Target_powerpc::relocate_relocs): Use Default_classify_reloc.
1137 * s390.cc (Target_s390::emit_relocs_scan): New method.
1138 (Target_s390::Relocatable_size_for_reloc): Remove.
1139 (Target_s390::gc_process_relocs): Use Default_classify_reloc.
1140 (Target_s390::scan_relocs): Likewise.
1141 (Target_s390::relocate_section): Likewise.
1142 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
1143 Remove.
1144 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
1145 (Target_s390::relocate_relocs): Use Default_classify_reloc.
1146 * sparc.cc (Target_sparc::emit_relocs_scan): New method.
1147 (Target_sparc::Relocatable_size_for_reloc): Remove.
1148 (Target_sparc::gc_process_relocs): Use Default_classify_reloc.
1149 (Target_sparc::scan_relocs): Likewise.
1150 (Target_sparc::relocate_section): Likewise.
1151 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
1152 Remove.
1153 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
1154 (Target_sparc::relocate_relocs): Use Default_classify_reloc.
1155 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
1156 (Target_tilegx::Relocatable_size_for_reloc): Remove.
1157 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
1158 (Target_tilegx::scan_relocs): Likewise.
1159 (Target_tilegx::relocate_section): Likewise.
1160 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
1161 Remove.
1162 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
1163 (Target_tilegx::relocate_relocs): Use Default_classify_reloc.
1164 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
1165 (Target_x86_64::Relocatable_size_for_reloc): Remove.
1166 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
1167 (Target_x86_64::scan_relocs): Likewise.
1168 (Target_x86_64::relocate_section): Likewise.
1169 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
1170 Remove.
1171 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
1172 (Target_x86_64::relocate_relocs): Use Default_classify_reloc.
1173
1174 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
1175
1176 2016-01-01 Alan Modra <amodra@gmail.com>
1177
1178 Update year range in copyright notice of all files.
1179
1180 For older changes see ChangeLog-0815
1181 \f
1182 Copyright (C) 2016 Free Software Foundation, Inc.
1183
1184 Copying and distribution of this file, with or without modification,
1185 are permitted in any medium without royalty provided the copyright
1186 notice and this notice are preserved.
1187
1188 Local Variables:
1189 mode: change-log
1190 left-margin: 8
1191 fill-column: 74
1192 version-control: never
1193 End:
This page took 0.055042 seconds and 5 git commands to generate.