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