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