1 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
3 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
4 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
5 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
7 2017-10-12 James Bowman <james.bowman@ftdichip.com>
9 * bfd-in2.h: Regenerate.
10 * libbfd.h: Regenerate.
11 * elf32-ft32.c: Add HOWTO R_FT32_15.
12 * reloc.c: Add BFD_RELOC_FT32_15.
14 2017-10-12 Nick Clifton <nickc@redhat.com>
16 * reloc.c (enum bfd_reloc_status): Start values at 2.
17 * bfd-in2.h: Regenerate.
18 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
19 that a TRUE return indicates success. Compare the result of
20 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
21 (build_one_stub): Change sense of tests against aarch64_relocate
23 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
24 than FALSE, when an error is detected.
25 (elfNN_aarch64_final_link_relocate): Likewise.
27 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
29 * elf32-i386.c (elf_backend_hide_symbol): New.
30 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
31 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
32 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
34 2017-10-12 Alan Modra <amodra@gmail.com>
36 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
37 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
38 (bfd_elf_define_start_stop): Likewise.
40 2017-10-12 Alan Modra <amodra@gmail.com>
42 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
43 when executable rather than non-PIC.
44 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
45 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
47 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
49 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
51 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
52 (elf_external_linux_prpsinfo64_ugid32): ... this.
53 (swap_linux_prpsinfo32_out): Rename to...
54 (swap_linux_prpsinfo32_ugid32_out): ... this.
55 (elf_external_linux_prpsinfo64_ugid16): New structure.
56 (swap_linux_prpsinfo64_ugid16_out): New function.
57 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
58 (elf_backend_linux_prpsinfo64_ugid16): Define.
59 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
60 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
61 of the 64-bit Linux core PRPSINFO note.
62 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
64 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
66 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
68 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
69 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
70 (elf_external_ppc_linux_prpsinfo32)
71 (swap_ppc_linux_prpsinfo32_out): Move to...
72 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
73 (swap_linux_prpsinfo32_ugid32_out): ... these.
74 (elf_external_linux_prpsinfo32): Rename to...
75 (elf_external_linux_prpsinfo32_ugid16): ... this.
76 (swap_linux_prpsinfo32_out): Rename to...
77 (swap_linux_prpsinfo32_ugid16_out): ... this.
78 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
79 (elf_backend_linux_prpsinfo32_ugid16): Define.
80 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
81 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
82 of the 32-bit Linux core PRPSINFO note.
83 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
84 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
85 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
86 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
87 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
88 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
89 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
90 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
91 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
92 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
94 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
96 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
97 `gap' member ahead of `pr_flag'.
99 2017-10-11 Pedro Alves <palves@redhat.com>
101 * bfd.c (_doprnt): Rename to ...
102 (_bfd_doprnt): ... this.
103 (error_handler_internal): Adjust.
105 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
107 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
108 instead of incrementing it.
109 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
111 2017-10-10 Renlin Li <renlin.li@arm.com>
114 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
115 symbols into dynamic.
117 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
120 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
121 (riscv_elf_link_hash_table_create): Initialize max_alignment to
123 (_bfd_riscv_relax_section): Cache the max alignment of output
124 sections if possible.
126 2017-10-10 Alan Modra <amodra@gmail.com>
128 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
129 .opd whenever .opd is present and non-zero size. Move code
130 setting abiversion to/from output file earlier. Only set
131 u.opd.func_sec when --gc-sections. Read relocs and set up
132 u.opd.func_sec values here..
133 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
135 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
137 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
139 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
142 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
144 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
145 .interp section with "ld --no-dynamic-linker".
147 2017-10-09 Alan Modra <amodra@gmail.com>
150 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
151 funcinfo_hash_table and varinfo_hash_table.
153 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
155 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
156 in read-only section with minfo.
157 (sh_elf_size_dynamic_sections): Likewise.
159 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
161 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
164 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
166 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
167 this_hdr.sh_entsize only if section size > 0.
169 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
171 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
173 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
175 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
176 in read-only section with minfo.
177 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
179 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
181 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
184 2017-10-06 John Baldwin <jhb@FreeBSD.org>
186 * elf-bfd.h (struct elf_backend_data): Add
187 `elf_backend_grok_freebsd_prstatus'.
188 * elf.c (elfcore_grok_freebsd_note): Call
189 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
191 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
193 (elf_backend_grok_freebsd_prstatus): Define.
194 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
195 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
197 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
199 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
200 and has_non_got_reloc with zero_undefweak.
201 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
202 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
204 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
205 has_non_got_reloc with zero_undefweak.
206 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
207 has_got_reloc and has_non_got_reloc with zero_undefweak.
208 (elf_x86_link_hash_entry): Likewise.
210 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
212 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
213 (VERIFY_COPY_RELOC): Likewise.
215 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
217 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
218 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
219 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
221 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
223 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
224 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
225 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
227 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
229 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
230 * elf32-i386.c (elf_i386_relocate_section): Use it.
231 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
233 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
235 * elf32-i386.c (X86_SIZE_TYPE_P): New.
236 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
237 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
238 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
239 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
241 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
243 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
244 (PLT_LOCAL_IFUNC_P): Likewise.
245 * elf32-i386.c (elf_i386_relocate_section): Use them.
246 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
248 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
250 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
251 * elf32-i386.c (elf_i386_relocate_section): Use it.
252 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
254 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
256 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
257 * elf32-i386.c (elf_i386_relocate_section): Use it.
258 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
260 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
262 * elf32-i386.c (X86_PCREL_TYPE_P): New.
263 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
264 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
265 (X86_PCREL_TYPE_P): This.
266 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
267 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
268 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
270 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
272 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
274 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
275 * elf32-i386.c (elf_i386_tls_transition): Use it.
276 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
278 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
280 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
281 Dump dynamic relocation in read-only section with minfo if
283 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
284 (maybe_set_textrel): Likewise.
285 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
286 read-only section with minfo.
288 2017-10-05 John Baldwin <jhb@FreeBSD.org>
290 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
292 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
294 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
295 in read-only section with minfo.
296 (tilepro_elf_size_dynamic_sections): Likewise.
297 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
298 (tilegx_elf_size_dynamic_sections): Likewise.
300 2017-10-05 Pedro Alves <palves@redhat.com>
303 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
304 ellipsis parameter. Split out bfd_error_on_input code to..
305 (bfd_set_input_error): .. New function.
306 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
307 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
308 * bfd-in2.h: Regenerate.
310 2017-10-05 Alan Modra <amodra@gmail.com>
312 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
313 fini_array error value.
315 2017-10-05 Alan Modra <amodra@gmail.com>
318 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
320 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
322 (elf_fake_sections): Adjust calls. Exit immediately on failure.
323 (bfd_elf_set_group_contents): Add associated reloc section indices
326 2017-10-04 Alan Modra <amodra@gmail.com>
328 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
329 classify symbols for ELFv2.
331 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
334 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
335 undergoes default promotion.
336 * bfd-in2.h: Regenerate.
338 2017-10-02 Alan Modra <amodra@gmail.com>
340 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
341 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
343 2017-10-01 Alan Modra <amodra@gmail.com>
346 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
347 (add_line_info): Always put end_sequence last.
349 2017-10-01 Alan Modra <amodra@gmail.com>
352 * dwarf2.c (read_section): Allocate buffer with extra byte for
353 bfd_simple_get_relocated_section_contents rather than copying
356 2017-09-29 Alan Modra <amodra@gmail.com>
358 * merge.c (merge_strings): Return FALSE on malloc failure.
359 (_bfd_merge_sections): Return failures from record_section and
362 2017-09-28 Alan Modra <amodra@gmail.com>
365 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
366 a case where plugin_notice isn't called.
368 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
370 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
373 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
376 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
377 output_bfd to info->callbacks->minfo.
379 2017-09-26 Nick Clifton <nickc@redhat.com>
382 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
383 assertion failure if elf_x86_64_rtype_to_howto has already issued
386 2017-09-26 Alan Modra <amodra@gmail.com>
389 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
392 2017-09-26 Nick Clifton <nickc@redhat.com>
395 * dwarf2.c (read_formatted_entries): Fail early if we know that
396 the loop parsing data entries will overflow the end of the
399 2017-09-26 Alan Modra <amodra@gmail.com>
402 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
403 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
404 to stash->info_ptr_memory, and check die_ref is within that memory.
405 Set info_ptr_end correctly when another CU is refd. Check die_ref
406 for DW_FORM_ref4 etc. is within CU.
408 2017-09-26 Alan Modra <amodra@gmail.com>
411 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
412 (read_formatted_entries): Init "fe".
413 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
415 2017-09-26 Alan Modra <amodra@gmail.com>
418 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
419 bounds in inner loop.
421 2017-09-25 Alan Modra <amodra@gmail.com>
424 * dwarf1.c (parse_die): Sanity check pointer against section limit
425 before dereferencing.
426 (parse_line_table): Likewise.
428 2017-09-25 Alan Modra <amodra@gmail.com>
431 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
433 (parse_comp_unit): Likewise.
435 2017-09-25 Alan Modra <amodra@gmail.com>
438 * dwarf2.c (read_formatted_entries): Error on format_count zero.
440 2017-09-24 Alan Modra <amodra@gmail.com>
443 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
444 within section bounds.
446 2017-09-24 Alan Modra <amodra@gmail.com>
449 * dwarf2.c (decode_line_info): Properly free line sequences on error.
451 2017-09-24 Alan Modra <amodra@gmail.com>
454 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
455 pname param. Return status. Make name const. Don't abort,
456 return an error. Formatting. Exit if current info_ptr matches
457 orig_info_ptr. Update callers.
458 (scan_unit_for_symbols): Start at nesting_level of zero. Make
459 nested_funcs an array of structs for extensibility. Formatting.
461 2017-09-24 Alan Modra <amodra@gmail.com>
464 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
465 rather than dividing by zero.
467 2017-09-24 Alan Modra <amodra@gmail.com>
470 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
472 2017-09-24 Alan Modra <amodra@gmail.com>
475 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
477 2017-09-24 Alan Modra <amodra@gmail.com>
480 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
481 SHT_GNU_verneed section for sanity. Don't zalloc memory for
484 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
487 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
490 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
493 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
494 -1 if bfd_canonicalize_dynamic_reloc returns 0.
496 2017-09-22 Pedro Alves <palves@redhat.com>
497 Alan Modra <amodra@gmail.com>
499 * version.h: Add comment.
501 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
503 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
504 NT_S390_GS_BC, correct the previously swapped invocations of
505 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
507 2017-09-19 Alan Modra <amodra@gmail.com>
510 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
513 2017-09-19 Alan Modra <amodra@gmail.com>
516 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
517 symbols before calculating verrefs. Don't renumber dynsyms
518 after gc. Exclude .gnu.version when zero or one dynsym.
519 Localize some vars and reindent.
521 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
524 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
525 return from bfd_canonicalize_dynamic_reloc.
527 2017-09-15 Alan Modra <amodra@gmail.com>
530 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
531 overflows bfd_size_type.
533 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
536 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
537 to indicate if conversion is performed.
538 (elf_i386_check_relocs): Cache section contents and relocations
539 if conversion is performed.
540 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
541 contents and relocations if conversion is performed.
543 2017-09-14 Nick Clifton <nickc@redhat.com>
546 * peXXigen.c (pe_print_idata): Extend check for HintName vector
549 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
551 * elfxx-x86.h: Fix a typo in comments.
553 2017-09-09 Kamil Rytarowski <n54@gmx.com>
555 * elf32-nds32.c: Rename __BIT() to N32_BIT().
557 2017-09-09 Alan Modra <amodra@gmail.com>
559 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
562 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
564 * elf32-i386.c (elf_i386_relocate_section): Update usage of
565 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
566 (elf_i386_finish_dynamic_symbol): Likewise.
567 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
568 (elf_x86_64_finish_dynamic_symbol): Likewise.
569 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
570 (_bfd_x86_elf_fixup_symbol): Likewise.
572 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
574 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
575 check has_non_got_reloc.
577 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
580 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
581 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
582 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
583 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
584 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
585 and linker_def on __ehdr_start if it is referenced and not
587 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
588 and return TRUE when building executable, if a symbol has
589 non-GOT/non-PLT relocations in text section or there is no
591 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
593 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
595 * elfxx-x86.h: Update comments.
597 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
599 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
600 elf_x86_plt_layout_table with elf_x86_init_table.
601 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
603 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
605 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
606 (elf_x86_init_table): This.
607 (_bfd_x86_elf_link_setup_gnu_properties): Replace
608 elf_x86_plt_layout_table with elf_x86_init_table.
610 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
612 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
613 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
614 * configure: Regenerated.
615 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
616 and r_sym fields of plt_layout.
617 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
619 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
620 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
621 r_info nor r_sym fields.
622 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
624 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
626 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
628 * (_bfd_riscv_relax_align): Call bfd_set_error and
629 print an error message when unable to relax a .align directive.
631 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
633 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
634 (riscv_record_pcrel_hi_reloc): Add absolute argument.
635 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
636 R_RISCV_PCREL_HI20 relocs, and pass the result to
637 riscv_record_pcrel_hi_reloc.
639 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
641 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
642 r_type_p. Remove the converted argument. Replace
643 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
644 the new relocation type via r_type_p.
645 (elf_i386_relocate_section): Likewise.
646 (elf_i386_finish_dynamic_symbol): Likewise.
647 (need_convert_load): Removed.
648 (check_relocs_failed): Updated.
649 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
650 instead of setting need_convert_load.
651 (_bfd_i386_elf_convert_load): Removed.
652 * elf64-x86-64.c (need_convert_load): Removed.
653 (check_relocs_failed): Updated.
654 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
655 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
656 Return the new relocation type via r_type_p.
657 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
658 instead of setting need_convert_load.
659 (elf_x86_64_check_relocs): Don't check PIC if relocation has
661 (_bfd_x86_64_elf_convert_load): Removed.
662 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
663 with SYMBOL_REFERENCES_LOCAL_P.
664 (elf_x86_64_finish_dynamic_symbol): Likewise.
665 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
667 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
668 (_bfd_x86_elf_link_symbol_references_local): New function.
669 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
670 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
671 SYMBOL_REFERENCES_LOCAL_P.
672 (elf_x86_link_hash_entry): Add local_ref.
673 (elf_x86_link_hash_table): Remove convert_load.
674 (_bfd_i386_elf_convert_load): Removed.
675 (_bfd_x86_64_elf_convert_load): Likewise.
676 (_bfd_x86_elf_link_symbol_references_local): New.
678 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
680 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
681 (elf_x86_64_info_to_howto): Get the real relocation type by
682 masking out R_X86_64_converted_reloc_bit.
683 (elf_x86_64_check_tls_transition): Get the real relocation type
684 by masking out R_X86_64_converted_reloc_bit.
685 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
686 instead of setting converted_reloc.
687 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
688 instead of converted_reloc. Get the real relocation type by
689 masking out R_X86_64_converted_reloc_bit.
690 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
691 R_X86_64_converted_reloc_bit is valid.
692 * elfxx-x86.h (converted_reloc): Removed.
694 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
696 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
697 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
698 to get the relocation type again.
699 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
700 r_type when calling elf_x86_64_tls_transition. Don't use
701 ELF32_R_TYPE to get the relocation type again.
703 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
705 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
708 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
710 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
711 argument. Don't check relocation overflow. Avoid relocation
712 overflow if --no-relax is used. Set converted_reloc on symbol
713 if a GOTPCREL relocation is converted.
714 (elf_x86_64_relocate_section): Issue a fatal error and suggest
715 --no-relax if GOTPCREL relocation conversion leads to relocation
717 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
719 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
720 Edmar Wienskoski <edmar.wienskoski@nxp.com
722 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
723 (ppc_elf_check_relocs): Handle it.
724 (ppc_elf_vle_split20): New function.
725 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
727 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
730 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
731 for x86-64 if GOT_TLS_GDESC_P is true.
733 2017-09-03 Alan Modra <amodra@gmail.com>
736 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
738 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
740 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
741 tls_get_addr for x86-64 in one place.
743 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
745 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
746 with elfxx-x86.lo for 64-bit BFD.
747 * configure: Regenerated.
749 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
751 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
752 (_bfd_i386_elf_convert_load): This. Remove static.
753 (elf_i386_size_dynamic_sections): Removed.
754 (elf_backend_size_dynamic_sections): Likewise.
755 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
756 (_bfd_x86_64_elf_convert_load): This. Remove static.
757 (elf_x86_64_size_dynamic_sections): Removed.
758 (elf_backend_size_dynamic_sections): Likewise.
759 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
760 (elf_x86_allocate_dynrelocs): This. Make it static.
761 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
762 (elf_x86_allocate_local_dynreloc): This. Make it static.
763 (elf_i386_is_reloc_section): New function.
764 (elf_x86_64_is_reloc_section): Likewise.
765 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
766 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
767 Rearrange got_entry_size initialization.
768 (_bfd_x86_elf_size_dynamic_sections): New function.
769 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
770 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
771 (_bfd_i386_elf_convert_load): New.
772 (_bfd_x86_64_elf_convert_load): Likewise.
773 (_bfd_x86_elf_size_dynamic_sections): Likewise.
774 (elf_backend_size_dynamic_sections): Likewise.
775 (_bfd_x86_elf_allocate_dynrelocs): Removed.
776 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
778 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
780 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
783 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
785 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
786 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
788 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
790 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
791 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
792 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
793 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
794 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
795 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
797 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
799 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
800 (elf_i386_allocate_local_dynrelocs): Likewise.
801 (elf_i386_size_dynamic_sections): Replace
802 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
803 with _bfd_x86_elf_allocate_dynrelocs and
804 _bfd_x86_elf_allocate_local_dynrelocs.
805 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
806 (elf_x86_64_allocate_local_dynrelocs): Likewise.
807 (elf_x86_64_size_dynamic_sections): Replace
808 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
809 with _bfd_x86_elf_allocate_dynrelocs and
810 _bfd_x86_elf_allocate_local_dynrelocs.
811 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
812 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
813 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
814 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
816 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
818 * elf32-i386.c (is_i386_elf): Removed.
819 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
820 (elf_i386_size_dynamic_sections): Likewise.
821 (elf_i386_relocate_section): Likewise.
822 * elf64-x86-64.c (is_x86_64_elf): Removed.
823 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
825 (elf_x86_64_size_dynamic_sections): Likewise.
826 (elf_x86_64_relocate_section): Likewise.
827 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
829 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
832 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
834 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
835 (elf_i386_allocate_dynrelocs): Replace
836 elf_i386_compute_jump_table_size with
837 elf_x86_compute_jump_table_size.
838 (elf_i386_size_dynamic_sections): Likewise.
839 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
840 (elf_x86_64_allocate_dynrelocs): Replace
841 elf_x86_64_compute_jump_table_size with
842 elf_x86_compute_jump_table_size.
843 (elf_x86_64_size_dynamic_sections): Likewise.
844 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
846 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
847 (elf_x86_compute_jump_table_size): New.
849 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
851 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
853 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
854 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
856 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
858 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
859 with htab->is_vxworks.
860 (elf_i386_size_dynamic_sections): Likewise.
861 (elf_i386_relocate_section): Likewise.
862 (elf_i386_finish_dynamic_symbol): Likewise.
863 (elf_i386_finish_dynamic_sections): Likewise.
865 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
867 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
868 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
869 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
870 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
871 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
872 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
873 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
874 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
876 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
879 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
880 ELF_COMMON_DEF_P for common symbols.
882 2017-09-02 Alan Modra <amodra@gmail.com>
884 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
885 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
886 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
888 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
890 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
891 (elf_backend_gc_mark_hook): Likewise.
892 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
893 (elf_backend_gc_mark_hook): Likewise.
894 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
895 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
896 (elf_backend_gc_mark_hook): Likewise.
898 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
900 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
901 (elf_backend_adjust_dynamic_symbol): Likewise.
902 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
903 (elf_backend_adjust_dynamic_symbol): Likewise.
904 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
905 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
906 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
907 (_bfd_x86_elf_adjust_dynamic_symbol): New.
908 (elf_backend_adjust_dynamic_symbol): Likewise.
910 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
912 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
915 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
917 * elf32-i386.c (elf_i386_mkobject): Removed.
918 (bfd_elf32_mkobject): Likewise.
919 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
920 (bfd_elf64_mkobject): Likewise.
921 (bfd_elf32_mkobject): Likewise.
922 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
923 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
924 (bfd_elf64_mkobject): Likewise.
925 (bfd_elf32_mkobject): Likewise.
927 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
929 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
930 Call _bfd_x86_elf_link_setup_gnu_properties.
931 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
932 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
934 (elf_x86_64_non_lazy_plt): Likewise.
935 (elf_x86_64_lazy_bnd_plt): Likewise.
936 (elf_x86_64_non_lazy_bnd_plt): Likewise.
937 (elf_x86_64_lazy_ibt_plt): Likewise.
938 (elf_x32_lazy_ibt_plt): Likewise.
939 (elf_x86_64_non_lazy_ibt_plt): Likewise.
940 (elf_x32_non_lazy_ibt_plt): Likewise.
941 (elf_x86_64_nacl_plt): Likewise.
942 (elf_x86_64_link_setup_gnu_properties): Updated. Call
943 _bfd_x86_elf_link_setup_gnu_properties.
944 * elfxx-x86.c: Include elf-vxworks.h".
945 (_bfd_x86_elf_link_setup_gnu_properties): New function.
946 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
947 comments for pic_plt0_entry and pic_plt_entry.
948 (elf_x86_non_lazy_plt_layout): Likewise.
949 (elf_x86_plt_layout_table): New.
950 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
952 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
955 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
956 .eh_frame section for the second PLT.
957 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
958 alignment of .eh_frame section for the second PLT.
960 2017-09-01 Nick Clifton <nickc@redhat.com>
963 * dwarf2.c (decode_line_info): Fix test for an overlong line info
966 2017-09-01 Nick Clifton <nickc@redhat.com>
969 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
970 attribute buffer is NUL terminated.
972 2017-08-31 Nick Clifton <nickc@redhat.com>
975 * dwarf2.c (read_section): If necessary add a terminating NUL byte
976 to dwarf string sections.
978 2017-08-31 Alan Modra <amodra@gmail.com>
980 * po/SRC-POTFILES.in: Regenerate.
982 2017-08-31 Alan Modra <amodra@gmail.com>
984 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
985 for a section containing just a terminator. Allow multiple
986 terminators at end of section.
987 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
988 sections when not adding alignment. Assert on terminator in
991 2017-08-31 Alan Modra <amodra@gmail.com>
995 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
998 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1000 * configure.ac (bfd_backends): Add elf64.lo together with
1001 elfxx-x86.lo for 64-bit BFD.
1002 * configure: Regenerated.
1004 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1006 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1009 2017-08-31 Alan Modra <amodra@gmail.com>
1012 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1013 before _close_and_cleanup. Call iovec->bclose after.
1014 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1016 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1018 * elf32-i386.c (elf_i386_plt_type): Removed.
1019 (elf_i386_plt): Likewise.
1020 (elf_i386_get_synthetic_symtab): Updated. Call
1021 _bfd_x86_elf_get_synthetic_symtab.
1022 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1023 (elf_x86_64_plt): Likewise.
1024 (elf_x86_64_get_synthetic_symtab): Updated. Call
1025 _bfd_x86_elf_get_synthetic_symtab.
1026 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1027 (elf_x86_64_get_plt_got_vma): Likewise.
1028 (elf_i386_valid_plt_reloc_p): Likewise.
1029 (elf_x86_64_valid_plt_reloc_p): Likewise.
1030 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1031 * elfxx-x86.h (elf_x86_plt_type): New.
1032 (elf_x86_plt): Likewise.
1033 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1035 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1037 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1038 target_id instead of elf_machine_code.
1040 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1042 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1043 (elf_i386_lazy_plt_layout): Likewise.
1044 (elf_i386_non_lazy_plt_layout): Likewise.
1045 (elf_i386_plt_layout): Likewise.
1046 (elf_i386_link_hash_table): Likewise.
1047 (elf_i386_next_tls_desc_index): Likewise.
1048 (elf_i386_srelplt2): Likewise.
1049 (elf_i386_plt): Likewise.
1050 (elf_i386_lazy_plt): Likewise.
1051 (elf_i386_non_lazy_plt): Likewise.
1052 (elf_i386_link_hash_table_create): Likewise.
1053 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1054 (elf_i386_lazy_plt): Updated.
1055 (elf_i386_non_lazy_plt): Likewise.
1056 (elf_i386_lazy_ibt_plt): Likewise.
1057 (elf_i386_non_lazy_ibt_plt): Likewise.
1058 (elf_i386_allocate_dynrelocs): Likewise.
1059 (elf_i386_size_dynamic_sections): Likewise.
1060 (elf_i386_relocate_section): Likewise.
1061 (elf_i386_finish_dynamic_symbol): Likewise.
1062 (elf_i386_finish_dynamic_sections): Likewise.
1063 (elf_i386_get_synthetic_symtab): Likewise.
1064 (elf_i386_link_setup_gnu_properties): Likewise.
1065 (elf_i386_nacl_plt): Likewise.
1066 * elf64-x86-64.c (ABI_64_P): Removed.
1067 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1068 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1069 (elf_x86_64_lazy_plt_layout): Likewise.
1070 (elf_x86_64_non_lazy_plt_layout): Likewise.
1071 (elf_x86_64_plt_layout): Likewise.
1072 (elf_x86_64_link_hash_table): Likewise.
1073 (elf_x86_64_plt): Likewise.
1074 (elf_x86_64_lazy_plt): Likewise.
1075 (elf_x86_64_non_lazy_plt): Likewise.
1076 (elf_x86_64_link_hash_table_create): Likewise.
1077 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1078 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1079 (elf_x86_64_lazy_plt): Updated.
1080 (elf_x86_64_non_lazy_plt): Likewise.
1081 (elf_x86_64_lazy_bnd_plt): Likewise.
1082 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1083 (elf_x86_64_lazy_ibt_plt): Likewise.
1084 (elf_x32_lazy_ibt_plt): Likewise.
1085 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1086 (elf_x32_non_lazy_ibt_plt): Likewise.
1087 (elf_x86_64_allocate_dynrelocs): Likewise.
1088 (elf_x86_64_size_dynamic_sections): Likewise.
1089 (elf_x86_64_relocate_section): Likewise.
1090 (elf_x86_64_finish_dynamic_symbol): Likewise.
1091 (elf_x86_64_finish_dynamic_sections): Likewise.
1092 (elf_x86_64_get_synthetic_symtab): Likewise.
1093 (elf_x86_64_link_setup_gnu_properties): Likewise.
1094 (elf_x86_64_nacl_plt): Likewise.
1095 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1097 (ELF32_DYNAMIC_INTERPRETER): New.
1098 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1099 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1100 (_bfd_x86_elf_link_hash_table_create): Likewise.
1101 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1102 (elf_x86_link_hash_table_free): This. Make it static.
1103 * elfxx-x86.h: Don't include "objalloc.h".
1105 (elf_x86_lazy_plt_layout): Likewise.
1106 (elf_x86_non_lazy_plt_layout): Likewise.
1107 (elf_x86_plt_layout): Likewise.
1108 (_bfd_x86_elf_link_hash_table_create): Likewise.
1109 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1110 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1111 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1112 srelplt2 and next_tls_desc_index.
1113 (_bfd_x86_elf_link_hash_table_free): Removed.
1115 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1117 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1118 branch offset interpretation.
1120 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1123 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1125 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1127 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1128 (elf_x86_64_srelplt2): Likewise.
1130 2017-08-30 Alan Modra <amodra@gmail.com>
1132 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1133 (ppc64_elf_tls_optimize): Set it.
1134 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1135 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1136 addis would add zero.
1137 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1138 (ppc_elf_tls_optimize): Set it.
1139 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1140 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1142 2017-08-30 Alan Modra <amodra@gmail.com>
1144 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1145 __tls_get_addr call sequences to LE, don't move the addi down
1146 to the nop. Replace the bl with addi and leave the nop alone.
1148 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1150 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1152 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1154 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1156 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1158 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1159 (BFD64_BACKENDS): Likewise.
1160 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1161 (BFD64_BACKENDS_CFILES): Likewise.
1162 * Makefile.in: Regenerated.
1163 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1164 elf32-i386.lo and elf64-x86-64.lo.
1165 * configure: Regenerated.
1166 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1167 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1168 "objalloc.h" and "hashtab.h".
1169 (ELIMINATE_COPY_RELOCS): Removed.
1170 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1171 (SYMBOL_NO_COPYRELOC): Likewise.
1172 (elf_i386_link_hash_entry): Likewise.
1173 (GOT_UNKNOWN): Likewise.
1174 (GOT_NORMAL): Likewise.
1175 (GOT_TLS_GD): Likewise.
1176 (elf_i386_hash_entry): Likewise.
1177 (elf_i386_obj_tdata): Likewise.
1178 (elf_i386_tdata): Likewise.
1179 (elf_i386_local_got_tls_type): Likewise.
1180 (elf_i386_local_tlsdesc_gotent): Likewise.
1181 (elf_i386_hash_table): Likewise.
1182 (elf_i386_link_hash_newfunc): Likewise.
1183 (elf_i386_local_htab_hash): Likewise.
1184 (elf_i386_local_htab_eq): Likewise.
1185 (elf_i386_get_local_sym_hash): Likewise.
1186 (elf_i386_link_hash_table_free): Likewise.
1187 (elf_i386_copy_indirect_symbol): Likewise.
1188 (elf_i386_fixup_symbol): Likewise.
1189 (elf_i386_readonly_dynrelocs): Likewise.
1190 (elf_i386_always_size_sections): Likewise.
1191 (elf_i386_set_tls_module_base): Likewise.
1192 (elf_i386_dtpoff_base): Likewise.
1193 (compare_relocs): Likewise.
1194 (elf_i386_hash_symbol): Likewise.
1195 (elf_i386_parse_gnu_properties): Likewise.
1196 (elf_i386_merge_gnu_properties): Likewise.
1197 (elf_i386_link_check_relocs): Likewise.
1198 (elf_i386_merge_symbol_attribute): Likewise.
1199 (bfd_elf32_bfd_link_check_relocs): Likewise.
1200 (elf_backend_copy_indirect_symbol): Likewise.
1201 (elf_backend_always_size_sections): Likewise.
1202 (elf_backend_omit_section_dynsym): Likewise.
1203 (elf_backend_hash_symbol): Likewise.
1204 (elf_backend_fixup_symbol): Likewise.
1205 (elf_backend_parse_gnu_properties): Likewise.
1206 (elf_backend_merge_gnu_properties): Likewise.
1207 (elf_backend_merge_symbol_attribute): Likewise.
1208 (elf_i386_mkobject): Updated.
1209 (elf_i386_link_hash_table_create): Likewise.
1210 (elf_i386_check_tls_transition): Likewise.
1211 (elf_i386_tls_transition): Likewise.
1212 (elf_i386_convert_load_reloc): Likewise.
1213 (elf_i386_check_relocs): Likewise.
1214 (elf_i386_adjust_dynamic_symbol): Likewise.
1215 (elf_i386_allocate_dynrelocs): Likewise.
1216 (elf_i386_convert_load): Likewise.
1217 (elf_i386_size_dynamic_sections): Likewise.
1218 (elf_i386_relocate_section): Likewise.
1219 (elf_i386_finish_dynamic_symbol ): Likewise.
1220 (elf_i386_finish_dynamic_sections): Likewise.
1221 (elf_i386_output_arch_local_syms): Likewise.
1222 (elf_i386_get_synthetic_symtab): Likewise.
1223 (elf_i386_link_setup_gnu_properties): Likewise.
1224 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1225 of elf_link_hash_table, as base.
1226 (elf_i386_next_tls_desc_index): New.
1227 (elf_i386_srelplt2): Likewise.
1228 (elf_i386_plt): Likewise.
1229 (elf_i386_lazy_plt): Likewise.
1230 (elf_i386_non_lazy_plt): Likewise.
1231 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1232 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1233 "objalloc.h" and "hashtab.h".
1234 (ELIMINATE_COPY_RELOCS): Removed.
1235 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1236 (SYMBOL_NO_COPYRELOC): Likewise.
1237 (elf_x86_64_link_hash_entry): Likewise.
1238 (GOT_UNKNOWN): Likewise.
1239 (GOT_NORMAL): Likewise.
1240 (GOT_TLS_GD): Likewise.
1241 (elf_x86_64_hash_entry): Likewise.
1242 (elf_x86_64_obj_tdata): Likewise.
1243 (elf_x86_64_tdata): Likewise.
1244 (elf_x86_64_local_got_tls_type): Likewise.
1245 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1246 (elf_x86_64_hash_table): Likewise.
1247 (elf_x86_64_link_hash_newfunc): Likewise.
1248 (elf_x86_64_local_htab_hash): Likewise.
1249 (elf_x86_64_local_htab_eq): Likewise.
1250 (elf_x86_64_get_local_sym_hash): Likewise.
1251 (elf_x86_64_link_hash_table_free): Likewise.
1252 (elf_x86_64_copy_indirect_symbol): Likewise.
1253 (elf_x86_64_fixup_symbol): Likewise.
1254 (elf_x86_64_readonly_dynrelocs): Likewise.
1255 (elf_x86_64_always_size_sections): Likewise.
1256 (elf_x86_64_set_tls_module_base): Likewise.
1257 (elf_x86_64_dtpoff_base): Likewise.
1258 (compare_relocs): Likewise.
1259 (elf_x86_64_merge_symbol_attribute): Likewise.
1260 (elf_x86_64_hash_symbol): Likewise.
1261 (elf_x86_64_parse_gnu_properties): Likewise.
1262 (elf_x86_64_merge_gnu_properties): Likewise.
1263 (elf_x86_64_link_check_relocs): Likewise.
1264 (elf_backend_copy_indirect_symbol): Likewise.
1265 (elf_backend_always_size_sections): Likewise.
1266 (bfd_elf64_bfd_link_check_relocs): Likewise.
1267 (elf_backend_merge_symbol_attribute): Likewise.
1268 (elf_backend_hash_symbol): Likewise.
1269 (elf_backend_omit_section_dynsym): Likewise.
1270 (elf_backend_fixup_symbol): Likewise.
1271 (elf_backend_parse_gnu_properties): Likewise.
1272 (elf_backend_merge_gnu_properties): Likewise.
1273 (bfd_elf32_bfd_link_check_relocs): Likewise.
1274 (elf_x86_64_mkobject): Updated.
1275 (elf_x86_64_link_hash_table_create): Likewise.
1276 (elf_x86_64_check_tls_transition): Likewise.
1277 (elf_x86_64_tls_transition): Likewise.
1278 (elf_x86_64_convert_load_reloc): Likewise.
1279 (elf_x86_64_check_relocs): Likewise.
1280 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1281 (elf_x86_64_allocate_dynrelocs): Likewise.
1282 (elf_x86_64_convert_load): Likewise.
1283 (elf_x86_64_size_dynamic_sections): Likewise.
1284 (elf_x86_64_relocate_section): Likewise.
1285 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1286 (elf_x86_64_finish_dynamic_sections): Likewise.
1287 (elf_x86_64_output_arch_local_syms): Likewise.
1288 (elf_x86_64_get_synthetic_symtab): Likewise.
1289 (elf_x86_64_link_setup_gnu_properties): Likewise.
1290 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1291 instead of elf_link_hash_table, as base.
1292 (elf_x86_64_next_tls_desc_index): New.
1293 (elf_x86_64_srelplt2): Likewise.
1294 (elf_x86_64_plt): Likewise.
1295 (elf_x86_64_lazy_plt): Likewise.
1296 (elf_x86_64_non_lazy_plt): Likewise.
1297 * elfxx-x86.c: New file.
1298 * elfxx-x86.h: Likewise.
1300 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1302 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1304 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1306 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1308 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1309 sections before checking dynamic relocations and free invalid
1310 PLT section contents.
1311 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1313 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1315 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1316 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1318 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1321 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1323 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1325 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1327 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1329 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1331 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1334 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1335 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1336 Add a has_no_copy_on_protected bitfield.
1337 (elf_has_no_copy_on_protected): New.
1338 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1339 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1340 (elf_merge_gnu_property_list): Likewise.
1341 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1342 to FALSE for elf_has_no_copy_on_protected.
1343 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1344 (elf_i386_link_hash_entry): Add def_protected.
1345 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1346 when checking info->nocopyreloc.
1347 (elf_i386_link_setup_gnu_properties): Don't set
1348 extern_protected_data here.
1349 (elf_i386_merge_symbol_attribute): New function.
1350 (elf_backend_merge_symbol_attribute): New.
1351 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1352 (elf_x86_64_link_hash_entry): Add def_protected.
1353 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1354 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1355 when checking info->nocopyreloc.
1356 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1357 relocation run-time overflow and unresolvable R_X86_64_32S
1358 relocation against protected data symbol defined in shared object
1359 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1360 (elf_x86_64_link_setup_gnu_properties): Don't set
1361 extern_protected_data here.
1362 (elf_x86_64_merge_symbol_attribute): New function.
1363 (elf_backend_merge_symbol_attribute): New.
1365 2017-08-26 Alan Modra <amodra@gmail.com>
1367 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1368 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1369 (ppc_elf_relocate_section): Comment fix.
1370 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1371 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1372 Support dynamic relocs for TPREL16 when non-pic too.
1373 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1374 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1377 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1379 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1380 "symbol" in comments.
1381 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1383 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1386 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1387 R_X86_64_PC32 relocation run-time overflow and unresolvable
1388 R_X86_64_32S relocation with -z nocopyreloc.
1390 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1392 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1393 Undefined symbols may not have a type.
1394 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1396 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1398 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1399 bfd_link_info. Report shared, PIE or PDE object based on
1401 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1402 (elf_x86_64_relocate_section): Likewise.
1404 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1406 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1407 for function symbols.
1408 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1410 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1412 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1413 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1414 is set on any input relocatable file.
1415 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1417 2017-08-23 Alan Modra <amodra@gmail.com>
1420 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1421 ensure_undefweak_dynamic. Handle undefined too.
1422 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1423 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1424 (allocate_dynrelocs): Discard undefined non-default visibility
1425 relocs first. Make undefined syms dynamic. Tidy goto.
1427 2017-08-21 Alan Modra <amodra@gmail.com>
1428 H.J. Lu <hongjiu.lu@intel.com>
1431 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1432 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1434 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1437 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1438 undefined weak symbols.
1440 2017-08-18 Nick Clifton <nickc@redhat.com>
1443 * tekhex.c (getsym): Fix check for source pointer walking off the
1444 end of the input buffer.
1446 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1449 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1450 relocations in debug sections, change abort to _bfd_error_handler.
1452 2017-08-14 Nick Clifton <nickc@redhat.com>
1455 * elf.c (setup_group): Check for an empty or very small group
1457 * po/bfd.pot: Regenerate.
1459 2017-08-14 Alan Modra <amodra@gmail.com>
1462 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1463 alignment padding here.
1464 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1465 in a reverse pass over sections.
1467 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1470 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1471 for @plt suffixes first.
1472 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1474 2017-08-08 Nick Clifton <nickc@redhat.com>
1477 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1478 small section lengths.
1479 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1481 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1482 there is enough data present in the note.
1484 2017-08-08 Alan Modra <amodra@gmail.com>
1487 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1488 got.refcount for GOTOFF relocs, just create .got section.
1490 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1492 * elflink.c (elf_link_add_object_symbols): Move common symbol
1493 check after bed->common_definition.
1495 2017-08-07 Alan Modra <amodra@gmail.com>
1498 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1499 needed to define various dynamic tags have been discarded.
1501 2017-08-07 Nick Clifton <nickc@redhat.com>
1504 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1505 has not been set then use the bfd returned by
1506 _bfd_elf_link_setup_gnu_properties. If that is null then search
1507 through all the input bfds selecting the first normal, ELF format
1509 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1511 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1513 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1515 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1516 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1517 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1518 (elf_i386_link_check_relocs): New function.
1519 (bfd_elf32_bfd_link_check_relocs): New.
1520 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1522 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1523 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1524 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1525 (elf_x86_64_link_check_relocs): New function.
1526 (bfd_elf64_bfd_link_check_relocs): New.
1527 (bfd_elf32_bfd_link_check_relocs): Likewise.
1529 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1532 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1533 as undefined for --no-define-common.
1535 2017-08-05 Alan Modra <amodra@gmail.com>
1537 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1538 hppa_link_hash_table.
1540 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1542 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1543 entries for sysregs with negative indices.
1545 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1547 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1548 isn't the S/390 specific elf data.
1549 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1551 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1553 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1554 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1555 [R_RISCV_ADD16]: Likewise.
1556 [R_RISCV_ADD32]: Likewise.
1557 [R_RISCV_ADD64]: Likewise.
1558 [R_RISCV_SUB6]: Likewise.
1559 [R_RISCV_SUB8]: Likewise.
1560 [R_RISCV_SUB16]: Likewise.
1561 [R_RISCV_SUB32]: Likewise.
1562 [R_RISCV_SUB64]: Likewise.
1564 2017-07-31 Alan Modra <amodra@gmail.com>
1566 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1567 without ld.so checks.
1569 2017-07-29 Alan Modra <amodra@gmail.com>
1572 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1573 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1574 (is_elfv2_localentry0): Test non_zero_localentry.
1575 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1577 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1579 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1580 pointer check for htab->elf.irelplt.
1581 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1583 2017-07-27 Nick Clifton <nickc@redhat.com>
1586 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1588 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1590 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1592 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1594 (evax_bfd_print_emh): Check for invalid string lengths.
1596 2017-07-25 Nick Clifton <nickc@redhat.com>
1598 * po/fr.po: Updated French translation.
1600 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1603 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1604 16-bit absolute branches into 10-bit pc-relative branches on the
1605 MSP430 as well as the MSP430X.
1607 2017-07-25 Alan Modra <amodra@gmail.com>
1609 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1610 (stub_eh_frame_size): New function.
1611 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1612 (group_sections): Init group tls_get_addr_opt_bctrl.
1613 (ppc64_elf_size_stubs): Update sizing and initialization of
1614 .eh_frame. Iteration over stubs via group list.
1615 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1616 (ppc64_elf_finish_dynamic_sections): Update finalization of
1619 2017-07-24 Nick Clifton <nickc@redhat.com>
1622 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1623 of the relocs to the canonicalize_one_reloc routine.
1624 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1625 for the _bfd_mach_o_canonicalize_one_reloc field.
1626 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1627 res_base parameter. Use to check for corrupt pair relocs.
1628 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1630 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1632 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1635 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1636 enough data in the record before attempting to parse it.
1637 (_bfd_vms_slurp_eeom): Likewise.
1639 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1640 (image_set_ptr): Likewise.
1641 (alpha_vms_slurp_relocs): Likewise.
1643 (alpha_vms_object_p): Check for a truncated record.
1645 2017-07-24 Nick Clifton <nickc@redhat.com>
1648 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1649 an unrecognized reloc and sets the bfd_error value.
1650 * libbfd.h: Regenerate.
1651 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1653 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1654 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1655 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1656 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1657 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1659 2017-07-23 Alan Modra <amodra@gmail.com>
1661 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1664 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1667 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1668 reloc_class_ifunc for ifunc symbols.
1670 2017-07-19 Nick Clifton <nickc@redhat.com>
1673 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1674 correct magic bytes at the start, set the error to wrong format
1675 and clear the format selector before returning NULL.
1677 2017-07-19 Nick Clifton <nickc@redhat.com>
1680 * coff-rs6000.c (_bfd_strntol): New function.
1681 (_bfd_strntoll): New function.
1682 (GET_VALUE_IN_FIELD): New macro.
1683 (EQ_VALUE_IN_FIELD): new macro.
1684 (_bfd_xcoff_slurp_armap): Use new macros.
1685 (_bfd_xcoff_archive_p): Likewise.
1686 (_bfd_xcoff_read_ar_hdr): Likewise.
1687 (_bfd_xcoff_openr_next_archived_file): Likewise.
1688 (_bfd_xcoff_stat_arch_elt): Likewise.
1689 * coff64-rs6000.c (_bfd_strntol): New function.
1690 (_bfd_strntoll): New function.
1691 (GET_VALUE_IN_FIELD): New macro.
1692 (xcoff64_slurp_armap): Use new macros.
1694 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1695 John Eric Martin <John.Martin@emmicro-us.com>
1697 * bfd-in2.h: Regenerate.
1698 * libbfd.h: Regenerate.
1699 * elf32-arc.c (JLI): Define.
1700 * reloc.c: Add JLI relocations.
1702 2017-07-18 Nick Clifton <nickc@redhat.com>
1705 * coff-sh.c: Fix spelling typos.
1706 * compress.c: Likewise.
1707 * cpu-pdp11.c: Likewise.
1708 * ecofflink.c: Likewise.
1709 * elf-m10300.c: Likewise.
1711 * elf32-arm.c: Likewise.
1712 * elf32-m68k.c: Likewise.
1713 * elf32-nds32.c: Likewise.
1714 * elf32-ppc.c: Likewise.
1715 * elf32-sh.c: Likewise.
1716 * elf32-v850.c: Likewise.
1717 * elf64-ppc.c: Likewise.
1718 * elf64-x86-64.c: Likewise.
1719 * elflink.c: Likewise.
1720 * elfnn-aarch64.c: Likewise.
1721 * elfxx-mips.c: Likewise.
1723 * sunos.c: Likewise.
1724 * vms-alpha.c: Likewise.
1725 * xcofflink.c: Likewise.
1727 2017-07-18 Nick Clifton <nickc@redhat.com>
1730 * coffcode.h (handle_COMDAT): Replace abort with an error message
1733 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1736 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1739 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1741 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1743 2017-07-16 Alan Modra <amodra@gmail.com>
1745 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1746 __tls_index GOT entries when using __tls_get_addr_opt stub.
1747 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1749 2017-07-12 Alan Modra <amodra@gmail.com>
1751 * po/es.po: Update from translationproject.org/latest/bfd/.
1752 * po/fi.po: Likewise.
1753 * po/fr.po: Likewise.
1754 * po/id.po: Likewise.
1755 * po/ja.po: Likewise.
1756 * po/ro.po: Likewise.
1757 * po/ru.po: Likewise.
1758 * po/sr.po: Likewise.
1759 * po/sv.po: Likewise.
1760 * po/tr.po: Likewise.
1761 * po/uk.po: Likewise.
1762 * po/vi.po: Likewise.
1763 * po/zh_CN.po: Likewise.
1764 * po/hr.po: New file from translationproject.org.
1765 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1766 * configure: Regenerate.
1768 2017-07-12 Nick Clifton <nickc@redhat.com>
1770 Fix compile time warnings using gcc 7.1.1.
1771 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1773 (elf_xtensa_get_gotplt_section): Increase length of got_name
1775 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1776 default return of FALSE.
1777 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1778 default return of FALSE.
1780 2017-07-12 Alan Modra <amodra@gmail.com>
1782 * binary.c (binary_set_section_contents): Don't print filepos in
1784 (coff_write_object_contents): Cast size_t for error message.
1785 (coff_slurp_line_table): Don't use bfd_vma symndx.
1786 (coff_slurp_reloc_table): Remove unneeded cast.
1787 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1789 (find_abstract_instance_name): Likewise.
1790 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1791 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1792 (elf32_arm_check_relocs): Make r_symndx an int.
1793 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1795 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1797 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1799 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1800 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1801 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1802 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1803 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1804 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1805 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1806 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1807 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1808 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1809 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1810 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1811 and use %lu for error message.
1812 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1813 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1816 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1818 (elf32_arm_final_link_relocate): Likewise.
1819 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1820 * coffcode.h (styp_to_sec_flags): Likewise.
1821 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1822 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1823 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1824 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1825 (elf32_bfin_merge_private_bfd_data): Likewise.
1826 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1827 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1828 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1829 (i370_elf_relocate_section): Likewise.
1830 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1831 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1832 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1833 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1834 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1835 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1836 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1837 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1838 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1839 * ieee.c (ieee_write_id, read_id): Likewise.
1840 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1841 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1842 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1843 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1844 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1845 * stabs.c (_bfd_link_section_stabs): Likewise.
1847 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1849 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1850 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1851 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1852 * coff-sh.c (sh_relax_section): Likewise.
1853 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1854 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1855 * coffcode.h (coff_slurp_reloc_table): Likewise.
1856 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1857 (_bfd_coff_read_string_table): Likewise.
1858 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1859 * compress.c (bfd_get_full_section_contents): Likewise.
1860 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1861 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1862 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1863 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1864 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1865 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1866 (elf32_arm_write_section): Likewise.
1867 * elf32-bfin.c (bfin_relocate_section): Likewise.
1868 (bfinfdpic_relocate_section): Likewise.
1869 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1870 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1871 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1872 (elf_i386_relocate_section): Likewise.
1873 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1874 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1875 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1876 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1877 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1878 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1879 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1880 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1881 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1882 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1883 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1884 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1885 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1886 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1887 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1888 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1889 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1890 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1891 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1892 * elf32-sh.c (sh_elf_relax_section): Likewise.
1893 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1894 (sh_elf_relocate_section): Likewise.
1895 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1896 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1897 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1898 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1899 * elf32-v850.c (v850_elf_relax_section): Likewise.
1900 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1901 (elf_vax_relocate_section): Likewise.
1902 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1903 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1904 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1905 (do_fix_for_relocatable_link): Likewise.
1906 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1907 (elf64_alpha_relax_with_lituse): Likewise.
1908 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1909 (elf_hppa_final_link_relocate): Likewise.
1910 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1911 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1912 (elf64_vms_link_add_object_symbols): Likewise.
1913 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1914 (mmix_final_link_relocate): Likewise.
1915 * elf64-s390.c (invalid_tls_insn): Likewise.
1916 (elf_s390_relocate_section): Likewise.
1917 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1918 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1919 (elf_x86_64_relocate_section): Likewise.
1920 * elfcode.h (elf_slurp_symbol_table): Likewise.
1921 * elfcore.h (elf_core_file_p): Likewise.
1922 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1923 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1924 (elfNN_aarch64_relocate_section): Likewise.
1925 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1926 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1927 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1928 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1929 (_bfd_mips_elf_relocate_section): Likewise.
1930 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1931 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1932 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1933 * ieee.c (ieee_slurp_external_symbols): Likewise.
1934 * ihex.c (ihex_write_object_content): Likewise.
1935 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1936 * merge.c (_bfd_merged_section_offset): Likewise.
1937 * mmo.c (mmo_write_loc_chunk): Likewise.
1938 (mmo_write_object_contents): Likewise.
1939 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1940 * stabs.c (_bfd_link_section_stabs): Likewise.
1941 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1943 2017-07-11 Alan Modra <amodra@gmail.com>
1945 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1947 2017-07-11 Alan Modra <amodra@gmail.com>
1949 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1950 instruction" error using _bfd_error_handler, not einfo.
1952 2017-07-10 Nick Clifton <nickc@redhat.com>
1954 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1955 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1957 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1959 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1961 2017-07-07 Alan Modra <amodra@gmail.com>
1963 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1965 2017-07-07 Alan Modra <amodra@gmail.com>
1967 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1968 as long long. Move code replacing "ll" with "I64", and simplify.
1970 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1972 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1975 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1977 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1979 (line_info_add_file_name): Likewise.
1980 (decode_line_info): Likewise.
1982 2017-07-04 Tristan Gingold <gingold@adacore.com>
1984 * version.m4: Bump version to 2.29.51
1985 * configure: Regenerate.
1987 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1989 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1990 sanity check at the head of this function.
1992 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1994 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1995 dwarf_line_str_size.
1996 (struct attr_abbrev): Add field implicit_const.
1997 (dwarf_debug_sections): Add .debug_line_str.
1998 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1999 (dwarf_debug_section_assert): Add static assertion.
2000 (read_indirect_line_string): New.
2001 (read_abbrevs): Support DW_FORM_implicit_const.
2002 (is_str_attr): Support DW_FORM_line_strp.
2003 (read_attribute_value): Support DW_FORM_line_strp and
2004 DW_FORM_implicit_const.
2005 (read_attribute): Support DW_FORM_implicit_const.
2006 (line_info_add_include_dir, line_info_add_include_dir_stub):
2007 (line_info_add_file_name, read_formatted_entries): New.
2008 (decode_line_info, parse_comp_unit): Support DWARF 5.
2009 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2011 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2013 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2014 abort statement that was put for symbols that are not dynamic.
2016 2017-07-03 Tristan Gingold <gingold@adacore.com>
2018 * po/bfd.pot: Regenerate
2020 2017-07-03 Alan Modra <amodra@gmail.com>
2022 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2023 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2024 * elf.c (setup_group): Use "Lx" to print sh_size.
2025 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2026 unknown section type in hex.
2027 (copy_special_section_fields): Style fix.
2028 (bfd_section_from_shdr): Correct format for sh_link. Use a
2029 common error message for all the variants of unrecognized
2031 (assign_file_positions_for_load_sections): Use "Lx" for lma
2032 adjust error message.
2033 (assign_file_positions_for_non_load_sections): Formatting.
2034 (rewrite_elf_program_header): Formatting. Use "Lx" for
2035 bfd_vma values in error messages.
2036 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2037 ELF_R_SYM value to type expected by format.
2038 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2040 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2041 (elf_link_input_bfd): Use "Lx" for r_info.
2042 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2044 2017-07-03 Alan Modra <amodra@gmail.com>
2046 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2047 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2048 Microsoft C library variant of long long format specifier.
2049 (PRINT20): Cast value to bfd_uint64_t not long long.
2050 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2051 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2052 long long. Don't cast to bfd_vma.
2053 * elf32-score.c (score3_bfd_getl48): Likewise.
2054 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2056 2017-07-03 Alan Modra <amodra@gmail.com>
2058 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2060 (bfd_elf_print_symbol): Don't cast symbol->flags.
2061 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2062 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2063 _bfd_error_handler argument order.
2064 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2066 2017-07-03 Alan Modra <amodra@gmail.com>
2068 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2069 AC_TYPE_LONG_DOUBLE.
2070 * configure: Regenerate.
2071 * config.in: Regenerate.
2073 2017-06-29 Andrew Waterman <andrew@sifive.com>
2075 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2078 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2080 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2081 unless it is undefined weak.
2082 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2083 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2085 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2086 is not dynamic in PIC, abort.
2088 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2091 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2092 undefined weak symbols into dynamic.
2093 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2094 relocation for non-dynamic symbols.
2095 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2097 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2099 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2100 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2101 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2102 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2103 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2106 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2108 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2109 (elfcore_write_s390_gs_bc): Likewise.
2110 * elf.c (elfcore_grok_s390_gs_cb): New function.
2111 (elfcore_grok_s390_gs_bc): New function.
2112 (elfcore_grok_note): Call them.
2113 (elfcore_write_s390_gs_cb): New function.
2114 (elfcore_write_s390_gs_bc): New function.
2115 (elfcore_write_register_note): Call them.
2117 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2119 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2120 bfd_get_file_size. Check archive element size.
2121 (_bfd_generic_get_section_contents_in_window): Likewise.
2123 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2125 * bfd-in2.h: Regenerated.
2126 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2127 (bfd_get_file_size): Likewise.
2129 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2130 Matthew Fortune <matthew.fortune@imgtec.com>
2132 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2133 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2134 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2135 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2137 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2138 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2139 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2140 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2141 `bfd_mach_mips_interaptiv_mr2' entries.
2142 * bfd-in2.h: Regenerate.
2144 2017-06-27 Nick Clifton <nickc@redhat.com>
2146 * tekhex.c (pass_over): Revert accidental conversion of a local
2147 array to a static array.
2149 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2152 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2153 reloc addend if necessary. Adjust diff only if
2154 shrinked_insn_address < end_address.
2156 2017-06-27 Alan Modra <amodra@gmail.com>
2159 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2160 (_bfd_generic_get_section_contents_in_window): Likewise.
2162 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2164 * elfnn-riscv.c (perform_relocation): Support the new
2165 R_RISCV_32_PCREL relocation.
2166 (riscv_elf_relocate_section): Likewise.
2167 * elfxx-riscv.c (howto_table): Likewise.
2168 (riscv_reloc_map): Likewise.
2169 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2170 * libbfd.h: Regenerate.
2172 2017-06-27 Alan Modra <amodra@gmail.com>
2175 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2176 Use unsigned file pointer type, and remove cast.
2177 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2178 Add "count", not "sz".
2180 2017-06-26 Pedro Alves <palves@redhat.com>
2183 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2186 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2189 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2192 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2194 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2195 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2196 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2197 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2198 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2200 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2203 * compress.c (bfd_get_full_section_contents): Don't check the
2205 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2206 reject a section whose size + offset is greater than the size
2208 (_bfd_generic_get_section_contents_in_window): Likewise.
2210 2017-06-26 Nick Clifton <nickc@redhat.com>
2213 * tekhex.c (getvalue): Check for the source pointer exceeding the
2214 end pointer before the first byte is read.
2216 2017-06-26 Nick Clifton <nickc@redhat.com>
2219 * opncls.c (get_build_id): Check that the section is big enough
2220 to contain the whole note.
2221 * compress.c (bfd_get_full_section_contents): Check for and reject
2222 a section whose size is greater than the size of the entire file.
2223 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2224 contain a notes section.
2226 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2228 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2230 (elf_s390_modify_segment_map): Likewise.
2231 (bfd_elf_s390_set_options): Lisewise.
2233 2017-06-26 Alan Modra <amodra@gmail.com>
2235 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2237 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2238 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2239 .preinit_array on --just-syms bfds.
2240 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2241 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2242 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2244 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2246 * elf.c (find_link): Bounds check "hint".
2248 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2250 * elf32-arm.c (using_thumb_only): Update list of architectures in
2251 BFD_ASSERT for which the logic is valid.
2252 (using_thumb2_bl): Likewise.
2253 (using_thumb2): Likewise and return true for ARMv8-R.
2254 (arch_has_arm_nop): Likewise.
2255 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2256 merging logic. Update commentis for value 15 of v8m_baseline,
2257 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2258 merging of value 15 of Tag_CPU_arch.
2260 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2262 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2263 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2264 * bfd-in2.h: Regenerate.
2266 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2268 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2269 the error_alignment label forward. Properly align program
2270 property note section.
2272 2017-06-22 Eric Christopher <echristo@gmail.com>
2274 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2275 abs to fix a truncation warning.
2277 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2279 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2280 local undefined weak symbol to 0.
2281 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2283 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2285 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2286 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2287 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2288 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2289 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2290 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2291 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2292 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2294 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2296 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2297 (elf_i386_lazy_ibt_plt_entry): Likewise.
2298 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2299 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2300 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2301 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2302 (elf_i386_lazy_plt_layout): Likewise.
2303 (elf_i386_non_lazy_plt_layout): Likewise.
2304 (elf_i386_link_hash_entry): Add plt_second.
2305 (elf_i386_link_hash_table): Add plt_second and
2306 plt_second_eh_frame.
2307 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2308 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2309 the second PLT. Check the second PLT.
2310 (elf_i386_relocate_section): Use the second PLT to resolve
2311 PLT reference if needed.
2312 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2314 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2315 second PLT. Generate unwind info for the second PLT.
2316 (elf_i386_plt_type): Add plt_second.
2317 (elf_i386_get_synthetic_symtab): Support the second PLT.
2318 (elf_i386_parse_gnu_properties): Support
2319 GNU_PROPERTY_X86_FEATURE_1_AND.
2320 (elf_i386_merge_gnu_properties): Support
2321 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2322 on GNU_PROPERTY_X86_FEATURE_1_IBT
2323 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2324 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2325 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2326 is set on all relocatable inputs.
2327 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2328 (elf_x32_lazy_ibt_plt_entry): Likewise.
2329 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2330 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2331 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2332 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2333 (elf_x86_64_lazy_ibt_plt): Likewise.
2334 (elf_x32_lazy_ibt_plt): Likewise.
2335 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2336 (elf_x32_non_lazy_ibt_plt): Likewise.
2337 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2338 (elf_x86_64_parse_gnu_properties): Support
2339 GNU_PROPERTY_X86_FEATURE_1_AND.
2340 (elf_x86_64_merge_gnu_properties): Support
2341 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2342 on GNU_PROPERTY_X86_FEATURE_1_IBT
2343 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2344 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2345 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2346 is set on all relocatable inputs.
2348 2017-06-22 Nick Clifton <nickc@redhat.com>
2351 * som.c (setup_sections): NUL terminate the space_strings buffer.
2352 Check that the space.name field does not index beyond the end of
2353 the space_strings buffer.
2355 2017-06-21 Nick Clifton <nickc@redhat.com>
2358 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2360 2017-06-21 Nick Clifton <nickc@redhat.com>
2363 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2364 type of the size parameter.
2365 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2366 length of the counted string.
2367 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2368 (_bfd_vms_save_counted_string): Likewise.
2369 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2370 _bfd_vms_save_counted_string.
2371 (_bfd_vms_slurp_ehdr): Likewise.
2372 (_bfd_vms_slurp_egsd): Likewise.
2373 (Parse_module): Likewise.
2375 2017-06-21 Alan Modra <amodra@gmail.com>
2377 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2378 calls before tocsave calls.
2379 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2382 2017-06-21 Nick Clifton <nickc@redhat.com>
2385 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2386 bfd_get_full_section_contents returns no contents.
2388 2017-06-21 Nick Clifton <nickc@redhat.com>
2391 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2394 2017-06-21 Nick Clifton <nickc@redhat.com>
2397 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2399 (image_set_ptr): Likewise.
2400 (alpha_vms_fix_sec_rel): Likewise.
2401 (alpha_vms_slurp_relocs): Likewise.
2403 2017-06-21 Nick Clifton <nickc@redhat.com>
2406 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2408 (ieee_archive_p): Likewise.
2409 (ieee_object_p): Likewise.
2411 2017-06-21 Nick Clifton <nickc@redhat.com>
2414 * elf.c (setup_group): Zero the group section pointer list after
2415 allocation so that loops can be caught. Check for NULL pointers
2416 when processing a group list.
2418 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2420 * elf-s390.h: New file.
2421 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2423 (elf_s390_additional_program_headers): New function.
2424 (elf_s390_modify_segment_map): New function.
2425 (bfd_elf_s390_set_options): New function.
2426 (elf_backend_additional_program_headers)
2427 (elf_backend_modify_segment_map): Add macro definitions.
2429 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2432 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2433 the DYNAMIC bit instead of bfd_count_sections.
2435 2017-06-19 Nick Clifton <nickc@redhat.com>
2438 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2440 (evax_bfd_print_eeom): Likewise.
2441 (evax_bfd_print_egsd): Check for an overlarge record length.
2442 (evax_bfd_print_etir): Likewise.
2444 2017-06-19 Nick Clifton <nickc@redhat.com>
2447 * libieee.h (struct common_header_type): Add end_p field.
2448 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2450 (read_id): Check for a length that exceeds the remaining bytes in
2452 (ieee_seek): Initialise end_p.
2453 (ieee_archive_p): Likewise.
2454 (ieee_object_p): Likewise.
2456 2017-06-19 Nick Clifton <nickc@redhat.com>
2459 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2460 before reading the EIHS structure entries.
2462 2017-06-19 Nick Clifton <nickc@redhat.com>
2465 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2466 gsd_size. Check that there are enough bytes remaining to read the
2467 type and size of the next egsd. Check that the size of the egsd
2468 does not exceed the size of the record.
2470 2017-06-19 Alan Modra <amodra@gmail.com>
2472 * config.bfd: Correct targ_underscore for cris.
2474 2017-06-18 Alan Modra <amodra@gmail.com>
2476 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2477 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2479 2017-06-16 Nick Clifton <nickc@redhat.com>
2481 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2482 bucketlist is empty because there are no symbols to add to the
2485 2017-06-16 Alan Modra <amodra@gmail.com>
2491 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2492 (BFD_JUMP_TABLE_LINK): Likewise.
2493 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2494 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2495 (bfd_elf_define_start_stop): New function.
2496 * linker.c (bfd_generic_define_start_stop): New function.
2497 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2499 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2500 * aout-target.h (MY_bfd_define_start_stop): Define.
2501 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2502 * binary.c (binary_bfd_define_start_stop): Define.
2503 * bout.c (b_out_bfd_define_start_stop): Define.
2504 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2505 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2506 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2507 * coffcode.h (coff_bfd_define_start_stop): Define.
2508 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2509 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2510 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2511 * ieee.c (ieee_bfd_define_start_stop): Define.
2512 * ihex.c (ihex_bfd_define_start_stop): Define.
2513 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2514 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2515 * mmo.c (mmo_bfd_define_start_stop): Define.
2516 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2517 * oasys.c (oasys_bfd_define_start_stop): Define.
2518 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2519 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2520 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2521 * som.c (som_bfd_define_start_stop): Define.
2522 * srec.c (srec_bfd_define_start_stop): Define.
2523 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2524 * versados.c (versados_bfd_define_start_stop): Define.
2525 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2526 (alpha_vms_bfd_define_start_stop): Define.
2527 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2528 * bfd-in2.h: Regenerate.
2529 * libbfd.h: Regenerate.
2531 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2533 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2534 SYMBOL_REFERENCES_LOCAL.
2536 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2539 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2540 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2541 runtime for if there needs copy relocation elimination.
2542 (need_copy_relocation_p): New function. Return true for symbol with
2543 pc-relative references and if it's against read-only sections.
2544 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2545 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2546 that are related with accessing external objects.
2547 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2548 in elfNN_aarch64_check_relocs.
2550 2017-06-15 Nick Clifton <nickc@redhat.com>
2553 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2556 (ieee_archive_p): Likewise.
2558 2017-06-15 Nick Clifton <nickc@redhat.com>
2561 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2563 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2565 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2566 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2567 keep both windowed and call0 ABI PLT definitions.
2568 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2569 elf_xtensa_*_plt_entry endex.
2570 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2572 2017-06-14 Nick Clifton <nickc@redhat.com>
2575 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2578 2017-06-14 Nick Clifton <nickc@redhat.com>
2581 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2582 maximum value for the ascic pointer. Check that name processing
2583 does not read beyond this value.
2584 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2587 2017-06-14 Nick Clifton <nickc@redhat.com>
2590 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2591 (process_otr): Check for an invalid offset in the otr structure.
2593 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2595 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2597 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2603 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2604 vtable field to a union.
2605 (_bfd_elf_is_start_stop): Removed.
2606 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2607 __start_SECNAME and __stop_SECNAME symbols.
2608 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2609 * elflink.c (_bfd_elf_is_start_stop): Removed.
2610 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2611 _bfd_elf_is_start_stop.
2612 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2613 __stop_SECNAME symbols. Updated.
2614 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2615 (bfd_elf_gc_record_vtinherit): Likewise.
2616 (bfd_elf_gc_record_vtentry): Likewise.
2618 2017-06-13 Nick Clifton <nickc@redhat.com>
2621 * elflink.c (elf_link_adjust_relocs): Generate an error when
2622 encountering a reloc against a symbol removed by garbage
2625 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2627 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2628 to merge_gnu_properties.
2629 * elf-properties.c (elf_merge_gnu_properties): Add struct
2630 bfd_link_info * and pass it to merge_gnu_properties.
2631 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2632 and pass it to elf_merge_gnu_properties.
2633 (_bfd_elf_link_setup_gnu_properties): Pass info to
2634 elf_merge_gnu_property_list.
2635 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2637 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2639 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2642 * binary.c (binary_set_section_contents): Scale lma by octets
2643 per byte to set filepos.
2645 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2647 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2650 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2652 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2655 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2657 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2658 patched section contents for TLS IE reloc.
2659 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2661 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2663 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2664 RELOC_FOR_GLOBAL_SYMBOL macro.
2666 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2668 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2671 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2673 * config/tc-arc.c (md_undefined_symbol): Changed.
2674 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2676 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2678 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2681 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2683 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2684 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2686 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2688 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2691 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2693 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2694 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2695 is non-zero. Add clarifying comments.
2697 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2699 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2700 name. Use local IFUNC symbol name string to report unsupported
2701 non-PIC call to IFUNC function.
2702 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2703 when generating R_386_IRELATIVE relocation.
2704 (elf_i386_finish_dynamic_symbol): Likewise.
2705 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2707 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2708 when generating R_X86_64_IRELATIVE relocation.
2709 (elf_x86_64_finish_dynamic_symbol): Likewise.
2711 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2713 * elf.c (setup_group): Make sure BFD sections are created for all
2714 group sections in the input file when processing SHF_GROUP
2716 (bfd_section_from_shdr): Avoid duplicating logic already
2717 implemented in `setup_group'.
2719 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2722 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2723 if the hint address is zero.
2725 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2728 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2729 ELF_COMMON_DEF_P for common symbols.
2731 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2733 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2734 SEC_GROUP sections as SEC_EXCLUDE.
2735 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2736 (assign_section_numbers): Use resolve_section_groups flag instead
2737 of relocatable link type.
2738 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2739 flag instead of checking the final_link flag for part of the
2740 checks in here. Fix white space as a result.
2741 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2742 instead of relocatable link type.
2743 (bfd_elf_final_link): Likewise.
2745 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2747 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2749 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2750 (s3_bfd_score_elf_check_relocs): Likewise.
2751 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2752 (score_elf_final_link_relocate): Likewise.
2753 (s7_bfd_score_elf_check_relocs): Likewise.
2755 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2757 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2760 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2762 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2763 from `reloc_count' rather than decrementing it.
2764 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2765 `reloc_count' by `int_rels_per_ext_rel'.
2766 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2767 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2768 entry determination.
2769 (s3_bfd_score_elf_check_relocs): Likewise.
2770 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2771 (s7_bfd_score_elf_relocate_section): Likewise.
2772 (s7_bfd_score_elf_check_relocs): Likewise.
2773 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2774 prototype and function.
2775 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2776 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2777 triple rather than once the sum of REL and RELA relocation entry
2779 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2780 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2781 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2782 storage allocation size determination.
2783 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2784 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2785 by `int_rels_per_ext_rel' for last relocation entry
2787 (bfd_elf_final_link): Do not multiply `reloc_count' by
2788 `int_rels_per_ext_rel' for internal relocation storage
2789 allocation size determination.
2790 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2791 `int_rels_per_ext_rel' for last relocation entry determination.
2792 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2793 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2794 (_bfd_mips_elf_relocate_section): Likewise.
2796 2017-06-05 Alan Modra <amodra@gmail.com>
2799 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2801 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2803 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2804 determine structure sizes.
2805 (elfcore_grok_freebsd_prstatus): Likewise.
2807 2017-06-01 Alan Modra <amodra@gmail.com>
2809 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2810 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2812 (is_elfv2_localentry0): New function.
2813 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2814 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2815 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2816 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2817 optimized localentry:0 stubs.
2818 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2819 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2821 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2823 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2825 2017-05-30 Casey Smith <clegg89@gmail.com>
2828 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2829 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2831 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2833 * cpu-arc.c (arc_compatible): New function.
2835 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2837 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2839 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2842 * bfdio.c (bfd_get_file_size): New function.
2843 * bfd-in2.h: Regenerated.
2845 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2847 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2850 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2852 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2853 dynobj instead of htab->elf.dynobj.
2855 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2857 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2859 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2860 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2861 actual number of internal relocations retrieved. Adjust
2862 function description.
2863 (bfd_elf64_canonicalize_reloc): Remove macro.
2864 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2866 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2868 * archures.c (bfd_mach_sparc_v9m8): Define.
2869 (bfd_mach_sparc_v8plusm8): Likewise.
2870 (bfd_mach_sparc_v9_p): Adjust to M8.
2871 (bfd_mach_sparc_64bit_p): Likewise.
2872 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2873 bfd_mach_sparc_v8plusm8.
2874 * bfd-in2.h: Regenerated.
2875 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2877 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2878 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2879 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2881 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2882 bfd_mach_sparc_v8plusm8.
2884 2017-05-19 Alan Modra <amodra@gmail.com>
2886 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2887 debug and special sections when no non-note alloc sections in an
2890 2017-05-18 Alan Modra <amodra@gmail.com>
2892 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2893 * elf-m10300.c: Likewise.
2895 * elf32-arc.c: Likewise.
2896 * elf32-bfin.c: Likewise.
2897 * elf32-m68k.c: Likewise.
2898 * elf32-nds32.c: Likewise.
2899 * elf32-tilepro.c: Likewise.
2900 * elflink.c: Likewise.
2901 * elfnn-aarch64.c: Likewise.
2902 * elfnn-riscv.c: Likewise.
2903 * elfxx-tilegx.c: Likewise.
2904 * mach-o.c: Likewise.
2905 * peXXigen.c: Likewise.
2906 * vms-alpha.c: Likewise.
2907 * vms-lib.c: Likewise.
2909 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2912 * elflink.c (elf_gc_mark_debug_section): New function.
2913 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2914 referenced by kept debug sections.
2916 2017-05-16 Alan Modra <amodra@gmail.com>
2918 * elf-m10300.c: Rename occurrences of non_ir_ref.
2919 * elf32-arm.c: Likewise.
2920 * elf32-bfin.c: Likewise.
2921 * elf32-cr16.c: Likewise.
2922 * elf32-cris.c: Likewise.
2923 * elf32-d10v.c: Likewise.
2924 * elf32-dlx.c: Likewise.
2925 * elf32-fr30.c: Likewise.
2926 * elf32-frv.c: Likewise.
2927 * elf32-hppa.c: Likewise.
2928 * elf32-i370.c: Likewise.
2929 * elf32-i386.c: Likewise.
2930 * elf32-iq2000.c: Likewise.
2931 * elf32-lm32.c: Likewise.
2932 * elf32-m32c.c: Likewise.
2933 * elf32-m32r.c: Likewise.
2934 * elf32-m68hc1x.c: Likewise.
2935 * elf32-m68k.c: Likewise.
2936 * elf32-mcore.c: Likewise.
2937 * elf32-metag.c: Likewise.
2938 * elf32-microblaze.c: Likewise.
2939 * elf32-moxie.c: Likewise.
2940 * elf32-msp430.c: Likewise.
2941 * elf32-mt.c: Likewise.
2942 * elf32-nios2.c: Likewise.
2943 * elf32-or1k.c: Likewise.
2944 * elf32-ppc.c: Likewise.
2945 * elf32-rl78.c: Likewise.
2946 * elf32-s390.c: Likewise.
2947 * elf32-score.c: Likewise.
2948 * elf32-score7.c: Likewise.
2949 * elf32-sh.c: Likewise.
2950 * elf32-tic6x.c: Likewise.
2951 * elf32-tilepro.c: Likewise.
2952 * elf32-v850.c: Likewise.
2953 * elf32-vax.c: Likewise.
2954 * elf32-xstormy16.c: Likewise.
2955 * elf32-xtensa.c: Likewise.
2956 * elf64-alpha.c: Likewise.
2957 * elf64-hppa.c: Likewise.
2958 * elf64-ia64-vms.c: Likewise.
2959 * elf64-mmix.c: Likewise.
2960 * elf64-ppc.c: Likewise.
2961 * elf64-s390.c: Likewise.
2962 * elf64-sh64.c: Likewise.
2963 * elf64-x86-64.c: Likewise.
2964 * elflink.c: Likewise.
2965 * elfnn-aarch64.c: Likewise.
2966 * elfnn-ia64.c: Likewise.
2967 * elfnn-riscv.c: Likewise.
2968 * elfxx-mips.c: Likewise.
2969 * elfxx-sparc.c: Likewise.
2970 * elfxx-tilegx.c: Likewise.
2971 * linker.c: Likewise.
2973 2017-05-16 Alan Modra <amodra@gmail.com>
2975 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2976 * elflink.c (elf_link_add_object_symbols): Update to use
2978 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2980 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2982 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2984 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2986 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2988 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2989 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2991 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2993 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2995 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2997 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2998 to plt_second/plt_second_eh_frame.
2999 (elf_x86_64_link_hash_newfunc): Updated.
3000 (elf_x86_64_allocate_dynrelocs): Likewise.
3001 (elf_x86_64_size_dynamic_sections): Likewise.
3002 (elf_x86_64_relocate_section): Likewise.
3003 (elf_x86_64_finish_dynamic_symbol): Likewise.
3004 (elf_x86_64_finish_dynamic_sections): Likewise.
3005 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3006 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3008 (elf_backend_setup_gnu_properties): Updated. Create the
3009 .plt.sec section instead of the .plt.sec section.
3011 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3013 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3014 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3015 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3017 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3019 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3020 (bfd_elf64_set_reloc): Define.
3021 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3023 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3025 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3026 (struct bfd_target): New field _bfd_set_reloc.
3027 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3028 * reloc.c (_bfd_generic_set_reloc): New function.
3029 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3030 * nlm-target.h (nlm_set_reloc): Likewise.
3031 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3032 * aout-tic30.c (MY_set_reloc): Likewise.
3033 * aout-target.h (MY_set_reloc): Likewise.
3034 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3035 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3036 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3037 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3038 * aout-adobe.c (aout_32_set_reloc): Likewise.
3039 * bout.c (b_out_set_reloc): Likewise.
3040 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3041 * i386os9k.c (aout_32_set_reloc): Likewise.
3042 * ieee.c (ieee_set_reloc): Likewise.
3043 * oasys.c (oasys_set_reloc): Likewise.
3044 * som.c (som_set_reloc): Likewise.
3045 * versados.c (versados_set_reloc): Likewise.
3046 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3047 _bfd_generic_set_reloc.
3048 (rs6000_xcoff64_aix_vec): LIkewise.
3049 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3050 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3051 * i386msdos.c (msdos_set_reloc): Define to
3052 _bfd_norelocs_set_reloc.
3053 * elfcode.h (elf_set_reloc): Define.
3054 * bfd-in2.h: Regenerated.
3056 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3059 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3060 for IFUNC function address.
3062 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3064 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3065 (CONFLICT_LIST): Likewise.
3066 (opcode/arc-attrs.h): Include.
3067 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3068 (arc_extract_features): New file.
3069 (arc_stralloc): Likewise.
3070 (arc_elf_merge_attributes): Likewise.
3071 (arc_elf_merge_private_bfd_data): Use object attributes.
3072 (bfd_arc_get_mach_from_attributes): New function.
3073 (arc_elf_object_p): Use object attributes.
3074 (arc_elf_final_write_processing): Likewise.
3075 (elf32_arc_obj_attrs_arg_type): New function.
3076 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3077 (elf32_arc_section_from_shdr): Likewise.
3078 (elf_backend_obj_attrs_vendor): Define.
3079 (elf_backend_obj_attrs_section): Likewise.
3080 (elf_backend_obj_attrs_arg_type): Likewise.
3081 (elf_backend_obj_attrs_section_type): Likewise.
3082 (elf_backend_obj_attrs_handle_unknown): Likewise.
3083 (elf_backend_section_from_shdr): Likewise.
3085 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3088 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3089 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3090 and the destination is a Thumb symbol.
3092 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3094 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3095 initializer to silence GCC 4.2.
3096 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3098 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3100 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3101 (LAZY_PLT_ENTRY_SIZE): This.
3102 (NON_LAZY_PLT_ENTRY_SIZE): New.
3103 (elf_x86_64_plt0_entry): Renamed to ...
3104 (elf_x86_64_lazy_plt0_entry): This.
3105 (elf_x86_64_plt_entry): Renamed to ...
3106 (elf_x86_64_lazy_plt_entry): This.
3107 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3108 (elf_x86_64_lazy_bnd_plt0_entry): This.
3109 (elf_x86_64_legacy_plt_entry): Removed.
3110 (elf_x86_64_bnd_plt_entry): Renamed to ...
3111 (elf_x86_64_lazy_bnd_plt_entry): This.
3112 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3113 (elf_x86_64_non_lazy_plt_entry): This.
3114 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3115 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3116 (elf_x86_64_eh_frame_plt): Renamed to ...
3117 (elf_x86_64_eh_frame_lazy_plt): This.
3118 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3119 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3120 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3121 (elf_x86_64_eh_frame_non_lazy_plt): This.
3122 (elf_x86_64_lazy_plt_layout): New.
3123 (elf_x86_64_non_lazy_plt_layout): Likewise.
3124 (elf_x86_64_plt_layout): Likewise.
3125 (elf_x86_64_backend_data): Remove PLT layout information. Add
3126 os for target system.
3127 (GET_PLT_ENTRY_SIZE): Removed.
3128 (elf_x86_64_lazy_plt): New.
3129 (elf_x86_64_non_lazy_plt): Likewise.
3130 (elf_x86_64_lazy_bnd_plt): Likewise.
3131 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3132 (elf_x86-64_arch_bed): Updated.
3133 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3134 (elf_x86_64_create_dynamic_sections): Removed.
3135 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3136 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3137 (elf_x86-64_adjust_dynamic_symbol): Updated.
3138 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3139 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3140 size for PLT0 if there is no PLT0. Get plt_entry_size from
3141 non_lazy_plt for non-lazy PLT entries.
3142 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3143 from non_lazy_plt for non-lazy PLT entries.
3144 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3145 if there is no PLT0.
3146 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3147 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3148 entries with non-lazy PLT layout. Don't fill the second and third
3149 slots in the PLT entry if there is no PLT0.
3150 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3151 if there is no PLT0. Set sh_entsize on the .plt.got section.
3152 (compare_relocs): New.
3153 (elf_x86_64_plt_type): Likewise.
3154 (elf_x86_64_plt): Likewise.
3155 (elf_x86_64_nacl_plt): New. Forward declaration.
3156 (elf_x86_64_get_plt_sym_val): Removed.
3157 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3158 against all dynamic relocations.
3159 (elf_x86_64_link_setup_gnu_properties): New function.
3160 (elf_backend_create_dynamic_sections): Updated.
3161 (elf_backend_setup_gnu_properties): New.
3162 (elf_x86_64_nacl_plt): New.
3163 (elf_x86_64_nacl_arch_bed): Updated.
3165 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3167 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3168 (LAZY_PLT_ENTRY_SIZE): This.
3169 (NON_LAZY_PLT_ENTRY_SIZE): New.
3170 (elf_i386_plt0_entry): Renamed to ...
3171 (elf_i386_lazy_plt0_entry): This.
3172 (elf_i386_plt_entry): Renamed to ...
3173 (elf_i386_lazy_plt_entry): This.
3174 (elf_i386_pic_plt0_entry): Renamed to ...
3175 (elf_i386_pic_lazy_plt0_entry): This.
3176 (elf_i386_pic_plt_entry): Renamed to ...
3177 (elf_i386_pic_lazy_plt_entry): This.
3178 (elf_i386_got_plt_entry): Renamed to ...
3179 (elf_i386_non_lazy_plt_entry): This.
3180 (elf_i386_pic_got_plt_entry): Renamed to ...
3181 (elf_i386_pic_non_lazy_plt_entry): This.
3182 (elf_i386_eh_frame_plt): Renamed to ...
3183 (elf_i386_eh_frame_lazy_plt): This.
3184 (elf_i386_eh_frame_plt_got): Renamed to ...
3185 (elf_i386_eh_frame_non_lazy_plt): This.
3186 (elf_i386_plt_layout): Renamed to ...
3187 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3188 eh_frame_plt_got_size.
3189 (elf_i386_non_lazy_plt_layout): New.
3190 (elf_i386_plt_layout): Likewise.
3191 (elf_i386_non_lazy_plt): Likewise.
3192 (GET_PLT_ENTRY_SIZE): Removed.
3193 (elf_i386_plt): Renamed to ...
3194 (elf_i386_lazy_plt): This.
3195 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3196 (elf_i386_arch_bed): Updated.
3197 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3198 (elf_i386_create_dynamic_sections): Removed.
3199 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3200 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3201 (elf_i386_adjust_dynamic_symbol): Updated.
3202 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3203 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3204 size for PLT0 if there is no PLT0.
3205 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3206 output section is discarded only if GOT isn't empty.
3207 (elf_i386_relocate_section): Updated. Properly get PLT index
3208 if there is no PLT0.
3209 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3210 second and third slots in the PLT entry if there is no PLT0.
3211 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3212 if there is no PLT0. Set sh_entsize on the .plt.got section.
3213 (elf_i386_nacl_plt): Forward declaration.
3214 (elf_i386_get_plt_sym_val): Removed.
3215 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3216 against all dynamic relocations.
3217 (elf_i386_link_setup_gnu_properties): New function.
3218 (elf_backend_create_dynamic_sections): Updated.
3219 (elf_backend_setup_gnu_properties): New.
3220 (elf_i386_nacl_plt): Updated.
3221 (elf_i386_nacl_arch_bed): Likewise.
3222 (elf_i386_vxworks_arch_bed): Likewise.
3224 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3226 * elflink.c (elf_output_implib): Remove executable flag from import
3228 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3229 library is a relocatable object file.
3231 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3234 * elf32-avr.c (avr_should_move_sym): New function.
3235 (avr_should_reduce_sym_size): Likewise.
3236 (avr_should_increase_sym_size): Likewise.
3237 (elf32_avr_relax_delete_bytes): Adjust symbol values
3238 and sizes by calling new functions.
3240 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3242 * config.bfd (riscv32-*): Enable rv64.
3244 2017-05-02 Alan Modra <amodra@gmail.com>
3247 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3248 rather than h->root.type == bfd_link_hash_new.
3249 (bfd_elf_record_link_assignment): Similarly, call
3250 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3252 2017-04-29 Alan Modra <amodra@gmail.com>
3255 * reloc.c (reloc_offset_in_range): New function.
3256 (bfd_perform_relocation, bfd_install_relocation): Use it.
3257 (_bfd_final_link_relocate): Likewise.
3259 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3261 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3262 before using .plt.got.
3263 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3265 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3267 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3268 instead of "+=" to update 0.
3270 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3272 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3273 .plt.got section here.
3274 (elf_i386_check_relocs): Don't create the .plt.got section.
3275 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3276 the .plt.got and .plt.bnd sections here.
3277 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3280 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3282 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3284 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3285 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3286 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3287 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3290 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3292 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3294 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3295 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3296 the first relocatable ELF input with GNU properties.
3298 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3300 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3301 VxWorks for non-PIC.
3303 2017-04-27 Alan Modra <amodra@gmail.com>
3305 * elf-bfd.h (struct elf_backend_data): Make asection param of
3306 elf_backend_eh_frame_address_size const.
3307 (_bfd_elf_eh_frame_address_size): Likewise.
3308 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3309 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3310 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3311 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3312 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3313 (next_cie_fde_offset): Constify params.
3314 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3316 2017-04-27 Alan Modra <amodra@gmail.com>
3318 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3319 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3320 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3322 (offset_adjust): New function.
3323 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3324 (adjust_eh_frame_local_symbols): Likewise.
3325 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3326 after changing anything. Return true if anything changed.
3327 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3328 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3330 2017-04-27 Alan Modra <amodra@gmail.com>
3332 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3335 2017-04-27 Alan Modra <amodra@gmail.com>
3337 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3338 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3339 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3340 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3341 for undef and undefweak dyn_relocs.
3342 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3343 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3344 (allocate_got, allocate_dynrelocs): Likewise.
3345 (ppc64_elf_relocate_section): Likewise.
3347 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3349 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3350 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3351 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3352 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3354 2017-04-26 Nick Clifton <nickc@redhat.com>
3357 * reloc.c (bfd_perform_relocation): Check for a negative address
3360 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3363 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3365 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3366 (elf_backend_always_renumber_dynsyms): Define.
3367 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3368 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3369 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3370 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3372 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3374 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3376 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3377 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3378 sections have been created.
3380 2017-04-26 Nick Clifton <nickc@redhat.com>
3383 * compress.c (bfd_init_section_compress_status): Check the return
3384 value from bfd_malloc.
3386 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3388 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3389 no_finish_dynamic_symbol.
3390 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3392 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3393 weak symbol, don't make it dynamic.
3394 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3395 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3396 relocation for GOT reference.
3397 (elf_x86_64_finish_dynamic_symbol): Abort if
3398 no_finish_dynamic_symbol isn't 0.
3400 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3403 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3404 undefined weak symbol, don't make it dynamic.
3405 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3406 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3407 relocation for R_386_GOT32.
3409 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3412 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3414 2017-04-23 Alan Modra <amodra@gmail.com>
3417 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3418 * elf.c (lcomm_sym): New.
3419 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3420 * bfd-in2.h: Regenerate.
3422 2017-04-23 Alan Modra <amodra@gmail.com>
3425 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3426 parameters and comment.
3427 (_bfd_elf_get_reloc_section): Delete.
3428 (_bfd_elf_plt_get_reloc_section): Declare.
3429 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3430 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3432 (_bfd_elf_get_reloc_section): ..here. Delete.
3433 (assign_section_numbers): Call elf_get_reloc_section.
3434 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3435 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3437 2017-04-23 Alan Modra <amodra@gmail.com>
3440 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3443 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3446 * elf32-i386.c (elf_i386_link_hash_entry): Add
3447 no_finish_dynamic_symbol.
3448 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3449 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3450 symbol, don't make it dynamic in PIE.
3451 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3452 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3453 relocation for R_386_GOT32
3454 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3457 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3461 * elflink.c (elf_link_add_object_symbols): Require
3462 --no-dynamic-linker with -E/--dynamic-list when creating
3465 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3467 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3470 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3472 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3473 dynamic symbol sorting.
3475 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3478 * elflink.c (elf_link_add_object_symbols): Preserve
3479 dynamic_ref_after_ir_def when restoring the symbol table for
3480 unneeded dynamic object.
3482 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3485 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3486 on on undefined IFUNC symbol in the second PLT.
3488 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3490 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3492 2017-04-19 Alan Modra <amodra@gmail.com>
3494 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3495 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3496 * elf32-ppc.c:Formatting.
3497 (ensure_undefweak_dynamic): Don't make dynamic when
3498 info->dynamic_undefined_weak is zero.
3499 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3500 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3501 not default visibility. Discard undef and undefweak
3503 (ppc_elf_relocate_section): Adjust to suit.
3504 * elf64-ppc.c: Formatting.
3505 (ensure_undefweak_dynamic): Don't make dynamic when
3506 info->dynamic_undefined_weak is zero.
3507 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3508 info->dynamic_undefined_weak. Discard them earlier.
3510 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3513 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3514 before generating the version definition section.
3516 2017-04-17 Alan Modra <amodra@gmail.com>
3518 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3519 state when a regular object file defines a symbol with
3520 incompatible type to that defined by an earlier shared lib.
3522 2017-04-13 Alan Modra <amodra@gmail.com>
3524 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3526 * elf32-arm.c: Likewise.
3527 * elf32-i386.c: Likewise.
3528 * elf32-mep.c: Likewise.
3529 * elf64-ia64-vms.c: Likewise.
3530 * elf64-x86-64.c: Likewise.
3531 * elflink.c: Likewise.
3532 * elfnn-ia64.c: Likewise.
3533 * elfxx-mips.c: Likewise.
3535 2017-04-13 Alan Modra <amodra@gmail.com>
3537 * aoutx.h: Use %B and %A in error messages throughout file.
3538 * aout-cris.c: Likewise.
3539 * archive.c: Likewise.
3540 * binary.c: Likewise.
3541 * coff-rs6000.c: Likewise.
3542 * coff-tic4x.c: Likewise.
3543 * coffcode.h: Likewise.
3544 * coffgen.c: Likewise.
3545 * cofflink.c: Likewise.
3546 * coffswap.h: Likewise.
3547 * cpu-arm.c: Likewise.
3548 * elf-eh-frame.c: Likewise.
3549 * elf-m10300.c: Likewise.
3551 * elf32-arc.c: Likewise.
3552 * elf32-arm.c: Likewise.
3553 * elf32-bfin.c: Likewise.
3554 * elf32-frv.c: Likewise.
3555 * elf32-iq2000.c: Likewise.
3556 * elf32-m32c.c: Likewise.
3557 * elf32-microblaze.c: Likewise.
3558 * elf32-nds32.c: Likewise.
3559 * elf32-rl78.c: Likewise.
3560 * elf32-rx.c: Likewise.
3561 * elf32-score.c: Likewise.
3562 * elf32-score7.c: Likewise.
3563 * elf32-sh64.c: Likewise.
3564 * elf32-v850.c: Likewise.
3565 * elf32-vax.c: Likewise.
3566 * elf32-visium.c: Likewise.
3567 * elf64-ia64-vms.c: Likewise.
3568 * elf64-mmix.c: Likewise.
3569 * elf64-sh64.c: Likewise.
3570 * elfcode.h: Likewise.
3571 * elfnn-aarch64.c: Likewise.
3572 * elfnn-ia64.c: Likewise.
3573 * elfxx-mips.c: Likewise.
3574 * hpux-core.c: Likewise.
3577 * linker.c: Likewise.
3578 * merge.c: Likewise.
3580 * oasys.c: Likewise.
3581 * pdp11.c: Likewise.
3582 * peXXigen.c: Likewise.
3583 * rs6000-core.c: Likewise.
3584 * vms-alpha.c: Likewise.
3585 * xcofflink.c: Likewise.
3587 2017-04-13 Alan Modra <amodra@gmail.com>
3589 * bfd.c (PRINT_TYPE): Define.
3590 (_doprnt): New function.
3591 (error_handler_internal): Use _doprnt.
3592 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3593 calls in their natural order, throughout file.
3594 * coff-mcore.c: Likewise.
3595 * coff-ppc.c: Likewise.
3596 * coff-tic80.c: Likewise.
3597 * cofflink.c: Likewise.
3598 * elf-s390-common.c: Likewise.
3600 * elf32-arm.c: Likewise.
3601 * elf32-i386.c: Likewise.
3602 * elf32-m32r.c: Likewise.
3603 * elf32-msp430.c: Likewise.
3604 * elf32-spu.c: Likewise.
3605 * elf64-ia64-vms.c: Likewise.
3606 * elf64-sparc.c: Likewise.
3607 * elf64-x86-64.c: Likewise.
3608 * elflink.c: Likewise.
3609 * elfnn-aarch64.c: Likewise.
3610 * elfnn-ia64.c: Likewise.
3611 * elfxx-mips.c: Likewise.
3613 2017-04-13 Alan Modra <amodra@gmail.com>
3615 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3616 branch veneers" error. Fix double space and format message.
3617 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3618 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3620 2017-04-13 Alan Modra <amodra@gmail.com>
3622 * bfd-in2.h: Regenerate.
3624 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3626 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3627 extra `\n' in warning/error messages.
3628 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3629 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3631 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3633 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3634 processor-specific properties with generic ELF target vector.
3636 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3638 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3639 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3640 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3641 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3643 (link_hash_newfunc): Initialize has_got_reloc and
3645 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3647 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3649 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3651 (_bfd_sparc_elf_fixup_symbol): New function.
3652 (allocate_dynrelocs): Don't allocate space for dynamic
3653 relocations and discard relocations against resolved undefined
3654 weak symbols in executable. Don't make resolved undefined weak
3655 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3656 relocation against undefined weak symbols in PIE.
3657 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3658 relocations against resolved undefined weak symbols in PIE
3659 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3660 without ynamic PLT/GOT relocations for resolved undefined weak
3662 Don't generate dynamic relocation against resolved undefined
3663 weak symbol in executable.
3664 (pie_finish_undefweak_symbol): New function.
3665 (_bfd_sparc_elf_finish_dynamic_sections): Call
3666 pie_finish_undefweak_symbol on all symbols in PIE.
3667 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3668 (_bfd_sparc_elf_fixup_symbol): New function.
3670 2017-04-10 Nick Clifton <nickc@redhat.com>
3672 * config.bfd: Remove ns32k from obsolete list.
3674 2017-04-10 Alan Modra <amodra@gmail.com>
3677 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3678 (special_sections_i): Likewise for .init_array.
3679 (special_sections_p): Likewise for .preinit_array.
3681 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3685 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3686 ELF_COMMON_DEF_P for common symbols.
3687 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3688 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3689 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3690 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3691 07492f668d2173da7a2bda3707ff0985e0f460b6.
3693 2017-04-07 Pedro Alves <palves@redhat.com>
3695 * opncls.c (bfd_get_debug_link_info): Rename to...
3696 (bfd_get_debug_link_info_1): ... this. Change type of second
3697 parameter to void pointer. Adjust.
3698 (bfd_get_debug_link_info): Reimplement on top of
3699 bfd_get_debug_link_info_1.
3700 (separate_debug_file_exists, separate_alt_debug_file_exists):
3701 Change type of second parameter to void pointer. Adjust.
3702 (get_func_type, check_func_type): Change type of second parameter
3704 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3705 the callback functions instead of passing the address of a local.
3706 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3707 find_separate_debug_file.
3708 (get_alt_debug_link_info_shim): Change type of second parameter to
3709 void pointer. Adjust.
3710 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3711 find_separate_debug_file.
3712 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3713 of second parameter to void pointer. Adjust.
3714 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3715 pointer local to find_separate_debug_file.
3717 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3719 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3720 external symbols with a definition.
3721 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3723 2017-04-07 Alan Modra <amodra@gmail.com>
3725 * po/SRC-POTFILES.in: Regenerate.
3727 2017-04-05 Alan Modra <amodra@gmail.com>
3729 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3732 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3734 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3735 numbers for DataDirectory entry indicies passed to
3738 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3740 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3741 each GNU_MBIND section and align GNU_MBIND section to page size.
3742 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3743 segment for each GNU_MBIND section.
3744 (_bfd_elf_init_private_section_data): Copy sh_info from input
3745 for GNU_MBIND section.
3747 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3749 * elfnn-riscv.c (GP_NAME): Delete.
3750 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3751 (_bfd_riscv_relax_lui): Likewise.
3753 2017-04-04 Nick Clifton <nickc@redhat.com>
3756 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3758 (bfd_elf_final_link): Only initialize the extended symbol index
3759 section if there are extended symbol tables to list.
3761 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3763 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3764 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3765 * configure.ac (elf): Add elf-properties.lo.
3766 * Makefile.in: Regenerated.
3767 * configure: Likewise.
3768 * elf-bfd.h (elf_property_kind): New.
3769 (elf_property): Likewise.
3770 (elf_property_list): Likewise.
3771 (elf_properties): Likewise.
3772 (_bfd_elf_parse_gnu_properties): Likewise.
3773 (_bfd_elf_get_property): Likewise.
3774 (_bfd_elf_link_setup_gnu_properties): Likewise.
3775 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3776 and setup_gnu_properties.
3777 (elf_obj_tdata): Add properties.
3778 * elf-properties.c: New file.
3779 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3780 (elf_i386_merge_gnu_properties): Likewise.
3781 (elf_backend_parse_gnu_properties): Likewise.
3782 (elf_backend_merge_gnu_properties): Likewise.
3783 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3784 (elf_x86_64_merge_gnu_properties): Likewise.
3785 (elf_backend_parse_gnu_properties): Likewise.
3786 (elf_backend_merge_gnu_properties): Likewise.
3787 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3788 (elf_backend_parse_gnu_properties): Likewise.
3789 (elf_backend_setup_gnu_properties): Likewise.
3790 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3791 elf_backend_merge_gnu_properties and
3792 elf_backend_setup_gnu_properties.
3794 2017-03-30 Pip Cet <pipcet@gmail.com>
3796 * elf32-wasm32.c: Add relocation code, two relocs.
3797 * reloc.c: Add wasm32 relocations.
3798 * libbfd.h: Regenerate.
3799 * bfd-in2.h: Regenerate.
3800 * bfd/po/bfd.pot: Regenerate.
3802 2017-03-29 Nick Clifton <nickc@redhat.com>
3805 * coff-bfd.h (struct coff_section_data): Add new fields:
3806 saved_bias and bias.
3807 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3808 computed for PE binaries.
3809 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3812 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3815 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3816 to handle a local symbol with a hash-symbol-entry; without PLT.
3817 Add BFD_ASSERT for an incidental case with GOT entry present.
3818 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3819 isn't forced-or-set local.
3821 2017-03-27 Pip Cet <pipcet@gmail.com>
3823 * wasm-module.c: New file to support WebAssembly modules.
3824 * wasm-module.h: New file to support WebAssembly modules.
3825 * doc/webassembly.texi: Start documenting wasm-module.c.
3826 * config.bfd: Add wasm_vec.
3827 * targets.c: Likewise.
3828 * configure.ac: Likewise.
3829 * Makefile.am: Add entries for wasm-module.c.
3830 * Makefile.in: Regenerate.
3831 * configure: Regenerate.
3832 * po/SRC-POTFILES.in: Regenerate.
3834 2017-03-27 Pip Cet <pipcet@gmail.com>
3836 * cpu-wasm32.c: New file to support wasm32 architecture.
3837 * elf32-wasm32.c: New file to support wasm32 architecture.
3838 * Makefile.am: Add wasm32 architecture.
3839 * archures.c: Likewise.
3840 * config.bfd: Likewise.
3841 * configure.ac: Likewise.
3842 * targets.c: Likewise.
3843 * Makefile.in: Regenerate.
3844 * bfd-in2.h: Regenerate.
3845 * configure: Regenerate.
3846 * po/SRC-POTFILES.in: Regenerate.
3848 2017-03-20 Alan Modra <amodra@gmail.com>
3851 * elf64-ppc.c (compare_symbols): Stabilize sort.
3853 2017-03-18 Alan Modra <amodra@gmail.com>
3855 * elf64-ppc.c (struct ppc_link_hash_table): Add
3856 local_ifunc_resolver and maybe_local_ifunc_resolver.
3857 (ppc_build_one_stub): Set flags on emitting dynamic
3858 relocation to ifunc.
3859 (ppc64_elf_relocate_section): Likewise.
3860 (ppc64_elf_finish_dynamic_symbol): Likewise.
3861 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3862 local dynamic relocs to ifuncs.
3863 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3864 local_ifunc_resolver and maybe_local_ifunc_resolver.
3865 (ppc_elf_relocate_section): Set flag on emitting dynamic
3866 relocation to ifuncs.
3867 (ppc_elf_finish_dynamic_symbol): Likewise.
3868 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3869 dynamic relocs to ifuncs.
3871 2017-03-13 Nick Clifton <nickc@redhat.com>
3874 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3875 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3876 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3877 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3878 * bfd-in2.h: Regenerate.
3879 * libbfd.h: Regenerate.
3880 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3882 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3883 (elfNN_aarch64_howto_table): Likewise.
3884 (aarch64_tls_transition_without_check): Likewise.
3885 (aarch64_reloc_got_type): Likewise.
3886 (elfNN_aarch64_final_link_relocate): Likewise.
3887 (elfNN_aarch64_tls_relax): Likewise.
3888 (elfNN_aarch64_relocate_section): Likewise.
3889 (elfNN_aarch64_gc_sweep_hook): Likewise.
3890 (elfNN_aarch64_check_relocs): Likewise.
3891 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3892 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3894 2017-03-11 Alan Modra <amodra@gmail.com>
3896 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3897 parameter is in fact used. Whitespace fixes.
3898 * elf64-ppc.c: Likewise.
3900 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3902 * rs6000-core.c (CORE_NEW): Simplify macro when
3903 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3905 2017-03-07 Alan Modra <amodra@gmail.com>
3909 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3912 2017-03-05 Alan Modra <amodra@gmail.com>
3914 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3915 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3916 (next_cie_fde_offset): New function.
3917 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3918 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3919 four bytes. Align CIEs to four or eight bytes depending on
3920 per_encoding_aligned8. Align FDEs according to their encoding.
3921 Pad last FDE to output section alignment.
3922 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3924 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3925 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3926 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3928 2017-03-02 Martin Bickel <binutils@ineranves.de>
3931 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3932 empty segments which have a zero filesz, but a non-zero memsz.
3934 2017-03-02 Alan Modra <amodra@gmail.com>
3936 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3938 2017-02-28 Alan Modra <amodra@gmail.com>
3940 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3941 (ppc64_elf_relocate_section): Likewise.
3943 2017-02-28 Alan Modra <amodra@gmail.com>
3946 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3947 rather than elf32_nios2_hash_table or elf_hash_table.
3948 (create_got_section): Likewise.
3949 (nios2_elf32_finish_dynamic_symbol): Likewise.
3950 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3951 (nios2_elf32_size_dynamic_sections): Likewise.
3952 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3953 vars. Use htab equivalents directly instead. Don't create
3954 all dynamic sections on needing just the GOT. Use a goto
3955 rather than a fall-through with reloc test. Ensure
3956 htab->dynobj is set when making dynamic sreloc section.
3957 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3958 equivalent directly instead. Don't segfault on looking for
3959 .dynamic when dynamic sections have not been created. Don't
3960 segfault on .got.plt being discarded.
3961 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3962 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3963 fixme and another not so relevant comment.
3964 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3965 already set, set hash table dynobj on creating .sbss.
3967 2017-02-28 Alan Modra <amodra@gmail.com>
3969 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3970 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3971 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3972 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3973 (ppc64_elf_relocate_section): Likewise.
3974 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3975 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3976 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3977 * libbfd.h: Regenerate.
3978 * bfd-in2.h: Regenerate.
3980 2017-02-28 Alan Modra <amodra@gmail.com>
3982 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3983 dynamic .data.rel.ro read-only.
3984 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3985 rather than section flags when deciding where copy reloc goes.
3986 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3987 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3988 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3989 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3990 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3991 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3992 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3993 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3994 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3995 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3996 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3997 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3998 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3999 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4000 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4001 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4002 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4003 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4004 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4006 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4008 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4009 `jalr $0, $25' instruction encoding.
4011 2017-02-27 Nick Clifton <nickc@redhat.com>
4014 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4015 generating a seg-fault when encountering a symbol that has been
4016 deleted by garbage collection.
4018 2017-02-25 Alan Modra <amodra@gmail.com>
4020 * elf32-arc.c (struct dynamic_sections): Delete.
4021 (enum dyn_section_types): Delete.
4022 (dyn_section_names): Delete.
4023 (arc_create_dynamic_sections): Delete.
4024 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4025 segfault on discarded .rela.plt section.
4026 (elf_arc_size_dynamic_sections): Formatting. Don't call
4027 arc_create_dynamic_sections. Don't allocate memory for sections
4028 handled by the generic linker. Correct code finding relocs in
4029 read-only sections. Set SEC_EXCLUDE on zero size .got,
4030 .got.plt, and .dynbss sections. Do set .interp for pies.
4032 2017-02-24 Andrew Waterman <andrew@sifive.com>
4034 * elfnn-riscv.c (GP_NAME): New macro.
4035 (riscv_global_pointer_value): Use it.
4036 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4037 output section, consider only that section's alignment.
4039 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4041 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4042 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4043 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4044 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4046 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4048 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4049 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4052 2017-02-23 Alan Modra <amodra@gmail.com>
4055 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4057 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4058 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4061 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4064 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4065 processing ahead of the call to `elf_gc_sweep_symbol'.
4067 2017-02-22 Nick Clifton <nickc@redhat.com>
4070 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4071 created section 4-byte alignment.
4073 2017-02-22 Alan Modra <amodra@gmail.com>
4075 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4076 on .got or .plt output section being discarded by script.
4077 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4080 2017-02-21 Alan Modra <amodra@gmail.com>
4082 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4083 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4085 2017-02-20 Alan Modra <amodra@gmail.com>
4088 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4089 if DT_RELSZ/DT_RELASZ is zero.
4091 2017-02-17 Nick Clifton <nickc@redhat.com>
4093 * compress.c (bfd_get_full_section_contents): Remember to reduce
4094 compressed size by the sizeof the compression header when
4095 decompressing the contents.
4097 2017-02-17 Pedro Alves <palves@redhat.com>
4099 * srec.c (Chunk): Rename to ...
4100 (_bfd_srec_len): ... this.
4101 (S3Forced): Rename to ...
4102 (_bfd_srec_forceS3): ... this.
4103 * objcopy.c: Adjust all references.
4105 2017-02-17 Pedro Alves <palves@redhat.com>
4107 * archive.c (bsd_write_armap): Rename to ...
4108 (_bfd_bsd_write_armap): ... this.
4109 (coff_write_armap): Rename to ...
4110 (_bfd_coff_write_armap): ... this.
4111 * libbfd-in.h (bsd_write_armap): Rename to ...
4112 (_bfd_bsd_write_armap): ... this.
4113 (coff_write_armap): Rename to ...
4114 (_bfd_coff_write_armap): ... this.
4115 * aout-target.h, aout-tic30.c: Adjust all users.
4116 * libbfd.h: Regenerate.
4118 2017-02-17 Pedro Alves <palves@redhat.com>
4120 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4121 (warn_deprecated): Rename to ...
4122 (_bfd_warn_deprecated): ... this.
4123 * libbfd.c (warn_deprecated): Rename to ...
4124 (_bfd_warn_deprecated): ... this.
4125 * bfd-in2.h: Regenerate.
4127 2017-02-17 Pedro Alves <palves@redhat.com>
4129 * bfdio.c (real_ftell): Rename to ...
4130 (_bfd_real_ftell): ... this.
4131 (real_fseek): Rename to ...
4132 (_bfd_real_fseek): ... this.
4133 (real_fopen): Rename to ...
4134 (_bfd_real_fopen): ... this.
4135 * libbfd-in.h (real_ftell): Rename to ...
4136 (_bfd_real_ftell): ... this.
4137 (real_fseek): Rename to ...
4138 (_bfd_real_fseek): ... this.
4139 (real_fopen): Rename to ...
4140 (_bfd_real_fopen): ... this.
4141 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4142 * libbfd.h: Regenerate.
4144 2017-02-17 Pedro Alves <palves@redhat.com>
4146 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4147 * libbfd.c (read_unsigned_leb128): Rename to ...
4148 (_bfd_read_unsigned_leb128): ... this.
4149 (read_signed_leb128): Rename to ...
4150 (_bfd_read_signed_leb128): ... this.
4151 (safe_read_leb128): Rename to ...
4152 (_bfd_safe_read_leb128): ... this.
4153 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4154 (_bfd_read_unsigned_leb128): ... this.
4155 (read_signed_leb128): Rename to ...
4156 (_bfd_read_signed_leb128): ... this.
4157 (safe_read_leb128): Rename to ...
4158 (_bfd_safe_read_leb128): ... this.
4159 * libbfd.h: Renegerate.
4161 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4163 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4164 before trying to fine matching file and line information.
4166 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4168 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4169 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4170 not match current bfd, then reload debug information. Record bfd
4171 we're loading debug info for in the stash. If we have debug
4172 informatin in the cache then perform section placement before
4175 2017-02-16 Alan Modra <amodra@gmail.com>
4178 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4179 * elfxx-target.h (elf_backend_no_page_alias): Define.
4180 (elfNN_bed): Init new field.
4181 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4182 ensure PT_LOAD segment starts on a new page.
4183 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4185 2017-02-16 Alan Modra <amodra@gmail.com>
4188 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4191 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4193 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4194 * bfd-in2.h: Regenerated.
4196 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4199 * elf32-i386.c (elf_i386_relocate_section): Allow
4200 "lea foo@GOT, %reg" in PIC.
4202 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4205 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4206 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4207 error against local IFUNC symbol without a base register for
4210 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4212 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4213 `%P: %H:' with `info->callbacks->einfo'.
4214 (ppc_elf_relocate_section): Likewise.
4215 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4216 (ppc64_elf_edit_toc): Likewise.
4217 (ppc64_elf_relocate_section): Likewise.
4219 2017-02-14 Alan Modra <amodra@gmail.com>
4221 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4222 --gc-keep-exported, and test versioned field of sym rather than
4223 looking for @ in name.
4225 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4227 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4230 2017-02-13 Nick Clifton <nickc@redhat.com>
4233 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4236 2017-02-07 Andrew Waterman <andrew@sifive.com>
4238 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4239 entry size if PLT header is written.
4241 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4243 Fix sparc64 dynamic relocation processing to use the dynamic
4245 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4246 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4249 2017-02-03 Nick Clifton <nickc@redhat.com>
4252 * coffcode.h (coff_write_object_contents): Enlarge size of
4253 s_name_buf in order to avoid compile time warning about possible
4255 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4256 32-bits of insn value before printing into buffer.
4258 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4260 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4261 `max_local_dynindx'.
4262 (mips_elf_sort_hash_table): Handle it.
4263 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4264 symbols bump up `max_local_dynindx' rather than
4265 `max_non_got_dynindx'.
4267 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4269 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4270 `min_got_dynindx', `max_unref_got_dynindx' and
4271 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4272 (mips_elf_sort_hash_table): Adjust accordingly.
4274 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4276 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4277 to access the hash table.
4279 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4281 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4282 non-NULL `htab' to the beginning.
4284 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4286 * elflink.c (elf_gc_sweep): Wrap overlong line.
4288 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4290 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4291 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4292 * elfxx-mips.c (mips_elf_link_hash_table): Add
4293 `ignore_branch_isa' member.
4294 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4295 in branch relocation calculation as an error if
4296 `ignore_branch_isa' has been set.
4297 (_bfd_mips_elf_insn32): Rename to...
4298 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4299 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4300 Handle the new parameter.
4302 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4304 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4305 local variable dynobj.
4308 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4309 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4310 executable from read-only sections into sdynrelro.
4311 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4312 dynamic relocs in sdynrelro.
4313 (elf_backend_want_dynrelro): Define.
4315 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4317 * config.bfd (*-*-rtemsaout*): Mark as removed.
4319 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4321 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4322 (arm-*-rtems*): Move to (arm*-*-eabi*).
4323 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4324 (m68-*-rtems*): Move to (m68*-*-elf*).
4326 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4328 * config.bfd (*-*-rtemscoff*): Mark as removed.
4330 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4333 * elflink.c (bfd_elf_record_link_assignment): Revert last
4334 change and don't ever clear `forced_local'. Set `mark'
4336 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4338 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4339 (bfd_elf_size_dynamic_sections): ... here.
4340 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4341 and set `mark' instead in `__tls_get_addr_opt' processing.
4342 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4344 2017-01-24 Alan Modra <amodra@gmail.com>
4346 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4347 where dynamic relocs are preferable. Allow ifunc too.
4348 (ensure_undefweak_dynamic): New function.
4349 (allocate_dynrelocs): Use it here. Move plt handling last and
4350 don't make symbols dynamic, simplifying loop. Only make undef
4351 weak symbols with GOT entries dynamic. Correct condition
4352 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4353 comments. Remove goto.
4354 (ppc_elf_relocate_section): Correct test for using dynamic
4355 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4356 to suit. Set up explicit tls_index entries and implicit GOT
4357 tls_index entries resolvable at link time for
4358 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4359 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4360 (ensure_undefweak_dynamic): New function.
4361 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4362 with GOT entries dynamic. Remove unnecessary test of
4363 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4364 (ppc64_elf_relocate_section): Correct test for using dynamic
4365 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4366 to suit. Set up explicit tls_index entries and implicit GOT
4367 tls_index entries resolvable at link time for __tls_get_addr_opt.
4368 Simplify expression to clear mem for prelink.
4370 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4372 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4374 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4376 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4377 (elf_backend_hash_symbol): Define.
4379 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4382 * elflink.c (bfd_elf_record_link_assignment): Clear any
4383 `forced_local' marking for DSO symbols that are not being
4386 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4388 * elfnn-riscv.c (riscv_elf_object_p): New function.
4390 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4393 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4395 (elf_x86_64_check_relocs): Create .eh_frame section for the
4397 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4398 .eh_frame section for the .plt.bnd section.
4399 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4400 for the .plt.bnd section.
4402 2017-01-12 Nick Clifton <nickc@redhat.com>
4405 * opncls.c (find_separate_debug_file): Add include_dirs
4406 parameter. Only include the directory part of the bfd's filename
4407 in search paths if include_dirs is true. Add a couple of extra
4408 locations for looking for debug files.
4409 ( bfd_follow_gnu_debuglink): Update invocation of
4410 find_separate_debug_file.
4411 (bfd_follow_gnu_debugaltlink): Likewise.
4412 (get_build_id): New function: Finds the build-id of the given bfd.
4413 (get_build_id_name): New function: Computes the name of the
4414 separate debug info file for a bfd, based upon its build-id.
4415 (check_build_id_file): New function: Checks to see if a separate
4416 debug info file exists at the given location, and that its
4417 build-id matches that of the original bfd.
4418 (bfd_follow_build_id_debuglink): New function: Finds a separate
4419 debug info file for a given bfd by using the build-id method.
4420 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4421 method of locating a separate debug info file before using the
4423 * bfd-in2.h: Regenerate.
4425 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4428 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4429 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4430 elf_x86_64_eh_frame_plt_got.
4431 (elf_x86_64_size_dynamic_sections): Get unwind info from
4432 elf_x86_64_bnd_arch_bed for the BND PLT.
4434 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4436 * config.bfd: Add entries for i686-redox and x86_64-redox.
4438 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4440 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4442 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4443 .eh_frame section to 4 bytes for x32.
4444 (elf_x86_64_check_relocs): Likewise.
4446 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4449 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4450 (PLT_GOT_FDE_LENGTH): Likewise.
4451 (elf_i386_plt_layout): Add eh_frame_plt_got and
4452 eh_frame_plt_got_size.
4453 (elf_i386_plt): Updated.
4454 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4455 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4456 (elf_i386_size_dynamic_sections): Allocate and initialize
4457 .eh_frame section for .plt.got.
4458 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4460 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4461 eh_frame_plt_got_size.
4462 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4463 (PLT_GOT_FDE_LENGTH): Likewise.
4464 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4465 eh_frame_plt_got_size.
4466 (elf_x86_64_arch_bed): Updated.
4467 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4468 eh_frame_plt_got_size.
4469 (elf_x86_64_nacl_arch_bed): Likewise.
4470 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4471 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4472 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4473 .eh_frame section for .plt.got.
4474 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4477 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4479 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4480 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4482 2017-01-09 Nick Clifton <nickc@redhat.com>
4484 * dwarf2.c (lookup_address_in_function_table): Return early if
4485 there are no functions in the given comp unit, or if the high
4486 address of the last function in the comp unit is less than the
4489 2017-01-09 Nick Clifton <nickc@redhat.com>
4492 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4493 message if there are too many symbols to load.
4495 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4497 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4498 if relocs are cached.
4500 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4503 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4504 for R_MICROBLAZE_GOTOFF_64.
4506 2017-01-03 Nick Clifton <nickc@redhat.com>
4508 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4509 warning about using a possibly uninitialised variable.
4511 2017-01-02 Alan Modra <amodra@gmail.com>
4513 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4514 (allocate_plt_static, allocate_dynrelocs): Use it.
4516 2017-01-02 Alan Modra <amodra@gmail.com>
4518 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4519 .PARISC.unwind section.
4521 2017-01-02 Alan Modra <amodra@gmail.com>
4524 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4525 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4526 indirect to GOT pointer relative code edit.
4528 2017-01-02 Alan Modra <amodra@gmail.com>
4530 Update year range in copyright notice of all files.
4532 For older changes see ChangeLog-2016
4534 Copyright (C) 2017 Free Software Foundation, Inc.
4536 Copying and distribution of this file, with or without modification,
4537 are permitted in any medium without royalty provided the copyright
4538 notice and this notice are preserved.
4544 version-control: never