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