1 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
3 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
4 in read-only section with minfo.
5 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
7 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
9 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
12 2017-10-06 John Baldwin <jhb@FreeBSD.org>
14 * elf-bfd.h (struct elf_backend_data): Add
15 `elf_backend_grok_freebsd_prstatus'.
16 * elf.c (elfcore_grok_freebsd_note): Call
17 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
19 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
21 (elf_backend_grok_freebsd_prstatus): Define.
22 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
23 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
25 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
27 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
28 and has_non_got_reloc with zero_undefweak.
29 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
30 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
32 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
33 has_non_got_reloc with zero_undefweak.
34 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
35 has_got_reloc and has_non_got_reloc with zero_undefweak.
36 (elf_x86_link_hash_entry): Likewise.
38 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
40 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
41 (VERIFY_COPY_RELOC): Likewise.
43 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
45 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
46 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
47 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
49 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
51 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
52 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
53 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
55 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
57 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
58 * elf32-i386.c (elf_i386_relocate_section): Use it.
59 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
61 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
63 * elf32-i386.c (X86_SIZE_TYPE_P): New.
64 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
65 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
66 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
67 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
69 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
71 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
72 (PLT_LOCAL_IFUNC_P): Likewise.
73 * elf32-i386.c (elf_i386_relocate_section): Use them.
74 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
76 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
78 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
79 * elf32-i386.c (elf_i386_relocate_section): Use it.
80 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
82 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
84 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
85 * elf32-i386.c (elf_i386_relocate_section): Use it.
86 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
88 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
90 * elf32-i386.c (X86_PCREL_TYPE_P): New.
91 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
92 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
93 (X86_PCREL_TYPE_P): This.
94 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
95 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
96 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
98 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
100 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
102 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
103 * elf32-i386.c (elf_i386_tls_transition): Use it.
104 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
106 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
108 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
109 Dump dynamic relocation in read-only section with minfo if
111 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
112 (maybe_set_textrel): Likewise.
113 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
114 read-only section with minfo.
116 2017-10-05 John Baldwin <jhb@FreeBSD.org>
118 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
120 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
122 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
123 in read-only section with minfo.
124 (tilepro_elf_size_dynamic_sections): Likewise.
125 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
126 (tilegx_elf_size_dynamic_sections): Likewise.
128 2017-10-05 Pedro Alves <palves@redhat.com>
131 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
132 ellipsis parameter. Split out bfd_error_on_input code to..
133 (bfd_set_input_error): .. New function.
134 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
135 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
136 * bfd-in2.h: Regenerate.
138 2017-10-05 Alan Modra <amodra@gmail.com>
140 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
141 fini_array error value.
143 2017-10-05 Alan Modra <amodra@gmail.com>
146 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
148 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
150 (elf_fake_sections): Adjust calls. Exit immediately on failure.
151 (bfd_elf_set_group_contents): Add associated reloc section indices
154 2017-10-04 Alan Modra <amodra@gmail.com>
156 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
157 classify symbols for ELFv2.
159 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
162 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
163 undergoes default promotion.
164 * bfd-in2.h: Regenerate.
166 2017-10-02 Alan Modra <amodra@gmail.com>
168 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
169 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
171 2017-10-01 Alan Modra <amodra@gmail.com>
174 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
175 (add_line_info): Always put end_sequence last.
177 2017-10-01 Alan Modra <amodra@gmail.com>
180 * dwarf2.c (read_section): Allocate buffer with extra byte for
181 bfd_simple_get_relocated_section_contents rather than copying
184 2017-09-29 Alan Modra <amodra@gmail.com>
186 * merge.c (merge_strings): Return FALSE on malloc failure.
187 (_bfd_merge_sections): Return failures from record_section and
190 2017-09-28 Alan Modra <amodra@gmail.com>
193 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
194 a case where plugin_notice isn't called.
196 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
198 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
201 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
204 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
205 output_bfd to info->callbacks->minfo.
207 2017-09-26 Nick Clifton <nickc@redhat.com>
210 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
211 assertion failure if elf_x86_64_rtype_to_howto has already issued
214 2017-09-26 Alan Modra <amodra@gmail.com>
217 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
220 2017-09-26 Nick Clifton <nickc@redhat.com>
223 * dwarf2.c (read_formatted_entries): Fail early if we know that
224 the loop parsing data entries will overflow the end of the
227 2017-09-26 Alan Modra <amodra@gmail.com>
230 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
231 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
232 to stash->info_ptr_memory, and check die_ref is within that memory.
233 Set info_ptr_end correctly when another CU is refd. Check die_ref
234 for DW_FORM_ref4 etc. is within CU.
236 2017-09-26 Alan Modra <amodra@gmail.com>
239 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
240 (read_formatted_entries): Init "fe".
241 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
243 2017-09-26 Alan Modra <amodra@gmail.com>
246 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
247 bounds in inner loop.
249 2017-09-25 Alan Modra <amodra@gmail.com>
252 * dwarf1.c (parse_die): Sanity check pointer against section limit
253 before dereferencing.
254 (parse_line_table): Likewise.
256 2017-09-25 Alan Modra <amodra@gmail.com>
259 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
261 (parse_comp_unit): Likewise.
263 2017-09-25 Alan Modra <amodra@gmail.com>
266 * dwarf2.c (read_formatted_entries): Error on format_count zero.
268 2017-09-24 Alan Modra <amodra@gmail.com>
271 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
272 within section bounds.
274 2017-09-24 Alan Modra <amodra@gmail.com>
277 * dwarf2.c (decode_line_info): Properly free line sequences on error.
279 2017-09-24 Alan Modra <amodra@gmail.com>
282 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
283 pname param. Return status. Make name const. Don't abort,
284 return an error. Formatting. Exit if current info_ptr matches
285 orig_info_ptr. Update callers.
286 (scan_unit_for_symbols): Start at nesting_level of zero. Make
287 nested_funcs an array of structs for extensibility. Formatting.
289 2017-09-24 Alan Modra <amodra@gmail.com>
292 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
293 rather than dividing by zero.
295 2017-09-24 Alan Modra <amodra@gmail.com>
298 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
300 2017-09-24 Alan Modra <amodra@gmail.com>
303 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
305 2017-09-24 Alan Modra <amodra@gmail.com>
308 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
309 SHT_GNU_verneed section for sanity. Don't zalloc memory for
312 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
315 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
318 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
321 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
322 -1 if bfd_canonicalize_dynamic_reloc returns 0.
324 2017-09-22 Pedro Alves <palves@redhat.com>
325 Alan Modra <amodra@gmail.com>
327 * version.h: Add comment.
329 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
331 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
332 NT_S390_GS_BC, correct the previously swapped invocations of
333 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
335 2017-09-19 Alan Modra <amodra@gmail.com>
338 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
341 2017-09-19 Alan Modra <amodra@gmail.com>
344 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
345 symbols before calculating verrefs. Don't renumber dynsyms
346 after gc. Exclude .gnu.version when zero or one dynsym.
347 Localize some vars and reindent.
349 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
352 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
353 return from bfd_canonicalize_dynamic_reloc.
355 2017-09-15 Alan Modra <amodra@gmail.com>
358 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
359 overflows bfd_size_type.
361 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
364 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
365 to indicate if conversion is performed.
366 (elf_i386_check_relocs): Cache section contents and relocations
367 if conversion is performed.
368 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
369 contents and relocations if conversion is performed.
371 2017-09-14 Nick Clifton <nickc@redhat.com>
374 * peXXigen.c (pe_print_idata): Extend check for HintName vector
377 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
379 * elfxx-x86.h: Fix a typo in comments.
381 2017-09-09 Kamil Rytarowski <n54@gmx.com>
383 * elf32-nds32.c: Rename __BIT() to N32_BIT().
385 2017-09-09 Alan Modra <amodra@gmail.com>
387 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
390 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
392 * elf32-i386.c (elf_i386_relocate_section): Update usage of
393 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
394 (elf_i386_finish_dynamic_symbol): Likewise.
395 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
396 (elf_x86_64_finish_dynamic_symbol): Likewise.
397 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
398 (_bfd_x86_elf_fixup_symbol): Likewise.
400 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
402 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
403 check has_non_got_reloc.
405 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
408 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
409 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
410 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
411 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
412 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
413 and linker_def on __ehdr_start if it is referenced and not
415 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
416 and return TRUE when building executable, if a symbol has
417 non-GOT/non-PLT relocations in text section or there is no
419 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
421 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
423 * elfxx-x86.h: Update comments.
425 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
427 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
428 elf_x86_plt_layout_table with elf_x86_init_table.
429 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
431 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
433 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
434 (elf_x86_init_table): This.
435 (_bfd_x86_elf_link_setup_gnu_properties): Replace
436 elf_x86_plt_layout_table with elf_x86_init_table.
438 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
440 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
441 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
442 * configure: Regenerated.
443 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
444 and r_sym fields of plt_layout.
445 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
447 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
448 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
449 r_info nor r_sym fields.
450 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
452 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
454 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
456 * (_bfd_riscv_relax_align): Call bfd_set_error and
457 print an error message when unable to relax a .align directive.
459 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
461 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
462 (riscv_record_pcrel_hi_reloc): Add absolute argument.
463 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
464 R_RISCV_PCREL_HI20 relocs, and pass the result to
465 riscv_record_pcrel_hi_reloc.
467 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
469 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
470 r_type_p. Remove the converted argument. Replace
471 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
472 the new relocation type via r_type_p.
473 (elf_i386_relocate_section): Likewise.
474 (elf_i386_finish_dynamic_symbol): Likewise.
475 (need_convert_load): Removed.
476 (check_relocs_failed): Updated.
477 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
478 instead of setting need_convert_load.
479 (_bfd_i386_elf_convert_load): Removed.
480 * elf64-x86-64.c (need_convert_load): Removed.
481 (check_relocs_failed): Updated.
482 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
483 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
484 Return the new relocation type via r_type_p.
485 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
486 instead of setting need_convert_load.
487 (elf_x86_64_check_relocs): Don't check PIC if relocation has
489 (_bfd_x86_64_elf_convert_load): Removed.
490 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
491 with SYMBOL_REFERENCES_LOCAL_P.
492 (elf_x86_64_finish_dynamic_symbol): Likewise.
493 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
495 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
496 (_bfd_x86_elf_link_symbol_references_local): New function.
497 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
498 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
499 SYMBOL_REFERENCES_LOCAL_P.
500 (elf_x86_link_hash_entry): Add local_ref.
501 (elf_x86_link_hash_table): Remove convert_load.
502 (_bfd_i386_elf_convert_load): Removed.
503 (_bfd_x86_64_elf_convert_load): Likewise.
504 (_bfd_x86_elf_link_symbol_references_local): New.
506 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
508 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
509 (elf_x86_64_info_to_howto): Get the real relocation type by
510 masking out R_X86_64_converted_reloc_bit.
511 (elf_x86_64_check_tls_transition): Get the real relocation type
512 by masking out R_X86_64_converted_reloc_bit.
513 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
514 instead of setting converted_reloc.
515 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
516 instead of converted_reloc. Get the real relocation type by
517 masking out R_X86_64_converted_reloc_bit.
518 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
519 R_X86_64_converted_reloc_bit is valid.
520 * elfxx-x86.h (converted_reloc): Removed.
522 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
524 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
525 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
526 to get the relocation type again.
527 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
528 r_type when calling elf_x86_64_tls_transition. Don't use
529 ELF32_R_TYPE to get the relocation type again.
531 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
533 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
536 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
538 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
539 argument. Don't check relocation overflow. Avoid relocation
540 overflow if --no-relax is used. Set converted_reloc on symbol
541 if a GOTPCREL relocation is converted.
542 (elf_x86_64_relocate_section): Issue a fatal error and suggest
543 --no-relax if GOTPCREL relocation conversion leads to relocation
545 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
547 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
548 Edmar Wienskoski <edmar.wienskoski@nxp.com
550 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
551 (ppc_elf_check_relocs): Handle it.
552 (ppc_elf_vle_split20): New function.
553 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
555 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
558 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
559 for x86-64 if GOT_TLS_GDESC_P is true.
561 2017-09-03 Alan Modra <amodra@gmail.com>
564 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
566 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
568 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
569 tls_get_addr for x86-64 in one place.
571 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
573 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
574 with elfxx-x86.lo for 64-bit BFD.
575 * configure: Regenerated.
577 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
579 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
580 (_bfd_i386_elf_convert_load): This. Remove static.
581 (elf_i386_size_dynamic_sections): Removed.
582 (elf_backend_size_dynamic_sections): Likewise.
583 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
584 (_bfd_x86_64_elf_convert_load): This. Remove static.
585 (elf_x86_64_size_dynamic_sections): Removed.
586 (elf_backend_size_dynamic_sections): Likewise.
587 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
588 (elf_x86_allocate_dynrelocs): This. Make it static.
589 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
590 (elf_x86_allocate_local_dynreloc): This. Make it static.
591 (elf_i386_is_reloc_section): New function.
592 (elf_x86_64_is_reloc_section): Likewise.
593 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
594 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
595 Rearrange got_entry_size initialization.
596 (_bfd_x86_elf_size_dynamic_sections): New function.
597 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
598 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
599 (_bfd_i386_elf_convert_load): New.
600 (_bfd_x86_64_elf_convert_load): Likewise.
601 (_bfd_x86_elf_size_dynamic_sections): Likewise.
602 (elf_backend_size_dynamic_sections): Likewise.
603 (_bfd_x86_elf_allocate_dynrelocs): Removed.
604 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
606 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
608 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
611 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
613 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
614 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
616 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
618 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
619 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
620 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
621 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
622 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
623 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
625 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
627 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
628 (elf_i386_allocate_local_dynrelocs): Likewise.
629 (elf_i386_size_dynamic_sections): Replace
630 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
631 with _bfd_x86_elf_allocate_dynrelocs and
632 _bfd_x86_elf_allocate_local_dynrelocs.
633 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
634 (elf_x86_64_allocate_local_dynrelocs): Likewise.
635 (elf_x86_64_size_dynamic_sections): Replace
636 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
637 with _bfd_x86_elf_allocate_dynrelocs and
638 _bfd_x86_elf_allocate_local_dynrelocs.
639 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
640 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
641 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
642 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
644 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
646 * elf32-i386.c (is_i386_elf): Removed.
647 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
648 (elf_i386_size_dynamic_sections): Likewise.
649 (elf_i386_relocate_section): Likewise.
650 * elf64-x86-64.c (is_x86_64_elf): Removed.
651 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
653 (elf_x86_64_size_dynamic_sections): Likewise.
654 (elf_x86_64_relocate_section): Likewise.
655 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
657 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
660 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
662 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
663 (elf_i386_allocate_dynrelocs): Replace
664 elf_i386_compute_jump_table_size with
665 elf_x86_compute_jump_table_size.
666 (elf_i386_size_dynamic_sections): Likewise.
667 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
668 (elf_x86_64_allocate_dynrelocs): Replace
669 elf_x86_64_compute_jump_table_size with
670 elf_x86_compute_jump_table_size.
671 (elf_x86_64_size_dynamic_sections): Likewise.
672 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
674 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
675 (elf_x86_compute_jump_table_size): New.
677 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
679 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
681 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
682 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
684 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
686 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
687 with htab->is_vxworks.
688 (elf_i386_size_dynamic_sections): Likewise.
689 (elf_i386_relocate_section): Likewise.
690 (elf_i386_finish_dynamic_symbol): Likewise.
691 (elf_i386_finish_dynamic_sections): Likewise.
693 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
695 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
696 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
697 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
698 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
699 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
700 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
701 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
702 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
704 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
707 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
708 ELF_COMMON_DEF_P for common symbols.
710 2017-09-02 Alan Modra <amodra@gmail.com>
712 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
713 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
714 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
716 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
718 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
719 (elf_backend_gc_mark_hook): Likewise.
720 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
721 (elf_backend_gc_mark_hook): Likewise.
722 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
723 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
724 (elf_backend_gc_mark_hook): Likewise.
726 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
728 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
729 (elf_backend_adjust_dynamic_symbol): Likewise.
730 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
731 (elf_backend_adjust_dynamic_symbol): Likewise.
732 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
733 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
734 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
735 (_bfd_x86_elf_adjust_dynamic_symbol): New.
736 (elf_backend_adjust_dynamic_symbol): Likewise.
738 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
740 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
743 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
745 * elf32-i386.c (elf_i386_mkobject): Removed.
746 (bfd_elf32_mkobject): Likewise.
747 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
748 (bfd_elf64_mkobject): Likewise.
749 (bfd_elf32_mkobject): Likewise.
750 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
751 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
752 (bfd_elf64_mkobject): Likewise.
753 (bfd_elf32_mkobject): Likewise.
755 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
757 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
758 Call _bfd_x86_elf_link_setup_gnu_properties.
759 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
760 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
762 (elf_x86_64_non_lazy_plt): Likewise.
763 (elf_x86_64_lazy_bnd_plt): Likewise.
764 (elf_x86_64_non_lazy_bnd_plt): Likewise.
765 (elf_x86_64_lazy_ibt_plt): Likewise.
766 (elf_x32_lazy_ibt_plt): Likewise.
767 (elf_x86_64_non_lazy_ibt_plt): Likewise.
768 (elf_x32_non_lazy_ibt_plt): Likewise.
769 (elf_x86_64_nacl_plt): Likewise.
770 (elf_x86_64_link_setup_gnu_properties): Updated. Call
771 _bfd_x86_elf_link_setup_gnu_properties.
772 * elfxx-x86.c: Include elf-vxworks.h".
773 (_bfd_x86_elf_link_setup_gnu_properties): New function.
774 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
775 comments for pic_plt0_entry and pic_plt_entry.
776 (elf_x86_non_lazy_plt_layout): Likewise.
777 (elf_x86_plt_layout_table): New.
778 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
780 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
783 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
784 .eh_frame section for the second PLT.
785 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
786 alignment of .eh_frame section for the second PLT.
788 2017-09-01 Nick Clifton <nickc@redhat.com>
791 * dwarf2.c (decode_line_info): Fix test for an overlong line info
794 2017-09-01 Nick Clifton <nickc@redhat.com>
797 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
798 attribute buffer is NUL terminated.
800 2017-08-31 Nick Clifton <nickc@redhat.com>
803 * dwarf2.c (read_section): If necessary add a terminating NUL byte
804 to dwarf string sections.
806 2017-08-31 Alan Modra <amodra@gmail.com>
808 * po/SRC-POTFILES.in: Regenerate.
810 2017-08-31 Alan Modra <amodra@gmail.com>
812 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
813 for a section containing just a terminator. Allow multiple
814 terminators at end of section.
815 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
816 sections when not adding alignment. Assert on terminator in
819 2017-08-31 Alan Modra <amodra@gmail.com>
823 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
826 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
828 * configure.ac (bfd_backends): Add elf64.lo together with
829 elfxx-x86.lo for 64-bit BFD.
830 * configure: Regenerated.
832 2017-08-31 James Bowman <james.bowman@ftdichip.com>
834 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
837 2017-08-31 Alan Modra <amodra@gmail.com>
840 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
841 before _close_and_cleanup. Call iovec->bclose after.
842 (bfd_close): Remove code common to, and call, bfd_close_all_done.
844 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
846 * elf32-i386.c (elf_i386_plt_type): Removed.
847 (elf_i386_plt): Likewise.
848 (elf_i386_get_synthetic_symtab): Updated. Call
849 _bfd_x86_elf_get_synthetic_symtab.
850 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
851 (elf_x86_64_plt): Likewise.
852 (elf_x86_64_get_synthetic_symtab): Updated. Call
853 _bfd_x86_elf_get_synthetic_symtab.
854 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
855 (elf_x86_64_get_plt_got_vma): Likewise.
856 (elf_i386_valid_plt_reloc_p): Likewise.
857 (elf_x86_64_valid_plt_reloc_p): Likewise.
858 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
859 * elfxx-x86.h (elf_x86_plt_type): New.
860 (elf_x86_plt): Likewise.
861 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
863 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
865 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
866 target_id instead of elf_machine_code.
868 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
870 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
871 (elf_i386_lazy_plt_layout): Likewise.
872 (elf_i386_non_lazy_plt_layout): Likewise.
873 (elf_i386_plt_layout): Likewise.
874 (elf_i386_link_hash_table): Likewise.
875 (elf_i386_next_tls_desc_index): Likewise.
876 (elf_i386_srelplt2): Likewise.
877 (elf_i386_plt): Likewise.
878 (elf_i386_lazy_plt): Likewise.
879 (elf_i386_non_lazy_plt): Likewise.
880 (elf_i386_link_hash_table_create): Likewise.
881 (bfd_elf32_bfd_link_hash_table_create): Likewise.
882 (elf_i386_lazy_plt): Updated.
883 (elf_i386_non_lazy_plt): Likewise.
884 (elf_i386_lazy_ibt_plt): Likewise.
885 (elf_i386_non_lazy_ibt_plt): Likewise.
886 (elf_i386_allocate_dynrelocs): Likewise.
887 (elf_i386_size_dynamic_sections): Likewise.
888 (elf_i386_relocate_section): Likewise.
889 (elf_i386_finish_dynamic_symbol): Likewise.
890 (elf_i386_finish_dynamic_sections): Likewise.
891 (elf_i386_get_synthetic_symtab): Likewise.
892 (elf_i386_link_setup_gnu_properties): Likewise.
893 (elf_i386_nacl_plt): Likewise.
894 * elf64-x86-64.c (ABI_64_P): Removed.
895 (ELF64_DYNAMIC_INTERPRETER): Likewise.
896 (ELF32_DYNAMIC_INTERPRETER): Likewise.
897 (elf_x86_64_lazy_plt_layout): Likewise.
898 (elf_x86_64_non_lazy_plt_layout): Likewise.
899 (elf_x86_64_plt_layout): Likewise.
900 (elf_x86_64_link_hash_table): Likewise.
901 (elf_x86_64_plt): Likewise.
902 (elf_x86_64_lazy_plt): Likewise.
903 (elf_x86_64_non_lazy_plt): Likewise.
904 (elf_x86_64_link_hash_table_create): Likewise.
905 (bfd_elf64_bfd_link_hash_table_create): Likewise.
906 (bfd_elf32_bfd_link_hash_table_create): Likewise.
907 (elf_x86_64_lazy_plt): Updated.
908 (elf_x86_64_non_lazy_plt): Likewise.
909 (elf_x86_64_lazy_bnd_plt): Likewise.
910 (elf_x86_64_non_lazy_bnd_plt): Likewise.
911 (elf_x86_64_lazy_ibt_plt): Likewise.
912 (elf_x32_lazy_ibt_plt): Likewise.
913 (elf_x86_64_non_lazy_ibt_plt): Likewise.
914 (elf_x32_non_lazy_ibt_plt): Likewise.
915 (elf_x86_64_allocate_dynrelocs): Likewise.
916 (elf_x86_64_size_dynamic_sections): Likewise.
917 (elf_x86_64_relocate_section): Likewise.
918 (elf_x86_64_finish_dynamic_symbol): Likewise.
919 (elf_x86_64_finish_dynamic_sections): Likewise.
920 (elf_x86_64_get_synthetic_symtab): Likewise.
921 (elf_x86_64_link_setup_gnu_properties): Likewise.
922 (elf_x86_64_nacl_plt): Likewise.
923 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
925 (ELF32_DYNAMIC_INTERPRETER): New.
926 (ELF64_DYNAMIC_INTERPRETER): Likewise.
927 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
928 (_bfd_x86_elf_link_hash_table_create): Likewise.
929 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
930 (elf_x86_link_hash_table_free): This. Make it static.
931 * elfxx-x86.h: Don't include "objalloc.h".
933 (elf_x86_lazy_plt_layout): Likewise.
934 (elf_x86_non_lazy_plt_layout): Likewise.
935 (elf_x86_plt_layout): Likewise.
936 (_bfd_x86_elf_link_hash_table_create): Likewise.
937 (bfd_elf64_bfd_link_hash_table_create): Likewise.
938 (bfd_elf32_bfd_link_hash_table_create): Likewise.
939 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
940 srelplt2 and next_tls_desc_index.
941 (_bfd_x86_elf_link_hash_table_free): Removed.
943 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
945 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
946 branch offset interpretation.
948 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
951 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
953 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
955 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
956 (elf_x86_64_srelplt2): Likewise.
958 2017-08-30 Alan Modra <amodra@gmail.com>
960 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
961 (ppc64_elf_tls_optimize): Set it.
962 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
963 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
964 addis would add zero.
965 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
966 (ppc_elf_tls_optimize): Set it.
967 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
968 insn on TPREL16_LO relocs to use r2 when addis would add zero.
970 2017-08-30 Alan Modra <amodra@gmail.com>
972 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
973 __tls_get_addr call sequences to LE, don't move the addi down
974 to the nop. Replace the bl with addi and leave the nop alone.
976 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
978 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
980 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
982 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
984 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
986 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
987 (BFD64_BACKENDS): Likewise.
988 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
989 (BFD64_BACKENDS_CFILES): Likewise.
990 * Makefile.in: Regenerated.
991 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
992 elf32-i386.lo and elf64-x86-64.lo.
993 * configure: Regenerated.
994 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
995 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
996 "objalloc.h" and "hashtab.h".
997 (ELIMINATE_COPY_RELOCS): Removed.
998 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
999 (SYMBOL_NO_COPYRELOC): Likewise.
1000 (elf_i386_link_hash_entry): Likewise.
1001 (GOT_UNKNOWN): Likewise.
1002 (GOT_NORMAL): Likewise.
1003 (GOT_TLS_GD): Likewise.
1004 (elf_i386_hash_entry): Likewise.
1005 (elf_i386_obj_tdata): Likewise.
1006 (elf_i386_tdata): Likewise.
1007 (elf_i386_local_got_tls_type): Likewise.
1008 (elf_i386_local_tlsdesc_gotent): Likewise.
1009 (elf_i386_hash_table): Likewise.
1010 (elf_i386_link_hash_newfunc): Likewise.
1011 (elf_i386_local_htab_hash): Likewise.
1012 (elf_i386_local_htab_eq): Likewise.
1013 (elf_i386_get_local_sym_hash): Likewise.
1014 (elf_i386_link_hash_table_free): Likewise.
1015 (elf_i386_copy_indirect_symbol): Likewise.
1016 (elf_i386_fixup_symbol): Likewise.
1017 (elf_i386_readonly_dynrelocs): Likewise.
1018 (elf_i386_always_size_sections): Likewise.
1019 (elf_i386_set_tls_module_base): Likewise.
1020 (elf_i386_dtpoff_base): Likewise.
1021 (compare_relocs): Likewise.
1022 (elf_i386_hash_symbol): Likewise.
1023 (elf_i386_parse_gnu_properties): Likewise.
1024 (elf_i386_merge_gnu_properties): Likewise.
1025 (elf_i386_link_check_relocs): Likewise.
1026 (elf_i386_merge_symbol_attribute): Likewise.
1027 (bfd_elf32_bfd_link_check_relocs): Likewise.
1028 (elf_backend_copy_indirect_symbol): Likewise.
1029 (elf_backend_always_size_sections): Likewise.
1030 (elf_backend_omit_section_dynsym): Likewise.
1031 (elf_backend_hash_symbol): Likewise.
1032 (elf_backend_fixup_symbol): Likewise.
1033 (elf_backend_parse_gnu_properties): Likewise.
1034 (elf_backend_merge_gnu_properties): Likewise.
1035 (elf_backend_merge_symbol_attribute): Likewise.
1036 (elf_i386_mkobject): Updated.
1037 (elf_i386_link_hash_table_create): Likewise.
1038 (elf_i386_check_tls_transition): Likewise.
1039 (elf_i386_tls_transition): Likewise.
1040 (elf_i386_convert_load_reloc): Likewise.
1041 (elf_i386_check_relocs): Likewise.
1042 (elf_i386_adjust_dynamic_symbol): Likewise.
1043 (elf_i386_allocate_dynrelocs): Likewise.
1044 (elf_i386_convert_load): Likewise.
1045 (elf_i386_size_dynamic_sections): Likewise.
1046 (elf_i386_relocate_section): Likewise.
1047 (elf_i386_finish_dynamic_symbol ): Likewise.
1048 (elf_i386_finish_dynamic_sections): Likewise.
1049 (elf_i386_output_arch_local_syms): Likewise.
1050 (elf_i386_get_synthetic_symtab): Likewise.
1051 (elf_i386_link_setup_gnu_properties): Likewise.
1052 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1053 of elf_link_hash_table, as base.
1054 (elf_i386_next_tls_desc_index): New.
1055 (elf_i386_srelplt2): Likewise.
1056 (elf_i386_plt): Likewise.
1057 (elf_i386_lazy_plt): Likewise.
1058 (elf_i386_non_lazy_plt): Likewise.
1059 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1060 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1061 "objalloc.h" and "hashtab.h".
1062 (ELIMINATE_COPY_RELOCS): Removed.
1063 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1064 (SYMBOL_NO_COPYRELOC): Likewise.
1065 (elf_x86_64_link_hash_entry): Likewise.
1066 (GOT_UNKNOWN): Likewise.
1067 (GOT_NORMAL): Likewise.
1068 (GOT_TLS_GD): Likewise.
1069 (elf_x86_64_hash_entry): Likewise.
1070 (elf_x86_64_obj_tdata): Likewise.
1071 (elf_x86_64_tdata): Likewise.
1072 (elf_x86_64_local_got_tls_type): Likewise.
1073 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1074 (elf_x86_64_hash_table): Likewise.
1075 (elf_x86_64_link_hash_newfunc): Likewise.
1076 (elf_x86_64_local_htab_hash): Likewise.
1077 (elf_x86_64_local_htab_eq): Likewise.
1078 (elf_x86_64_get_local_sym_hash): Likewise.
1079 (elf_x86_64_link_hash_table_free): Likewise.
1080 (elf_x86_64_copy_indirect_symbol): Likewise.
1081 (elf_x86_64_fixup_symbol): Likewise.
1082 (elf_x86_64_readonly_dynrelocs): Likewise.
1083 (elf_x86_64_always_size_sections): Likewise.
1084 (elf_x86_64_set_tls_module_base): Likewise.
1085 (elf_x86_64_dtpoff_base): Likewise.
1086 (compare_relocs): Likewise.
1087 (elf_x86_64_merge_symbol_attribute): Likewise.
1088 (elf_x86_64_hash_symbol): Likewise.
1089 (elf_x86_64_parse_gnu_properties): Likewise.
1090 (elf_x86_64_merge_gnu_properties): Likewise.
1091 (elf_x86_64_link_check_relocs): Likewise.
1092 (elf_backend_copy_indirect_symbol): Likewise.
1093 (elf_backend_always_size_sections): Likewise.
1094 (bfd_elf64_bfd_link_check_relocs): Likewise.
1095 (elf_backend_merge_symbol_attribute): Likewise.
1096 (elf_backend_hash_symbol): Likewise.
1097 (elf_backend_omit_section_dynsym): Likewise.
1098 (elf_backend_fixup_symbol): Likewise.
1099 (elf_backend_parse_gnu_properties): Likewise.
1100 (elf_backend_merge_gnu_properties): Likewise.
1101 (bfd_elf32_bfd_link_check_relocs): Likewise.
1102 (elf_x86_64_mkobject): Updated.
1103 (elf_x86_64_link_hash_table_create): Likewise.
1104 (elf_x86_64_check_tls_transition): Likewise.
1105 (elf_x86_64_tls_transition): Likewise.
1106 (elf_x86_64_convert_load_reloc): Likewise.
1107 (elf_x86_64_check_relocs): Likewise.
1108 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1109 (elf_x86_64_allocate_dynrelocs): Likewise.
1110 (elf_x86_64_convert_load): Likewise.
1111 (elf_x86_64_size_dynamic_sections): Likewise.
1112 (elf_x86_64_relocate_section): Likewise.
1113 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1114 (elf_x86_64_finish_dynamic_sections): Likewise.
1115 (elf_x86_64_output_arch_local_syms): Likewise.
1116 (elf_x86_64_get_synthetic_symtab): Likewise.
1117 (elf_x86_64_link_setup_gnu_properties): Likewise.
1118 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1119 instead of elf_link_hash_table, as base.
1120 (elf_x86_64_next_tls_desc_index): New.
1121 (elf_x86_64_srelplt2): Likewise.
1122 (elf_x86_64_plt): Likewise.
1123 (elf_x86_64_lazy_plt): Likewise.
1124 (elf_x86_64_non_lazy_plt): Likewise.
1125 * elfxx-x86.c: New file.
1126 * elfxx-x86.h: Likewise.
1128 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1130 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1132 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1134 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1136 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1137 sections before checking dynamic relocations and free invalid
1138 PLT section contents.
1139 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1141 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1143 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1144 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1146 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1149 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1151 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1153 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1155 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1157 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1159 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1162 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1163 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1164 Add a has_no_copy_on_protected bitfield.
1165 (elf_has_no_copy_on_protected): New.
1166 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1167 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1168 (elf_merge_gnu_property_list): Likewise.
1169 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1170 to FALSE for elf_has_no_copy_on_protected.
1171 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1172 (elf_i386_link_hash_entry): Add def_protected.
1173 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1174 when checking info->nocopyreloc.
1175 (elf_i386_link_setup_gnu_properties): Don't set
1176 extern_protected_data here.
1177 (elf_i386_merge_symbol_attribute): New function.
1178 (elf_backend_merge_symbol_attribute): New.
1179 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1180 (elf_x86_64_link_hash_entry): Add def_protected.
1181 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1182 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1183 when checking info->nocopyreloc.
1184 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1185 relocation run-time overflow and unresolvable R_X86_64_32S
1186 relocation against protected data symbol defined in shared object
1187 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1188 (elf_x86_64_link_setup_gnu_properties): Don't set
1189 extern_protected_data here.
1190 (elf_x86_64_merge_symbol_attribute): New function.
1191 (elf_backend_merge_symbol_attribute): New.
1193 2017-08-26 Alan Modra <amodra@gmail.com>
1195 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1196 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1197 (ppc_elf_relocate_section): Comment fix.
1198 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1199 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1200 Support dynamic relocs for TPREL16 when non-pic too.
1201 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1202 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1205 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1207 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1208 "symbol" in comments.
1209 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1211 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1214 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1215 R_X86_64_PC32 relocation run-time overflow and unresolvable
1216 R_X86_64_32S relocation with -z nocopyreloc.
1218 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1220 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1221 Undefined symbols may not have a type.
1222 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1224 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1226 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1227 bfd_link_info. Report shared, PIE or PDE object based on
1229 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1230 (elf_x86_64_relocate_section): Likewise.
1232 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1234 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1235 for function symbols.
1236 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1238 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1240 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1241 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1242 is set on any input relocatable file.
1243 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1245 2017-08-23 Alan Modra <amodra@gmail.com>
1248 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1249 ensure_undefweak_dynamic. Handle undefined too.
1250 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1251 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1252 (allocate_dynrelocs): Discard undefined non-default visibility
1253 relocs first. Make undefined syms dynamic. Tidy goto.
1255 2017-08-21 Alan Modra <amodra@gmail.com>
1256 H.J. Lu <hongjiu.lu@intel.com>
1259 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1260 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1262 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1265 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1266 undefined weak symbols.
1268 2017-08-18 Nick Clifton <nickc@redhat.com>
1271 * tekhex.c (getsym): Fix check for source pointer walking off the
1272 end of the input buffer.
1274 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1277 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1278 relocations in debug sections, change abort to _bfd_error_handler.
1280 2017-08-14 Nick Clifton <nickc@redhat.com>
1283 * elf.c (setup_group): Check for an empty or very small group
1285 * po/bfd.pot: Regenerate.
1287 2017-08-14 Alan Modra <amodra@gmail.com>
1290 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1291 alignment padding here.
1292 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1293 in a reverse pass over sections.
1295 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1298 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1299 for @plt suffixes first.
1300 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1302 2017-08-08 Nick Clifton <nickc@redhat.com>
1305 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1306 small section lengths.
1307 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1309 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1310 there is enough data present in the note.
1312 2017-08-08 Alan Modra <amodra@gmail.com>
1315 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1316 got.refcount for GOTOFF relocs, just create .got section.
1318 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1320 * elflink.c (elf_link_add_object_symbols): Move common symbol
1321 check after bed->common_definition.
1323 2017-08-07 Alan Modra <amodra@gmail.com>
1326 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1327 needed to define various dynamic tags have been discarded.
1329 2017-08-07 Nick Clifton <nickc@redhat.com>
1332 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1333 has not been set then use the bfd returned by
1334 _bfd_elf_link_setup_gnu_properties. If that is null then search
1335 through all the input bfds selecting the first normal, ELF format
1337 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1339 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1341 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1343 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1344 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1345 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1346 (elf_i386_link_check_relocs): New function.
1347 (bfd_elf32_bfd_link_check_relocs): New.
1348 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1350 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1351 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1352 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1353 (elf_x86_64_link_check_relocs): New function.
1354 (bfd_elf64_bfd_link_check_relocs): New.
1355 (bfd_elf32_bfd_link_check_relocs): Likewise.
1357 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1360 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1361 as undefined for --no-define-common.
1363 2017-08-05 Alan Modra <amodra@gmail.com>
1365 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1366 hppa_link_hash_table.
1368 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1370 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1371 entries for sysregs with negative indices.
1373 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1375 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1376 isn't the S/390 specific elf data.
1377 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1379 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1381 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1382 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1383 [R_RISCV_ADD16]: Likewise.
1384 [R_RISCV_ADD32]: Likewise.
1385 [R_RISCV_ADD64]: Likewise.
1386 [R_RISCV_SUB6]: Likewise.
1387 [R_RISCV_SUB8]: Likewise.
1388 [R_RISCV_SUB16]: Likewise.
1389 [R_RISCV_SUB32]: Likewise.
1390 [R_RISCV_SUB64]: Likewise.
1392 2017-07-31 Alan Modra <amodra@gmail.com>
1394 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1395 without ld.so checks.
1397 2017-07-29 Alan Modra <amodra@gmail.com>
1400 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1401 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1402 (is_elfv2_localentry0): Test non_zero_localentry.
1403 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1405 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1407 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1408 pointer check for htab->elf.irelplt.
1409 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1411 2017-07-27 Nick Clifton <nickc@redhat.com>
1414 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1416 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1418 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1420 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1422 (evax_bfd_print_emh): Check for invalid string lengths.
1424 2017-07-25 Nick Clifton <nickc@redhat.com>
1426 * po/fr.po: Updated French translation.
1428 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1431 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1432 16-bit absolute branches into 10-bit pc-relative branches on the
1433 MSP430 as well as the MSP430X.
1435 2017-07-25 Alan Modra <amodra@gmail.com>
1437 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1438 (stub_eh_frame_size): New function.
1439 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1440 (group_sections): Init group tls_get_addr_opt_bctrl.
1441 (ppc64_elf_size_stubs): Update sizing and initialization of
1442 .eh_frame. Iteration over stubs via group list.
1443 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1444 (ppc64_elf_finish_dynamic_sections): Update finalization of
1447 2017-07-24 Nick Clifton <nickc@redhat.com>
1450 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1451 of the relocs to the canonicalize_one_reloc routine.
1452 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1453 for the _bfd_mach_o_canonicalize_one_reloc field.
1454 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1455 res_base parameter. Use to check for corrupt pair relocs.
1456 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1458 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1460 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1463 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1464 enough data in the record before attempting to parse it.
1465 (_bfd_vms_slurp_eeom): Likewise.
1467 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1468 (image_set_ptr): Likewise.
1469 (alpha_vms_slurp_relocs): Likewise.
1471 (alpha_vms_object_p): Check for a truncated record.
1473 2017-07-24 Nick Clifton <nickc@redhat.com>
1476 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1477 an unrecognized reloc and sets the bfd_error value.
1478 * libbfd.h: Regenerate.
1479 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1481 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1482 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1483 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1484 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1485 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1487 2017-07-23 Alan Modra <amodra@gmail.com>
1489 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1492 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1495 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1496 reloc_class_ifunc for ifunc symbols.
1498 2017-07-19 Nick Clifton <nickc@redhat.com>
1501 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1502 correct magic bytes at the start, set the error to wrong format
1503 and clear the format selector before returning NULL.
1505 2017-07-19 Nick Clifton <nickc@redhat.com>
1508 * coff-rs6000.c (_bfd_strntol): New function.
1509 (_bfd_strntoll): New function.
1510 (GET_VALUE_IN_FIELD): New macro.
1511 (EQ_VALUE_IN_FIELD): new macro.
1512 (_bfd_xcoff_slurp_armap): Use new macros.
1513 (_bfd_xcoff_archive_p): Likewise.
1514 (_bfd_xcoff_read_ar_hdr): Likewise.
1515 (_bfd_xcoff_openr_next_archived_file): Likewise.
1516 (_bfd_xcoff_stat_arch_elt): Likewise.
1517 * coff64-rs6000.c (_bfd_strntol): New function.
1518 (_bfd_strntoll): New function.
1519 (GET_VALUE_IN_FIELD): New macro.
1520 (xcoff64_slurp_armap): Use new macros.
1522 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1523 John Eric Martin <John.Martin@emmicro-us.com>
1525 * bfd-in2.h: Regenerate.
1526 * libbfd.h: Regenerate.
1527 * elf32-arc.c (JLI): Define.
1528 * reloc.c: Add JLI relocations.
1530 2017-07-18 Nick Clifton <nickc@redhat.com>
1533 * coff-sh.c: Fix spelling typos.
1534 * compress.c: Likewise.
1535 * cpu-pdp11.c: Likewise.
1536 * ecofflink.c: Likewise.
1537 * elf-m10300.c: Likewise.
1539 * elf32-arm.c: Likewise.
1540 * elf32-m68k.c: Likewise.
1541 * elf32-nds32.c: Likewise.
1542 * elf32-ppc.c: Likewise.
1543 * elf32-sh.c: Likewise.
1544 * elf32-v850.c: Likewise.
1545 * elf64-ppc.c: Likewise.
1546 * elf64-x86-64.c: Likewise.
1547 * elflink.c: Likewise.
1548 * elfnn-aarch64.c: Likewise.
1549 * elfxx-mips.c: Likewise.
1551 * sunos.c: Likewise.
1552 * vms-alpha.c: Likewise.
1553 * xcofflink.c: Likewise.
1555 2017-07-18 Nick Clifton <nickc@redhat.com>
1558 * coffcode.h (handle_COMDAT): Replace abort with an error message
1561 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1564 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1567 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1569 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1571 2017-07-16 Alan Modra <amodra@gmail.com>
1573 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1574 __tls_index GOT entries when using __tls_get_addr_opt stub.
1575 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1577 2017-07-12 Alan Modra <amodra@gmail.com>
1579 * po/es.po: Update from translationproject.org/latest/bfd/.
1580 * po/fi.po: Likewise.
1581 * po/fr.po: Likewise.
1582 * po/id.po: Likewise.
1583 * po/ja.po: Likewise.
1584 * po/ro.po: Likewise.
1585 * po/ru.po: Likewise.
1586 * po/sr.po: Likewise.
1587 * po/sv.po: Likewise.
1588 * po/tr.po: Likewise.
1589 * po/uk.po: Likewise.
1590 * po/vi.po: Likewise.
1591 * po/zh_CN.po: Likewise.
1592 * po/hr.po: New file from translationproject.org.
1593 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1594 * configure: Regenerate.
1596 2017-07-12 Nick Clifton <nickc@redhat.com>
1598 Fix compile time warnings using gcc 7.1.1.
1599 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1601 (elf_xtensa_get_gotplt_section): Increase length of got_name
1603 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1604 default return of FALSE.
1605 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1606 default return of FALSE.
1608 2017-07-12 Alan Modra <amodra@gmail.com>
1610 * binary.c (binary_set_section_contents): Don't print filepos in
1612 (coff_write_object_contents): Cast size_t for error message.
1613 (coff_slurp_line_table): Don't use bfd_vma symndx.
1614 (coff_slurp_reloc_table): Remove unneeded cast.
1615 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1617 (find_abstract_instance_name): Likewise.
1618 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1619 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1620 (elf32_arm_check_relocs): Make r_symndx an int.
1621 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1623 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1625 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1627 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1628 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1629 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1630 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1631 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1632 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1633 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1634 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1635 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1636 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1637 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1638 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1639 and use %lu for error message.
1640 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1641 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1644 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1646 (elf32_arm_final_link_relocate): Likewise.
1647 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1648 * coffcode.h (styp_to_sec_flags): Likewise.
1649 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1650 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1651 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1652 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1653 (elf32_bfin_merge_private_bfd_data): Likewise.
1654 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1655 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1656 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1657 (i370_elf_relocate_section): Likewise.
1658 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1659 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1660 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1661 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1662 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1663 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1664 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1665 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1666 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1667 * ieee.c (ieee_write_id, read_id): Likewise.
1668 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1669 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1670 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1671 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1672 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1673 * stabs.c (_bfd_link_section_stabs): Likewise.
1675 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1677 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1678 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1679 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1680 * coff-sh.c (sh_relax_section): Likewise.
1681 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1682 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1683 * coffcode.h (coff_slurp_reloc_table): Likewise.
1684 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1685 (_bfd_coff_read_string_table): Likewise.
1686 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1687 * compress.c (bfd_get_full_section_contents): Likewise.
1688 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1689 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1690 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1691 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1692 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1693 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1694 (elf32_arm_write_section): Likewise.
1695 * elf32-bfin.c (bfin_relocate_section): Likewise.
1696 (bfinfdpic_relocate_section): Likewise.
1697 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1698 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1699 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1700 (elf_i386_relocate_section): Likewise.
1701 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1702 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1703 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1704 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1705 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1706 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1707 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1708 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1709 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1710 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1711 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1712 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1713 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1714 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1715 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1716 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1717 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1718 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1719 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1720 * elf32-sh.c (sh_elf_relax_section): Likewise.
1721 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1722 (sh_elf_relocate_section): Likewise.
1723 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1724 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1725 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1726 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1727 * elf32-v850.c (v850_elf_relax_section): Likewise.
1728 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1729 (elf_vax_relocate_section): Likewise.
1730 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1731 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1732 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1733 (do_fix_for_relocatable_link): Likewise.
1734 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1735 (elf64_alpha_relax_with_lituse): Likewise.
1736 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1737 (elf_hppa_final_link_relocate): Likewise.
1738 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1739 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1740 (elf64_vms_link_add_object_symbols): Likewise.
1741 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1742 (mmix_final_link_relocate): Likewise.
1743 * elf64-s390.c (invalid_tls_insn): Likewise.
1744 (elf_s390_relocate_section): Likewise.
1745 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1746 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1747 (elf_x86_64_relocate_section): Likewise.
1748 * elfcode.h (elf_slurp_symbol_table): Likewise.
1749 * elfcore.h (elf_core_file_p): Likewise.
1750 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1751 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1752 (elfNN_aarch64_relocate_section): Likewise.
1753 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1754 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1755 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1756 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1757 (_bfd_mips_elf_relocate_section): Likewise.
1758 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1759 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1760 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1761 * ieee.c (ieee_slurp_external_symbols): Likewise.
1762 * ihex.c (ihex_write_object_content): Likewise.
1763 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1764 * merge.c (_bfd_merged_section_offset): Likewise.
1765 * mmo.c (mmo_write_loc_chunk): Likewise.
1766 (mmo_write_object_contents): Likewise.
1767 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1768 * stabs.c (_bfd_link_section_stabs): Likewise.
1769 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1771 2017-07-11 Alan Modra <amodra@gmail.com>
1773 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1775 2017-07-11 Alan Modra <amodra@gmail.com>
1777 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1778 instruction" error using _bfd_error_handler, not einfo.
1780 2017-07-10 Nick Clifton <nickc@redhat.com>
1782 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1783 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1785 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1787 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1789 2017-07-07 Alan Modra <amodra@gmail.com>
1791 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1793 2017-07-07 Alan Modra <amodra@gmail.com>
1795 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1796 as long long. Move code replacing "ll" with "I64", and simplify.
1798 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1800 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1803 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1805 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1807 (line_info_add_file_name): Likewise.
1808 (decode_line_info): Likewise.
1810 2017-07-04 Tristan Gingold <gingold@adacore.com>
1812 * version.m4: Bump version to 2.29.51
1813 * configure: Regenerate.
1815 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1817 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1818 sanity check at the head of this function.
1820 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1822 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1823 dwarf_line_str_size.
1824 (struct attr_abbrev): Add field implicit_const.
1825 (dwarf_debug_sections): Add .debug_line_str.
1826 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1827 (dwarf_debug_section_assert): Add static assertion.
1828 (read_indirect_line_string): New.
1829 (read_abbrevs): Support DW_FORM_implicit_const.
1830 (is_str_attr): Support DW_FORM_line_strp.
1831 (read_attribute_value): Support DW_FORM_line_strp and
1832 DW_FORM_implicit_const.
1833 (read_attribute): Support DW_FORM_implicit_const.
1834 (line_info_add_include_dir, line_info_add_include_dir_stub):
1835 (line_info_add_file_name, read_formatted_entries): New.
1836 (decode_line_info, parse_comp_unit): Support DWARF 5.
1837 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1839 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1841 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1842 abort statement that was put for symbols that are not dynamic.
1844 2017-07-03 Tristan Gingold <gingold@adacore.com>
1846 * po/bfd.pot: Regenerate
1848 2017-07-03 Alan Modra <amodra@gmail.com>
1850 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1851 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1852 * elf.c (setup_group): Use "Lx" to print sh_size.
1853 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1854 unknown section type in hex.
1855 (copy_special_section_fields): Style fix.
1856 (bfd_section_from_shdr): Correct format for sh_link. Use a
1857 common error message for all the variants of unrecognized
1859 (assign_file_positions_for_load_sections): Use "Lx" for lma
1860 adjust error message.
1861 (assign_file_positions_for_non_load_sections): Formatting.
1862 (rewrite_elf_program_header): Formatting. Use "Lx" for
1863 bfd_vma values in error messages.
1864 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1865 ELF_R_SYM value to type expected by format.
1866 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1868 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1869 (elf_link_input_bfd): Use "Lx" for r_info.
1870 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1872 2017-07-03 Alan Modra <amodra@gmail.com>
1874 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1875 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1876 Microsoft C library variant of long long format specifier.
1877 (PRINT20): Cast value to bfd_uint64_t not long long.
1878 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1879 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1880 long long. Don't cast to bfd_vma.
1881 * elf32-score.c (score3_bfd_getl48): Likewise.
1882 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1884 2017-07-03 Alan Modra <amodra@gmail.com>
1886 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1888 (bfd_elf_print_symbol): Don't cast symbol->flags.
1889 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1890 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1891 _bfd_error_handler argument order.
1892 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1894 2017-07-03 Alan Modra <amodra@gmail.com>
1896 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1897 AC_TYPE_LONG_DOUBLE.
1898 * configure: Regenerate.
1899 * config.in: Regenerate.
1901 2017-06-29 Andrew Waterman <andrew@sifive.com>
1903 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1906 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1908 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1909 unless it is undefined weak.
1910 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1911 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1913 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1914 is not dynamic in PIC, abort.
1916 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1919 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1920 undefined weak symbols into dynamic.
1921 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1922 relocation for non-dynamic symbols.
1923 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1925 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1927 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1928 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1929 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1930 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1931 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1934 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1936 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1937 (elfcore_write_s390_gs_bc): Likewise.
1938 * elf.c (elfcore_grok_s390_gs_cb): New function.
1939 (elfcore_grok_s390_gs_bc): New function.
1940 (elfcore_grok_note): Call them.
1941 (elfcore_write_s390_gs_cb): New function.
1942 (elfcore_write_s390_gs_bc): New function.
1943 (elfcore_write_register_note): Call them.
1945 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1947 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1948 bfd_get_file_size. Check archive element size.
1949 (_bfd_generic_get_section_contents_in_window): Likewise.
1951 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1953 * bfd-in2.h: Regenerated.
1954 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1955 (bfd_get_file_size): Likewise.
1957 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1958 Matthew Fortune <matthew.fortune@imgtec.com>
1960 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1961 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1962 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1963 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1965 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1966 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1967 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1968 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1969 `bfd_mach_mips_interaptiv_mr2' entries.
1970 * bfd-in2.h: Regenerate.
1972 2017-06-27 Nick Clifton <nickc@redhat.com>
1974 * tekhex.c (pass_over): Revert accidental conversion of a local
1975 array to a static array.
1977 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1980 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1981 reloc addend if necessary. Adjust diff only if
1982 shrinked_insn_address < end_address.
1984 2017-06-27 Alan Modra <amodra@gmail.com>
1987 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1988 (_bfd_generic_get_section_contents_in_window): Likewise.
1990 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1992 * elfnn-riscv.c (perform_relocation): Support the new
1993 R_RISCV_32_PCREL relocation.
1994 (riscv_elf_relocate_section): Likewise.
1995 * elfxx-riscv.c (howto_table): Likewise.
1996 (riscv_reloc_map): Likewise.
1997 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1998 * libbfd.h: Regenerate.
2000 2017-06-27 Alan Modra <amodra@gmail.com>
2003 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2004 Use unsigned file pointer type, and remove cast.
2005 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2006 Add "count", not "sz".
2008 2017-06-26 Pedro Alves <palves@redhat.com>
2011 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2014 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2017 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2020 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2022 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2023 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2024 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2025 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2026 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2028 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2031 * compress.c (bfd_get_full_section_contents): Don't check the
2033 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2034 reject a section whose size + offset is greater than the size
2036 (_bfd_generic_get_section_contents_in_window): Likewise.
2038 2017-06-26 Nick Clifton <nickc@redhat.com>
2041 * tekhex.c (getvalue): Check for the source pointer exceeding the
2042 end pointer before the first byte is read.
2044 2017-06-26 Nick Clifton <nickc@redhat.com>
2047 * opncls.c (get_build_id): Check that the section is big enough
2048 to contain the whole note.
2049 * compress.c (bfd_get_full_section_contents): Check for and reject
2050 a section whose size is greater than the size of the entire file.
2051 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2052 contain a notes section.
2054 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2056 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2058 (elf_s390_modify_segment_map): Likewise.
2059 (bfd_elf_s390_set_options): Lisewise.
2061 2017-06-26 Alan Modra <amodra@gmail.com>
2063 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2065 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2066 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2067 .preinit_array on --just-syms bfds.
2068 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2069 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2070 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2072 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2074 * elf.c (find_link): Bounds check "hint".
2076 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2078 * elf32-arm.c (using_thumb_only): Update list of architectures in
2079 BFD_ASSERT for which the logic is valid.
2080 (using_thumb2_bl): Likewise.
2081 (using_thumb2): Likewise and return true for ARMv8-R.
2082 (arch_has_arm_nop): Likewise.
2083 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2084 merging logic. Update commentis for value 15 of v8m_baseline,
2085 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2086 merging of value 15 of Tag_CPU_arch.
2088 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2090 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2091 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2092 * bfd-in2.h: Regenerate.
2094 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2096 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2097 the error_alignment label forward. Properly align program
2098 property note section.
2100 2017-06-22 Eric Christopher <echristo@gmail.com>
2102 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2103 abs to fix a truncation warning.
2105 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2107 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2108 local undefined weak symbol to 0.
2109 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2111 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2113 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2114 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2115 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2116 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2117 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2118 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2119 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2120 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2122 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2124 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2125 (elf_i386_lazy_ibt_plt_entry): Likewise.
2126 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2127 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2128 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2129 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2130 (elf_i386_lazy_plt_layout): Likewise.
2131 (elf_i386_non_lazy_plt_layout): Likewise.
2132 (elf_i386_link_hash_entry): Add plt_second.
2133 (elf_i386_link_hash_table): Add plt_second and
2134 plt_second_eh_frame.
2135 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2136 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2137 the second PLT. Check the second PLT.
2138 (elf_i386_relocate_section): Use the second PLT to resolve
2139 PLT reference if needed.
2140 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2142 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2143 second PLT. Generate unwind info for the second PLT.
2144 (elf_i386_plt_type): Add plt_second.
2145 (elf_i386_get_synthetic_symtab): Support the second PLT.
2146 (elf_i386_parse_gnu_properties): Support
2147 GNU_PROPERTY_X86_FEATURE_1_AND.
2148 (elf_i386_merge_gnu_properties): Support
2149 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2150 on GNU_PROPERTY_X86_FEATURE_1_IBT
2151 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2152 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2153 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2154 is set on all relocatable inputs.
2155 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2156 (elf_x32_lazy_ibt_plt_entry): Likewise.
2157 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2158 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2159 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2160 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2161 (elf_x86_64_lazy_ibt_plt): Likewise.
2162 (elf_x32_lazy_ibt_plt): Likewise.
2163 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2164 (elf_x32_non_lazy_ibt_plt): Likewise.
2165 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2166 (elf_x86_64_parse_gnu_properties): Support
2167 GNU_PROPERTY_X86_FEATURE_1_AND.
2168 (elf_x86_64_merge_gnu_properties): Support
2169 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2170 on GNU_PROPERTY_X86_FEATURE_1_IBT
2171 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2172 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2173 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2174 is set on all relocatable inputs.
2176 2017-06-22 Nick Clifton <nickc@redhat.com>
2179 * som.c (setup_sections): NUL terminate the space_strings buffer.
2180 Check that the space.name field does not index beyond the end of
2181 the space_strings buffer.
2183 2017-06-21 Nick Clifton <nickc@redhat.com>
2186 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2188 2017-06-21 Nick Clifton <nickc@redhat.com>
2191 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2192 type of the size parameter.
2193 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2194 length of the counted string.
2195 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2196 (_bfd_vms_save_counted_string): Likewise.
2197 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2198 _bfd_vms_save_counted_string.
2199 (_bfd_vms_slurp_ehdr): Likewise.
2200 (_bfd_vms_slurp_egsd): Likewise.
2201 (Parse_module): Likewise.
2203 2017-06-21 Alan Modra <amodra@gmail.com>
2205 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2206 calls before tocsave calls.
2207 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2210 2017-06-21 Nick Clifton <nickc@redhat.com>
2213 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2214 bfd_get_full_section_contents returns no contents.
2216 2017-06-21 Nick Clifton <nickc@redhat.com>
2219 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2222 2017-06-21 Nick Clifton <nickc@redhat.com>
2225 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2227 (image_set_ptr): Likewise.
2228 (alpha_vms_fix_sec_rel): Likewise.
2229 (alpha_vms_slurp_relocs): Likewise.
2231 2017-06-21 Nick Clifton <nickc@redhat.com>
2234 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2236 (ieee_archive_p): Likewise.
2237 (ieee_object_p): Likewise.
2239 2017-06-21 Nick Clifton <nickc@redhat.com>
2242 * elf.c (setup_group): Zero the group section pointer list after
2243 allocation so that loops can be caught. Check for NULL pointers
2244 when processing a group list.
2246 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2248 * elf-s390.h: New file.
2249 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2251 (elf_s390_additional_program_headers): New function.
2252 (elf_s390_modify_segment_map): New function.
2253 (bfd_elf_s390_set_options): New function.
2254 (elf_backend_additional_program_headers)
2255 (elf_backend_modify_segment_map): Add macro definitions.
2257 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2260 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2261 the DYNAMIC bit instead of bfd_count_sections.
2263 2017-06-19 Nick Clifton <nickc@redhat.com>
2266 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2268 (evax_bfd_print_eeom): Likewise.
2269 (evax_bfd_print_egsd): Check for an overlarge record length.
2270 (evax_bfd_print_etir): Likewise.
2272 2017-06-19 Nick Clifton <nickc@redhat.com>
2275 * libieee.h (struct common_header_type): Add end_p field.
2276 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2278 (read_id): Check for a length that exceeds the remaining bytes in
2280 (ieee_seek): Initialise end_p.
2281 (ieee_archive_p): Likewise.
2282 (ieee_object_p): Likewise.
2284 2017-06-19 Nick Clifton <nickc@redhat.com>
2287 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2288 before reading the EIHS structure entries.
2290 2017-06-19 Nick Clifton <nickc@redhat.com>
2293 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2294 gsd_size. Check that there are enough bytes remaining to read the
2295 type and size of the next egsd. Check that the size of the egsd
2296 does not exceed the size of the record.
2298 2017-06-19 Alan Modra <amodra@gmail.com>
2300 * config.bfd: Correct targ_underscore for cris.
2302 2017-06-18 Alan Modra <amodra@gmail.com>
2304 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2305 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2307 2017-06-16 Nick Clifton <nickc@redhat.com>
2309 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2310 bucketlist is empty because there are no symbols to add to the
2313 2017-06-16 Alan Modra <amodra@gmail.com>
2319 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2320 (BFD_JUMP_TABLE_LINK): Likewise.
2321 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2322 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2323 (bfd_elf_define_start_stop): New function.
2324 * linker.c (bfd_generic_define_start_stop): New function.
2325 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2327 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2328 * aout-target.h (MY_bfd_define_start_stop): Define.
2329 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2330 * binary.c (binary_bfd_define_start_stop): Define.
2331 * bout.c (b_out_bfd_define_start_stop): Define.
2332 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2333 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2334 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2335 * coffcode.h (coff_bfd_define_start_stop): Define.
2336 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2337 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2338 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2339 * ieee.c (ieee_bfd_define_start_stop): Define.
2340 * ihex.c (ihex_bfd_define_start_stop): Define.
2341 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2342 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2343 * mmo.c (mmo_bfd_define_start_stop): Define.
2344 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2345 * oasys.c (oasys_bfd_define_start_stop): Define.
2346 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2347 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2348 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2349 * som.c (som_bfd_define_start_stop): Define.
2350 * srec.c (srec_bfd_define_start_stop): Define.
2351 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2352 * versados.c (versados_bfd_define_start_stop): Define.
2353 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2354 (alpha_vms_bfd_define_start_stop): Define.
2355 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2356 * bfd-in2.h: Regenerate.
2357 * libbfd.h: Regenerate.
2359 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2361 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2362 SYMBOL_REFERENCES_LOCAL.
2364 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2367 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2368 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2369 runtime for if there needs copy relocation elimination.
2370 (need_copy_relocation_p): New function. Return true for symbol with
2371 pc-relative references and if it's against read-only sections.
2372 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2373 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2374 that are related with accessing external objects.
2375 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2376 in elfNN_aarch64_check_relocs.
2378 2017-06-15 Nick Clifton <nickc@redhat.com>
2381 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2384 (ieee_archive_p): Likewise.
2386 2017-06-15 Nick Clifton <nickc@redhat.com>
2389 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2391 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2393 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2394 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2395 keep both windowed and call0 ABI PLT definitions.
2396 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2397 elf_xtensa_*_plt_entry endex.
2398 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2400 2017-06-14 Nick Clifton <nickc@redhat.com>
2403 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2406 2017-06-14 Nick Clifton <nickc@redhat.com>
2409 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2410 maximum value for the ascic pointer. Check that name processing
2411 does not read beyond this value.
2412 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2415 2017-06-14 Nick Clifton <nickc@redhat.com>
2418 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2419 (process_otr): Check for an invalid offset in the otr structure.
2421 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2423 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2425 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2431 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2432 vtable field to a union.
2433 (_bfd_elf_is_start_stop): Removed.
2434 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2435 __start_SECNAME and __stop_SECNAME symbols.
2436 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2437 * elflink.c (_bfd_elf_is_start_stop): Removed.
2438 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2439 _bfd_elf_is_start_stop.
2440 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2441 __stop_SECNAME symbols. Updated.
2442 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2443 (bfd_elf_gc_record_vtinherit): Likewise.
2444 (bfd_elf_gc_record_vtentry): Likewise.
2446 2017-06-13 Nick Clifton <nickc@redhat.com>
2449 * elflink.c (elf_link_adjust_relocs): Generate an error when
2450 encountering a reloc against a symbol removed by garbage
2453 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2455 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2456 to merge_gnu_properties.
2457 * elf-properties.c (elf_merge_gnu_properties): Add struct
2458 bfd_link_info * and pass it to merge_gnu_properties.
2459 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2460 and pass it to elf_merge_gnu_properties.
2461 (_bfd_elf_link_setup_gnu_properties): Pass info to
2462 elf_merge_gnu_property_list.
2463 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2465 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2467 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2470 * binary.c (binary_set_section_contents): Scale lma by octets
2471 per byte to set filepos.
2473 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2475 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2478 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2480 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2483 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2485 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2486 patched section contents for TLS IE reloc.
2487 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2489 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2491 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2492 RELOC_FOR_GLOBAL_SYMBOL macro.
2494 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2496 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2499 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2501 * config/tc-arc.c (md_undefined_symbol): Changed.
2502 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2504 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2506 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2509 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2511 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2512 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2514 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2516 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2519 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2521 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2522 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2523 is non-zero. Add clarifying comments.
2525 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2527 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2528 name. Use local IFUNC symbol name string to report unsupported
2529 non-PIC call to IFUNC function.
2530 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2531 when generating R_386_IRELATIVE relocation.
2532 (elf_i386_finish_dynamic_symbol): Likewise.
2533 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2535 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2536 when generating R_X86_64_IRELATIVE relocation.
2537 (elf_x86_64_finish_dynamic_symbol): Likewise.
2539 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2541 * elf.c (setup_group): Make sure BFD sections are created for all
2542 group sections in the input file when processing SHF_GROUP
2544 (bfd_section_from_shdr): Avoid duplicating logic already
2545 implemented in `setup_group'.
2547 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2550 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2551 if the hint address is zero.
2553 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2556 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2557 ELF_COMMON_DEF_P for common symbols.
2559 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2561 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2562 SEC_GROUP sections as SEC_EXCLUDE.
2563 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2564 (assign_section_numbers): Use resolve_section_groups flag instead
2565 of relocatable link type.
2566 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2567 flag instead of checking the final_link flag for part of the
2568 checks in here. Fix white space as a result.
2569 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2570 instead of relocatable link type.
2571 (bfd_elf_final_link): Likewise.
2573 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2575 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2577 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2578 (s3_bfd_score_elf_check_relocs): Likewise.
2579 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2580 (score_elf_final_link_relocate): Likewise.
2581 (s7_bfd_score_elf_check_relocs): Likewise.
2583 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2585 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2588 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2590 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2591 from `reloc_count' rather than decrementing it.
2592 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2593 `reloc_count' by `int_rels_per_ext_rel'.
2594 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2595 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2596 entry determination.
2597 (s3_bfd_score_elf_check_relocs): Likewise.
2598 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2599 (s7_bfd_score_elf_relocate_section): Likewise.
2600 (s7_bfd_score_elf_check_relocs): Likewise.
2601 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2602 prototype and function.
2603 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2604 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2605 triple rather than once the sum of REL and RELA relocation entry
2607 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2608 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2609 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2610 storage allocation size determination.
2611 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2612 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2613 by `int_rels_per_ext_rel' for last relocation entry
2615 (bfd_elf_final_link): Do not multiply `reloc_count' by
2616 `int_rels_per_ext_rel' for internal relocation storage
2617 allocation size determination.
2618 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2619 `int_rels_per_ext_rel' for last relocation entry determination.
2620 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2621 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2622 (_bfd_mips_elf_relocate_section): Likewise.
2624 2017-06-05 Alan Modra <amodra@gmail.com>
2627 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2629 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2631 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2632 determine structure sizes.
2633 (elfcore_grok_freebsd_prstatus): Likewise.
2635 2017-06-01 Alan Modra <amodra@gmail.com>
2637 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2638 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2640 (is_elfv2_localentry0): New function.
2641 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2642 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2643 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2644 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2645 optimized localentry:0 stubs.
2646 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2647 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2649 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2651 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2653 2017-05-30 Casey Smith <clegg89@gmail.com>
2656 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2657 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2659 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2661 * cpu-arc.c (arc_compatible): New function.
2663 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2665 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2667 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2670 * bfdio.c (bfd_get_file_size): New function.
2671 * bfd-in2.h: Regenerated.
2673 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2675 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2678 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2680 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2681 dynobj instead of htab->elf.dynobj.
2683 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2685 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2687 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2688 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2689 actual number of internal relocations retrieved. Adjust
2690 function description.
2691 (bfd_elf64_canonicalize_reloc): Remove macro.
2692 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2694 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2696 * archures.c (bfd_mach_sparc_v9m8): Define.
2697 (bfd_mach_sparc_v8plusm8): Likewise.
2698 (bfd_mach_sparc_v9_p): Adjust to M8.
2699 (bfd_mach_sparc_64bit_p): Likewise.
2700 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2701 bfd_mach_sparc_v8plusm8.
2702 * bfd-in2.h: Regenerated.
2703 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2705 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2706 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2707 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2709 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2710 bfd_mach_sparc_v8plusm8.
2712 2017-05-19 Alan Modra <amodra@gmail.com>
2714 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2715 debug and special sections when no non-note alloc sections in an
2718 2017-05-18 Alan Modra <amodra@gmail.com>
2720 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2721 * elf-m10300.c: Likewise.
2723 * elf32-arc.c: Likewise.
2724 * elf32-bfin.c: Likewise.
2725 * elf32-m68k.c: Likewise.
2726 * elf32-nds32.c: Likewise.
2727 * elf32-tilepro.c: Likewise.
2728 * elflink.c: Likewise.
2729 * elfnn-aarch64.c: Likewise.
2730 * elfnn-riscv.c: Likewise.
2731 * elfxx-tilegx.c: Likewise.
2732 * mach-o.c: Likewise.
2733 * peXXigen.c: Likewise.
2734 * vms-alpha.c: Likewise.
2735 * vms-lib.c: Likewise.
2737 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2740 * elflink.c (elf_gc_mark_debug_section): New function.
2741 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2742 referenced by kept debug sections.
2744 2017-05-16 Alan Modra <amodra@gmail.com>
2746 * elf-m10300.c: Rename occurrences of non_ir_ref.
2747 * elf32-arm.c: Likewise.
2748 * elf32-bfin.c: Likewise.
2749 * elf32-cr16.c: Likewise.
2750 * elf32-cris.c: Likewise.
2751 * elf32-d10v.c: Likewise.
2752 * elf32-dlx.c: Likewise.
2753 * elf32-fr30.c: Likewise.
2754 * elf32-frv.c: Likewise.
2755 * elf32-hppa.c: Likewise.
2756 * elf32-i370.c: Likewise.
2757 * elf32-i386.c: Likewise.
2758 * elf32-iq2000.c: Likewise.
2759 * elf32-lm32.c: Likewise.
2760 * elf32-m32c.c: Likewise.
2761 * elf32-m32r.c: Likewise.
2762 * elf32-m68hc1x.c: Likewise.
2763 * elf32-m68k.c: Likewise.
2764 * elf32-mcore.c: Likewise.
2765 * elf32-metag.c: Likewise.
2766 * elf32-microblaze.c: Likewise.
2767 * elf32-moxie.c: Likewise.
2768 * elf32-msp430.c: Likewise.
2769 * elf32-mt.c: Likewise.
2770 * elf32-nios2.c: Likewise.
2771 * elf32-or1k.c: Likewise.
2772 * elf32-ppc.c: Likewise.
2773 * elf32-rl78.c: Likewise.
2774 * elf32-s390.c: Likewise.
2775 * elf32-score.c: Likewise.
2776 * elf32-score7.c: Likewise.
2777 * elf32-sh.c: Likewise.
2778 * elf32-tic6x.c: Likewise.
2779 * elf32-tilepro.c: Likewise.
2780 * elf32-v850.c: Likewise.
2781 * elf32-vax.c: Likewise.
2782 * elf32-xstormy16.c: Likewise.
2783 * elf32-xtensa.c: Likewise.
2784 * elf64-alpha.c: Likewise.
2785 * elf64-hppa.c: Likewise.
2786 * elf64-ia64-vms.c: Likewise.
2787 * elf64-mmix.c: Likewise.
2788 * elf64-ppc.c: Likewise.
2789 * elf64-s390.c: Likewise.
2790 * elf64-sh64.c: Likewise.
2791 * elf64-x86-64.c: Likewise.
2792 * elflink.c: Likewise.
2793 * elfnn-aarch64.c: Likewise.
2794 * elfnn-ia64.c: Likewise.
2795 * elfnn-riscv.c: Likewise.
2796 * elfxx-mips.c: Likewise.
2797 * elfxx-sparc.c: Likewise.
2798 * elfxx-tilegx.c: Likewise.
2799 * linker.c: Likewise.
2801 2017-05-16 Alan Modra <amodra@gmail.com>
2803 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2804 * elflink.c (elf_link_add_object_symbols): Update to use
2806 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2808 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2810 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2812 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2814 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2816 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2817 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2819 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2821 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2823 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2825 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2826 to plt_second/plt_second_eh_frame.
2827 (elf_x86_64_link_hash_newfunc): Updated.
2828 (elf_x86_64_allocate_dynrelocs): Likewise.
2829 (elf_x86_64_size_dynamic_sections): Likewise.
2830 (elf_x86_64_relocate_section): Likewise.
2831 (elf_x86_64_finish_dynamic_symbol): Likewise.
2832 (elf_x86_64_finish_dynamic_sections): Likewise.
2833 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2834 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2836 (elf_backend_setup_gnu_properties): Updated. Create the
2837 .plt.sec section instead of the .plt.sec section.
2839 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2841 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2842 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2843 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2845 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2847 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2848 (bfd_elf64_set_reloc): Define.
2849 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2851 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2853 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2854 (struct bfd_target): New field _bfd_set_reloc.
2855 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2856 * reloc.c (_bfd_generic_set_reloc): New function.
2857 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2858 * nlm-target.h (nlm_set_reloc): Likewise.
2859 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2860 * aout-tic30.c (MY_set_reloc): Likewise.
2861 * aout-target.h (MY_set_reloc): Likewise.
2862 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2863 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2864 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2865 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2866 * aout-adobe.c (aout_32_set_reloc): Likewise.
2867 * bout.c (b_out_set_reloc): Likewise.
2868 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2869 * i386os9k.c (aout_32_set_reloc): Likewise.
2870 * ieee.c (ieee_set_reloc): Likewise.
2871 * oasys.c (oasys_set_reloc): Likewise.
2872 * som.c (som_set_reloc): Likewise.
2873 * versados.c (versados_set_reloc): Likewise.
2874 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2875 _bfd_generic_set_reloc.
2876 (rs6000_xcoff64_aix_vec): LIkewise.
2877 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2878 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2879 * i386msdos.c (msdos_set_reloc): Define to
2880 _bfd_norelocs_set_reloc.
2881 * elfcode.h (elf_set_reloc): Define.
2882 * bfd-in2.h: Regenerated.
2884 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2887 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2888 for IFUNC function address.
2890 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2892 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2893 (CONFLICT_LIST): Likewise.
2894 (opcode/arc-attrs.h): Include.
2895 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2896 (arc_extract_features): New file.
2897 (arc_stralloc): Likewise.
2898 (arc_elf_merge_attributes): Likewise.
2899 (arc_elf_merge_private_bfd_data): Use object attributes.
2900 (bfd_arc_get_mach_from_attributes): New function.
2901 (arc_elf_object_p): Use object attributes.
2902 (arc_elf_final_write_processing): Likewise.
2903 (elf32_arc_obj_attrs_arg_type): New function.
2904 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2905 (elf32_arc_section_from_shdr): Likewise.
2906 (elf_backend_obj_attrs_vendor): Define.
2907 (elf_backend_obj_attrs_section): Likewise.
2908 (elf_backend_obj_attrs_arg_type): Likewise.
2909 (elf_backend_obj_attrs_section_type): Likewise.
2910 (elf_backend_obj_attrs_handle_unknown): Likewise.
2911 (elf_backend_section_from_shdr): Likewise.
2913 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2916 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2917 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2918 and the destination is a Thumb symbol.
2920 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2922 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2923 initializer to silence GCC 4.2.
2924 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2926 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2928 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2929 (LAZY_PLT_ENTRY_SIZE): This.
2930 (NON_LAZY_PLT_ENTRY_SIZE): New.
2931 (elf_x86_64_plt0_entry): Renamed to ...
2932 (elf_x86_64_lazy_plt0_entry): This.
2933 (elf_x86_64_plt_entry): Renamed to ...
2934 (elf_x86_64_lazy_plt_entry): This.
2935 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2936 (elf_x86_64_lazy_bnd_plt0_entry): This.
2937 (elf_x86_64_legacy_plt_entry): Removed.
2938 (elf_x86_64_bnd_plt_entry): Renamed to ...
2939 (elf_x86_64_lazy_bnd_plt_entry): This.
2940 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2941 (elf_x86_64_non_lazy_plt_entry): This.
2942 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2943 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2944 (elf_x86_64_eh_frame_plt): Renamed to ...
2945 (elf_x86_64_eh_frame_lazy_plt): This.
2946 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2947 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2948 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2949 (elf_x86_64_eh_frame_non_lazy_plt): This.
2950 (elf_x86_64_lazy_plt_layout): New.
2951 (elf_x86_64_non_lazy_plt_layout): Likewise.
2952 (elf_x86_64_plt_layout): Likewise.
2953 (elf_x86_64_backend_data): Remove PLT layout information. Add
2954 os for target system.
2955 (GET_PLT_ENTRY_SIZE): Removed.
2956 (elf_x86_64_lazy_plt): New.
2957 (elf_x86_64_non_lazy_plt): Likewise.
2958 (elf_x86_64_lazy_bnd_plt): Likewise.
2959 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2960 (elf_x86-64_arch_bed): Updated.
2961 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2962 (elf_x86_64_create_dynamic_sections): Removed.
2963 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2964 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2965 (elf_x86-64_adjust_dynamic_symbol): Updated.
2966 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2967 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2968 size for PLT0 if there is no PLT0. Get plt_entry_size from
2969 non_lazy_plt for non-lazy PLT entries.
2970 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2971 from non_lazy_plt for non-lazy PLT entries.
2972 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2973 if there is no PLT0.
2974 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2975 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2976 entries with non-lazy PLT layout. Don't fill the second and third
2977 slots in the PLT entry if there is no PLT0.
2978 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2979 if there is no PLT0. Set sh_entsize on the .plt.got section.
2980 (compare_relocs): New.
2981 (elf_x86_64_plt_type): Likewise.
2982 (elf_x86_64_plt): Likewise.
2983 (elf_x86_64_nacl_plt): New. Forward declaration.
2984 (elf_x86_64_get_plt_sym_val): Removed.
2985 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2986 against all dynamic relocations.
2987 (elf_x86_64_link_setup_gnu_properties): New function.
2988 (elf_backend_create_dynamic_sections): Updated.
2989 (elf_backend_setup_gnu_properties): New.
2990 (elf_x86_64_nacl_plt): New.
2991 (elf_x86_64_nacl_arch_bed): Updated.
2993 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2995 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2996 (LAZY_PLT_ENTRY_SIZE): This.
2997 (NON_LAZY_PLT_ENTRY_SIZE): New.
2998 (elf_i386_plt0_entry): Renamed to ...
2999 (elf_i386_lazy_plt0_entry): This.
3000 (elf_i386_plt_entry): Renamed to ...
3001 (elf_i386_lazy_plt_entry): This.
3002 (elf_i386_pic_plt0_entry): Renamed to ...
3003 (elf_i386_pic_lazy_plt0_entry): This.
3004 (elf_i386_pic_plt_entry): Renamed to ...
3005 (elf_i386_pic_lazy_plt_entry): This.
3006 (elf_i386_got_plt_entry): Renamed to ...
3007 (elf_i386_non_lazy_plt_entry): This.
3008 (elf_i386_pic_got_plt_entry): Renamed to ...
3009 (elf_i386_pic_non_lazy_plt_entry): This.
3010 (elf_i386_eh_frame_plt): Renamed to ...
3011 (elf_i386_eh_frame_lazy_plt): This.
3012 (elf_i386_eh_frame_plt_got): Renamed to ...
3013 (elf_i386_eh_frame_non_lazy_plt): This.
3014 (elf_i386_plt_layout): Renamed to ...
3015 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3016 eh_frame_plt_got_size.
3017 (elf_i386_non_lazy_plt_layout): New.
3018 (elf_i386_plt_layout): Likewise.
3019 (elf_i386_non_lazy_plt): Likewise.
3020 (GET_PLT_ENTRY_SIZE): Removed.
3021 (elf_i386_plt): Renamed to ...
3022 (elf_i386_lazy_plt): This.
3023 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3024 (elf_i386_arch_bed): Updated.
3025 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3026 (elf_i386_create_dynamic_sections): Removed.
3027 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3028 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3029 (elf_i386_adjust_dynamic_symbol): Updated.
3030 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3031 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3032 size for PLT0 if there is no PLT0.
3033 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3034 output section is discarded only if GOT isn't empty.
3035 (elf_i386_relocate_section): Updated. Properly get PLT index
3036 if there is no PLT0.
3037 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3038 second and third slots in the PLT entry if there is no PLT0.
3039 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3040 if there is no PLT0. Set sh_entsize on the .plt.got section.
3041 (elf_i386_nacl_plt): Forward declaration.
3042 (elf_i386_get_plt_sym_val): Removed.
3043 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3044 against all dynamic relocations.
3045 (elf_i386_link_setup_gnu_properties): New function.
3046 (elf_backend_create_dynamic_sections): Updated.
3047 (elf_backend_setup_gnu_properties): New.
3048 (elf_i386_nacl_plt): Updated.
3049 (elf_i386_nacl_arch_bed): Likewise.
3050 (elf_i386_vxworks_arch_bed): Likewise.
3052 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3054 * elflink.c (elf_output_implib): Remove executable flag from import
3056 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3057 library is a relocatable object file.
3059 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3062 * elf32-avr.c (avr_should_move_sym): New function.
3063 (avr_should_reduce_sym_size): Likewise.
3064 (avr_should_increase_sym_size): Likewise.
3065 (elf32_avr_relax_delete_bytes): Adjust symbol values
3066 and sizes by calling new functions.
3068 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3070 * config.bfd (riscv32-*): Enable rv64.
3072 2017-05-02 Alan Modra <amodra@gmail.com>
3075 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3076 rather than h->root.type == bfd_link_hash_new.
3077 (bfd_elf_record_link_assignment): Similarly, call
3078 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3080 2017-04-29 Alan Modra <amodra@gmail.com>
3083 * reloc.c (reloc_offset_in_range): New function.
3084 (bfd_perform_relocation, bfd_install_relocation): Use it.
3085 (_bfd_final_link_relocate): Likewise.
3087 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3089 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3090 before using .plt.got.
3091 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3093 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3095 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3096 instead of "+=" to update 0.
3098 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3100 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3101 .plt.got section here.
3102 (elf_i386_check_relocs): Don't create the .plt.got section.
3103 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3104 the .plt.got and .plt.bnd sections here.
3105 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3108 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3110 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3112 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3113 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3114 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3115 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3118 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3120 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3122 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3123 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3124 the first relocatable ELF input with GNU properties.
3126 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3128 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3129 VxWorks for non-PIC.
3131 2017-04-27 Alan Modra <amodra@gmail.com>
3133 * elf-bfd.h (struct elf_backend_data): Make asection param of
3134 elf_backend_eh_frame_address_size const.
3135 (_bfd_elf_eh_frame_address_size): Likewise.
3136 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3137 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3138 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3139 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3140 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3141 (next_cie_fde_offset): Constify params.
3142 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3144 2017-04-27 Alan Modra <amodra@gmail.com>
3146 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3147 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3148 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3150 (offset_adjust): New function.
3151 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3152 (adjust_eh_frame_local_symbols): Likewise.
3153 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3154 after changing anything. Return true if anything changed.
3155 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3156 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3158 2017-04-27 Alan Modra <amodra@gmail.com>
3160 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3163 2017-04-27 Alan Modra <amodra@gmail.com>
3165 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3166 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3167 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3168 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3169 for undef and undefweak dyn_relocs.
3170 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3171 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3172 (allocate_got, allocate_dynrelocs): Likewise.
3173 (ppc64_elf_relocate_section): Likewise.
3175 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3177 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3178 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3179 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3180 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3182 2017-04-26 Nick Clifton <nickc@redhat.com>
3185 * reloc.c (bfd_perform_relocation): Check for a negative address
3188 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3191 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3193 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3194 (elf_backend_always_renumber_dynsyms): Define.
3195 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3196 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3197 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3198 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3200 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3202 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3204 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3205 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3206 sections have been created.
3208 2017-04-26 Nick Clifton <nickc@redhat.com>
3211 * compress.c (bfd_init_section_compress_status): Check the return
3212 value from bfd_malloc.
3214 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3216 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3217 no_finish_dynamic_symbol.
3218 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3220 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3221 weak symbol, don't make it dynamic.
3222 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3223 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3224 relocation for GOT reference.
3225 (elf_x86_64_finish_dynamic_symbol): Abort if
3226 no_finish_dynamic_symbol isn't 0.
3228 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3231 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3232 undefined weak symbol, don't make it dynamic.
3233 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3234 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3235 relocation for R_386_GOT32.
3237 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3240 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3242 2017-04-23 Alan Modra <amodra@gmail.com>
3245 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3246 * elf.c (lcomm_sym): New.
3247 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3248 * bfd-in2.h: Regenerate.
3250 2017-04-23 Alan Modra <amodra@gmail.com>
3253 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3254 parameters and comment.
3255 (_bfd_elf_get_reloc_section): Delete.
3256 (_bfd_elf_plt_get_reloc_section): Declare.
3257 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3258 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3260 (_bfd_elf_get_reloc_section): ..here. Delete.
3261 (assign_section_numbers): Call elf_get_reloc_section.
3262 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3263 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3265 2017-04-23 Alan Modra <amodra@gmail.com>
3268 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3271 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3274 * elf32-i386.c (elf_i386_link_hash_entry): Add
3275 no_finish_dynamic_symbol.
3276 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3277 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3278 symbol, don't make it dynamic in PIE.
3279 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3280 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3281 relocation for R_386_GOT32
3282 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3285 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3289 * elflink.c (elf_link_add_object_symbols): Require
3290 --no-dynamic-linker with -E/--dynamic-list when creating
3293 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3295 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3298 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3300 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3301 dynamic symbol sorting.
3303 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3306 * elflink.c (elf_link_add_object_symbols): Preserve
3307 dynamic_ref_after_ir_def when restoring the symbol table for
3308 unneeded dynamic object.
3310 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3313 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3314 on on undefined IFUNC symbol in the second PLT.
3316 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3318 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3320 2017-04-19 Alan Modra <amodra@gmail.com>
3322 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3323 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3324 * elf32-ppc.c:Formatting.
3325 (ensure_undefweak_dynamic): Don't make dynamic when
3326 info->dynamic_undefined_weak is zero.
3327 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3328 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3329 not default visibility. Discard undef and undefweak
3331 (ppc_elf_relocate_section): Adjust to suit.
3332 * elf64-ppc.c: Formatting.
3333 (ensure_undefweak_dynamic): Don't make dynamic when
3334 info->dynamic_undefined_weak is zero.
3335 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3336 info->dynamic_undefined_weak. Discard them earlier.
3338 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3341 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3342 before generating the version definition section.
3344 2017-04-17 Alan Modra <amodra@gmail.com>
3346 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3347 state when a regular object file defines a symbol with
3348 incompatible type to that defined by an earlier shared lib.
3350 2017-04-13 Alan Modra <amodra@gmail.com>
3352 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3354 * elf32-arm.c: Likewise.
3355 * elf32-i386.c: Likewise.
3356 * elf32-mep.c: Likewise.
3357 * elf64-ia64-vms.c: Likewise.
3358 * elf64-x86-64.c: Likewise.
3359 * elflink.c: Likewise.
3360 * elfnn-ia64.c: Likewise.
3361 * elfxx-mips.c: Likewise.
3363 2017-04-13 Alan Modra <amodra@gmail.com>
3365 * aoutx.h: Use %B and %A in error messages throughout file.
3366 * aout-cris.c: Likewise.
3367 * archive.c: Likewise.
3368 * binary.c: Likewise.
3369 * coff-rs6000.c: Likewise.
3370 * coff-tic4x.c: Likewise.
3371 * coffcode.h: Likewise.
3372 * coffgen.c: Likewise.
3373 * cofflink.c: Likewise.
3374 * coffswap.h: Likewise.
3375 * cpu-arm.c: Likewise.
3376 * elf-eh-frame.c: Likewise.
3377 * elf-m10300.c: Likewise.
3379 * elf32-arc.c: Likewise.
3380 * elf32-arm.c: Likewise.
3381 * elf32-bfin.c: Likewise.
3382 * elf32-frv.c: Likewise.
3383 * elf32-iq2000.c: Likewise.
3384 * elf32-m32c.c: Likewise.
3385 * elf32-microblaze.c: Likewise.
3386 * elf32-nds32.c: Likewise.
3387 * elf32-rl78.c: Likewise.
3388 * elf32-rx.c: Likewise.
3389 * elf32-score.c: Likewise.
3390 * elf32-score7.c: Likewise.
3391 * elf32-sh64.c: Likewise.
3392 * elf32-v850.c: Likewise.
3393 * elf32-vax.c: Likewise.
3394 * elf32-visium.c: Likewise.
3395 * elf64-ia64-vms.c: Likewise.
3396 * elf64-mmix.c: Likewise.
3397 * elf64-sh64.c: Likewise.
3398 * elfcode.h: Likewise.
3399 * elfnn-aarch64.c: Likewise.
3400 * elfnn-ia64.c: Likewise.
3401 * elfxx-mips.c: Likewise.
3402 * hpux-core.c: Likewise.
3405 * linker.c: Likewise.
3406 * merge.c: Likewise.
3408 * oasys.c: Likewise.
3409 * pdp11.c: Likewise.
3410 * peXXigen.c: Likewise.
3411 * rs6000-core.c: Likewise.
3412 * vms-alpha.c: Likewise.
3413 * xcofflink.c: Likewise.
3415 2017-04-13 Alan Modra <amodra@gmail.com>
3417 * bfd.c (PRINT_TYPE): Define.
3418 (_doprnt): New function.
3419 (error_handler_internal): Use _doprnt.
3420 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3421 calls in their natural order, throughout file.
3422 * coff-mcore.c: Likewise.
3423 * coff-ppc.c: Likewise.
3424 * coff-tic80.c: Likewise.
3425 * cofflink.c: Likewise.
3426 * elf-s390-common.c: Likewise.
3428 * elf32-arm.c: Likewise.
3429 * elf32-i386.c: Likewise.
3430 * elf32-m32r.c: Likewise.
3431 * elf32-msp430.c: Likewise.
3432 * elf32-spu.c: Likewise.
3433 * elf64-ia64-vms.c: Likewise.
3434 * elf64-sparc.c: Likewise.
3435 * elf64-x86-64.c: Likewise.
3436 * elflink.c: Likewise.
3437 * elfnn-aarch64.c: Likewise.
3438 * elfnn-ia64.c: Likewise.
3439 * elfxx-mips.c: Likewise.
3441 2017-04-13 Alan Modra <amodra@gmail.com>
3443 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3444 branch veneers" error. Fix double space and format message.
3445 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3446 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3448 2017-04-13 Alan Modra <amodra@gmail.com>
3450 * bfd-in2.h: Regenerate.
3452 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3454 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3455 extra `\n' in warning/error messages.
3456 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3457 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3459 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3461 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3462 processor-specific properties with generic ELF target vector.
3464 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3466 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3467 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3468 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3469 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3471 (link_hash_newfunc): Initialize has_got_reloc and
3473 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3475 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3477 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3479 (_bfd_sparc_elf_fixup_symbol): New function.
3480 (allocate_dynrelocs): Don't allocate space for dynamic
3481 relocations and discard relocations against resolved undefined
3482 weak symbols in executable. Don't make resolved undefined weak
3483 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3484 relocation against undefined weak symbols in PIE.
3485 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3486 relocations against resolved undefined weak symbols in PIE
3487 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3488 without ynamic PLT/GOT relocations for resolved undefined weak
3490 Don't generate dynamic relocation against resolved undefined
3491 weak symbol in executable.
3492 (pie_finish_undefweak_symbol): New function.
3493 (_bfd_sparc_elf_finish_dynamic_sections): Call
3494 pie_finish_undefweak_symbol on all symbols in PIE.
3495 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3496 (_bfd_sparc_elf_fixup_symbol): New function.
3498 2017-04-10 Nick Clifton <nickc@redhat.com>
3500 * config.bfd: Remove ns32k from obsolete list.
3502 2017-04-10 Alan Modra <amodra@gmail.com>
3505 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3506 (special_sections_i): Likewise for .init_array.
3507 (special_sections_p): Likewise for .preinit_array.
3509 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3513 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3514 ELF_COMMON_DEF_P for common symbols.
3515 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3516 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3517 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3518 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3519 07492f668d2173da7a2bda3707ff0985e0f460b6.
3521 2017-04-07 Pedro Alves <palves@redhat.com>
3523 * opncls.c (bfd_get_debug_link_info): Rename to...
3524 (bfd_get_debug_link_info_1): ... this. Change type of second
3525 parameter to void pointer. Adjust.
3526 (bfd_get_debug_link_info): Reimplement on top of
3527 bfd_get_debug_link_info_1.
3528 (separate_debug_file_exists, separate_alt_debug_file_exists):
3529 Change type of second parameter to void pointer. Adjust.
3530 (get_func_type, check_func_type): Change type of second parameter
3532 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3533 the callback functions instead of passing the address of a local.
3534 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3535 find_separate_debug_file.
3536 (get_alt_debug_link_info_shim): Change type of second parameter to
3537 void pointer. Adjust.
3538 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3539 find_separate_debug_file.
3540 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3541 of second parameter to void pointer. Adjust.
3542 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3543 pointer local to find_separate_debug_file.
3545 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3547 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3548 external symbols with a definition.
3549 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3551 2017-04-07 Alan Modra <amodra@gmail.com>
3553 * po/SRC-POTFILES.in: Regenerate.
3555 2017-04-05 Alan Modra <amodra@gmail.com>
3557 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3560 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3562 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3563 numbers for DataDirectory entry indicies passed to
3566 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3568 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3569 each GNU_MBIND section and align GNU_MBIND section to page size.
3570 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3571 segment for each GNU_MBIND section.
3572 (_bfd_elf_init_private_section_data): Copy sh_info from input
3573 for GNU_MBIND section.
3575 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3577 * elfnn-riscv.c (GP_NAME): Delete.
3578 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3579 (_bfd_riscv_relax_lui): Likewise.
3581 2017-04-04 Nick Clifton <nickc@redhat.com>
3584 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3586 (bfd_elf_final_link): Only initialize the extended symbol index
3587 section if there are extended symbol tables to list.
3589 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3591 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3592 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3593 * configure.ac (elf): Add elf-properties.lo.
3594 * Makefile.in: Regenerated.
3595 * configure: Likewise.
3596 * elf-bfd.h (elf_property_kind): New.
3597 (elf_property): Likewise.
3598 (elf_property_list): Likewise.
3599 (elf_properties): Likewise.
3600 (_bfd_elf_parse_gnu_properties): Likewise.
3601 (_bfd_elf_get_property): Likewise.
3602 (_bfd_elf_link_setup_gnu_properties): Likewise.
3603 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3604 and setup_gnu_properties.
3605 (elf_obj_tdata): Add properties.
3606 * elf-properties.c: New file.
3607 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3608 (elf_i386_merge_gnu_properties): Likewise.
3609 (elf_backend_parse_gnu_properties): Likewise.
3610 (elf_backend_merge_gnu_properties): Likewise.
3611 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3612 (elf_x86_64_merge_gnu_properties): Likewise.
3613 (elf_backend_parse_gnu_properties): Likewise.
3614 (elf_backend_merge_gnu_properties): Likewise.
3615 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3616 (elf_backend_parse_gnu_properties): Likewise.
3617 (elf_backend_setup_gnu_properties): Likewise.
3618 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3619 elf_backend_merge_gnu_properties and
3620 elf_backend_setup_gnu_properties.
3622 2017-03-30 Pip Cet <pipcet@gmail.com>
3624 * elf32-wasm32.c: Add relocation code, two relocs.
3625 * reloc.c: Add wasm32 relocations.
3626 * libbfd.h: Regenerate.
3627 * bfd-in2.h: Regenerate.
3628 * bfd/po/bfd.pot: Regenerate.
3630 2017-03-29 Nick Clifton <nickc@redhat.com>
3633 * coff-bfd.h (struct coff_section_data): Add new fields:
3634 saved_bias and bias.
3635 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3636 computed for PE binaries.
3637 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3640 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3643 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3644 to handle a local symbol with a hash-symbol-entry; without PLT.
3645 Add BFD_ASSERT for an incidental case with GOT entry present.
3646 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3647 isn't forced-or-set local.
3649 2017-03-27 Pip Cet <pipcet@gmail.com>
3651 * wasm-module.c: New file to support WebAssembly modules.
3652 * wasm-module.h: New file to support WebAssembly modules.
3653 * doc/webassembly.texi: Start documenting wasm-module.c.
3654 * config.bfd: Add wasm_vec.
3655 * targets.c: Likewise.
3656 * configure.ac: Likewise.
3657 * Makefile.am: Add entries for wasm-module.c.
3658 * Makefile.in: Regenerate.
3659 * configure: Regenerate.
3660 * po/SRC-POTFILES.in: Regenerate.
3662 2017-03-27 Pip Cet <pipcet@gmail.com>
3664 * cpu-wasm32.c: New file to support wasm32 architecture.
3665 * elf32-wasm32.c: New file to support wasm32 architecture.
3666 * Makefile.am: Add wasm32 architecture.
3667 * archures.c: Likewise.
3668 * config.bfd: Likewise.
3669 * configure.ac: Likewise.
3670 * targets.c: Likewise.
3671 * Makefile.in: Regenerate.
3672 * bfd-in2.h: Regenerate.
3673 * configure: Regenerate.
3674 * po/SRC-POTFILES.in: Regenerate.
3676 2017-03-20 Alan Modra <amodra@gmail.com>
3679 * elf64-ppc.c (compare_symbols): Stabilize sort.
3681 2017-03-18 Alan Modra <amodra@gmail.com>
3683 * elf64-ppc.c (struct ppc_link_hash_table): Add
3684 local_ifunc_resolver and maybe_local_ifunc_resolver.
3685 (ppc_build_one_stub): Set flags on emitting dynamic
3686 relocation to ifunc.
3687 (ppc64_elf_relocate_section): Likewise.
3688 (ppc64_elf_finish_dynamic_symbol): Likewise.
3689 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3690 local dynamic relocs to ifuncs.
3691 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3692 local_ifunc_resolver and maybe_local_ifunc_resolver.
3693 (ppc_elf_relocate_section): Set flag on emitting dynamic
3694 relocation to ifuncs.
3695 (ppc_elf_finish_dynamic_symbol): Likewise.
3696 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3697 dynamic relocs to ifuncs.
3699 2017-03-13 Nick Clifton <nickc@redhat.com>
3702 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3703 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3704 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3705 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3706 * bfd-in2.h: Regenerate.
3707 * libbfd.h: Regenerate.
3708 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3710 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3711 (elfNN_aarch64_howto_table): Likewise.
3712 (aarch64_tls_transition_without_check): Likewise.
3713 (aarch64_reloc_got_type): Likewise.
3714 (elfNN_aarch64_final_link_relocate): Likewise.
3715 (elfNN_aarch64_tls_relax): Likewise.
3716 (elfNN_aarch64_relocate_section): Likewise.
3717 (elfNN_aarch64_gc_sweep_hook): Likewise.
3718 (elfNN_aarch64_check_relocs): Likewise.
3719 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3720 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3722 2017-03-11 Alan Modra <amodra@gmail.com>
3724 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3725 parameter is in fact used. Whitespace fixes.
3726 * elf64-ppc.c: Likewise.
3728 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3730 * rs6000-core.c (CORE_NEW): Simplify macro when
3731 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3733 2017-03-07 Alan Modra <amodra@gmail.com>
3737 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3740 2017-03-05 Alan Modra <amodra@gmail.com>
3742 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3743 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3744 (next_cie_fde_offset): New function.
3745 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3746 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3747 four bytes. Align CIEs to four or eight bytes depending on
3748 per_encoding_aligned8. Align FDEs according to their encoding.
3749 Pad last FDE to output section alignment.
3750 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3752 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3753 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3754 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3756 2017-03-02 Martin Bickel <binutils@ineranves.de>
3759 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3760 empty segments which have a zero filesz, but a non-zero memsz.
3762 2017-03-02 Alan Modra <amodra@gmail.com>
3764 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3766 2017-02-28 Alan Modra <amodra@gmail.com>
3768 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3769 (ppc64_elf_relocate_section): Likewise.
3771 2017-02-28 Alan Modra <amodra@gmail.com>
3774 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3775 rather than elf32_nios2_hash_table or elf_hash_table.
3776 (create_got_section): Likewise.
3777 (nios2_elf32_finish_dynamic_symbol): Likewise.
3778 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3779 (nios2_elf32_size_dynamic_sections): Likewise.
3780 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3781 vars. Use htab equivalents directly instead. Don't create
3782 all dynamic sections on needing just the GOT. Use a goto
3783 rather than a fall-through with reloc test. Ensure
3784 htab->dynobj is set when making dynamic sreloc section.
3785 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3786 equivalent directly instead. Don't segfault on looking for
3787 .dynamic when dynamic sections have not been created. Don't
3788 segfault on .got.plt being discarded.
3789 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3790 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3791 fixme and another not so relevant comment.
3792 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3793 already set, set hash table dynobj on creating .sbss.
3795 2017-02-28 Alan Modra <amodra@gmail.com>
3797 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3798 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3799 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3800 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3801 (ppc64_elf_relocate_section): Likewise.
3802 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3803 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3804 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3805 * libbfd.h: Regenerate.
3806 * bfd-in2.h: Regenerate.
3808 2017-02-28 Alan Modra <amodra@gmail.com>
3810 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3811 dynamic .data.rel.ro read-only.
3812 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3813 rather than section flags when deciding where copy reloc goes.
3814 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3815 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3816 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3817 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3818 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3819 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3820 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3821 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3822 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3823 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3824 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3825 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3826 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3827 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3828 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3829 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3830 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3831 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3832 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3834 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3836 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3837 `jalr $0, $25' instruction encoding.
3839 2017-02-27 Nick Clifton <nickc@redhat.com>
3842 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3843 generating a seg-fault when encountering a symbol that has been
3844 deleted by garbage collection.
3846 2017-02-25 Alan Modra <amodra@gmail.com>
3848 * elf32-arc.c (struct dynamic_sections): Delete.
3849 (enum dyn_section_types): Delete.
3850 (dyn_section_names): Delete.
3851 (arc_create_dynamic_sections): Delete.
3852 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3853 segfault on discarded .rela.plt section.
3854 (elf_arc_size_dynamic_sections): Formatting. Don't call
3855 arc_create_dynamic_sections. Don't allocate memory for sections
3856 handled by the generic linker. Correct code finding relocs in
3857 read-only sections. Set SEC_EXCLUDE on zero size .got,
3858 .got.plt, and .dynbss sections. Do set .interp for pies.
3860 2017-02-24 Andrew Waterman <andrew@sifive.com>
3862 * elfnn-riscv.c (GP_NAME): New macro.
3863 (riscv_global_pointer_value): Use it.
3864 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3865 output section, consider only that section's alignment.
3867 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3869 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3870 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3871 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3872 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3874 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3876 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3877 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3880 2017-02-23 Alan Modra <amodra@gmail.com>
3883 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3885 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3886 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3889 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3892 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3893 processing ahead of the call to `elf_gc_sweep_symbol'.
3895 2017-02-22 Nick Clifton <nickc@redhat.com>
3898 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3899 created section 4-byte alignment.
3901 2017-02-22 Alan Modra <amodra@gmail.com>
3903 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3904 on .got or .plt output section being discarded by script.
3905 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3908 2017-02-21 Alan Modra <amodra@gmail.com>
3910 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3911 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3913 2017-02-20 Alan Modra <amodra@gmail.com>
3916 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3917 if DT_RELSZ/DT_RELASZ is zero.
3919 2017-02-17 Nick Clifton <nickc@redhat.com>
3921 * compress.c (bfd_get_full_section_contents): Remember to reduce
3922 compressed size by the sizeof the compression header when
3923 decompressing the contents.
3925 2017-02-17 Pedro Alves <palves@redhat.com>
3927 * srec.c (Chunk): Rename to ...
3928 (_bfd_srec_len): ... this.
3929 (S3Forced): Rename to ...
3930 (_bfd_srec_forceS3): ... this.
3931 * objcopy.c: Adjust all references.
3933 2017-02-17 Pedro Alves <palves@redhat.com>
3935 * archive.c (bsd_write_armap): Rename to ...
3936 (_bfd_bsd_write_armap): ... this.
3937 (coff_write_armap): Rename to ...
3938 (_bfd_coff_write_armap): ... this.
3939 * libbfd-in.h (bsd_write_armap): Rename to ...
3940 (_bfd_bsd_write_armap): ... this.
3941 (coff_write_armap): Rename to ...
3942 (_bfd_coff_write_armap): ... this.
3943 * aout-target.h, aout-tic30.c: Adjust all users.
3944 * libbfd.h: Regenerate.
3946 2017-02-17 Pedro Alves <palves@redhat.com>
3948 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3949 (warn_deprecated): Rename to ...
3950 (_bfd_warn_deprecated): ... this.
3951 * libbfd.c (warn_deprecated): Rename to ...
3952 (_bfd_warn_deprecated): ... this.
3953 * bfd-in2.h: Regenerate.
3955 2017-02-17 Pedro Alves <palves@redhat.com>
3957 * bfdio.c (real_ftell): Rename to ...
3958 (_bfd_real_ftell): ... this.
3959 (real_fseek): Rename to ...
3960 (_bfd_real_fseek): ... this.
3961 (real_fopen): Rename to ...
3962 (_bfd_real_fopen): ... this.
3963 * libbfd-in.h (real_ftell): Rename to ...
3964 (_bfd_real_ftell): ... this.
3965 (real_fseek): Rename to ...
3966 (_bfd_real_fseek): ... this.
3967 (real_fopen): Rename to ...
3968 (_bfd_real_fopen): ... this.
3969 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3970 * libbfd.h: Regenerate.
3972 2017-02-17 Pedro Alves <palves@redhat.com>
3974 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3975 * libbfd.c (read_unsigned_leb128): Rename to ...
3976 (_bfd_read_unsigned_leb128): ... this.
3977 (read_signed_leb128): Rename to ...
3978 (_bfd_read_signed_leb128): ... this.
3979 (safe_read_leb128): Rename to ...
3980 (_bfd_safe_read_leb128): ... this.
3981 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3982 (_bfd_read_unsigned_leb128): ... this.
3983 (read_signed_leb128): Rename to ...
3984 (_bfd_read_signed_leb128): ... this.
3985 (safe_read_leb128): Rename to ...
3986 (_bfd_safe_read_leb128): ... this.
3987 * libbfd.h: Renegerate.
3989 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3991 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3992 before trying to fine matching file and line information.
3994 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3996 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3997 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3998 not match current bfd, then reload debug information. Record bfd
3999 we're loading debug info for in the stash. If we have debug
4000 informatin in the cache then perform section placement before
4003 2017-02-16 Alan Modra <amodra@gmail.com>
4006 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4007 * elfxx-target.h (elf_backend_no_page_alias): Define.
4008 (elfNN_bed): Init new field.
4009 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4010 ensure PT_LOAD segment starts on a new page.
4011 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4013 2017-02-16 Alan Modra <amodra@gmail.com>
4016 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4019 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4021 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4022 * bfd-in2.h: Regenerated.
4024 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4027 * elf32-i386.c (elf_i386_relocate_section): Allow
4028 "lea foo@GOT, %reg" in PIC.
4030 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4033 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4034 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4035 error against local IFUNC symbol without a base register for
4038 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4040 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4041 `%P: %H:' with `info->callbacks->einfo'.
4042 (ppc_elf_relocate_section): Likewise.
4043 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4044 (ppc64_elf_edit_toc): Likewise.
4045 (ppc64_elf_relocate_section): Likewise.
4047 2017-02-14 Alan Modra <amodra@gmail.com>
4049 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4050 --gc-keep-exported, and test versioned field of sym rather than
4051 looking for @ in name.
4053 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4055 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4058 2017-02-13 Nick Clifton <nickc@redhat.com>
4061 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4064 2017-02-07 Andrew Waterman <andrew@sifive.com>
4066 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4067 entry size if PLT header is written.
4069 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4071 Fix sparc64 dynamic relocation processing to use the dynamic
4073 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4074 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4077 2017-02-03 Nick Clifton <nickc@redhat.com>
4080 * coffcode.h (coff_write_object_contents): Enlarge size of
4081 s_name_buf in order to avoid compile time warning about possible
4083 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4084 32-bits of insn value before printing into buffer.
4086 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4088 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4089 `max_local_dynindx'.
4090 (mips_elf_sort_hash_table): Handle it.
4091 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4092 symbols bump up `max_local_dynindx' rather than
4093 `max_non_got_dynindx'.
4095 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4097 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4098 `min_got_dynindx', `max_unref_got_dynindx' and
4099 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4100 (mips_elf_sort_hash_table): Adjust accordingly.
4102 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4104 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4105 to access the hash table.
4107 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4109 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4110 non-NULL `htab' to the beginning.
4112 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4114 * elflink.c (elf_gc_sweep): Wrap overlong line.
4116 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4118 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4119 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4120 * elfxx-mips.c (mips_elf_link_hash_table): Add
4121 `ignore_branch_isa' member.
4122 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4123 in branch relocation calculation as an error if
4124 `ignore_branch_isa' has been set.
4125 (_bfd_mips_elf_insn32): Rename to...
4126 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4127 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4128 Handle the new parameter.
4130 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4132 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4133 local variable dynobj.
4136 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4137 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4138 executable from read-only sections into sdynrelro.
4139 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4140 dynamic relocs in sdynrelro.
4141 (elf_backend_want_dynrelro): Define.
4143 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4145 * config.bfd (*-*-rtemsaout*): Mark as removed.
4147 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4149 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4150 (arm-*-rtems*): Move to (arm*-*-eabi*).
4151 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4152 (m68-*-rtems*): Move to (m68*-*-elf*).
4154 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4156 * config.bfd (*-*-rtemscoff*): Mark as removed.
4158 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4161 * elflink.c (bfd_elf_record_link_assignment): Revert last
4162 change and don't ever clear `forced_local'. Set `mark'
4164 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4166 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4167 (bfd_elf_size_dynamic_sections): ... here.
4168 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4169 and set `mark' instead in `__tls_get_addr_opt' processing.
4170 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4172 2017-01-24 Alan Modra <amodra@gmail.com>
4174 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4175 where dynamic relocs are preferable. Allow ifunc too.
4176 (ensure_undefweak_dynamic): New function.
4177 (allocate_dynrelocs): Use it here. Move plt handling last and
4178 don't make symbols dynamic, simplifying loop. Only make undef
4179 weak symbols with GOT entries dynamic. Correct condition
4180 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4181 comments. Remove goto.
4182 (ppc_elf_relocate_section): Correct test for using dynamic
4183 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4184 to suit. Set up explicit tls_index entries and implicit GOT
4185 tls_index entries resolvable at link time for
4186 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4187 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4188 (ensure_undefweak_dynamic): New function.
4189 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4190 with GOT entries dynamic. Remove unnecessary test of
4191 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4192 (ppc64_elf_relocate_section): Correct test for using dynamic
4193 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4194 to suit. Set up explicit tls_index entries and implicit GOT
4195 tls_index entries resolvable at link time for __tls_get_addr_opt.
4196 Simplify expression to clear mem for prelink.
4198 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4200 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4202 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4204 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4205 (elf_backend_hash_symbol): Define.
4207 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4210 * elflink.c (bfd_elf_record_link_assignment): Clear any
4211 `forced_local' marking for DSO symbols that are not being
4214 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4216 * elfnn-riscv.c (riscv_elf_object_p): New function.
4218 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4221 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4223 (elf_x86_64_check_relocs): Create .eh_frame section for the
4225 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4226 .eh_frame section for the .plt.bnd section.
4227 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4228 for the .plt.bnd section.
4230 2017-01-12 Nick Clifton <nickc@redhat.com>
4233 * opncls.c (find_separate_debug_file): Add include_dirs
4234 parameter. Only include the directory part of the bfd's filename
4235 in search paths if include_dirs is true. Add a couple of extra
4236 locations for looking for debug files.
4237 ( bfd_follow_gnu_debuglink): Update invocation of
4238 find_separate_debug_file.
4239 (bfd_follow_gnu_debugaltlink): Likewise.
4240 (get_build_id): New function: Finds the build-id of the given bfd.
4241 (get_build_id_name): New function: Computes the name of the
4242 separate debug info file for a bfd, based upon its build-id.
4243 (check_build_id_file): New function: Checks to see if a separate
4244 debug info file exists at the given location, and that its
4245 build-id matches that of the original bfd.
4246 (bfd_follow_build_id_debuglink): New function: Finds a separate
4247 debug info file for a given bfd by using the build-id method.
4248 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4249 method of locating a separate debug info file before using the
4251 * bfd-in2.h: Regenerate.
4253 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4256 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4257 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4258 elf_x86_64_eh_frame_plt_got.
4259 (elf_x86_64_size_dynamic_sections): Get unwind info from
4260 elf_x86_64_bnd_arch_bed for the BND PLT.
4262 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4264 * config.bfd: Add entries for i686-redox and x86_64-redox.
4266 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4268 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4270 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4271 .eh_frame section to 4 bytes for x32.
4272 (elf_x86_64_check_relocs): Likewise.
4274 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4277 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4278 (PLT_GOT_FDE_LENGTH): Likewise.
4279 (elf_i386_plt_layout): Add eh_frame_plt_got and
4280 eh_frame_plt_got_size.
4281 (elf_i386_plt): Updated.
4282 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4283 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4284 (elf_i386_size_dynamic_sections): Allocate and initialize
4285 .eh_frame section for .plt.got.
4286 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4288 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4289 eh_frame_plt_got_size.
4290 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4291 (PLT_GOT_FDE_LENGTH): Likewise.
4292 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4293 eh_frame_plt_got_size.
4294 (elf_x86_64_arch_bed): Updated.
4295 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4296 eh_frame_plt_got_size.
4297 (elf_x86_64_nacl_arch_bed): Likewise.
4298 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4299 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4300 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4301 .eh_frame section for .plt.got.
4302 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4305 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4307 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4308 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4310 2017-01-09 Nick Clifton <nickc@redhat.com>
4312 * dwarf2.c (lookup_address_in_function_table): Return early if
4313 there are no functions in the given comp unit, or if the high
4314 address of the last function in the comp unit is less than the
4317 2017-01-09 Nick Clifton <nickc@redhat.com>
4320 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4321 message if there are too many symbols to load.
4323 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4325 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4326 if relocs are cached.
4328 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4331 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4332 for R_MICROBLAZE_GOTOFF_64.
4334 2017-01-03 Nick Clifton <nickc@redhat.com>
4336 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4337 warning about using a possibly uninitialised variable.
4339 2017-01-02 Alan Modra <amodra@gmail.com>
4341 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4342 (allocate_plt_static, allocate_dynrelocs): Use it.
4344 2017-01-02 Alan Modra <amodra@gmail.com>
4346 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4347 .PARISC.unwind section.
4349 2017-01-02 Alan Modra <amodra@gmail.com>
4352 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4353 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4354 indirect to GOT pointer relative code edit.
4356 2017-01-02 Alan Modra <amodra@gmail.com>
4358 Update year range in copyright notice of all files.
4360 For older changes see ChangeLog-2016
4362 Copyright (C) 2017 Free Software Foundation, Inc.
4364 Copying and distribution of this file, with or without modification,
4365 are permitted in any medium without royalty provided the copyright
4366 notice and this notice are preserved.
4372 version-control: never