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