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