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