ppc32 use of %x in einfo format, typo fix
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2017-07-11 Alan Modra <amodra@gmail.com>
2
3 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
4
5 2017-07-11 Alan Modra <amodra@gmail.com>
6
7 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
8 instruction" error using _bfd_error_handler, not einfo.
9
10 2017-07-10 Nick Clifton <nickc@redhat.com>
11
12 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
13 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
14
15 2017-07-07 John Baldwin <jhb@FreeBSD.org>
16
17 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
18
19 2017-07-07 Alan Modra <amodra@gmail.com>
20
21 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
22
23 2017-07-07 Alan Modra <amodra@gmail.com>
24
25 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
26 as long long. Move code replacing "ll" with "I64", and simplify.
27
28 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
29
30 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
31 to 1.
32
33 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
34
35 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
36 xtime.
37 (line_info_add_file_name): Likewise.
38 (decode_line_info): Likewise.
39
40 2017-07-04 Tristan Gingold <gingold@adacore.com>
41
42 * version.m4: Bump version to 2.29.51
43 * configure: Regenerate.
44
45 2017-07-04 Jiong Wang <jiong.wang@arm.com>
46
47 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
48 sanity check at the head of this function.
49
50 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
51
52 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
53 dwarf_line_str_size.
54 (struct attr_abbrev): Add field implicit_const.
55 (dwarf_debug_sections): Add .debug_line_str.
56 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
57 (dwarf_debug_section_assert): Add static assertion.
58 (read_indirect_line_string): New.
59 (read_abbrevs): Support DW_FORM_implicit_const.
60 (is_str_attr): Support DW_FORM_line_strp.
61 (read_attribute_value): Support DW_FORM_line_strp and
62 DW_FORM_implicit_const.
63 (read_attribute): Support DW_FORM_implicit_const.
64 (line_info_add_include_dir, line_info_add_include_dir_stub):
65 (line_info_add_file_name, read_formatted_entries): New.
66 (decode_line_info, parse_comp_unit): Support DWARF 5.
67 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
68
69 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
70
71 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
72 abort statement that was put for symbols that are not dynamic.
73
74 2017-07-03 Tristan Gingold <gingold@adacore.com>
75
76 * po/bfd.pot: Regenerate
77
78 2017-07-03 Alan Modra <amodra@gmail.com>
79
80 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
81 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
82 * elf.c (setup_group): Use "Lx" to print sh_size.
83 (_bfd_elf_setup_sections): Remove unnecessary cast and print
84 unknown section type in hex.
85 (copy_special_section_fields): Style fix.
86 (bfd_section_from_shdr): Correct format for sh_link. Use a
87 common error message for all the variants of unrecognized
88 section types.
89 (assign_file_positions_for_load_sections): Use "Lx" for lma
90 adjust error message.
91 (assign_file_positions_for_non_load_sections): Formatting.
92 (rewrite_elf_program_header): Formatting. Use "Lx" for
93 bfd_vma values in error messages.
94 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
95 ELF_R_SYM value to type expected by format.
96 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
97 in error messages.
98 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
99 (elf_link_input_bfd): Use "Lx" for r_info.
100 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
101
102 2017-07-03 Alan Modra <amodra@gmail.com>
103
104 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
105 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
106 Microsoft C library variant of long long format specifier.
107 (PRINT20): Cast value to bfd_uint64_t not long long.
108 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
109 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
110 long long. Don't cast to bfd_vma.
111 * elf32-score.c (score3_bfd_getl48): Likewise.
112 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
113
114 2017-07-03 Alan Modra <amodra@gmail.com>
115
116 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
117 print d_tag.
118 (bfd_elf_print_symbol): Don't cast symbol->flags.
119 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
120 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
121 _bfd_error_handler argument order.
122 (ppc_elf_merge_private_bfd_data): Don't cast flags.
123
124 2017-07-03 Alan Modra <amodra@gmail.com>
125
126 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
127 AC_TYPE_LONG_DOUBLE.
128 * configure: Regenerate.
129 * config.in: Regenerate.
130
131 2017-06-29 Andrew Waterman <andrew@sifive.com>
132
133 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
134 relocs.
135
136 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
137
138 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
139 unless it is undefined weak.
140 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
141 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
142 relocation.
143 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
144 is not dynamic in PIC, abort.
145
146 2017-06-29 Jiong Wang <jiong.wang@arm.com>
147
148 PR ld/21402
149 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
150 undefined weak symbols into dynamic.
151 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
152 relocation for non-dynamic symbols.
153 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
154
155 2017-06-29 Jiong Wang <jiong.wang@arm.com>
156
157 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
158 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
159 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
160 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
161 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
162 support for them.
163
164 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
165
166 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
167 (elfcore_write_s390_gs_bc): Likewise.
168 * elf.c (elfcore_grok_s390_gs_cb): New function.
169 (elfcore_grok_s390_gs_bc): New function.
170 (elfcore_grok_note): Call them.
171 (elfcore_write_s390_gs_cb): New function.
172 (elfcore_write_s390_gs_bc): New function.
173 (elfcore_write_register_note): Call them.
174
175 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
176
177 * libbfd.c (_bfd_generic_get_section_contents): Don't call
178 bfd_get_file_size. Check archive element size.
179 (_bfd_generic_get_section_contents_in_window): Likewise.
180
181 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
182
183 * bfd-in2.h: Regenerated.
184 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
185 (bfd_get_file_size): Likewise.
186
187 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
188 Matthew Fortune <matthew.fortune@imgtec.com>
189
190 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
191 * cpu-mips.c (I_interaptiv_mr2): New enum value.
192 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
193 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
194 case.
195 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
196 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
197 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
198 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
199 `bfd_mach_mips_interaptiv_mr2' entries.
200 * bfd-in2.h: Regenerate.
201
202 2017-06-27 Nick Clifton <nickc@redhat.com>
203
204 * tekhex.c (pass_over): Revert accidental conversion of a local
205 array to a static array.
206
207 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
208
209 PR ld/13402
210 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
211 reloc addend if necessary. Adjust diff only if
212 shrinked_insn_address < end_address.
213
214 2017-06-27 Alan Modra <amodra@gmail.com>
215
216 PR binutils/21665
217 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
218 (_bfd_generic_get_section_contents_in_window): Likewise.
219
220 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
221
222 * elfnn-riscv.c (perform_relocation): Support the new
223 R_RISCV_32_PCREL relocation.
224 (riscv_elf_relocate_section): Likewise.
225 * elfxx-riscv.c (howto_table): Likewise.
226 (riscv_reloc_map): Likewise.
227 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
228 * libbfd.h: Regenerate.
229
230 2017-06-27 Alan Modra <amodra@gmail.com>
231
232 PR binutils/21665
233 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
234 Use unsigned file pointer type, and remove cast.
235 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
236 Add "count", not "sz".
237
238 2017-06-26 Pedro Alves <palves@redhat.com>
239
240 PR binutils/21665
241 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
242 "sz".
243
244 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
245
246 PR binutils/21665
247 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
248 a missing line.
249
250 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
251
252 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
253 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
254 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
255 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
256 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
257
258 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
259
260 PR binutils/21665
261 * compress.c (bfd_get_full_section_contents): Don't check the
262 file size here.
263 * libbfd.c (_bfd_generic_get_section_contents): Check for and
264 reject a section whose size + offset is greater than the size
265 of the entire file.
266 (_bfd_generic_get_section_contents_in_window): Likewise.
267
268 2017-06-26 Nick Clifton <nickc@redhat.com>
269
270 PR binutils/21670
271 * tekhex.c (getvalue): Check for the source pointer exceeding the
272 end pointer before the first byte is read.
273
274 2017-06-26 Nick Clifton <nickc@redhat.com>
275
276 PR binutils/21665
277 * opncls.c (get_build_id): Check that the section is big enough
278 to contain the whole note.
279 * compress.c (bfd_get_full_section_contents): Check for and reject
280 a section whose size is greater than the size of the entire file.
281 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
282 contain a notes section.
283
284 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
285
286 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
287 pointer checks.
288 (elf_s390_modify_segment_map): Likewise.
289 (bfd_elf_s390_set_options): Lisewise.
290
291 2017-06-26 Alan Modra <amodra@gmail.com>
292
293 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
294 a --just-syms bfd.
295 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
296 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
297 .preinit_array on --just-syms bfds.
298 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
299 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
300 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
301
302 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
303
304 * elf.c (find_link): Bounds check "hint".
305
306 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
307
308 * elf32-arm.c (using_thumb_only): Update list of architectures in
309 BFD_ASSERT for which the logic is valid.
310 (using_thumb2_bl): Likewise.
311 (using_thumb2): Likewise and return true for ARMv8-R.
312 (arch_has_arm_nop): Likewise.
313 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
314 merging logic. Update commentis for value 15 of v8m_baseline,
315 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
316 merging of value 15 of Tag_CPU_arch.
317
318 2017-06-23 Jiong Wang <jiong.wang@arm.com>
319
320 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
321 BFD_RELOC_AARCH64_ADR_GOT_PAGE
322 * bfd-in2.h: Regenerate.
323
324 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
325
326 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
327 the error_alignment label forward. Properly align program
328 property note section.
329
330 2017-06-22 Eric Christopher <echristo@gmail.com>
331
332 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
333 abs to fix a truncation warning.
334
335 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
336
337 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
338 local undefined weak symbol to 0.
339 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
340
341 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
342
343 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
344 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
345 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
346 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
347 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
348 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
349 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
350 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
351
352 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
353
354 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
355 (elf_i386_lazy_ibt_plt_entry): Likewise.
356 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
357 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
358 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
359 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
360 (elf_i386_lazy_plt_layout): Likewise.
361 (elf_i386_non_lazy_plt_layout): Likewise.
362 (elf_i386_link_hash_entry): Add plt_second.
363 (elf_i386_link_hash_table): Add plt_second and
364 plt_second_eh_frame.
365 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
366 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
367 the second PLT. Check the second PLT.
368 (elf_i386_relocate_section): Use the second PLT to resolve
369 PLT reference if needed.
370 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
371 needed.
372 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
373 second PLT. Generate unwind info for the second PLT.
374 (elf_i386_plt_type): Add plt_second.
375 (elf_i386_get_synthetic_symtab): Support the second PLT.
376 (elf_i386_parse_gnu_properties): Support
377 GNU_PROPERTY_X86_FEATURE_1_AND.
378 (elf_i386_merge_gnu_properties): Support
379 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
380 on GNU_PROPERTY_X86_FEATURE_1_IBT
381 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
382 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
383 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
384 is set on all relocatable inputs.
385 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
386 (elf_x32_lazy_ibt_plt_entry): Likewise.
387 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
388 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
389 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
390 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
391 (elf_x86_64_lazy_ibt_plt): Likewise.
392 (elf_x32_lazy_ibt_plt): Likewise.
393 (elf_x86_64_non_lazy_ibt_plt): Likewise.
394 (elf_x32_non_lazy_ibt_plt): Likewise.
395 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
396 (elf_x86_64_parse_gnu_properties): Support
397 GNU_PROPERTY_X86_FEATURE_1_AND.
398 (elf_x86_64_merge_gnu_properties): Support
399 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
400 on GNU_PROPERTY_X86_FEATURE_1_IBT
401 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
402 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
403 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
404 is set on all relocatable inputs.
405
406 2017-06-22 Nick Clifton <nickc@redhat.com>
407
408 PR binutils/21649
409 * som.c (setup_sections): NUL terminate the space_strings buffer.
410 Check that the space.name field does not index beyond the end of
411 the space_strings buffer.
412
413 2017-06-21 Nick Clifton <nickc@redhat.com>
414
415 PR binutils/21646
416 * coff-sh.c (sh_reloc): Check for an out of range reloc.
417
418 2017-06-21 Nick Clifton <nickc@redhat.com>
419
420 PR binutils/21639
421 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
422 type of the size parameter.
423 (_bfd_vms_save_counted_string): Add second parameter - the maximum
424 length of the counted string.
425 * vms.h (_bfd_vms_save_sized_string): Update prototype.
426 (_bfd_vms_save_counted_string): Likewise.
427 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
428 _bfd_vms_save_counted_string.
429 (_bfd_vms_slurp_ehdr): Likewise.
430 (_bfd_vms_slurp_egsd): Likewise.
431 (Parse_module): Likewise.
432
433 2017-06-21 Alan Modra <amodra@gmail.com>
434
435 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
436 calls before tocsave calls.
437 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
438 following nop.
439
440 2017-06-21 Nick Clifton <nickc@redhat.com>
441
442 PR binutils/21645
443 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
444 bfd_get_full_section_contents returns no contents.
445
446 2017-06-21 Nick Clifton <nickc@redhat.com>
447
448 PR binutils/21638
449 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
450 record.
451
452 2017-06-21 Nick Clifton <nickc@redhat.com>
453
454 PR binutils/21637
455 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
456 list.
457 (image_set_ptr): Likewise.
458 (alpha_vms_fix_sec_rel): Likewise.
459 (alpha_vms_slurp_relocs): Likewise.
460
461 2017-06-21 Nick Clifton <nickc@redhat.com>
462
463 PR binutils/21633
464 * ieee.c (ieee_slurp_sections): Check for a NULL return from
465 read_id.
466 (ieee_archive_p): Likewise.
467 (ieee_object_p): Likewise.
468
469 2017-06-21 Nick Clifton <nickc@redhat.com>
470
471 PR binutils/21640
472 * elf.c (setup_group): Zero the group section pointer list after
473 allocation so that loops can be caught. Check for NULL pointers
474 when processing a group list.
475
476 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
477
478 * elf-s390.h: New file.
479 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
480 field.
481 (elf_s390_additional_program_headers): New function.
482 (elf_s390_modify_segment_map): New function.
483 (bfd_elf_s390_set_options): New function.
484 (elf_backend_additional_program_headers)
485 (elf_backend_modify_segment_map): Add macro definitions.
486
487 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
488
489 PR ld/21626
490 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
491 the DYNAMIC bit instead of bfd_count_sections.
492
493 2017-06-19 Nick Clifton <nickc@redhat.com>
494
495 PR binutils/21618
496 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
497 length.
498 (evax_bfd_print_eeom): Likewise.
499 (evax_bfd_print_egsd): Check for an overlarge record length.
500 (evax_bfd_print_etir): Likewise.
501
502 2017-06-19 Nick Clifton <nickc@redhat.com>
503
504 PR binutils/21612
505 * libieee.h (struct common_header_type): Add end_p field.
506 * ieee.c (this_byte_and_next): Do not advance input_p beyond
507 end_p.
508 (read_id): Check for a length that exceeds the remaining bytes in
509 the input buffer.
510 (ieee_seek): Initialise end_p.
511 (ieee_archive_p): Likewise.
512 (ieee_object_p): Likewise.
513
514 2017-06-19 Nick Clifton <nickc@redhat.com>
515
516 PR binutils/21611
517 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
518 before reading the EIHS structure entries.
519
520 2017-06-19 Nick Clifton <nickc@redhat.com>
521
522 PR binutils/21615
523 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
524 gsd_size. Check that there are enough bytes remaining to read the
525 type and size of the next egsd. Check that the size of the egsd
526 does not exceed the size of the record.
527
528 2017-06-19 Alan Modra <amodra@gmail.com>
529
530 * config.bfd: Correct targ_underscore for cris.
531
532 2017-06-18 Alan Modra <amodra@gmail.com>
533
534 * config.bfd: Correct targ_underscore for epiphany, ip2k,
535 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
536
537 2017-06-16 Nick Clifton <nickc@redhat.com>
538
539 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
540 bucketlist is empty because there are no symbols to add to the
541 list.
542
543 2017-06-16 Alan Modra <amodra@gmail.com>
544
545 PR ld/20022
546 PR ld/21557
547 PR ld/21562
548 PR ld/21571
549 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
550 (BFD_JUMP_TABLE_LINK): Likewise.
551 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
552 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
553 (bfd_elf_define_start_stop): New function.
554 * linker.c (bfd_generic_define_start_stop): New function.
555 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
556 new field.
557 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
558 * aout-target.h (MY_bfd_define_start_stop): Define.
559 * aout-tic30.c (MY_bfd_define_start_stop): Define.
560 * binary.c (binary_bfd_define_start_stop): Define.
561 * bout.c (b_out_bfd_define_start_stop): Define.
562 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
563 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
564 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
565 * coffcode.h (coff_bfd_define_start_stop): Define.
566 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
567 * i386msdos.c (msdos_bfd_define_start_stop): Define.
568 * i386os9k.c (os9k_bfd_define_start_stop): Define.
569 * ieee.c (ieee_bfd_define_start_stop): Define.
570 * ihex.c (ihex_bfd_define_start_stop): Define.
571 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
572 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
573 * mmo.c (mmo_bfd_define_start_stop): Define.
574 * nlm-target.h (nlm_bfd_define_start_stop): Define.
575 * oasys.c (oasys_bfd_define_start_stop): Define.
576 * pef.c (bfd_pef_bfd_define_start_stop): Define.
577 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
578 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
579 * som.c (som_bfd_define_start_stop): Define.
580 * srec.c (srec_bfd_define_start_stop): Define.
581 * tekhex.c (tekhex_bfd_define_start_stop): Define.
582 * versados.c (versados_bfd_define_start_stop): Define.
583 * vms-alpha.c (vms_bfd_define_start_stop): Define.
584 (alpha_vms_bfd_define_start_stop): Define.
585 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
586 * bfd-in2.h: Regenerate.
587 * libbfd.h: Regenerate.
588
589 2017-06-16 Jiong Wang <jiong.wang@arm.com>
590
591 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
592 SYMBOL_REFERENCES_LOCAL.
593
594 2017-06-15 Jiong Wang <jiong.wang@arm.com>
595
596 PR ld/21532
597 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
598 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
599 runtime for if there needs copy relocation elimination.
600 (need_copy_relocation_p): New function. Return true for symbol with
601 pc-relative references and if it's against read-only sections.
602 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
603 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
604 that are related with accessing external objects.
605 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
606 in elfNN_aarch64_check_relocs.
607
608 2017-06-15 Nick Clifton <nickc@redhat.com>
609
610 PR binutils/21582
611 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
612 bugs.
613 PR binutils/21581
614 (ieee_archive_p): Likewise.
615
616 2017-06-15 Nick Clifton <nickc@redhat.com>
617
618 PR binutils/21579
619 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
620
621 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
622
623 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
624 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
625 keep both windowed and call0 ABI PLT definitions.
626 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
627 elf_xtensa_*_plt_entry endex.
628 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
629
630 2017-06-14 Nick Clifton <nickc@redhat.com>
631
632 PR binutils/21578
633 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
634 flag value.
635
636 2017-06-14 Nick Clifton <nickc@redhat.com>
637
638 PR binutils/21589
639 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
640 maximum value for the ascic pointer. Check that name processing
641 does not read beyond this value.
642 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
643 end of etir record.
644
645 2017-06-14 Nick Clifton <nickc@redhat.com>
646
647 PR binutils/21591
648 * versados.c (versados_mkobject): Zero the allocated tdata structure.
649 (process_otr): Check for an invalid offset in the otr structure.
650
651 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
652
653 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
654
655 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
656
657 PR ld/20022
658 PR ld/21557
659 PR ld/21562
660 PR ld/21571
661 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
662 vtable field to a union.
663 (_bfd_elf_is_start_stop): Removed.
664 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
665 __start_SECNAME and __stop_SECNAME symbols.
666 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
667 * elflink.c (_bfd_elf_is_start_stop): Removed.
668 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
669 _bfd_elf_is_start_stop.
670 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
671 __stop_SECNAME symbols. Updated.
672 (elf_gc_smash_unused_vtentry_relocs): Likewise.
673 (bfd_elf_gc_record_vtinherit): Likewise.
674 (bfd_elf_gc_record_vtentry): Likewise.
675
676 2017-06-13 Nick Clifton <nickc@redhat.com>
677
678 PR ld/21524
679 * elflink.c (elf_link_adjust_relocs): Generate an error when
680 encountering a reloc against a symbol removed by garbage
681 collection.
682
683 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
684
685 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
686 to merge_gnu_properties.
687 * elf-properties.c (elf_merge_gnu_properties): Add struct
688 bfd_link_info * and pass it to merge_gnu_properties.
689 (elf_merge_gnu_property_list): Add struct bfd_link_info *
690 and pass it to elf_merge_gnu_properties.
691 (_bfd_elf_link_setup_gnu_properties): Pass info to
692 elf_merge_gnu_property_list.
693 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
694 bfd_link_info *.
695 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
696
697 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
698
699 PR 21564
700 * binary.c (binary_set_section_contents): Scale lma by octets
701 per byte to set filepos.
702
703 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
704
705 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
706 dynamic sections.
707
708 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
709
710 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
711 require TEXTREL.
712
713 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
714
715 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
716 patched section contents for TLS IE reloc.
717 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
718
719 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
720
721 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
722 RELOC_FOR_GLOBAL_SYMBOL macro.
723
724 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
725
726 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
727 changes.
728
729 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
730
731 * config/tc-arc.c (md_undefined_symbol): Changed.
732 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
733
734 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
735
736 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
737 symbols.
738
739 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
740
741 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
742 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
743
744 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
745
746 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
747 object is created.
748
749 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
750
751 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
752 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
753 is non-zero. Add clarifying comments.
754
755 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
756
757 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
758 name. Use local IFUNC symbol name string to report unsupported
759 non-PIC call to IFUNC function.
760 (elf_i386_relocate_section): Dump local IFUNC name with minfo
761 when generating R_386_IRELATIVE relocation.
762 (elf_i386_finish_dynamic_symbol): Likewise.
763 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
764 IFUNC symbol name.
765 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
766 when generating R_X86_64_IRELATIVE relocation.
767 (elf_x86_64_finish_dynamic_symbol): Likewise.
768
769 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
770
771 * elf.c (setup_group): Make sure BFD sections are created for all
772 group sections in the input file when processing SHF_GROUP
773 sections.
774 (bfd_section_from_shdr): Avoid duplicating logic already
775 implemented in `setup_group'.
776
777 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
778
779 PR binutils/21546
780 * peXXigen.c (pe_print_idata): Use the address of the first thunk
781 if the hint address is zero.
782
783 2017-06-06 James Clarke <jrtc27@jrtc27.com>
784
785 PR ld/19579
786 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
787 ELF_COMMON_DEF_P for common symbols.
788
789 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
790
791 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
792 SEC_GROUP sections as SEC_EXCLUDE.
793 (bfd_elf_set_group_contents): Replace use of abort with an assert.
794 (assign_section_numbers): Use resolve_section_groups flag instead
795 of relocatable link type.
796 (_bfd_elf_init_private_section_data): Use resolve_section_groups
797 flag instead of checking the final_link flag for part of the
798 checks in here. Fix white space as a result.
799 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
800 instead of relocatable link type.
801 (bfd_elf_final_link): Likewise.
802
803 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
804
805 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
806 variable `bed'.
807 * elf32-score.c (score_elf_final_link_relocate): Likewise.
808 (s3_bfd_score_elf_check_relocs): Likewise.
809 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
810 (score_elf_final_link_relocate): Likewise.
811 (s7_bfd_score_elf_check_relocs): Likewise.
812
813 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
814
815 * elflink.c (init_reloc_cookie_rels): Remove unused variable
816 `bed'.
817
818 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
819
820 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
821 from `reloc_count' rather than decrementing it.
822 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
823 `reloc_count' by `int_rels_per_ext_rel'.
824 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
825 `reloc_count' by `int_rels_per_ext_rel' for last relocation
826 entry determination.
827 (s3_bfd_score_elf_check_relocs): Likewise.
828 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
829 (s7_bfd_score_elf_relocate_section): Likewise.
830 (s7_bfd_score_elf_check_relocs): Likewise.
831 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
832 prototype and function.
833 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
834 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
835 triple rather than once the sum of REL and RELA relocation entry
836 counts.
837 (bfd_elf64_get_reloc_upper_bound): Remove macro.
838 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
839 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
840 storage allocation size determination.
841 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
842 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
843 by `int_rels_per_ext_rel' for last relocation entry
844 determination.
845 (bfd_elf_final_link): Do not multiply `reloc_count' by
846 `int_rels_per_ext_rel' for internal relocation storage
847 allocation size determination.
848 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
849 `int_rels_per_ext_rel' for last relocation entry determination.
850 (elf_gc_smash_unused_vtentry_relocs): Likewise.
851 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
852 (_bfd_mips_elf_relocate_section): Likewise.
853
854 2017-06-05 Alan Modra <amodra@gmail.com>
855
856 PR 21529
857 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
858
859 2017-06-01 John Baldwin <jhb@FreeBSD.org>
860
861 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
862 determine structure sizes.
863 (elfcore_grok_freebsd_prstatus): Likewise.
864
865 2017-06-01 Alan Modra <amodra@gmail.com>
866
867 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
868 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
869 dynamic objects.
870 (is_elfv2_localentry0): New function.
871 (ppc64_elf_tls_setup): Default params->plt_localentry0.
872 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
873 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
874 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
875 optimized localentry:0 stubs.
876 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
877 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
878 localentry:0 stubs.
879 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
880 DT_PPC64_OPT.
881 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
882
883 2017-05-30 Casey Smith <clegg89@gmail.com>
884
885 PR ld/21523
886 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
887 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
888
889 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
890
891 * cpu-arc.c (arc_compatible): New function.
892
893 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
894
895 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
896
897 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
898
899 PR binutils/21519
900 * bfdio.c (bfd_get_file_size): New function.
901 * bfd-in2.h: Regenerated.
902
903 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
904
905 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
906 comments.
907
908 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
909
910 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
911 dynobj instead of htab->elf.dynobj.
912
913 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
914
915 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
916 and function.
917 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
918 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
919 actual number of internal relocations retrieved. Adjust
920 function description.
921 (bfd_elf64_canonicalize_reloc): Remove macro.
922 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
923
924 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
925
926 * archures.c (bfd_mach_sparc_v9m8): Define.
927 (bfd_mach_sparc_v8plusm8): Likewise.
928 (bfd_mach_sparc_v9_p): Adjust to M8.
929 (bfd_mach_sparc_64bit_p): Likewise.
930 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
931 bfd_mach_sparc_v8plusm8.
932 * bfd-in2.h: Regenerated.
933 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
934 sparc:v8plusm8.
935 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
936 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
937 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
938 SHA3.
939 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
940 bfd_mach_sparc_v8plusm8.
941
942 2017-05-19 Alan Modra <amodra@gmail.com>
943
944 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
945 debug and special sections when no non-note alloc sections in an
946 object are kept.
947
948 2017-05-18 Alan Modra <amodra@gmail.com>
949
950 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
951 * elf-m10300.c: Likewise.
952 * elf.c: Likewise.
953 * elf32-arc.c: Likewise.
954 * elf32-bfin.c: Likewise.
955 * elf32-m68k.c: Likewise.
956 * elf32-nds32.c: Likewise.
957 * elf32-tilepro.c: Likewise.
958 * elflink.c: Likewise.
959 * elfnn-aarch64.c: Likewise.
960 * elfnn-riscv.c: Likewise.
961 * elfxx-tilegx.c: Likewise.
962 * mach-o.c: Likewise.
963 * peXXigen.c: Likewise.
964 * vms-alpha.c: Likewise.
965 * vms-lib.c: Likewise.
966
967 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
968
969 PR ld/20882
970 * elflink.c (elf_gc_mark_debug_section): New function.
971 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
972 referenced by kept debug sections.
973
974 2017-05-16 Alan Modra <amodra@gmail.com>
975
976 * elf-m10300.c: Rename occurrences of non_ir_ref.
977 * elf32-arm.c: Likewise.
978 * elf32-bfin.c: Likewise.
979 * elf32-cr16.c: Likewise.
980 * elf32-cris.c: Likewise.
981 * elf32-d10v.c: Likewise.
982 * elf32-dlx.c: Likewise.
983 * elf32-fr30.c: Likewise.
984 * elf32-frv.c: Likewise.
985 * elf32-hppa.c: Likewise.
986 * elf32-i370.c: Likewise.
987 * elf32-i386.c: Likewise.
988 * elf32-iq2000.c: Likewise.
989 * elf32-lm32.c: Likewise.
990 * elf32-m32c.c: Likewise.
991 * elf32-m32r.c: Likewise.
992 * elf32-m68hc1x.c: Likewise.
993 * elf32-m68k.c: Likewise.
994 * elf32-mcore.c: Likewise.
995 * elf32-metag.c: Likewise.
996 * elf32-microblaze.c: Likewise.
997 * elf32-moxie.c: Likewise.
998 * elf32-msp430.c: Likewise.
999 * elf32-mt.c: Likewise.
1000 * elf32-nios2.c: Likewise.
1001 * elf32-or1k.c: Likewise.
1002 * elf32-ppc.c: Likewise.
1003 * elf32-rl78.c: Likewise.
1004 * elf32-s390.c: Likewise.
1005 * elf32-score.c: Likewise.
1006 * elf32-score7.c: Likewise.
1007 * elf32-sh.c: Likewise.
1008 * elf32-tic6x.c: Likewise.
1009 * elf32-tilepro.c: Likewise.
1010 * elf32-v850.c: Likewise.
1011 * elf32-vax.c: Likewise.
1012 * elf32-xstormy16.c: Likewise.
1013 * elf32-xtensa.c: Likewise.
1014 * elf64-alpha.c: Likewise.
1015 * elf64-hppa.c: Likewise.
1016 * elf64-ia64-vms.c: Likewise.
1017 * elf64-mmix.c: Likewise.
1018 * elf64-ppc.c: Likewise.
1019 * elf64-s390.c: Likewise.
1020 * elf64-sh64.c: Likewise.
1021 * elf64-x86-64.c: Likewise.
1022 * elflink.c: Likewise.
1023 * elfnn-aarch64.c: Likewise.
1024 * elfnn-ia64.c: Likewise.
1025 * elfnn-riscv.c: Likewise.
1026 * elfxx-mips.c: Likewise.
1027 * elfxx-sparc.c: Likewise.
1028 * elfxx-tilegx.c: Likewise.
1029 * linker.c: Likewise.
1030
1031 2017-05-16 Alan Modra <amodra@gmail.com>
1032
1033 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
1034 * elflink.c (elf_link_add_object_symbols): Update to use
1035 non_ir_ref_dynamic.
1036 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
1037 non_ir_ref.
1038 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1039
1040 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
1041
1042 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
1043
1044 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
1045
1046 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
1047 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
1048 properties.
1049 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1050
1051 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1052
1053 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
1054 to plt_second.
1055 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
1056 to plt_second/plt_second_eh_frame.
1057 (elf_x86_64_link_hash_newfunc): Updated.
1058 (elf_x86_64_allocate_dynrelocs): Likewise.
1059 (elf_x86_64_size_dynamic_sections): Likewise.
1060 (elf_x86_64_relocate_section): Likewise.
1061 (elf_x86_64_finish_dynamic_symbol): Likewise.
1062 (elf_x86_64_finish_dynamic_sections): Likewise.
1063 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
1064 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
1065 .plt.sec section.
1066 (elf_backend_setup_gnu_properties): Updated. Create the
1067 .plt.sec section instead of the .plt.sec section.
1068
1069 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1070
1071 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
1072 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
1073 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
1074
1075 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1076
1077 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
1078 (bfd_elf64_set_reloc): Define.
1079 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
1080
1081 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1082
1083 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
1084 (struct bfd_target): New field _bfd_set_reloc.
1085 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
1086 * reloc.c (_bfd_generic_set_reloc): New function.
1087 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
1088 * nlm-target.h (nlm_set_reloc): Likewise.
1089 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
1090 * aout-tic30.c (MY_set_reloc): Likewise.
1091 * aout-target.h (MY_set_reloc): Likewise.
1092 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
1093 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
1094 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
1095 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
1096 * aout-adobe.c (aout_32_set_reloc): Likewise.
1097 * bout.c (b_out_set_reloc): Likewise.
1098 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
1099 * i386os9k.c (aout_32_set_reloc): Likewise.
1100 * ieee.c (ieee_set_reloc): Likewise.
1101 * oasys.c (oasys_set_reloc): Likewise.
1102 * som.c (som_set_reloc): Likewise.
1103 * versados.c (versados_set_reloc): Likewise.
1104 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1105 _bfd_generic_set_reloc.
1106 (rs6000_xcoff64_aix_vec): LIkewise.
1107 * libbfd.c (_bfd_norelocs_set_reloc): New function.
1108 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
1109 * i386msdos.c (msdos_set_reloc): Define to
1110 _bfd_norelocs_set_reloc.
1111 * elfcode.h (elf_set_reloc): Define.
1112 * bfd-in2.h: Regenerated.
1113
1114 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
1115
1116 PR ld/21481
1117 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
1118 for IFUNC function address.
1119
1120 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
1121
1122 * elf32-arc.c (FEATURE_LIST_NAME): Define.
1123 (CONFLICT_LIST): Likewise.
1124 (opcode/arc-attrs.h): Include.
1125 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
1126 (arc_extract_features): New file.
1127 (arc_stralloc): Likewise.
1128 (arc_elf_merge_attributes): Likewise.
1129 (arc_elf_merge_private_bfd_data): Use object attributes.
1130 (bfd_arc_get_mach_from_attributes): New function.
1131 (arc_elf_object_p): Use object attributes.
1132 (arc_elf_final_write_processing): Likewise.
1133 (elf32_arc_obj_attrs_arg_type): New function.
1134 (elf32_arc_obj_attrs_handle_unknown): Likewise.
1135 (elf32_arc_section_from_shdr): Likewise.
1136 (elf_backend_obj_attrs_vendor): Define.
1137 (elf_backend_obj_attrs_section): Likewise.
1138 (elf_backend_obj_attrs_arg_type): Likewise.
1139 (elf_backend_obj_attrs_section_type): Likewise.
1140 (elf_backend_obj_attrs_handle_unknown): Likewise.
1141 (elf_backend_section_from_shdr): Likewise.
1142
1143 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
1144
1145 PR ld/21458
1146 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
1147 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
1148 and the destination is a Thumb symbol.
1149
1150 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1151
1152 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
1153 initializer to silence GCC 4.2.
1154 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1155
1156 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1157
1158 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
1159 (LAZY_PLT_ENTRY_SIZE): This.
1160 (NON_LAZY_PLT_ENTRY_SIZE): New.
1161 (elf_x86_64_plt0_entry): Renamed to ...
1162 (elf_x86_64_lazy_plt0_entry): This.
1163 (elf_x86_64_plt_entry): Renamed to ...
1164 (elf_x86_64_lazy_plt_entry): This.
1165 (elf_x86_64_bnd_plt0_entry): Renamed to ...
1166 (elf_x86_64_lazy_bnd_plt0_entry): This.
1167 (elf_x86_64_legacy_plt_entry): Removed.
1168 (elf_x86_64_bnd_plt_entry): Renamed to ...
1169 (elf_x86_64_lazy_bnd_plt_entry): This.
1170 (elf_x86_64_legacy_plt2_entry): Renamed to ...
1171 (elf_x86_64_non_lazy_plt_entry): This.
1172 (elf_x86_64_bnd_plt2_entry): Renamed to ...
1173 (elf_x86_64_non_lazy_bnd_plt_entry): This.
1174 (elf_x86_64_eh_frame_plt): Renamed to ...
1175 (elf_x86_64_eh_frame_lazy_plt): This.
1176 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
1177 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
1178 (elf_x86_64_eh_frame_plt_got): Renamed to ...
1179 (elf_x86_64_eh_frame_non_lazy_plt): This.
1180 (elf_x86_64_lazy_plt_layout): New.
1181 (elf_x86_64_non_lazy_plt_layout): Likewise.
1182 (elf_x86_64_plt_layout): Likewise.
1183 (elf_x86_64_backend_data): Remove PLT layout information. Add
1184 os for target system.
1185 (GET_PLT_ENTRY_SIZE): Removed.
1186 (elf_x86_64_lazy_plt): New.
1187 (elf_x86_64_non_lazy_plt): Likewise.
1188 (elf_x86_64_lazy_bnd_plt): Likewise.
1189 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1190 (elf_x86-64_arch_bed): Updated.
1191 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1192 (elf_x86_64_create_dynamic_sections): Removed.
1193 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
1194 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1195 (elf_x86-64_adjust_dynamic_symbol): Updated.
1196 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
1197 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1198 size for PLT0 if there is no PLT0. Get plt_entry_size from
1199 non_lazy_plt for non-lazy PLT entries.
1200 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
1201 from non_lazy_plt for non-lazy PLT entries.
1202 (elf_x86-64_relocate_section): Updated. Properly get PLT index
1203 if there is no PLT0.
1204 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
1205 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
1206 entries with non-lazy PLT layout. Don't fill the second and third
1207 slots in the PLT entry if there is no PLT0.
1208 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
1209 if there is no PLT0. Set sh_entsize on the .plt.got section.
1210 (compare_relocs): New.
1211 (elf_x86_64_plt_type): Likewise.
1212 (elf_x86_64_plt): Likewise.
1213 (elf_x86_64_nacl_plt): New. Forward declaration.
1214 (elf_x86_64_get_plt_sym_val): Removed.
1215 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
1216 against all dynamic relocations.
1217 (elf_x86_64_link_setup_gnu_properties): New function.
1218 (elf_backend_create_dynamic_sections): Updated.
1219 (elf_backend_setup_gnu_properties): New.
1220 (elf_x86_64_nacl_plt): New.
1221 (elf_x86_64_nacl_arch_bed): Updated.
1222
1223 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1224
1225 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
1226 (LAZY_PLT_ENTRY_SIZE): This.
1227 (NON_LAZY_PLT_ENTRY_SIZE): New.
1228 (elf_i386_plt0_entry): Renamed to ...
1229 (elf_i386_lazy_plt0_entry): This.
1230 (elf_i386_plt_entry): Renamed to ...
1231 (elf_i386_lazy_plt_entry): This.
1232 (elf_i386_pic_plt0_entry): Renamed to ...
1233 (elf_i386_pic_lazy_plt0_entry): This.
1234 (elf_i386_pic_plt_entry): Renamed to ...
1235 (elf_i386_pic_lazy_plt_entry): This.
1236 (elf_i386_got_plt_entry): Renamed to ...
1237 (elf_i386_non_lazy_plt_entry): This.
1238 (elf_i386_pic_got_plt_entry): Renamed to ...
1239 (elf_i386_pic_non_lazy_plt_entry): This.
1240 (elf_i386_eh_frame_plt): Renamed to ...
1241 (elf_i386_eh_frame_lazy_plt): This.
1242 (elf_i386_eh_frame_plt_got): Renamed to ...
1243 (elf_i386_eh_frame_non_lazy_plt): This.
1244 (elf_i386_plt_layout): Renamed to ...
1245 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
1246 eh_frame_plt_got_size.
1247 (elf_i386_non_lazy_plt_layout): New.
1248 (elf_i386_plt_layout): Likewise.
1249 (elf_i386_non_lazy_plt): Likewise.
1250 (GET_PLT_ENTRY_SIZE): Removed.
1251 (elf_i386_plt): Renamed to ...
1252 (elf_i386_lazy_plt): This.
1253 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
1254 (elf_i386_arch_bed): Updated.
1255 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1256 (elf_i386_create_dynamic_sections): Removed.
1257 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
1258 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1259 (elf_i386_adjust_dynamic_symbol): Updated.
1260 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
1261 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1262 size for PLT0 if there is no PLT0.
1263 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
1264 output section is discarded only if GOT isn't empty.
1265 (elf_i386_relocate_section): Updated. Properly get PLT index
1266 if there is no PLT0.
1267 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
1268 second and third slots in the PLT entry if there is no PLT0.
1269 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
1270 if there is no PLT0. Set sh_entsize on the .plt.got section.
1271 (elf_i386_nacl_plt): Forward declaration.
1272 (elf_i386_get_plt_sym_val): Removed.
1273 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
1274 against all dynamic relocations.
1275 (elf_i386_link_setup_gnu_properties): New function.
1276 (elf_backend_create_dynamic_sections): Updated.
1277 (elf_backend_setup_gnu_properties): New.
1278 (elf_i386_nacl_plt): Updated.
1279 (elf_i386_nacl_arch_bed): Likewise.
1280 (elf_i386_vxworks_arch_bed): Likewise.
1281
1282 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
1283
1284 * elflink.c (elf_output_implib): Remove executable flag from import
1285 library bfd.
1286 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
1287 library is a relocatable object file.
1288
1289 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1290
1291 PR ld/21404
1292 * elf32-avr.c (avr_should_move_sym): New function.
1293 (avr_should_reduce_sym_size): Likewise.
1294 (avr_should_increase_sym_size): Likewise.
1295 (elf32_avr_relax_delete_bytes): Adjust symbol values
1296 and sizes by calling new functions.
1297
1298 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
1299
1300 * config.bfd (riscv32-*): Enable rv64.
1301
1302 2017-05-02 Alan Modra <amodra@gmail.com>
1303
1304 PR 21384
1305 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
1306 rather than h->root.type == bfd_link_hash_new.
1307 (bfd_elf_record_link_assignment): Similarly, call
1308 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
1309
1310 2017-04-29 Alan Modra <amodra@gmail.com>
1311
1312 PR 21432
1313 * reloc.c (reloc_offset_in_range): New function.
1314 (bfd_perform_relocation, bfd_install_relocation): Use it.
1315 (_bfd_final_link_relocate): Likewise.
1316
1317 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
1318
1319 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
1320 before using .plt.got.
1321 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1322
1323 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1324
1325 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
1326 instead of "+=" to update 0.
1327
1328 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1329
1330 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
1331 .plt.got section here.
1332 (elf_i386_check_relocs): Don't create the .plt.got section.
1333 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
1334 the .plt.got and .plt.bnd sections here.
1335 (elf_x86_64_check_relocs): Don't create the .plt.got nor
1336 .plt.bnd sections.
1337
1338 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1339
1340 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
1341 has_bnd_reloc.
1342 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
1343 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
1344 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
1345 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
1346 has_bnd_reloc.
1347
1348 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1349
1350 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
1351 to return bfd *.
1352 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
1353 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
1354 the first relocatable ELF input with GNU properties.
1355
1356 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1357
1358 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
1359 VxWorks for non-PIC.
1360
1361 2017-04-27 Alan Modra <amodra@gmail.com>
1362
1363 * elf-bfd.h (struct elf_backend_data): Make asection param of
1364 elf_backend_eh_frame_address_size const.
1365 (_bfd_elf_eh_frame_address_size): Likewise.
1366 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
1367 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
1368 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
1369 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
1370 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
1371 (next_cie_fde_offset): Constify params.
1372 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
1373
1374 2017-04-27 Alan Modra <amodra@gmail.com>
1375
1376 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
1377 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
1378 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
1379 aug_data_len.
1380 (offset_adjust): New function.
1381 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
1382 (adjust_eh_frame_local_symbols): Likewise.
1383 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
1384 after changing anything. Return true if anything changed.
1385 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
1386 _bfd_elf_adjust_eh_frame_global_symbol for globals.
1387
1388 2017-04-27 Alan Modra <amodra@gmail.com>
1389
1390 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
1391 when force_local.
1392
1393 2017-04-27 Alan Modra <amodra@gmail.com>
1394
1395 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1396 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
1397 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
1398 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
1399 for undef and undefweak dyn_relocs.
1400 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1401 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
1402 (allocate_got, allocate_dynrelocs): Likewise.
1403 (ppc64_elf_relocate_section): Likewise.
1404
1405 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
1406
1407 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
1408 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
1409 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
1410 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
1411
1412 2017-04-26 Nick Clifton <nickc@redhat.com>
1413
1414 PR binutils/21434
1415 * reloc.c (bfd_perform_relocation): Check for a negative address
1416 in the reloc.
1417
1418 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1419
1420 PR ld/21334
1421 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
1422 member.
1423 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
1424 (elf_backend_always_renumber_dynsyms): Define.
1425 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
1426 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
1427 * elflink.c (bfd_elf_size_dynamic_sections): Also call
1428 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
1429 it.
1430 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1431
1432 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1433
1434 * elflink.c (bfd_elf_size_dynamic_sections): Only call
1435 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
1436 sections have been created.
1437
1438 2017-04-26 Nick Clifton <nickc@redhat.com>
1439
1440 PR binutils/21431
1441 * compress.c (bfd_init_section_compress_status): Check the return
1442 value from bfd_malloc.
1443
1444 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1445
1446 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
1447 no_finish_dynamic_symbol.
1448 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
1449 0.
1450 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
1451 weak symbol, don't make it dynamic.
1452 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
1453 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
1454 relocation for GOT reference.
1455 (elf_x86_64_finish_dynamic_symbol): Abort if
1456 no_finish_dynamic_symbol isn't 0.
1457
1458 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1459
1460 PR ld/21402
1461 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
1462 undefined weak symbol, don't make it dynamic.
1463 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
1464 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1465 relocation for R_386_GOT32.
1466
1467 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1468
1469 PR ld/21425
1470 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
1471
1472 2017-04-23 Alan Modra <amodra@gmail.com>
1473
1474 PR 21414
1475 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
1476 * elf.c (lcomm_sym): New.
1477 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
1478 * bfd-in2.h: Regenerate.
1479
1480 2017-04-23 Alan Modra <amodra@gmail.com>
1481
1482 PR 21412
1483 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
1484 parameters and comment.
1485 (_bfd_elf_get_reloc_section): Delete.
1486 (_bfd_elf_plt_get_reloc_section): Declare.
1487 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
1488 New functions. Don't blindly skip over assumed .rel/.rela prefix.
1489 Extracted from..
1490 (_bfd_elf_get_reloc_section): ..here. Delete.
1491 (assign_section_numbers): Call elf_get_reloc_section.
1492 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
1493 * elfxx-target.h (elf_backend_get_reloc_section): Update.
1494
1495 2017-04-23 Alan Modra <amodra@gmail.com>
1496
1497 PR 21409
1498 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
1499 no symbols.
1500
1501 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1502
1503 PR ld/21402
1504 * elf32-i386.c (elf_i386_link_hash_entry): Add
1505 no_finish_dynamic_symbol.
1506 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
1507 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
1508 symbol, don't make it dynamic in PIE.
1509 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
1510 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1511 relocation for R_386_GOT32
1512 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
1513 isn't 0.
1514
1515 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1516
1517 PR ld/19617
1518 PR ld/21086
1519 * elflink.c (elf_link_add_object_symbols): Require
1520 --no-dynamic-linker with -E/--dynamic-list when creating
1521 dynamic sections.
1522
1523 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1524
1525 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
1526 if forced local.
1527
1528 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1529
1530 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
1531 dynamic symbol sorting.
1532
1533 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
1534
1535 PR ld/21382
1536 * elflink.c (elf_link_add_object_symbols): Preserve
1537 dynamic_ref_after_ir_def when restoring the symbol table for
1538 unneeded dynamic object.
1539
1540 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
1541
1542 PR ld/21401
1543 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
1544 on on undefined IFUNC symbol in the second PLT.
1545
1546 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
1547
1548 * peXXigen.c (pe_print_reloc): Correct chunk_end.
1549
1550 2017-04-19 Alan Modra <amodra@gmail.com>
1551
1552 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
1553 or make dynamic for info->dynamic_undefined_weak 0 and 1.
1554 * elf32-ppc.c:Formatting.
1555 (ensure_undefweak_dynamic): Don't make dynamic when
1556 info->dynamic_undefined_weak is zero.
1557 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1558 info->dynamic_undefined_weak. Discard undef dyn_relocs when
1559 not default visibility. Discard undef and undefweak
1560 dyn_relocs earlier.
1561 (ppc_elf_relocate_section): Adjust to suit.
1562 * elf64-ppc.c: Formatting.
1563 (ensure_undefweak_dynamic): Don't make dynamic when
1564 info->dynamic_undefined_weak is zero.
1565 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1566 info->dynamic_undefined_weak. Discard them earlier.
1567
1568 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
1569
1570 PR ld/21389
1571 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
1572 before generating the version definition section.
1573
1574 2017-04-17 Alan Modra <amodra@gmail.com>
1575
1576 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
1577 state when a regular object file defines a symbol with
1578 incompatible type to that defined by an earlier shared lib.
1579
1580 2017-04-13 Alan Modra <amodra@gmail.com>
1581
1582 * coffcode.h: Wrap some overly long _bfd_error_handler args.
1583 * elf.c: Likewise.
1584 * elf32-arm.c: Likewise.
1585 * elf32-i386.c: Likewise.
1586 * elf32-mep.c: Likewise.
1587 * elf64-ia64-vms.c: Likewise.
1588 * elf64-x86-64.c: Likewise.
1589 * elflink.c: Likewise.
1590 * elfnn-ia64.c: Likewise.
1591 * elfxx-mips.c: Likewise.
1592
1593 2017-04-13 Alan Modra <amodra@gmail.com>
1594
1595 * aoutx.h: Use %B and %A in error messages throughout file.
1596 * aout-cris.c: Likewise.
1597 * archive.c: Likewise.
1598 * binary.c: Likewise.
1599 * coff-rs6000.c: Likewise.
1600 * coff-tic4x.c: Likewise.
1601 * coffcode.h: Likewise.
1602 * coffgen.c: Likewise.
1603 * cofflink.c: Likewise.
1604 * coffswap.h: Likewise.
1605 * cpu-arm.c: Likewise.
1606 * elf-eh-frame.c: Likewise.
1607 * elf-m10300.c: Likewise.
1608 * elf.c: Likewise.
1609 * elf32-arc.c: Likewise.
1610 * elf32-arm.c: Likewise.
1611 * elf32-bfin.c: Likewise.
1612 * elf32-frv.c: Likewise.
1613 * elf32-iq2000.c: Likewise.
1614 * elf32-m32c.c: Likewise.
1615 * elf32-microblaze.c: Likewise.
1616 * elf32-nds32.c: Likewise.
1617 * elf32-rl78.c: Likewise.
1618 * elf32-rx.c: Likewise.
1619 * elf32-score.c: Likewise.
1620 * elf32-score7.c: Likewise.
1621 * elf32-sh64.c: Likewise.
1622 * elf32-v850.c: Likewise.
1623 * elf32-vax.c: Likewise.
1624 * elf32-visium.c: Likewise.
1625 * elf64-ia64-vms.c: Likewise.
1626 * elf64-mmix.c: Likewise.
1627 * elf64-sh64.c: Likewise.
1628 * elfcode.h: Likewise.
1629 * elfnn-aarch64.c: Likewise.
1630 * elfnn-ia64.c: Likewise.
1631 * elfxx-mips.c: Likewise.
1632 * hpux-core.c: Likewise.
1633 * ieee.c: Likewise.
1634 * ihex.c: Likewise.
1635 * linker.c: Likewise.
1636 * merge.c: Likewise.
1637 * mmo.c: Likewise.
1638 * oasys.c: Likewise.
1639 * pdp11.c: Likewise.
1640 * peXXigen.c: Likewise.
1641 * rs6000-core.c: Likewise.
1642 * vms-alpha.c: Likewise.
1643 * xcofflink.c: Likewise.
1644
1645 2017-04-13 Alan Modra <amodra@gmail.com>
1646
1647 * bfd.c (PRINT_TYPE): Define.
1648 (_doprnt): New function.
1649 (error_handler_internal): Use _doprnt.
1650 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
1651 calls in their natural order, throughout file.
1652 * coff-mcore.c: Likewise.
1653 * coff-ppc.c: Likewise.
1654 * coff-tic80.c: Likewise.
1655 * cofflink.c: Likewise.
1656 * elf-s390-common.c: Likewise.
1657 * elf.c: Likewise.
1658 * elf32-arm.c: Likewise.
1659 * elf32-i386.c: Likewise.
1660 * elf32-m32r.c: Likewise.
1661 * elf32-msp430.c: Likewise.
1662 * elf32-spu.c: Likewise.
1663 * elf64-ia64-vms.c: Likewise.
1664 * elf64-sparc.c: Likewise.
1665 * elf64-x86-64.c: Likewise.
1666 * elflink.c: Likewise.
1667 * elfnn-aarch64.c: Likewise.
1668 * elfnn-ia64.c: Likewise.
1669 * elfxx-mips.c: Likewise.
1670
1671 2017-04-13 Alan Modra <amodra@gmail.com>
1672
1673 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
1674 branch veneers" error. Fix double space and format message.
1675 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
1676 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
1677
1678 2017-04-13 Alan Modra <amodra@gmail.com>
1679
1680 * bfd-in2.h: Regenerate.
1681
1682 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1683
1684 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
1685 extra `\n' in warning/error messages.
1686 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
1687 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1688
1689 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1690
1691 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
1692 processor-specific properties with generic ELF target vector.
1693
1694 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
1695
1696 * elf32-sparc.c (elf_backend_fixup_symbol): New.
1697 * elf64-sparc.c (elf_backend_fixup_symbol): New.
1698 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1699 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
1700 has_non_got_reloc.
1701 (link_hash_newfunc): Initialize has_got_reloc and
1702 has_non_got_reloc.
1703 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
1704 section.
1705 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
1706 has_non_got_reloc.
1707 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
1708 has_non_got_reloc.
1709 (_bfd_sparc_elf_fixup_symbol): New function.
1710 (allocate_dynrelocs): Don't allocate space for dynamic
1711 relocations and discard relocations against resolved undefined
1712 weak symbols in executable. Don't make resolved undefined weak
1713 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1714 relocation against undefined weak symbols in PIE.
1715 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
1716 relocations against resolved undefined weak symbols in PIE
1717 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
1718 without ynamic PLT/GOT relocations for resolved undefined weak
1719 symbols.
1720 Don't generate dynamic relocation against resolved undefined
1721 weak symbol in executable.
1722 (pie_finish_undefweak_symbol): New function.
1723 (_bfd_sparc_elf_finish_dynamic_sections): Call
1724 pie_finish_undefweak_symbol on all symbols in PIE.
1725 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
1726 (_bfd_sparc_elf_fixup_symbol): New function.
1727
1728 2017-04-10 Nick Clifton <nickc@redhat.com>
1729
1730 * config.bfd: Remove ns32k from obsolete list.
1731
1732 2017-04-10 Alan Modra <amodra@gmail.com>
1733
1734 PR 21287
1735 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
1736 (special_sections_i): Likewise for .init_array.
1737 (special_sections_p): Likewise for .preinit_array.
1738
1739 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
1740
1741 PR ld/19579
1742 PR ld/21306
1743 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
1744 ELF_COMMON_DEF_P for common symbols.
1745 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1746 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1747 * elflink.c (_bfd_elf_merge_symbol): Revert commits
1748 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
1749 07492f668d2173da7a2bda3707ff0985e0f460b6.
1750
1751 2017-04-07 Pedro Alves <palves@redhat.com>
1752
1753 * opncls.c (bfd_get_debug_link_info): Rename to...
1754 (bfd_get_debug_link_info_1): ... this. Change type of second
1755 parameter to void pointer. Adjust.
1756 (bfd_get_debug_link_info): Reimplement on top of
1757 bfd_get_debug_link_info_1.
1758 (separate_debug_file_exists, separate_alt_debug_file_exists):
1759 Change type of second parameter to void pointer. Adjust.
1760 (get_func_type, check_func_type): Change type of second parameter
1761 to void pointer.
1762 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
1763 the callback functions instead of passing the address of a local.
1764 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
1765 find_separate_debug_file.
1766 (get_alt_debug_link_info_shim): Change type of second parameter to
1767 void pointer. Adjust.
1768 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
1769 find_separate_debug_file.
1770 (get_build_id_name, bfd_boolean check_build_id_file): Change type
1771 of second parameter to void pointer. Adjust.
1772 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
1773 pointer local to find_separate_debug_file.
1774
1775 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1776
1777 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
1778 external symbols with a definition.
1779 (_bfd_coff_gc_mark_extra_sections): Fix typo.
1780
1781 2017-04-07 Alan Modra <amodra@gmail.com>
1782
1783 * po/SRC-POTFILES.in: Regenerate.
1784
1785 2017-04-05 Alan Modra <amodra@gmail.com>
1786
1787 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
1788 reference counting.
1789
1790 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
1791
1792 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
1793 numbers for DataDirectory entry indicies passed to
1794 add_data_entry().
1795
1796 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
1797
1798 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
1799 each GNU_MBIND section and align GNU_MBIND section to page size.
1800 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
1801 segment for each GNU_MBIND section.
1802 (_bfd_elf_init_private_section_data): Copy sh_info from input
1803 for GNU_MBIND section.
1804
1805 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
1806
1807 * elfnn-riscv.c (GP_NAME): Delete.
1808 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
1809 (_bfd_riscv_relax_lui): Likewise.
1810
1811 2017-04-04 Nick Clifton <nickc@redhat.com>
1812
1813 PR binutils/21342
1814 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
1815 dereference.
1816 (bfd_elf_final_link): Only initialize the extended symbol index
1817 section if there are extended symbol tables to list.
1818
1819 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
1820
1821 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
1822 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
1823 * configure.ac (elf): Add elf-properties.lo.
1824 * Makefile.in: Regenerated.
1825 * configure: Likewise.
1826 * elf-bfd.h (elf_property_kind): New.
1827 (elf_property): Likewise.
1828 (elf_property_list): Likewise.
1829 (elf_properties): Likewise.
1830 (_bfd_elf_parse_gnu_properties): Likewise.
1831 (_bfd_elf_get_property): Likewise.
1832 (_bfd_elf_link_setup_gnu_properties): Likewise.
1833 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
1834 and setup_gnu_properties.
1835 (elf_obj_tdata): Add properties.
1836 * elf-properties.c: New file.
1837 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
1838 (elf_i386_merge_gnu_properties): Likewise.
1839 (elf_backend_parse_gnu_properties): Likewise.
1840 (elf_backend_merge_gnu_properties): Likewise.
1841 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1842 (elf_x86_64_merge_gnu_properties): Likewise.
1843 (elf_backend_parse_gnu_properties): Likewise.
1844 (elf_backend_merge_gnu_properties): Likewise.
1845 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
1846 (elf_backend_parse_gnu_properties): Likewise.
1847 (elf_backend_setup_gnu_properties): Likewise.
1848 (elfNN_bed): Add elf_backend_parse_gnu_properties,
1849 elf_backend_merge_gnu_properties and
1850 elf_backend_setup_gnu_properties.
1851
1852 2017-03-30 Pip Cet <pipcet@gmail.com>
1853
1854 * elf32-wasm32.c: Add relocation code, two relocs.
1855 * reloc.c: Add wasm32 relocations.
1856 * libbfd.h: Regenerate.
1857 * bfd-in2.h: Regenerate.
1858 * bfd/po/bfd.pot: Regenerate.
1859
1860 2017-03-29 Nick Clifton <nickc@redhat.com>
1861
1862 PR binutils/18025
1863 * coff-bfd.h (struct coff_section_data): Add new fields:
1864 saved_bias and bias.
1865 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
1866 computed for PE binaries.
1867 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
1868 missing abbrev.
1869
1870 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
1871
1872 PR ld/16044
1873 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
1874 to handle a local symbol with a hash-symbol-entry; without PLT.
1875 Add BFD_ASSERT for an incidental case with GOT entry present.
1876 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
1877 isn't forced-or-set local.
1878
1879 2017-03-27 Pip Cet <pipcet@gmail.com>
1880
1881 * wasm-module.c: New file to support WebAssembly modules.
1882 * wasm-module.h: New file to support WebAssembly modules.
1883 * doc/webassembly.texi: Start documenting wasm-module.c.
1884 * config.bfd: Add wasm_vec.
1885 * targets.c: Likewise.
1886 * configure.ac: Likewise.
1887 * Makefile.am: Add entries for wasm-module.c.
1888 * Makefile.in: Regenerate.
1889 * configure: Regenerate.
1890 * po/SRC-POTFILES.in: Regenerate.
1891
1892 2017-03-27 Pip Cet <pipcet@gmail.com>
1893
1894 * cpu-wasm32.c: New file to support wasm32 architecture.
1895 * elf32-wasm32.c: New file to support wasm32 architecture.
1896 * Makefile.am: Add wasm32 architecture.
1897 * archures.c: Likewise.
1898 * config.bfd: Likewise.
1899 * configure.ac: Likewise.
1900 * targets.c: Likewise.
1901 * Makefile.in: Regenerate.
1902 * bfd-in2.h: Regenerate.
1903 * configure: Regenerate.
1904 * po/SRC-POTFILES.in: Regenerate.
1905
1906 2017-03-20 Alan Modra <amodra@gmail.com>
1907
1908 PR 21266
1909 * elf64-ppc.c (compare_symbols): Stabilize sort.
1910
1911 2017-03-18 Alan Modra <amodra@gmail.com>
1912
1913 * elf64-ppc.c (struct ppc_link_hash_table): Add
1914 local_ifunc_resolver and maybe_local_ifunc_resolver.
1915 (ppc_build_one_stub): Set flags on emitting dynamic
1916 relocation to ifunc.
1917 (ppc64_elf_relocate_section): Likewise.
1918 (ppc64_elf_finish_dynamic_symbol): Likewise.
1919 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1920 local dynamic relocs to ifuncs.
1921 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1922 local_ifunc_resolver and maybe_local_ifunc_resolver.
1923 (ppc_elf_relocate_section): Set flag on emitting dynamic
1924 relocation to ifuncs.
1925 (ppc_elf_finish_dynamic_symbol): Likewise.
1926 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1927 dynamic relocs to ifuncs.
1928
1929 2017-03-13 Nick Clifton <nickc@redhat.com>
1930
1931 PR binutils/21202
1932 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1933 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1934 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1935 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1936 * bfd-in2.h: Regenerate.
1937 * libbfd.h: Regenerate.
1938 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1939 names.
1940 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1941 (elfNN_aarch64_howto_table): Likewise.
1942 (aarch64_tls_transition_without_check): Likewise.
1943 (aarch64_reloc_got_type): Likewise.
1944 (elfNN_aarch64_final_link_relocate): Likewise.
1945 (elfNN_aarch64_tls_relax): Likewise.
1946 (elfNN_aarch64_relocate_section): Likewise.
1947 (elfNN_aarch64_gc_sweep_hook): Likewise.
1948 (elfNN_aarch64_check_relocs): Likewise.
1949 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1950 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1951
1952 2017-03-11 Alan Modra <amodra@gmail.com>
1953
1954 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1955 parameter is in fact used. Whitespace fixes.
1956 * elf64-ppc.c: Likewise.
1957
1958 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1959
1960 * rs6000-core.c (CORE_NEW): Simplify macro when
1961 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1962
1963 2017-03-07 Alan Modra <amodra@gmail.com>
1964
1965 PR 21224
1966 PR 20519
1967 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1968 dyn_relocs check.
1969
1970 2017-03-05 Alan Modra <amodra@gmail.com>
1971
1972 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1973 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1974 (next_cie_fde_offset): New function.
1975 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1976 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1977 four bytes. Align CIEs to four or eight bytes depending on
1978 per_encoding_aligned8. Align FDEs according to their encoding.
1979 Pad last FDE to output section alignment.
1980 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1981 assertion.
1982 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1983 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1984 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1985
1986 2017-03-02 Martin Bickel <binutils@ineranves.de>
1987
1988 PR ld/21212
1989 * elf.c (rewrite_elf_program_header): Do not issue a warning for
1990 empty segments which have a zero filesz, but a non-zero memsz.
1991
1992 2017-03-02 Alan Modra <amodra@gmail.com>
1993
1994 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1995
1996 2017-02-28 Alan Modra <amodra@gmail.com>
1997
1998 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1999 (ppc64_elf_relocate_section): Likewise.
2000
2001 2017-02-28 Alan Modra <amodra@gmail.com>
2002
2003 PR 20995
2004 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
2005 rather than elf32_nios2_hash_table or elf_hash_table.
2006 (create_got_section): Likewise.
2007 (nios2_elf32_finish_dynamic_symbol): Likewise.
2008 (nios2_elf32_adjust_dynamic_symbol): Likewise.
2009 (nios2_elf32_size_dynamic_sections): Likewise.
2010 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
2011 vars. Use htab equivalents directly instead. Don't create
2012 all dynamic sections on needing just the GOT. Use a goto
2013 rather than a fall-through with reloc test. Ensure
2014 htab->dynobj is set when making dynamic sreloc section.
2015 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
2016 equivalent directly instead. Don't segfault on looking for
2017 .dynamic when dynamic sections have not been created. Don't
2018 segfault on .got.plt being discarded.
2019 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
2020 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
2021 fixme and another not so relevant comment.
2022 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
2023 already set, set hash table dynobj on creating .sbss.
2024
2025 2017-02-28 Alan Modra <amodra@gmail.com>
2026
2027 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
2028 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
2029 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
2030 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
2031 (ppc64_elf_relocate_section): Likewise.
2032 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
2033 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
2034 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
2035 * libbfd.h: Regenerate.
2036 * bfd-in2.h: Regenerate.
2037
2038 2017-02-28 Alan Modra <amodra@gmail.com>
2039
2040 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
2041 dynamic .data.rel.ro read-only.
2042 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
2043 rather than section flags when deciding where copy reloc goes.
2044 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
2045 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
2046 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
2047 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
2048 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
2049 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
2050 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
2051 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
2052 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2053 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
2054 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
2055 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
2056 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2057 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
2058 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
2059 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
2060 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
2061 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
2062 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
2063
2064 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
2065
2066 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
2067 `jalr $0, $25' instruction encoding.
2068
2069 2017-02-27 Nick Clifton <nickc@redhat.com>
2070
2071 PR ld/21180
2072 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
2073 generating a seg-fault when encountering a symbol that has been
2074 deleted by garbage collection.
2075
2076 2017-02-25 Alan Modra <amodra@gmail.com>
2077
2078 * elf32-arc.c (struct dynamic_sections): Delete.
2079 (enum dyn_section_types): Delete.
2080 (dyn_section_names): Delete.
2081 (arc_create_dynamic_sections): Delete.
2082 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
2083 segfault on discarded .rela.plt section.
2084 (elf_arc_size_dynamic_sections): Formatting. Don't call
2085 arc_create_dynamic_sections. Don't allocate memory for sections
2086 handled by the generic linker. Correct code finding relocs in
2087 read-only sections. Set SEC_EXCLUDE on zero size .got,
2088 .got.plt, and .dynbss sections. Do set .interp for pies.
2089
2090 2017-02-24 Andrew Waterman <andrew@sifive.com>
2091
2092 * elfnn-riscv.c (GP_NAME): New macro.
2093 (riscv_global_pointer_value): Use it.
2094 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
2095 output section, consider only that section's alignment.
2096
2097 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2098
2099 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
2100 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
2101 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
2102 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
2103
2104 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2105
2106 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
2107 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
2108 or misaligned.
2109
2110 2017-02-23 Alan Modra <amodra@gmail.com>
2111
2112 PR 20744
2113 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
2114 16D relocations.
2115 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
2116 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
2117 relocs.
2118
2119 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
2120
2121 PR ld/20828
2122 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
2123 processing ahead of the call to `elf_gc_sweep_symbol'.
2124
2125 2017-02-22 Nick Clifton <nickc@redhat.com>
2126
2127 PR binutils/21193
2128 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
2129 created section 4-byte alignment.
2130
2131 2017-02-22 Alan Modra <amodra@gmail.com>
2132
2133 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
2134 on .got or .plt output section being discarded by script.
2135 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
2136 vxworks splt temp.
2137
2138 2017-02-21 Alan Modra <amodra@gmail.com>
2139
2140 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
2141 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
2142
2143 2017-02-20 Alan Modra <amodra@gmail.com>
2144
2145 PR 21181
2146 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
2147 if DT_RELSZ/DT_RELASZ is zero.
2148
2149 2017-02-17 Nick Clifton <nickc@redhat.com>
2150
2151 * compress.c (bfd_get_full_section_contents): Remember to reduce
2152 compressed size by the sizeof the compression header when
2153 decompressing the contents.
2154
2155 2017-02-17 Pedro Alves <palves@redhat.com>
2156
2157 * srec.c (Chunk): Rename to ...
2158 (_bfd_srec_len): ... this.
2159 (S3Forced): Rename to ...
2160 (_bfd_srec_forceS3): ... this.
2161 * objcopy.c: Adjust all references.
2162
2163 2017-02-17 Pedro Alves <palves@redhat.com>
2164
2165 * archive.c (bsd_write_armap): Rename to ...
2166 (_bfd_bsd_write_armap): ... this.
2167 (coff_write_armap): Rename to ...
2168 (_bfd_coff_write_armap): ... this.
2169 * libbfd-in.h (bsd_write_armap): Rename to ...
2170 (_bfd_bsd_write_armap): ... this.
2171 (coff_write_armap): Rename to ...
2172 (_bfd_coff_write_armap): ... this.
2173 * aout-target.h, aout-tic30.c: Adjust all users.
2174 * libbfd.h: Regenerate.
2175
2176 2017-02-17 Pedro Alves <palves@redhat.com>
2177
2178 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
2179 (warn_deprecated): Rename to ...
2180 (_bfd_warn_deprecated): ... this.
2181 * libbfd.c (warn_deprecated): Rename to ...
2182 (_bfd_warn_deprecated): ... this.
2183 * bfd-in2.h: Regenerate.
2184
2185 2017-02-17 Pedro Alves <palves@redhat.com>
2186
2187 * bfdio.c (real_ftell): Rename to ...
2188 (_bfd_real_ftell): ... this.
2189 (real_fseek): Rename to ...
2190 (_bfd_real_fseek): ... this.
2191 (real_fopen): Rename to ...
2192 (_bfd_real_fopen): ... this.
2193 * libbfd-in.h (real_ftell): Rename to ...
2194 (_bfd_real_ftell): ... this.
2195 (real_fseek): Rename to ...
2196 (_bfd_real_fseek): ... this.
2197 (real_fopen): Rename to ...
2198 (_bfd_real_fopen): ... this.
2199 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
2200 * libbfd.h: Regenerate.
2201
2202 2017-02-17 Pedro Alves <palves@redhat.com>
2203
2204 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
2205 * libbfd.c (read_unsigned_leb128): Rename to ...
2206 (_bfd_read_unsigned_leb128): ... this.
2207 (read_signed_leb128): Rename to ...
2208 (_bfd_read_signed_leb128): ... this.
2209 (safe_read_leb128): Rename to ...
2210 (_bfd_safe_read_leb128): ... this.
2211 * libbfd-in.h (read_unsigned_leb128): Rename to ...
2212 (_bfd_read_unsigned_leb128): ... this.
2213 (read_signed_leb128): Rename to ...
2214 (_bfd_read_signed_leb128): ... this.
2215 (safe_read_leb128): Rename to ...
2216 (_bfd_safe_read_leb128): ... this.
2217 * libbfd.h: Renegerate.
2218
2219 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2220
2221 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
2222 before trying to fine matching file and line information.
2223
2224 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2225
2226 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
2227 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
2228 not match current bfd, then reload debug information. Record bfd
2229 we're loading debug info for in the stash. If we have debug
2230 informatin in the cache then perform section placement before
2231 returning.
2232
2233 2017-02-16 Alan Modra <amodra@gmail.com>
2234
2235 PR 21000
2236 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
2237 * elfxx-target.h (elf_backend_no_page_alias): Define.
2238 (elfNN_bed): Init new field.
2239 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
2240 ensure PT_LOAD segment starts on a new page.
2241 * elf32-hppa.c (elf_backend_no_page_alias): Define.
2242
2243 2017-02-16 Alan Modra <amodra@gmail.com>
2244
2245 PR 21132
2246 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
2247 if pic.
2248
2249 2017-02-16 Jiong Wang <jiong.wang@arm.com>
2250
2251 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
2252 * bfd-in2.h: Regenerated.
2253
2254 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2255
2256 PR ld/21168
2257 * elf32-i386.c (elf_i386_relocate_section): Allow
2258 "lea foo@GOT, %reg" in PIC.
2259
2260 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2261
2262 PR ld/20244
2263 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
2264 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
2265 error against local IFUNC symbol without a base register for
2266 PIC.
2267
2268 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
2269
2270 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
2271 `%P: %H:' with `info->callbacks->einfo'.
2272 (ppc_elf_relocate_section): Likewise.
2273 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
2274 (ppc64_elf_edit_toc): Likewise.
2275 (ppc64_elf_relocate_section): Likewise.
2276
2277 2017-02-14 Alan Modra <amodra@gmail.com>
2278
2279 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
2280 --gc-keep-exported, and test versioned field of sym rather than
2281 looking for @ in name.
2282
2283 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
2284
2285 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
2286 __global_pointer$.
2287
2288 2017-02-13 Nick Clifton <nickc@redhat.com>
2289
2290 PR binutils/21151
2291 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
2292 unit length field.
2293
2294 2017-02-07 Andrew Waterman <andrew@sifive.com>
2295
2296 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
2297 entry size if PLT header is written.
2298
2299 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
2300
2301 Fix sparc64 dynamic relocation processing to use the dynamic
2302 symbol count.
2303 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
2304 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
2305 should be used.
2306
2307 2017-02-03 Nick Clifton <nickc@redhat.com>
2308
2309 PR 21096
2310 * coffcode.h (coff_write_object_contents): Enlarge size of
2311 s_name_buf in order to avoid compile time warning about possible
2312 integer truncation.
2313 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
2314 32-bits of insn value before printing into buffer.
2315
2316 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2317
2318 * elfxx-mips.c (mips_elf_hash_sort_data): Add
2319 `max_local_dynindx'.
2320 (mips_elf_sort_hash_table): Handle it.
2321 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
2322 symbols bump up `max_local_dynindx' rather than
2323 `max_non_got_dynindx'.
2324
2325 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2326
2327 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
2328 `min_got_dynindx', `max_unref_got_dynindx' and
2329 `max_non_got_dynindx' members to the `bfd_size_type' data type.
2330 (mips_elf_sort_hash_table): Adjust accordingly.
2331
2332 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2333
2334 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
2335 to access the hash table.
2336
2337 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2338
2339 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
2340 non-NULL `htab' to the beginning.
2341
2342 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2343
2344 * elflink.c (elf_gc_sweep): Wrap overlong line.
2345
2346 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
2347
2348 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
2349 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
2350 * elfxx-mips.c (mips_elf_link_hash_table): Add
2351 `ignore_branch_isa' member.
2352 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
2353 in branch relocation calculation as an error if
2354 `ignore_branch_isa' has been set.
2355 (_bfd_mips_elf_insn32): Rename to...
2356 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
2357 parameter to `insn32' and add an `ignore_branch_isa' parameter.
2358 Handle the new parameter.
2359
2360 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
2361
2362 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
2363 local variable dynobj.
2364
2365 PR ld/20995
2366 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
2367 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
2368 executable from read-only sections into sdynrelro.
2369 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
2370 dynamic relocs in sdynrelro.
2371 (elf_backend_want_dynrelro): Define.
2372
2373 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2374
2375 * config.bfd (*-*-rtemsaout*): Mark as removed.
2376
2377 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2378
2379 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
2380 (arm-*-rtems*): Move to (arm*-*-eabi*).
2381 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
2382 (m68-*-rtems*): Move to (m68*-*-elf*).
2383
2384 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2385
2386 * config.bfd (*-*-rtemscoff*): Mark as removed.
2387
2388 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
2389
2390 PR ld/20828
2391 * elflink.c (bfd_elf_record_link_assignment): Revert last
2392 change and don't ever clear `forced_local'. Set `mark'
2393 unconditionally.
2394 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
2395 file.
2396 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
2397 (bfd_elf_size_dynamic_sections): ... here.
2398 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
2399 and set `mark' instead in `__tls_get_addr_opt' processing.
2400 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
2401
2402 2017-01-24 Alan Modra <amodra@gmail.com>
2403
2404 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
2405 where dynamic relocs are preferable. Allow ifunc too.
2406 (ensure_undefweak_dynamic): New function.
2407 (allocate_dynrelocs): Use it here. Move plt handling last and
2408 don't make symbols dynamic, simplifying loop. Only make undef
2409 weak symbols with GOT entries dynamic. Correct condition
2410 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
2411 comments. Remove goto.
2412 (ppc_elf_relocate_section): Correct test for using dynamic
2413 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2414 to suit. Set up explicit tls_index entries and implicit GOT
2415 tls_index entries resolvable at link time for
2416 __tls_get_addr_opt. Simplify test to clear mem for prelink.
2417 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
2418 (ensure_undefweak_dynamic): New function.
2419 (allocate_dynrelocs): Use it here. Only make undef weak symbols
2420 with GOT entries dynamic. Remove unnecessary test of
2421 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
2422 (ppc64_elf_relocate_section): Correct test for using dynamic
2423 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2424 to suit. Set up explicit tls_index entries and implicit GOT
2425 tls_index entries resolvable at link time for __tls_get_addr_opt.
2426 Simplify expression to clear mem for prelink.
2427
2428 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
2429
2430 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
2431
2432 2017-01-20 Jiong Wang <jiong.wang@arm.com>
2433
2434 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
2435 (elf_backend_hash_symbol): Define.
2436
2437 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
2438
2439 PR ld/20828
2440 * elflink.c (bfd_elf_record_link_assignment): Clear any
2441 `forced_local' marking for DSO symbols that are not being
2442 provided.
2443
2444 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2445
2446 * elfnn-riscv.c (riscv_elf_object_p): New function.
2447
2448 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
2449
2450 PR ld/21038
2451 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
2452 plt_bnd_eh_frame.
2453 (elf_x86_64_check_relocs): Create .eh_frame section for the
2454 .plt.bnd section.
2455 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2456 .eh_frame section for the .plt.bnd section.
2457 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2458 for the .plt.bnd section.
2459
2460 2017-01-12 Nick Clifton <nickc@redhat.com>
2461
2462 PR binutils/20876
2463 * opncls.c (find_separate_debug_file): Add include_dirs
2464 parameter. Only include the directory part of the bfd's filename
2465 in search paths if include_dirs is true. Add a couple of extra
2466 locations for looking for debug files.
2467 ( bfd_follow_gnu_debuglink): Update invocation of
2468 find_separate_debug_file.
2469 (bfd_follow_gnu_debugaltlink): Likewise.
2470 (get_build_id): New function: Finds the build-id of the given bfd.
2471 (get_build_id_name): New function: Computes the name of the
2472 separate debug info file for a bfd, based upon its build-id.
2473 (check_build_id_file): New function: Checks to see if a separate
2474 debug info file exists at the given location, and that its
2475 build-id matches that of the original bfd.
2476 (bfd_follow_build_id_debuglink): New function: Finds a separate
2477 debug info file for a given bfd by using the build-id method.
2478 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
2479 method of locating a separate debug info file before using the
2480 debuglink method.
2481 * bfd-in2.h: Regenerate.
2482
2483 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
2484
2485 PR ld/21038
2486 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
2487 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
2488 elf_x86_64_eh_frame_plt_got.
2489 (elf_x86_64_size_dynamic_sections): Get unwind info from
2490 elf_x86_64_bnd_arch_bed for the BND PLT.
2491
2492 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
2493
2494 * config.bfd: Add entries for i686-redox and x86_64-redox.
2495
2496 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2497
2498 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
2499 to 4 bytes.
2500 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
2501 .eh_frame section to 4 bytes for x32.
2502 (elf_x86_64_check_relocs): Likewise.
2503
2504 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2505
2506 PR ld/20830
2507 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
2508 (PLT_GOT_FDE_LENGTH): Likewise.
2509 (elf_i386_plt_layout): Add eh_frame_plt_got and
2510 eh_frame_plt_got_size.
2511 (elf_i386_plt): Updated.
2512 (elf_i386_link_hash_table): Add plt_got_eh_frame.
2513 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
2514 (elf_i386_size_dynamic_sections): Allocate and initialize
2515 .eh_frame section for .plt.got.
2516 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
2517 .plt.got.
2518 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
2519 eh_frame_plt_got_size.
2520 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
2521 (PLT_GOT_FDE_LENGTH): Likewise.
2522 (elf_x86_64_backend_data): Add eh_frame_plt_got and
2523 eh_frame_plt_got_size.
2524 (elf_x86_64_arch_bed): Updated.
2525 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
2526 eh_frame_plt_got_size.
2527 (elf_x86_64_nacl_arch_bed): Likewise.
2528 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
2529 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
2530 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2531 .eh_frame section for .plt.got.
2532 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2533 for .plt.got.
2534
2535 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2536
2537 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
2538 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
2539
2540 2017-01-09 Nick Clifton <nickc@redhat.com>
2541
2542 * dwarf2.c (lookup_address_in_function_table): Return early if
2543 there are no functions in the given comp unit, or if the high
2544 address of the last function in the comp unit is less than the
2545 desired address.
2546
2547 2017-01-09 Nick Clifton <nickc@redhat.com>
2548
2549 PR binutils/21013
2550 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
2551 message if there are too many symbols to load.
2552
2553 2017-01-04 James Clarke <jrtc27@jrtc27.com>
2554
2555 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
2556 if relocs are cached.
2557
2558 2017-01-03 Rich Felker <bugdal@aerifal.cx>
2559
2560 PR ld/21017
2561 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
2562 for R_MICROBLAZE_GOTOFF_64.
2563
2564 2017-01-03 Nick Clifton <nickc@redhat.com>
2565
2566 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
2567 warning about using a possibly uninitialised variable.
2568
2569 2017-01-02 Alan Modra <amodra@gmail.com>
2570
2571 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
2572 (allocate_plt_static, allocate_dynrelocs): Use it.
2573
2574 2017-01-02 Alan Modra <amodra@gmail.com>
2575
2576 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
2577 .PARISC.unwind section.
2578
2579 2017-01-02 Alan Modra <amodra@gmail.com>
2580
2581 PR ld/20989
2582 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
2583 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
2584 indirect to GOT pointer relative code edit.
2585
2586 2017-01-02 Alan Modra <amodra@gmail.com>
2587
2588 Update year range in copyright notice of all files.
2589
2590 For older changes see ChangeLog-2016
2591 \f
2592 Copyright (C) 2017 Free Software Foundation, Inc.
2593
2594 Copying and distribution of this file, with or without modification,
2595 are permitted in any medium without royalty provided the copyright
2596 notice and this notice are preserved.
2597
2598 Local Variables:
2599 mode: change-log
2600 left-margin: 8
2601 fill-column: 74
2602 version-control: never
2603 End:
This page took 0.085488 seconds and 4 git commands to generate.