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