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