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