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