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