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