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