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