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