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