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