1 2017-10-12 Alan Modra <amodra@gmail.com>
3 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
4 when executable rather than non-PIC.
5 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
6 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
8 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
10 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
12 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
13 (elf_external_linux_prpsinfo64_ugid32): ... this.
14 (swap_linux_prpsinfo32_out): Rename to...
15 (swap_linux_prpsinfo32_ugid32_out): ... this.
16 (elf_external_linux_prpsinfo64_ugid16): New structure.
17 (swap_linux_prpsinfo64_ugid16_out): New function.
18 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
19 (elf_backend_linux_prpsinfo64_ugid16): Define.
20 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
21 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
22 of the 64-bit Linux core PRPSINFO note.
23 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
25 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
27 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
29 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
30 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
31 (elf_external_ppc_linux_prpsinfo32)
32 (swap_ppc_linux_prpsinfo32_out): Move to...
33 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
34 (swap_linux_prpsinfo32_ugid32_out): ... these.
35 (elf_external_linux_prpsinfo32): Rename to...
36 (elf_external_linux_prpsinfo32_ugid16): ... this.
37 (swap_linux_prpsinfo32_out): Rename to...
38 (swap_linux_prpsinfo32_ugid16_out): ... this.
39 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
40 (elf_backend_linux_prpsinfo32_ugid16): Define.
41 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
42 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
43 of the 32-bit Linux core PRPSINFO note.
44 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
45 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
46 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
47 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
48 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
49 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
50 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
51 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
52 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
53 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
55 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
57 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
58 `gap' member ahead of `pr_flag'.
60 2017-10-11 Pedro Alves <palves@redhat.com>
62 * bfd.c (_doprnt): Rename to ...
63 (_bfd_doprnt): ... this.
64 (error_handler_internal): Adjust.
66 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
68 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
69 instead of incrementing it.
70 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
72 2017-10-10 Renlin Li <renlin.li@arm.com>
75 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
78 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
81 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
82 (riscv_elf_link_hash_table_create): Initialize max_alignment to
84 (_bfd_riscv_relax_section): Cache the max alignment of output
87 2017-10-10 Alan Modra <amodra@gmail.com>
89 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
90 .opd whenever .opd is present and non-zero size. Move code
91 setting abiversion to/from output file earlier. Only set
92 u.opd.func_sec when --gc-sections. Read relocs and set up
93 u.opd.func_sec values here..
94 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
96 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
98 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
100 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
103 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
105 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
106 .interp section with "ld --no-dynamic-linker".
108 2017-10-09 Alan Modra <amodra@gmail.com>
111 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
112 funcinfo_hash_table and varinfo_hash_table.
114 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
116 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
117 in read-only section with minfo.
118 (sh_elf_size_dynamic_sections): Likewise.
120 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
122 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
125 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
127 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
128 this_hdr.sh_entsize only if section size > 0.
130 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
132 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
134 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
136 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
137 in read-only section with minfo.
138 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
140 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
142 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
145 2017-10-06 John Baldwin <jhb@FreeBSD.org>
147 * elf-bfd.h (struct elf_backend_data): Add
148 `elf_backend_grok_freebsd_prstatus'.
149 * elf.c (elfcore_grok_freebsd_note): Call
150 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
152 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
154 (elf_backend_grok_freebsd_prstatus): Define.
155 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
156 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
158 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
160 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
161 and has_non_got_reloc with zero_undefweak.
162 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
163 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
165 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
166 has_non_got_reloc with zero_undefweak.
167 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
168 has_got_reloc and has_non_got_reloc with zero_undefweak.
169 (elf_x86_link_hash_entry): Likewise.
171 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
173 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
174 (VERIFY_COPY_RELOC): Likewise.
176 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
178 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
179 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
180 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
182 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
184 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
185 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
186 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
188 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
190 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
191 * elf32-i386.c (elf_i386_relocate_section): Use it.
192 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
194 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
196 * elf32-i386.c (X86_SIZE_TYPE_P): New.
197 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
198 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
199 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
200 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
202 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
204 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
205 (PLT_LOCAL_IFUNC_P): Likewise.
206 * elf32-i386.c (elf_i386_relocate_section): Use them.
207 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
209 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
211 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
212 * elf32-i386.c (elf_i386_relocate_section): Use it.
213 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
215 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
217 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
218 * elf32-i386.c (elf_i386_relocate_section): Use it.
219 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
221 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
223 * elf32-i386.c (X86_PCREL_TYPE_P): New.
224 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
225 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
226 (X86_PCREL_TYPE_P): This.
227 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
228 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
229 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
231 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
233 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
235 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
236 * elf32-i386.c (elf_i386_tls_transition): Use it.
237 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
239 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
241 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
242 Dump dynamic relocation in read-only section with minfo if
244 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
245 (maybe_set_textrel): Likewise.
246 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
247 read-only section with minfo.
249 2017-10-05 John Baldwin <jhb@FreeBSD.org>
251 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
253 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
255 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
256 in read-only section with minfo.
257 (tilepro_elf_size_dynamic_sections): Likewise.
258 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
259 (tilegx_elf_size_dynamic_sections): Likewise.
261 2017-10-05 Pedro Alves <palves@redhat.com>
264 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
265 ellipsis parameter. Split out bfd_error_on_input code to..
266 (bfd_set_input_error): .. New function.
267 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
268 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
269 * bfd-in2.h: Regenerate.
271 2017-10-05 Alan Modra <amodra@gmail.com>
273 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
274 fini_array error value.
276 2017-10-05 Alan Modra <amodra@gmail.com>
279 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
281 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
283 (elf_fake_sections): Adjust calls. Exit immediately on failure.
284 (bfd_elf_set_group_contents): Add associated reloc section indices
287 2017-10-04 Alan Modra <amodra@gmail.com>
289 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
290 classify symbols for ELFv2.
292 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
295 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
296 undergoes default promotion.
297 * bfd-in2.h: Regenerate.
299 2017-10-02 Alan Modra <amodra@gmail.com>
301 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
302 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
304 2017-10-01 Alan Modra <amodra@gmail.com>
307 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
308 (add_line_info): Always put end_sequence last.
310 2017-10-01 Alan Modra <amodra@gmail.com>
313 * dwarf2.c (read_section): Allocate buffer with extra byte for
314 bfd_simple_get_relocated_section_contents rather than copying
317 2017-09-29 Alan Modra <amodra@gmail.com>
319 * merge.c (merge_strings): Return FALSE on malloc failure.
320 (_bfd_merge_sections): Return failures from record_section and
323 2017-09-28 Alan Modra <amodra@gmail.com>
326 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
327 a case where plugin_notice isn't called.
329 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
331 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
334 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
337 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
338 output_bfd to info->callbacks->minfo.
340 2017-09-26 Nick Clifton <nickc@redhat.com>
343 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
344 assertion failure if elf_x86_64_rtype_to_howto has already issued
347 2017-09-26 Alan Modra <amodra@gmail.com>
350 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
353 2017-09-26 Nick Clifton <nickc@redhat.com>
356 * dwarf2.c (read_formatted_entries): Fail early if we know that
357 the loop parsing data entries will overflow the end of the
360 2017-09-26 Alan Modra <amodra@gmail.com>
363 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
364 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
365 to stash->info_ptr_memory, and check die_ref is within that memory.
366 Set info_ptr_end correctly when another CU is refd. Check die_ref
367 for DW_FORM_ref4 etc. is within CU.
369 2017-09-26 Alan Modra <amodra@gmail.com>
372 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
373 (read_formatted_entries): Init "fe".
374 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
376 2017-09-26 Alan Modra <amodra@gmail.com>
379 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
380 bounds in inner loop.
382 2017-09-25 Alan Modra <amodra@gmail.com>
385 * dwarf1.c (parse_die): Sanity check pointer against section limit
386 before dereferencing.
387 (parse_line_table): Likewise.
389 2017-09-25 Alan Modra <amodra@gmail.com>
392 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
394 (parse_comp_unit): Likewise.
396 2017-09-25 Alan Modra <amodra@gmail.com>
399 * dwarf2.c (read_formatted_entries): Error on format_count zero.
401 2017-09-24 Alan Modra <amodra@gmail.com>
404 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
405 within section bounds.
407 2017-09-24 Alan Modra <amodra@gmail.com>
410 * dwarf2.c (decode_line_info): Properly free line sequences on error.
412 2017-09-24 Alan Modra <amodra@gmail.com>
415 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
416 pname param. Return status. Make name const. Don't abort,
417 return an error. Formatting. Exit if current info_ptr matches
418 orig_info_ptr. Update callers.
419 (scan_unit_for_symbols): Start at nesting_level of zero. Make
420 nested_funcs an array of structs for extensibility. Formatting.
422 2017-09-24 Alan Modra <amodra@gmail.com>
425 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
426 rather than dividing by zero.
428 2017-09-24 Alan Modra <amodra@gmail.com>
431 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
433 2017-09-24 Alan Modra <amodra@gmail.com>
436 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
438 2017-09-24 Alan Modra <amodra@gmail.com>
441 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
442 SHT_GNU_verneed section for sanity. Don't zalloc memory for
445 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
448 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
451 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
454 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
455 -1 if bfd_canonicalize_dynamic_reloc returns 0.
457 2017-09-22 Pedro Alves <palves@redhat.com>
458 Alan Modra <amodra@gmail.com>
460 * version.h: Add comment.
462 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
464 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
465 NT_S390_GS_BC, correct the previously swapped invocations of
466 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
468 2017-09-19 Alan Modra <amodra@gmail.com>
471 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
474 2017-09-19 Alan Modra <amodra@gmail.com>
477 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
478 symbols before calculating verrefs. Don't renumber dynsyms
479 after gc. Exclude .gnu.version when zero or one dynsym.
480 Localize some vars and reindent.
482 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
485 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
486 return from bfd_canonicalize_dynamic_reloc.
488 2017-09-15 Alan Modra <amodra@gmail.com>
491 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
492 overflows bfd_size_type.
494 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
497 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
498 to indicate if conversion is performed.
499 (elf_i386_check_relocs): Cache section contents and relocations
500 if conversion is performed.
501 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
502 contents and relocations if conversion is performed.
504 2017-09-14 Nick Clifton <nickc@redhat.com>
507 * peXXigen.c (pe_print_idata): Extend check for HintName vector
510 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
512 * elfxx-x86.h: Fix a typo in comments.
514 2017-09-09 Kamil Rytarowski <n54@gmx.com>
516 * elf32-nds32.c: Rename __BIT() to N32_BIT().
518 2017-09-09 Alan Modra <amodra@gmail.com>
520 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
523 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
525 * elf32-i386.c (elf_i386_relocate_section): Update usage of
526 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
527 (elf_i386_finish_dynamic_symbol): Likewise.
528 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
529 (elf_x86_64_finish_dynamic_symbol): Likewise.
530 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
531 (_bfd_x86_elf_fixup_symbol): Likewise.
533 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
535 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
536 check has_non_got_reloc.
538 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
541 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
542 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
543 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
544 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
545 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
546 and linker_def on __ehdr_start if it is referenced and not
548 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
549 and return TRUE when building executable, if a symbol has
550 non-GOT/non-PLT relocations in text section or there is no
552 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
554 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
556 * elfxx-x86.h: Update comments.
558 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
560 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
561 elf_x86_plt_layout_table with elf_x86_init_table.
562 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
564 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
566 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
567 (elf_x86_init_table): This.
568 (_bfd_x86_elf_link_setup_gnu_properties): Replace
569 elf_x86_plt_layout_table with elf_x86_init_table.
571 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
573 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
574 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
575 * configure: Regenerated.
576 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
577 and r_sym fields of plt_layout.
578 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
580 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
581 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
582 r_info nor r_sym fields.
583 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
585 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
587 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
589 * (_bfd_riscv_relax_align): Call bfd_set_error and
590 print an error message when unable to relax a .align directive.
592 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
594 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
595 (riscv_record_pcrel_hi_reloc): Add absolute argument.
596 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
597 R_RISCV_PCREL_HI20 relocs, and pass the result to
598 riscv_record_pcrel_hi_reloc.
600 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
602 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
603 r_type_p. Remove the converted argument. Replace
604 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
605 the new relocation type via r_type_p.
606 (elf_i386_relocate_section): Likewise.
607 (elf_i386_finish_dynamic_symbol): Likewise.
608 (need_convert_load): Removed.
609 (check_relocs_failed): Updated.
610 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
611 instead of setting need_convert_load.
612 (_bfd_i386_elf_convert_load): Removed.
613 * elf64-x86-64.c (need_convert_load): Removed.
614 (check_relocs_failed): Updated.
615 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
616 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
617 Return the new relocation type via r_type_p.
618 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
619 instead of setting need_convert_load.
620 (elf_x86_64_check_relocs): Don't check PIC if relocation has
622 (_bfd_x86_64_elf_convert_load): Removed.
623 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
624 with SYMBOL_REFERENCES_LOCAL_P.
625 (elf_x86_64_finish_dynamic_symbol): Likewise.
626 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
628 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
629 (_bfd_x86_elf_link_symbol_references_local): New function.
630 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
631 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
632 SYMBOL_REFERENCES_LOCAL_P.
633 (elf_x86_link_hash_entry): Add local_ref.
634 (elf_x86_link_hash_table): Remove convert_load.
635 (_bfd_i386_elf_convert_load): Removed.
636 (_bfd_x86_64_elf_convert_load): Likewise.
637 (_bfd_x86_elf_link_symbol_references_local): New.
639 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
641 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
642 (elf_x86_64_info_to_howto): Get the real relocation type by
643 masking out R_X86_64_converted_reloc_bit.
644 (elf_x86_64_check_tls_transition): Get the real relocation type
645 by masking out R_X86_64_converted_reloc_bit.
646 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
647 instead of setting converted_reloc.
648 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
649 instead of converted_reloc. Get the real relocation type by
650 masking out R_X86_64_converted_reloc_bit.
651 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
652 R_X86_64_converted_reloc_bit is valid.
653 * elfxx-x86.h (converted_reloc): Removed.
655 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
657 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
658 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
659 to get the relocation type again.
660 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
661 r_type when calling elf_x86_64_tls_transition. Don't use
662 ELF32_R_TYPE to get the relocation type again.
664 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
666 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
669 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
671 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
672 argument. Don't check relocation overflow. Avoid relocation
673 overflow if --no-relax is used. Set converted_reloc on symbol
674 if a GOTPCREL relocation is converted.
675 (elf_x86_64_relocate_section): Issue a fatal error and suggest
676 --no-relax if GOTPCREL relocation conversion leads to relocation
678 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
680 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
681 Edmar Wienskoski <edmar.wienskoski@nxp.com
683 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
684 (ppc_elf_check_relocs): Handle it.
685 (ppc_elf_vle_split20): New function.
686 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
688 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
691 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
692 for x86-64 if GOT_TLS_GDESC_P is true.
694 2017-09-03 Alan Modra <amodra@gmail.com>
697 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
699 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
701 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
702 tls_get_addr for x86-64 in one place.
704 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
706 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
707 with elfxx-x86.lo for 64-bit BFD.
708 * configure: Regenerated.
710 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
712 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
713 (_bfd_i386_elf_convert_load): This. Remove static.
714 (elf_i386_size_dynamic_sections): Removed.
715 (elf_backend_size_dynamic_sections): Likewise.
716 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
717 (_bfd_x86_64_elf_convert_load): This. Remove static.
718 (elf_x86_64_size_dynamic_sections): Removed.
719 (elf_backend_size_dynamic_sections): Likewise.
720 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
721 (elf_x86_allocate_dynrelocs): This. Make it static.
722 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
723 (elf_x86_allocate_local_dynreloc): This. Make it static.
724 (elf_i386_is_reloc_section): New function.
725 (elf_x86_64_is_reloc_section): Likewise.
726 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
727 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
728 Rearrange got_entry_size initialization.
729 (_bfd_x86_elf_size_dynamic_sections): New function.
730 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
731 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
732 (_bfd_i386_elf_convert_load): New.
733 (_bfd_x86_64_elf_convert_load): Likewise.
734 (_bfd_x86_elf_size_dynamic_sections): Likewise.
735 (elf_backend_size_dynamic_sections): Likewise.
736 (_bfd_x86_elf_allocate_dynrelocs): Removed.
737 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
739 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
741 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
744 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
746 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
747 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
749 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
751 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
752 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
753 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
754 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
755 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
756 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
758 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
760 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
761 (elf_i386_allocate_local_dynrelocs): Likewise.
762 (elf_i386_size_dynamic_sections): Replace
763 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
764 with _bfd_x86_elf_allocate_dynrelocs and
765 _bfd_x86_elf_allocate_local_dynrelocs.
766 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
767 (elf_x86_64_allocate_local_dynrelocs): Likewise.
768 (elf_x86_64_size_dynamic_sections): Replace
769 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
770 with _bfd_x86_elf_allocate_dynrelocs and
771 _bfd_x86_elf_allocate_local_dynrelocs.
772 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
773 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
774 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
775 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
777 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
779 * elf32-i386.c (is_i386_elf): Removed.
780 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
781 (elf_i386_size_dynamic_sections): Likewise.
782 (elf_i386_relocate_section): Likewise.
783 * elf64-x86-64.c (is_x86_64_elf): Removed.
784 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
786 (elf_x86_64_size_dynamic_sections): Likewise.
787 (elf_x86_64_relocate_section): Likewise.
788 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
790 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
793 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
795 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
796 (elf_i386_allocate_dynrelocs): Replace
797 elf_i386_compute_jump_table_size with
798 elf_x86_compute_jump_table_size.
799 (elf_i386_size_dynamic_sections): Likewise.
800 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
801 (elf_x86_64_allocate_dynrelocs): Replace
802 elf_x86_64_compute_jump_table_size with
803 elf_x86_compute_jump_table_size.
804 (elf_x86_64_size_dynamic_sections): Likewise.
805 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
807 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
808 (elf_x86_compute_jump_table_size): New.
810 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
812 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
814 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
815 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
817 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
819 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
820 with htab->is_vxworks.
821 (elf_i386_size_dynamic_sections): Likewise.
822 (elf_i386_relocate_section): Likewise.
823 (elf_i386_finish_dynamic_symbol): Likewise.
824 (elf_i386_finish_dynamic_sections): Likewise.
826 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
828 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
829 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
830 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
831 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
832 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
833 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
834 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
835 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
837 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
840 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
841 ELF_COMMON_DEF_P for common symbols.
843 2017-09-02 Alan Modra <amodra@gmail.com>
845 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
846 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
847 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
849 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
851 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
852 (elf_backend_gc_mark_hook): Likewise.
853 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
854 (elf_backend_gc_mark_hook): Likewise.
855 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
856 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
857 (elf_backend_gc_mark_hook): Likewise.
859 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
861 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
862 (elf_backend_adjust_dynamic_symbol): Likewise.
863 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
864 (elf_backend_adjust_dynamic_symbol): Likewise.
865 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
866 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
867 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
868 (_bfd_x86_elf_adjust_dynamic_symbol): New.
869 (elf_backend_adjust_dynamic_symbol): Likewise.
871 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
873 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
876 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
878 * elf32-i386.c (elf_i386_mkobject): Removed.
879 (bfd_elf32_mkobject): Likewise.
880 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
881 (bfd_elf64_mkobject): Likewise.
882 (bfd_elf32_mkobject): Likewise.
883 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
884 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
885 (bfd_elf64_mkobject): Likewise.
886 (bfd_elf32_mkobject): Likewise.
888 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
890 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
891 Call _bfd_x86_elf_link_setup_gnu_properties.
892 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
893 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
895 (elf_x86_64_non_lazy_plt): Likewise.
896 (elf_x86_64_lazy_bnd_plt): Likewise.
897 (elf_x86_64_non_lazy_bnd_plt): Likewise.
898 (elf_x86_64_lazy_ibt_plt): Likewise.
899 (elf_x32_lazy_ibt_plt): Likewise.
900 (elf_x86_64_non_lazy_ibt_plt): Likewise.
901 (elf_x32_non_lazy_ibt_plt): Likewise.
902 (elf_x86_64_nacl_plt): Likewise.
903 (elf_x86_64_link_setup_gnu_properties): Updated. Call
904 _bfd_x86_elf_link_setup_gnu_properties.
905 * elfxx-x86.c: Include elf-vxworks.h".
906 (_bfd_x86_elf_link_setup_gnu_properties): New function.
907 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
908 comments for pic_plt0_entry and pic_plt_entry.
909 (elf_x86_non_lazy_plt_layout): Likewise.
910 (elf_x86_plt_layout_table): New.
911 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
913 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
916 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
917 .eh_frame section for the second PLT.
918 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
919 alignment of .eh_frame section for the second PLT.
921 2017-09-01 Nick Clifton <nickc@redhat.com>
924 * dwarf2.c (decode_line_info): Fix test for an overlong line info
927 2017-09-01 Nick Clifton <nickc@redhat.com>
930 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
931 attribute buffer is NUL terminated.
933 2017-08-31 Nick Clifton <nickc@redhat.com>
936 * dwarf2.c (read_section): If necessary add a terminating NUL byte
937 to dwarf string sections.
939 2017-08-31 Alan Modra <amodra@gmail.com>
941 * po/SRC-POTFILES.in: Regenerate.
943 2017-08-31 Alan Modra <amodra@gmail.com>
945 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
946 for a section containing just a terminator. Allow multiple
947 terminators at end of section.
948 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
949 sections when not adding alignment. Assert on terminator in
952 2017-08-31 Alan Modra <amodra@gmail.com>
956 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
959 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
961 * configure.ac (bfd_backends): Add elf64.lo together with
962 elfxx-x86.lo for 64-bit BFD.
963 * configure: Regenerated.
965 2017-08-31 James Bowman <james.bowman@ftdichip.com>
967 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
970 2017-08-31 Alan Modra <amodra@gmail.com>
973 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
974 before _close_and_cleanup. Call iovec->bclose after.
975 (bfd_close): Remove code common to, and call, bfd_close_all_done.
977 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
979 * elf32-i386.c (elf_i386_plt_type): Removed.
980 (elf_i386_plt): Likewise.
981 (elf_i386_get_synthetic_symtab): Updated. Call
982 _bfd_x86_elf_get_synthetic_symtab.
983 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
984 (elf_x86_64_plt): Likewise.
985 (elf_x86_64_get_synthetic_symtab): Updated. Call
986 _bfd_x86_elf_get_synthetic_symtab.
987 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
988 (elf_x86_64_get_plt_got_vma): Likewise.
989 (elf_i386_valid_plt_reloc_p): Likewise.
990 (elf_x86_64_valid_plt_reloc_p): Likewise.
991 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
992 * elfxx-x86.h (elf_x86_plt_type): New.
993 (elf_x86_plt): Likewise.
994 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
996 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
998 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
999 target_id instead of elf_machine_code.
1001 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1003 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1004 (elf_i386_lazy_plt_layout): Likewise.
1005 (elf_i386_non_lazy_plt_layout): Likewise.
1006 (elf_i386_plt_layout): Likewise.
1007 (elf_i386_link_hash_table): Likewise.
1008 (elf_i386_next_tls_desc_index): Likewise.
1009 (elf_i386_srelplt2): Likewise.
1010 (elf_i386_plt): Likewise.
1011 (elf_i386_lazy_plt): Likewise.
1012 (elf_i386_non_lazy_plt): Likewise.
1013 (elf_i386_link_hash_table_create): Likewise.
1014 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1015 (elf_i386_lazy_plt): Updated.
1016 (elf_i386_non_lazy_plt): Likewise.
1017 (elf_i386_lazy_ibt_plt): Likewise.
1018 (elf_i386_non_lazy_ibt_plt): Likewise.
1019 (elf_i386_allocate_dynrelocs): Likewise.
1020 (elf_i386_size_dynamic_sections): Likewise.
1021 (elf_i386_relocate_section): Likewise.
1022 (elf_i386_finish_dynamic_symbol): Likewise.
1023 (elf_i386_finish_dynamic_sections): Likewise.
1024 (elf_i386_get_synthetic_symtab): Likewise.
1025 (elf_i386_link_setup_gnu_properties): Likewise.
1026 (elf_i386_nacl_plt): Likewise.
1027 * elf64-x86-64.c (ABI_64_P): Removed.
1028 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1029 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1030 (elf_x86_64_lazy_plt_layout): Likewise.
1031 (elf_x86_64_non_lazy_plt_layout): Likewise.
1032 (elf_x86_64_plt_layout): Likewise.
1033 (elf_x86_64_link_hash_table): Likewise.
1034 (elf_x86_64_plt): Likewise.
1035 (elf_x86_64_lazy_plt): Likewise.
1036 (elf_x86_64_non_lazy_plt): Likewise.
1037 (elf_x86_64_link_hash_table_create): Likewise.
1038 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1039 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1040 (elf_x86_64_lazy_plt): Updated.
1041 (elf_x86_64_non_lazy_plt): Likewise.
1042 (elf_x86_64_lazy_bnd_plt): Likewise.
1043 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1044 (elf_x86_64_lazy_ibt_plt): Likewise.
1045 (elf_x32_lazy_ibt_plt): Likewise.
1046 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1047 (elf_x32_non_lazy_ibt_plt): Likewise.
1048 (elf_x86_64_allocate_dynrelocs): Likewise.
1049 (elf_x86_64_size_dynamic_sections): Likewise.
1050 (elf_x86_64_relocate_section): Likewise.
1051 (elf_x86_64_finish_dynamic_symbol): Likewise.
1052 (elf_x86_64_finish_dynamic_sections): Likewise.
1053 (elf_x86_64_get_synthetic_symtab): Likewise.
1054 (elf_x86_64_link_setup_gnu_properties): Likewise.
1055 (elf_x86_64_nacl_plt): Likewise.
1056 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1058 (ELF32_DYNAMIC_INTERPRETER): New.
1059 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1060 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1061 (_bfd_x86_elf_link_hash_table_create): Likewise.
1062 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1063 (elf_x86_link_hash_table_free): This. Make it static.
1064 * elfxx-x86.h: Don't include "objalloc.h".
1066 (elf_x86_lazy_plt_layout): Likewise.
1067 (elf_x86_non_lazy_plt_layout): Likewise.
1068 (elf_x86_plt_layout): Likewise.
1069 (_bfd_x86_elf_link_hash_table_create): Likewise.
1070 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1071 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1072 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1073 srelplt2 and next_tls_desc_index.
1074 (_bfd_x86_elf_link_hash_table_free): Removed.
1076 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1078 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1079 branch offset interpretation.
1081 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1084 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1086 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1088 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1089 (elf_x86_64_srelplt2): Likewise.
1091 2017-08-30 Alan Modra <amodra@gmail.com>
1093 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1094 (ppc64_elf_tls_optimize): Set it.
1095 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1096 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1097 addis would add zero.
1098 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1099 (ppc_elf_tls_optimize): Set it.
1100 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1101 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1103 2017-08-30 Alan Modra <amodra@gmail.com>
1105 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1106 __tls_get_addr call sequences to LE, don't move the addi down
1107 to the nop. Replace the bl with addi and leave the nop alone.
1109 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1111 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1113 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1115 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1117 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1119 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1120 (BFD64_BACKENDS): Likewise.
1121 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1122 (BFD64_BACKENDS_CFILES): Likewise.
1123 * Makefile.in: Regenerated.
1124 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1125 elf32-i386.lo and elf64-x86-64.lo.
1126 * configure: Regenerated.
1127 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1128 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1129 "objalloc.h" and "hashtab.h".
1130 (ELIMINATE_COPY_RELOCS): Removed.
1131 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1132 (SYMBOL_NO_COPYRELOC): Likewise.
1133 (elf_i386_link_hash_entry): Likewise.
1134 (GOT_UNKNOWN): Likewise.
1135 (GOT_NORMAL): Likewise.
1136 (GOT_TLS_GD): Likewise.
1137 (elf_i386_hash_entry): Likewise.
1138 (elf_i386_obj_tdata): Likewise.
1139 (elf_i386_tdata): Likewise.
1140 (elf_i386_local_got_tls_type): Likewise.
1141 (elf_i386_local_tlsdesc_gotent): Likewise.
1142 (elf_i386_hash_table): Likewise.
1143 (elf_i386_link_hash_newfunc): Likewise.
1144 (elf_i386_local_htab_hash): Likewise.
1145 (elf_i386_local_htab_eq): Likewise.
1146 (elf_i386_get_local_sym_hash): Likewise.
1147 (elf_i386_link_hash_table_free): Likewise.
1148 (elf_i386_copy_indirect_symbol): Likewise.
1149 (elf_i386_fixup_symbol): Likewise.
1150 (elf_i386_readonly_dynrelocs): Likewise.
1151 (elf_i386_always_size_sections): Likewise.
1152 (elf_i386_set_tls_module_base): Likewise.
1153 (elf_i386_dtpoff_base): Likewise.
1154 (compare_relocs): Likewise.
1155 (elf_i386_hash_symbol): Likewise.
1156 (elf_i386_parse_gnu_properties): Likewise.
1157 (elf_i386_merge_gnu_properties): Likewise.
1158 (elf_i386_link_check_relocs): Likewise.
1159 (elf_i386_merge_symbol_attribute): Likewise.
1160 (bfd_elf32_bfd_link_check_relocs): Likewise.
1161 (elf_backend_copy_indirect_symbol): Likewise.
1162 (elf_backend_always_size_sections): Likewise.
1163 (elf_backend_omit_section_dynsym): Likewise.
1164 (elf_backend_hash_symbol): Likewise.
1165 (elf_backend_fixup_symbol): Likewise.
1166 (elf_backend_parse_gnu_properties): Likewise.
1167 (elf_backend_merge_gnu_properties): Likewise.
1168 (elf_backend_merge_symbol_attribute): Likewise.
1169 (elf_i386_mkobject): Updated.
1170 (elf_i386_link_hash_table_create): Likewise.
1171 (elf_i386_check_tls_transition): Likewise.
1172 (elf_i386_tls_transition): Likewise.
1173 (elf_i386_convert_load_reloc): Likewise.
1174 (elf_i386_check_relocs): Likewise.
1175 (elf_i386_adjust_dynamic_symbol): Likewise.
1176 (elf_i386_allocate_dynrelocs): Likewise.
1177 (elf_i386_convert_load): Likewise.
1178 (elf_i386_size_dynamic_sections): Likewise.
1179 (elf_i386_relocate_section): Likewise.
1180 (elf_i386_finish_dynamic_symbol ): Likewise.
1181 (elf_i386_finish_dynamic_sections): Likewise.
1182 (elf_i386_output_arch_local_syms): Likewise.
1183 (elf_i386_get_synthetic_symtab): Likewise.
1184 (elf_i386_link_setup_gnu_properties): Likewise.
1185 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1186 of elf_link_hash_table, as base.
1187 (elf_i386_next_tls_desc_index): New.
1188 (elf_i386_srelplt2): Likewise.
1189 (elf_i386_plt): Likewise.
1190 (elf_i386_lazy_plt): Likewise.
1191 (elf_i386_non_lazy_plt): Likewise.
1192 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1193 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1194 "objalloc.h" and "hashtab.h".
1195 (ELIMINATE_COPY_RELOCS): Removed.
1196 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1197 (SYMBOL_NO_COPYRELOC): Likewise.
1198 (elf_x86_64_link_hash_entry): Likewise.
1199 (GOT_UNKNOWN): Likewise.
1200 (GOT_NORMAL): Likewise.
1201 (GOT_TLS_GD): Likewise.
1202 (elf_x86_64_hash_entry): Likewise.
1203 (elf_x86_64_obj_tdata): Likewise.
1204 (elf_x86_64_tdata): Likewise.
1205 (elf_x86_64_local_got_tls_type): Likewise.
1206 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1207 (elf_x86_64_hash_table): Likewise.
1208 (elf_x86_64_link_hash_newfunc): Likewise.
1209 (elf_x86_64_local_htab_hash): Likewise.
1210 (elf_x86_64_local_htab_eq): Likewise.
1211 (elf_x86_64_get_local_sym_hash): Likewise.
1212 (elf_x86_64_link_hash_table_free): Likewise.
1213 (elf_x86_64_copy_indirect_symbol): Likewise.
1214 (elf_x86_64_fixup_symbol): Likewise.
1215 (elf_x86_64_readonly_dynrelocs): Likewise.
1216 (elf_x86_64_always_size_sections): Likewise.
1217 (elf_x86_64_set_tls_module_base): Likewise.
1218 (elf_x86_64_dtpoff_base): Likewise.
1219 (compare_relocs): Likewise.
1220 (elf_x86_64_merge_symbol_attribute): Likewise.
1221 (elf_x86_64_hash_symbol): Likewise.
1222 (elf_x86_64_parse_gnu_properties): Likewise.
1223 (elf_x86_64_merge_gnu_properties): Likewise.
1224 (elf_x86_64_link_check_relocs): Likewise.
1225 (elf_backend_copy_indirect_symbol): Likewise.
1226 (elf_backend_always_size_sections): Likewise.
1227 (bfd_elf64_bfd_link_check_relocs): Likewise.
1228 (elf_backend_merge_symbol_attribute): Likewise.
1229 (elf_backend_hash_symbol): Likewise.
1230 (elf_backend_omit_section_dynsym): Likewise.
1231 (elf_backend_fixup_symbol): Likewise.
1232 (elf_backend_parse_gnu_properties): Likewise.
1233 (elf_backend_merge_gnu_properties): Likewise.
1234 (bfd_elf32_bfd_link_check_relocs): Likewise.
1235 (elf_x86_64_mkobject): Updated.
1236 (elf_x86_64_link_hash_table_create): Likewise.
1237 (elf_x86_64_check_tls_transition): Likewise.
1238 (elf_x86_64_tls_transition): Likewise.
1239 (elf_x86_64_convert_load_reloc): Likewise.
1240 (elf_x86_64_check_relocs): Likewise.
1241 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1242 (elf_x86_64_allocate_dynrelocs): Likewise.
1243 (elf_x86_64_convert_load): Likewise.
1244 (elf_x86_64_size_dynamic_sections): Likewise.
1245 (elf_x86_64_relocate_section): Likewise.
1246 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1247 (elf_x86_64_finish_dynamic_sections): Likewise.
1248 (elf_x86_64_output_arch_local_syms): Likewise.
1249 (elf_x86_64_get_synthetic_symtab): Likewise.
1250 (elf_x86_64_link_setup_gnu_properties): Likewise.
1251 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1252 instead of elf_link_hash_table, as base.
1253 (elf_x86_64_next_tls_desc_index): New.
1254 (elf_x86_64_srelplt2): Likewise.
1255 (elf_x86_64_plt): Likewise.
1256 (elf_x86_64_lazy_plt): Likewise.
1257 (elf_x86_64_non_lazy_plt): Likewise.
1258 * elfxx-x86.c: New file.
1259 * elfxx-x86.h: Likewise.
1261 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1263 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1265 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1267 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1269 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1270 sections before checking dynamic relocations and free invalid
1271 PLT section contents.
1272 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1274 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1276 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1277 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1279 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1282 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1284 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1286 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1288 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1290 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1292 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1295 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1296 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1297 Add a has_no_copy_on_protected bitfield.
1298 (elf_has_no_copy_on_protected): New.
1299 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1300 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1301 (elf_merge_gnu_property_list): Likewise.
1302 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1303 to FALSE for elf_has_no_copy_on_protected.
1304 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1305 (elf_i386_link_hash_entry): Add def_protected.
1306 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1307 when checking info->nocopyreloc.
1308 (elf_i386_link_setup_gnu_properties): Don't set
1309 extern_protected_data here.
1310 (elf_i386_merge_symbol_attribute): New function.
1311 (elf_backend_merge_symbol_attribute): New.
1312 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1313 (elf_x86_64_link_hash_entry): Add def_protected.
1314 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1315 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1316 when checking info->nocopyreloc.
1317 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1318 relocation run-time overflow and unresolvable R_X86_64_32S
1319 relocation against protected data symbol defined in shared object
1320 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1321 (elf_x86_64_link_setup_gnu_properties): Don't set
1322 extern_protected_data here.
1323 (elf_x86_64_merge_symbol_attribute): New function.
1324 (elf_backend_merge_symbol_attribute): New.
1326 2017-08-26 Alan Modra <amodra@gmail.com>
1328 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1329 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1330 (ppc_elf_relocate_section): Comment fix.
1331 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1332 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1333 Support dynamic relocs for TPREL16 when non-pic too.
1334 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1335 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1338 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1340 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1341 "symbol" in comments.
1342 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1344 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1347 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1348 R_X86_64_PC32 relocation run-time overflow and unresolvable
1349 R_X86_64_32S relocation with -z nocopyreloc.
1351 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1353 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1354 Undefined symbols may not have a type.
1355 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1357 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1359 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1360 bfd_link_info. Report shared, PIE or PDE object based on
1362 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1363 (elf_x86_64_relocate_section): Likewise.
1365 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1367 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1368 for function symbols.
1369 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1371 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1373 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1374 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1375 is set on any input relocatable file.
1376 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1378 2017-08-23 Alan Modra <amodra@gmail.com>
1381 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1382 ensure_undefweak_dynamic. Handle undefined too.
1383 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1384 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1385 (allocate_dynrelocs): Discard undefined non-default visibility
1386 relocs first. Make undefined syms dynamic. Tidy goto.
1388 2017-08-21 Alan Modra <amodra@gmail.com>
1389 H.J. Lu <hongjiu.lu@intel.com>
1392 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1393 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1395 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1398 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1399 undefined weak symbols.
1401 2017-08-18 Nick Clifton <nickc@redhat.com>
1404 * tekhex.c (getsym): Fix check for source pointer walking off the
1405 end of the input buffer.
1407 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1410 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1411 relocations in debug sections, change abort to _bfd_error_handler.
1413 2017-08-14 Nick Clifton <nickc@redhat.com>
1416 * elf.c (setup_group): Check for an empty or very small group
1418 * po/bfd.pot: Regenerate.
1420 2017-08-14 Alan Modra <amodra@gmail.com>
1423 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1424 alignment padding here.
1425 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1426 in a reverse pass over sections.
1428 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1431 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1432 for @plt suffixes first.
1433 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1435 2017-08-08 Nick Clifton <nickc@redhat.com>
1438 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1439 small section lengths.
1440 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1442 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1443 there is enough data present in the note.
1445 2017-08-08 Alan Modra <amodra@gmail.com>
1448 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1449 got.refcount for GOTOFF relocs, just create .got section.
1451 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1453 * elflink.c (elf_link_add_object_symbols): Move common symbol
1454 check after bed->common_definition.
1456 2017-08-07 Alan Modra <amodra@gmail.com>
1459 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1460 needed to define various dynamic tags have been discarded.
1462 2017-08-07 Nick Clifton <nickc@redhat.com>
1465 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1466 has not been set then use the bfd returned by
1467 _bfd_elf_link_setup_gnu_properties. If that is null then search
1468 through all the input bfds selecting the first normal, ELF format
1470 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1472 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1474 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1476 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1477 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1478 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1479 (elf_i386_link_check_relocs): New function.
1480 (bfd_elf32_bfd_link_check_relocs): New.
1481 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1483 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1484 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1485 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1486 (elf_x86_64_link_check_relocs): New function.
1487 (bfd_elf64_bfd_link_check_relocs): New.
1488 (bfd_elf32_bfd_link_check_relocs): Likewise.
1490 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1493 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1494 as undefined for --no-define-common.
1496 2017-08-05 Alan Modra <amodra@gmail.com>
1498 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1499 hppa_link_hash_table.
1501 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1503 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1504 entries for sysregs with negative indices.
1506 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1508 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1509 isn't the S/390 specific elf data.
1510 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1512 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1514 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1515 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1516 [R_RISCV_ADD16]: Likewise.
1517 [R_RISCV_ADD32]: Likewise.
1518 [R_RISCV_ADD64]: Likewise.
1519 [R_RISCV_SUB6]: Likewise.
1520 [R_RISCV_SUB8]: Likewise.
1521 [R_RISCV_SUB16]: Likewise.
1522 [R_RISCV_SUB32]: Likewise.
1523 [R_RISCV_SUB64]: Likewise.
1525 2017-07-31 Alan Modra <amodra@gmail.com>
1527 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1528 without ld.so checks.
1530 2017-07-29 Alan Modra <amodra@gmail.com>
1533 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1534 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1535 (is_elfv2_localentry0): Test non_zero_localentry.
1536 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1538 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1540 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1541 pointer check for htab->elf.irelplt.
1542 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1544 2017-07-27 Nick Clifton <nickc@redhat.com>
1547 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1549 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1551 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1553 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1555 (evax_bfd_print_emh): Check for invalid string lengths.
1557 2017-07-25 Nick Clifton <nickc@redhat.com>
1559 * po/fr.po: Updated French translation.
1561 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1564 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1565 16-bit absolute branches into 10-bit pc-relative branches on the
1566 MSP430 as well as the MSP430X.
1568 2017-07-25 Alan Modra <amodra@gmail.com>
1570 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1571 (stub_eh_frame_size): New function.
1572 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1573 (group_sections): Init group tls_get_addr_opt_bctrl.
1574 (ppc64_elf_size_stubs): Update sizing and initialization of
1575 .eh_frame. Iteration over stubs via group list.
1576 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1577 (ppc64_elf_finish_dynamic_sections): Update finalization of
1580 2017-07-24 Nick Clifton <nickc@redhat.com>
1583 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1584 of the relocs to the canonicalize_one_reloc routine.
1585 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1586 for the _bfd_mach_o_canonicalize_one_reloc field.
1587 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1588 res_base parameter. Use to check for corrupt pair relocs.
1589 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1591 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1593 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1596 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1597 enough data in the record before attempting to parse it.
1598 (_bfd_vms_slurp_eeom): Likewise.
1600 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1601 (image_set_ptr): Likewise.
1602 (alpha_vms_slurp_relocs): Likewise.
1604 (alpha_vms_object_p): Check for a truncated record.
1606 2017-07-24 Nick Clifton <nickc@redhat.com>
1609 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1610 an unrecognized reloc and sets the bfd_error value.
1611 * libbfd.h: Regenerate.
1612 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1614 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1615 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1616 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1617 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1618 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1620 2017-07-23 Alan Modra <amodra@gmail.com>
1622 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1625 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1628 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1629 reloc_class_ifunc for ifunc symbols.
1631 2017-07-19 Nick Clifton <nickc@redhat.com>
1634 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1635 correct magic bytes at the start, set the error to wrong format
1636 and clear the format selector before returning NULL.
1638 2017-07-19 Nick Clifton <nickc@redhat.com>
1641 * coff-rs6000.c (_bfd_strntol): New function.
1642 (_bfd_strntoll): New function.
1643 (GET_VALUE_IN_FIELD): New macro.
1644 (EQ_VALUE_IN_FIELD): new macro.
1645 (_bfd_xcoff_slurp_armap): Use new macros.
1646 (_bfd_xcoff_archive_p): Likewise.
1647 (_bfd_xcoff_read_ar_hdr): Likewise.
1648 (_bfd_xcoff_openr_next_archived_file): Likewise.
1649 (_bfd_xcoff_stat_arch_elt): Likewise.
1650 * coff64-rs6000.c (_bfd_strntol): New function.
1651 (_bfd_strntoll): New function.
1652 (GET_VALUE_IN_FIELD): New macro.
1653 (xcoff64_slurp_armap): Use new macros.
1655 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1656 John Eric Martin <John.Martin@emmicro-us.com>
1658 * bfd-in2.h: Regenerate.
1659 * libbfd.h: Regenerate.
1660 * elf32-arc.c (JLI): Define.
1661 * reloc.c: Add JLI relocations.
1663 2017-07-18 Nick Clifton <nickc@redhat.com>
1666 * coff-sh.c: Fix spelling typos.
1667 * compress.c: Likewise.
1668 * cpu-pdp11.c: Likewise.
1669 * ecofflink.c: Likewise.
1670 * elf-m10300.c: Likewise.
1672 * elf32-arm.c: Likewise.
1673 * elf32-m68k.c: Likewise.
1674 * elf32-nds32.c: Likewise.
1675 * elf32-ppc.c: Likewise.
1676 * elf32-sh.c: Likewise.
1677 * elf32-v850.c: Likewise.
1678 * elf64-ppc.c: Likewise.
1679 * elf64-x86-64.c: Likewise.
1680 * elflink.c: Likewise.
1681 * elfnn-aarch64.c: Likewise.
1682 * elfxx-mips.c: Likewise.
1684 * sunos.c: Likewise.
1685 * vms-alpha.c: Likewise.
1686 * xcofflink.c: Likewise.
1688 2017-07-18 Nick Clifton <nickc@redhat.com>
1691 * coffcode.h (handle_COMDAT): Replace abort with an error message
1694 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1697 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1700 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1702 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1704 2017-07-16 Alan Modra <amodra@gmail.com>
1706 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1707 __tls_index GOT entries when using __tls_get_addr_opt stub.
1708 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1710 2017-07-12 Alan Modra <amodra@gmail.com>
1712 * po/es.po: Update from translationproject.org/latest/bfd/.
1713 * po/fi.po: Likewise.
1714 * po/fr.po: Likewise.
1715 * po/id.po: Likewise.
1716 * po/ja.po: Likewise.
1717 * po/ro.po: Likewise.
1718 * po/ru.po: Likewise.
1719 * po/sr.po: Likewise.
1720 * po/sv.po: Likewise.
1721 * po/tr.po: Likewise.
1722 * po/uk.po: Likewise.
1723 * po/vi.po: Likewise.
1724 * po/zh_CN.po: Likewise.
1725 * po/hr.po: New file from translationproject.org.
1726 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1727 * configure: Regenerate.
1729 2017-07-12 Nick Clifton <nickc@redhat.com>
1731 Fix compile time warnings using gcc 7.1.1.
1732 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1734 (elf_xtensa_get_gotplt_section): Increase length of got_name
1736 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1737 default return of FALSE.
1738 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1739 default return of FALSE.
1741 2017-07-12 Alan Modra <amodra@gmail.com>
1743 * binary.c (binary_set_section_contents): Don't print filepos in
1745 (coff_write_object_contents): Cast size_t for error message.
1746 (coff_slurp_line_table): Don't use bfd_vma symndx.
1747 (coff_slurp_reloc_table): Remove unneeded cast.
1748 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1750 (find_abstract_instance_name): Likewise.
1751 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1752 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1753 (elf32_arm_check_relocs): Make r_symndx an int.
1754 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1756 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1758 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1760 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1761 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1762 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1763 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1764 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1765 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1766 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1767 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1768 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1769 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1770 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1771 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1772 and use %lu for error message.
1773 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1774 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1777 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1779 (elf32_arm_final_link_relocate): Likewise.
1780 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1781 * coffcode.h (styp_to_sec_flags): Likewise.
1782 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1783 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1784 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1785 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1786 (elf32_bfin_merge_private_bfd_data): Likewise.
1787 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1788 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1789 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1790 (i370_elf_relocate_section): Likewise.
1791 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1792 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1793 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1794 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1795 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1796 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1797 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1798 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1799 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1800 * ieee.c (ieee_write_id, read_id): Likewise.
1801 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1802 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1803 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1804 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1805 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1806 * stabs.c (_bfd_link_section_stabs): Likewise.
1808 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1810 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1811 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1812 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1813 * coff-sh.c (sh_relax_section): Likewise.
1814 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1815 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1816 * coffcode.h (coff_slurp_reloc_table): Likewise.
1817 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1818 (_bfd_coff_read_string_table): Likewise.
1819 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1820 * compress.c (bfd_get_full_section_contents): Likewise.
1821 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1822 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1823 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1824 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1825 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1826 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1827 (elf32_arm_write_section): Likewise.
1828 * elf32-bfin.c (bfin_relocate_section): Likewise.
1829 (bfinfdpic_relocate_section): Likewise.
1830 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1831 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1832 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1833 (elf_i386_relocate_section): Likewise.
1834 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1835 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1836 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1837 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1838 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1839 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1840 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1841 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1842 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1843 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1844 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1845 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1846 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1847 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1848 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1849 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1850 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1851 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1852 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1853 * elf32-sh.c (sh_elf_relax_section): Likewise.
1854 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1855 (sh_elf_relocate_section): Likewise.
1856 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1857 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1858 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1859 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1860 * elf32-v850.c (v850_elf_relax_section): Likewise.
1861 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1862 (elf_vax_relocate_section): Likewise.
1863 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1864 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1865 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1866 (do_fix_for_relocatable_link): Likewise.
1867 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1868 (elf64_alpha_relax_with_lituse): Likewise.
1869 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1870 (elf_hppa_final_link_relocate): Likewise.
1871 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1872 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1873 (elf64_vms_link_add_object_symbols): Likewise.
1874 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1875 (mmix_final_link_relocate): Likewise.
1876 * elf64-s390.c (invalid_tls_insn): Likewise.
1877 (elf_s390_relocate_section): Likewise.
1878 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1879 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1880 (elf_x86_64_relocate_section): Likewise.
1881 * elfcode.h (elf_slurp_symbol_table): Likewise.
1882 * elfcore.h (elf_core_file_p): Likewise.
1883 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1884 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1885 (elfNN_aarch64_relocate_section): Likewise.
1886 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1887 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1888 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1889 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1890 (_bfd_mips_elf_relocate_section): Likewise.
1891 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1892 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1893 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1894 * ieee.c (ieee_slurp_external_symbols): Likewise.
1895 * ihex.c (ihex_write_object_content): Likewise.
1896 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1897 * merge.c (_bfd_merged_section_offset): Likewise.
1898 * mmo.c (mmo_write_loc_chunk): Likewise.
1899 (mmo_write_object_contents): Likewise.
1900 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1901 * stabs.c (_bfd_link_section_stabs): Likewise.
1902 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1904 2017-07-11 Alan Modra <amodra@gmail.com>
1906 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1908 2017-07-11 Alan Modra <amodra@gmail.com>
1910 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1911 instruction" error using _bfd_error_handler, not einfo.
1913 2017-07-10 Nick Clifton <nickc@redhat.com>
1915 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1916 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1918 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1920 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1922 2017-07-07 Alan Modra <amodra@gmail.com>
1924 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1926 2017-07-07 Alan Modra <amodra@gmail.com>
1928 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1929 as long long. Move code replacing "ll" with "I64", and simplify.
1931 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1933 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1936 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1938 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1940 (line_info_add_file_name): Likewise.
1941 (decode_line_info): Likewise.
1943 2017-07-04 Tristan Gingold <gingold@adacore.com>
1945 * version.m4: Bump version to 2.29.51
1946 * configure: Regenerate.
1948 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1950 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1951 sanity check at the head of this function.
1953 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1955 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1956 dwarf_line_str_size.
1957 (struct attr_abbrev): Add field implicit_const.
1958 (dwarf_debug_sections): Add .debug_line_str.
1959 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1960 (dwarf_debug_section_assert): Add static assertion.
1961 (read_indirect_line_string): New.
1962 (read_abbrevs): Support DW_FORM_implicit_const.
1963 (is_str_attr): Support DW_FORM_line_strp.
1964 (read_attribute_value): Support DW_FORM_line_strp and
1965 DW_FORM_implicit_const.
1966 (read_attribute): Support DW_FORM_implicit_const.
1967 (line_info_add_include_dir, line_info_add_include_dir_stub):
1968 (line_info_add_file_name, read_formatted_entries): New.
1969 (decode_line_info, parse_comp_unit): Support DWARF 5.
1970 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1972 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1974 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1975 abort statement that was put for symbols that are not dynamic.
1977 2017-07-03 Tristan Gingold <gingold@adacore.com>
1979 * po/bfd.pot: Regenerate
1981 2017-07-03 Alan Modra <amodra@gmail.com>
1983 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1984 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1985 * elf.c (setup_group): Use "Lx" to print sh_size.
1986 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1987 unknown section type in hex.
1988 (copy_special_section_fields): Style fix.
1989 (bfd_section_from_shdr): Correct format for sh_link. Use a
1990 common error message for all the variants of unrecognized
1992 (assign_file_positions_for_load_sections): Use "Lx" for lma
1993 adjust error message.
1994 (assign_file_positions_for_non_load_sections): Formatting.
1995 (rewrite_elf_program_header): Formatting. Use "Lx" for
1996 bfd_vma values in error messages.
1997 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1998 ELF_R_SYM value to type expected by format.
1999 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2001 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2002 (elf_link_input_bfd): Use "Lx" for r_info.
2003 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2005 2017-07-03 Alan Modra <amodra@gmail.com>
2007 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2008 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2009 Microsoft C library variant of long long format specifier.
2010 (PRINT20): Cast value to bfd_uint64_t not long long.
2011 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2012 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2013 long long. Don't cast to bfd_vma.
2014 * elf32-score.c (score3_bfd_getl48): Likewise.
2015 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2017 2017-07-03 Alan Modra <amodra@gmail.com>
2019 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2021 (bfd_elf_print_symbol): Don't cast symbol->flags.
2022 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2023 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2024 _bfd_error_handler argument order.
2025 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2027 2017-07-03 Alan Modra <amodra@gmail.com>
2029 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2030 AC_TYPE_LONG_DOUBLE.
2031 * configure: Regenerate.
2032 * config.in: Regenerate.
2034 2017-06-29 Andrew Waterman <andrew@sifive.com>
2036 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2039 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2041 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2042 unless it is undefined weak.
2043 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2044 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2046 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2047 is not dynamic in PIC, abort.
2049 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2052 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2053 undefined weak symbols into dynamic.
2054 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2055 relocation for non-dynamic symbols.
2056 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2058 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2060 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2061 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2062 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2063 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2064 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2067 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2069 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2070 (elfcore_write_s390_gs_bc): Likewise.
2071 * elf.c (elfcore_grok_s390_gs_cb): New function.
2072 (elfcore_grok_s390_gs_bc): New function.
2073 (elfcore_grok_note): Call them.
2074 (elfcore_write_s390_gs_cb): New function.
2075 (elfcore_write_s390_gs_bc): New function.
2076 (elfcore_write_register_note): Call them.
2078 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2080 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2081 bfd_get_file_size. Check archive element size.
2082 (_bfd_generic_get_section_contents_in_window): Likewise.
2084 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2086 * bfd-in2.h: Regenerated.
2087 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2088 (bfd_get_file_size): Likewise.
2090 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2091 Matthew Fortune <matthew.fortune@imgtec.com>
2093 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2094 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2095 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2096 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2098 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2099 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2100 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2101 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2102 `bfd_mach_mips_interaptiv_mr2' entries.
2103 * bfd-in2.h: Regenerate.
2105 2017-06-27 Nick Clifton <nickc@redhat.com>
2107 * tekhex.c (pass_over): Revert accidental conversion of a local
2108 array to a static array.
2110 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2113 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2114 reloc addend if necessary. Adjust diff only if
2115 shrinked_insn_address < end_address.
2117 2017-06-27 Alan Modra <amodra@gmail.com>
2120 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2121 (_bfd_generic_get_section_contents_in_window): Likewise.
2123 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2125 * elfnn-riscv.c (perform_relocation): Support the new
2126 R_RISCV_32_PCREL relocation.
2127 (riscv_elf_relocate_section): Likewise.
2128 * elfxx-riscv.c (howto_table): Likewise.
2129 (riscv_reloc_map): Likewise.
2130 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2131 * libbfd.h: Regenerate.
2133 2017-06-27 Alan Modra <amodra@gmail.com>
2136 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2137 Use unsigned file pointer type, and remove cast.
2138 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2139 Add "count", not "sz".
2141 2017-06-26 Pedro Alves <palves@redhat.com>
2144 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2147 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2150 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2153 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2155 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2156 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2157 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2158 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2159 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2161 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2164 * compress.c (bfd_get_full_section_contents): Don't check the
2166 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2167 reject a section whose size + offset is greater than the size
2169 (_bfd_generic_get_section_contents_in_window): Likewise.
2171 2017-06-26 Nick Clifton <nickc@redhat.com>
2174 * tekhex.c (getvalue): Check for the source pointer exceeding the
2175 end pointer before the first byte is read.
2177 2017-06-26 Nick Clifton <nickc@redhat.com>
2180 * opncls.c (get_build_id): Check that the section is big enough
2181 to contain the whole note.
2182 * compress.c (bfd_get_full_section_contents): Check for and reject
2183 a section whose size is greater than the size of the entire file.
2184 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2185 contain a notes section.
2187 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2189 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2191 (elf_s390_modify_segment_map): Likewise.
2192 (bfd_elf_s390_set_options): Lisewise.
2194 2017-06-26 Alan Modra <amodra@gmail.com>
2196 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2198 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2199 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2200 .preinit_array on --just-syms bfds.
2201 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2202 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2203 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2205 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2207 * elf.c (find_link): Bounds check "hint".
2209 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2211 * elf32-arm.c (using_thumb_only): Update list of architectures in
2212 BFD_ASSERT for which the logic is valid.
2213 (using_thumb2_bl): Likewise.
2214 (using_thumb2): Likewise and return true for ARMv8-R.
2215 (arch_has_arm_nop): Likewise.
2216 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2217 merging logic. Update commentis for value 15 of v8m_baseline,
2218 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2219 merging of value 15 of Tag_CPU_arch.
2221 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2223 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2224 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2225 * bfd-in2.h: Regenerate.
2227 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2229 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2230 the error_alignment label forward. Properly align program
2231 property note section.
2233 2017-06-22 Eric Christopher <echristo@gmail.com>
2235 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2236 abs to fix a truncation warning.
2238 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2240 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2241 local undefined weak symbol to 0.
2242 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2244 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2246 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2247 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2248 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2249 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2250 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2251 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2252 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2253 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2255 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2257 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2258 (elf_i386_lazy_ibt_plt_entry): Likewise.
2259 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2260 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2261 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2262 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2263 (elf_i386_lazy_plt_layout): Likewise.
2264 (elf_i386_non_lazy_plt_layout): Likewise.
2265 (elf_i386_link_hash_entry): Add plt_second.
2266 (elf_i386_link_hash_table): Add plt_second and
2267 plt_second_eh_frame.
2268 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2269 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2270 the second PLT. Check the second PLT.
2271 (elf_i386_relocate_section): Use the second PLT to resolve
2272 PLT reference if needed.
2273 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2275 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2276 second PLT. Generate unwind info for the second PLT.
2277 (elf_i386_plt_type): Add plt_second.
2278 (elf_i386_get_synthetic_symtab): Support the second PLT.
2279 (elf_i386_parse_gnu_properties): Support
2280 GNU_PROPERTY_X86_FEATURE_1_AND.
2281 (elf_i386_merge_gnu_properties): Support
2282 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2283 on GNU_PROPERTY_X86_FEATURE_1_IBT
2284 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2285 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2286 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2287 is set on all relocatable inputs.
2288 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2289 (elf_x32_lazy_ibt_plt_entry): Likewise.
2290 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2291 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2292 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2293 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2294 (elf_x86_64_lazy_ibt_plt): Likewise.
2295 (elf_x32_lazy_ibt_plt): Likewise.
2296 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2297 (elf_x32_non_lazy_ibt_plt): Likewise.
2298 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2299 (elf_x86_64_parse_gnu_properties): Support
2300 GNU_PROPERTY_X86_FEATURE_1_AND.
2301 (elf_x86_64_merge_gnu_properties): Support
2302 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2303 on GNU_PROPERTY_X86_FEATURE_1_IBT
2304 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2305 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2306 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2307 is set on all relocatable inputs.
2309 2017-06-22 Nick Clifton <nickc@redhat.com>
2312 * som.c (setup_sections): NUL terminate the space_strings buffer.
2313 Check that the space.name field does not index beyond the end of
2314 the space_strings buffer.
2316 2017-06-21 Nick Clifton <nickc@redhat.com>
2319 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2321 2017-06-21 Nick Clifton <nickc@redhat.com>
2324 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2325 type of the size parameter.
2326 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2327 length of the counted string.
2328 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2329 (_bfd_vms_save_counted_string): Likewise.
2330 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2331 _bfd_vms_save_counted_string.
2332 (_bfd_vms_slurp_ehdr): Likewise.
2333 (_bfd_vms_slurp_egsd): Likewise.
2334 (Parse_module): Likewise.
2336 2017-06-21 Alan Modra <amodra@gmail.com>
2338 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2339 calls before tocsave calls.
2340 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2343 2017-06-21 Nick Clifton <nickc@redhat.com>
2346 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2347 bfd_get_full_section_contents returns no contents.
2349 2017-06-21 Nick Clifton <nickc@redhat.com>
2352 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2355 2017-06-21 Nick Clifton <nickc@redhat.com>
2358 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2360 (image_set_ptr): Likewise.
2361 (alpha_vms_fix_sec_rel): Likewise.
2362 (alpha_vms_slurp_relocs): Likewise.
2364 2017-06-21 Nick Clifton <nickc@redhat.com>
2367 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2369 (ieee_archive_p): Likewise.
2370 (ieee_object_p): Likewise.
2372 2017-06-21 Nick Clifton <nickc@redhat.com>
2375 * elf.c (setup_group): Zero the group section pointer list after
2376 allocation so that loops can be caught. Check for NULL pointers
2377 when processing a group list.
2379 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2381 * elf-s390.h: New file.
2382 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2384 (elf_s390_additional_program_headers): New function.
2385 (elf_s390_modify_segment_map): New function.
2386 (bfd_elf_s390_set_options): New function.
2387 (elf_backend_additional_program_headers)
2388 (elf_backend_modify_segment_map): Add macro definitions.
2390 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2393 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2394 the DYNAMIC bit instead of bfd_count_sections.
2396 2017-06-19 Nick Clifton <nickc@redhat.com>
2399 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2401 (evax_bfd_print_eeom): Likewise.
2402 (evax_bfd_print_egsd): Check for an overlarge record length.
2403 (evax_bfd_print_etir): Likewise.
2405 2017-06-19 Nick Clifton <nickc@redhat.com>
2408 * libieee.h (struct common_header_type): Add end_p field.
2409 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2411 (read_id): Check for a length that exceeds the remaining bytes in
2413 (ieee_seek): Initialise end_p.
2414 (ieee_archive_p): Likewise.
2415 (ieee_object_p): Likewise.
2417 2017-06-19 Nick Clifton <nickc@redhat.com>
2420 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2421 before reading the EIHS structure entries.
2423 2017-06-19 Nick Clifton <nickc@redhat.com>
2426 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2427 gsd_size. Check that there are enough bytes remaining to read the
2428 type and size of the next egsd. Check that the size of the egsd
2429 does not exceed the size of the record.
2431 2017-06-19 Alan Modra <amodra@gmail.com>
2433 * config.bfd: Correct targ_underscore for cris.
2435 2017-06-18 Alan Modra <amodra@gmail.com>
2437 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2438 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2440 2017-06-16 Nick Clifton <nickc@redhat.com>
2442 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2443 bucketlist is empty because there are no symbols to add to the
2446 2017-06-16 Alan Modra <amodra@gmail.com>
2452 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2453 (BFD_JUMP_TABLE_LINK): Likewise.
2454 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2455 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2456 (bfd_elf_define_start_stop): New function.
2457 * linker.c (bfd_generic_define_start_stop): New function.
2458 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2460 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2461 * aout-target.h (MY_bfd_define_start_stop): Define.
2462 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2463 * binary.c (binary_bfd_define_start_stop): Define.
2464 * bout.c (b_out_bfd_define_start_stop): Define.
2465 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2466 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2467 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2468 * coffcode.h (coff_bfd_define_start_stop): Define.
2469 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2470 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2471 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2472 * ieee.c (ieee_bfd_define_start_stop): Define.
2473 * ihex.c (ihex_bfd_define_start_stop): Define.
2474 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2475 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2476 * mmo.c (mmo_bfd_define_start_stop): Define.
2477 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2478 * oasys.c (oasys_bfd_define_start_stop): Define.
2479 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2480 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2481 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2482 * som.c (som_bfd_define_start_stop): Define.
2483 * srec.c (srec_bfd_define_start_stop): Define.
2484 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2485 * versados.c (versados_bfd_define_start_stop): Define.
2486 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2487 (alpha_vms_bfd_define_start_stop): Define.
2488 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2489 * bfd-in2.h: Regenerate.
2490 * libbfd.h: Regenerate.
2492 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2494 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2495 SYMBOL_REFERENCES_LOCAL.
2497 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2500 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2501 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2502 runtime for if there needs copy relocation elimination.
2503 (need_copy_relocation_p): New function. Return true for symbol with
2504 pc-relative references and if it's against read-only sections.
2505 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2506 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2507 that are related with accessing external objects.
2508 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2509 in elfNN_aarch64_check_relocs.
2511 2017-06-15 Nick Clifton <nickc@redhat.com>
2514 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2517 (ieee_archive_p): Likewise.
2519 2017-06-15 Nick Clifton <nickc@redhat.com>
2522 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2524 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2526 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2527 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2528 keep both windowed and call0 ABI PLT definitions.
2529 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2530 elf_xtensa_*_plt_entry endex.
2531 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2533 2017-06-14 Nick Clifton <nickc@redhat.com>
2536 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2539 2017-06-14 Nick Clifton <nickc@redhat.com>
2542 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2543 maximum value for the ascic pointer. Check that name processing
2544 does not read beyond this value.
2545 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2548 2017-06-14 Nick Clifton <nickc@redhat.com>
2551 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2552 (process_otr): Check for an invalid offset in the otr structure.
2554 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2556 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2558 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2564 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2565 vtable field to a union.
2566 (_bfd_elf_is_start_stop): Removed.
2567 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2568 __start_SECNAME and __stop_SECNAME symbols.
2569 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2570 * elflink.c (_bfd_elf_is_start_stop): Removed.
2571 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2572 _bfd_elf_is_start_stop.
2573 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2574 __stop_SECNAME symbols. Updated.
2575 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2576 (bfd_elf_gc_record_vtinherit): Likewise.
2577 (bfd_elf_gc_record_vtentry): Likewise.
2579 2017-06-13 Nick Clifton <nickc@redhat.com>
2582 * elflink.c (elf_link_adjust_relocs): Generate an error when
2583 encountering a reloc against a symbol removed by garbage
2586 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2588 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2589 to merge_gnu_properties.
2590 * elf-properties.c (elf_merge_gnu_properties): Add struct
2591 bfd_link_info * and pass it to merge_gnu_properties.
2592 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2593 and pass it to elf_merge_gnu_properties.
2594 (_bfd_elf_link_setup_gnu_properties): Pass info to
2595 elf_merge_gnu_property_list.
2596 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2598 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2600 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2603 * binary.c (binary_set_section_contents): Scale lma by octets
2604 per byte to set filepos.
2606 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2608 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2611 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2613 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2616 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2618 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2619 patched section contents for TLS IE reloc.
2620 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2622 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2624 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2625 RELOC_FOR_GLOBAL_SYMBOL macro.
2627 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2629 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2632 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2634 * config/tc-arc.c (md_undefined_symbol): Changed.
2635 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2637 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2639 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2642 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2644 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2645 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2647 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2649 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2652 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2654 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2655 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2656 is non-zero. Add clarifying comments.
2658 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2660 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2661 name. Use local IFUNC symbol name string to report unsupported
2662 non-PIC call to IFUNC function.
2663 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2664 when generating R_386_IRELATIVE relocation.
2665 (elf_i386_finish_dynamic_symbol): Likewise.
2666 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2668 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2669 when generating R_X86_64_IRELATIVE relocation.
2670 (elf_x86_64_finish_dynamic_symbol): Likewise.
2672 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2674 * elf.c (setup_group): Make sure BFD sections are created for all
2675 group sections in the input file when processing SHF_GROUP
2677 (bfd_section_from_shdr): Avoid duplicating logic already
2678 implemented in `setup_group'.
2680 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2683 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2684 if the hint address is zero.
2686 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2689 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2690 ELF_COMMON_DEF_P for common symbols.
2692 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2694 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2695 SEC_GROUP sections as SEC_EXCLUDE.
2696 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2697 (assign_section_numbers): Use resolve_section_groups flag instead
2698 of relocatable link type.
2699 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2700 flag instead of checking the final_link flag for part of the
2701 checks in here. Fix white space as a result.
2702 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2703 instead of relocatable link type.
2704 (bfd_elf_final_link): Likewise.
2706 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2708 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2710 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2711 (s3_bfd_score_elf_check_relocs): Likewise.
2712 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2713 (score_elf_final_link_relocate): Likewise.
2714 (s7_bfd_score_elf_check_relocs): Likewise.
2716 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2718 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2721 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2723 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2724 from `reloc_count' rather than decrementing it.
2725 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2726 `reloc_count' by `int_rels_per_ext_rel'.
2727 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2728 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2729 entry determination.
2730 (s3_bfd_score_elf_check_relocs): Likewise.
2731 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2732 (s7_bfd_score_elf_relocate_section): Likewise.
2733 (s7_bfd_score_elf_check_relocs): Likewise.
2734 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2735 prototype and function.
2736 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2737 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2738 triple rather than once the sum of REL and RELA relocation entry
2740 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2741 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2742 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2743 storage allocation size determination.
2744 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2745 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2746 by `int_rels_per_ext_rel' for last relocation entry
2748 (bfd_elf_final_link): Do not multiply `reloc_count' by
2749 `int_rels_per_ext_rel' for internal relocation storage
2750 allocation size determination.
2751 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2752 `int_rels_per_ext_rel' for last relocation entry determination.
2753 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2754 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2755 (_bfd_mips_elf_relocate_section): Likewise.
2757 2017-06-05 Alan Modra <amodra@gmail.com>
2760 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2762 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2764 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2765 determine structure sizes.
2766 (elfcore_grok_freebsd_prstatus): Likewise.
2768 2017-06-01 Alan Modra <amodra@gmail.com>
2770 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2771 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2773 (is_elfv2_localentry0): New function.
2774 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2775 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2776 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2777 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2778 optimized localentry:0 stubs.
2779 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2780 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2782 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2784 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2786 2017-05-30 Casey Smith <clegg89@gmail.com>
2789 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2790 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2792 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2794 * cpu-arc.c (arc_compatible): New function.
2796 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2798 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2800 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2803 * bfdio.c (bfd_get_file_size): New function.
2804 * bfd-in2.h: Regenerated.
2806 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2808 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2811 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2813 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2814 dynobj instead of htab->elf.dynobj.
2816 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2818 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2820 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2821 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2822 actual number of internal relocations retrieved. Adjust
2823 function description.
2824 (bfd_elf64_canonicalize_reloc): Remove macro.
2825 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2827 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2829 * archures.c (bfd_mach_sparc_v9m8): Define.
2830 (bfd_mach_sparc_v8plusm8): Likewise.
2831 (bfd_mach_sparc_v9_p): Adjust to M8.
2832 (bfd_mach_sparc_64bit_p): Likewise.
2833 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2834 bfd_mach_sparc_v8plusm8.
2835 * bfd-in2.h: Regenerated.
2836 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2838 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2839 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2840 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2842 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2843 bfd_mach_sparc_v8plusm8.
2845 2017-05-19 Alan Modra <amodra@gmail.com>
2847 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2848 debug and special sections when no non-note alloc sections in an
2851 2017-05-18 Alan Modra <amodra@gmail.com>
2853 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2854 * elf-m10300.c: Likewise.
2856 * elf32-arc.c: Likewise.
2857 * elf32-bfin.c: Likewise.
2858 * elf32-m68k.c: Likewise.
2859 * elf32-nds32.c: Likewise.
2860 * elf32-tilepro.c: Likewise.
2861 * elflink.c: Likewise.
2862 * elfnn-aarch64.c: Likewise.
2863 * elfnn-riscv.c: Likewise.
2864 * elfxx-tilegx.c: Likewise.
2865 * mach-o.c: Likewise.
2866 * peXXigen.c: Likewise.
2867 * vms-alpha.c: Likewise.
2868 * vms-lib.c: Likewise.
2870 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2873 * elflink.c (elf_gc_mark_debug_section): New function.
2874 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2875 referenced by kept debug sections.
2877 2017-05-16 Alan Modra <amodra@gmail.com>
2879 * elf-m10300.c: Rename occurrences of non_ir_ref.
2880 * elf32-arm.c: Likewise.
2881 * elf32-bfin.c: Likewise.
2882 * elf32-cr16.c: Likewise.
2883 * elf32-cris.c: Likewise.
2884 * elf32-d10v.c: Likewise.
2885 * elf32-dlx.c: Likewise.
2886 * elf32-fr30.c: Likewise.
2887 * elf32-frv.c: Likewise.
2888 * elf32-hppa.c: Likewise.
2889 * elf32-i370.c: Likewise.
2890 * elf32-i386.c: Likewise.
2891 * elf32-iq2000.c: Likewise.
2892 * elf32-lm32.c: Likewise.
2893 * elf32-m32c.c: Likewise.
2894 * elf32-m32r.c: Likewise.
2895 * elf32-m68hc1x.c: Likewise.
2896 * elf32-m68k.c: Likewise.
2897 * elf32-mcore.c: Likewise.
2898 * elf32-metag.c: Likewise.
2899 * elf32-microblaze.c: Likewise.
2900 * elf32-moxie.c: Likewise.
2901 * elf32-msp430.c: Likewise.
2902 * elf32-mt.c: Likewise.
2903 * elf32-nios2.c: Likewise.
2904 * elf32-or1k.c: Likewise.
2905 * elf32-ppc.c: Likewise.
2906 * elf32-rl78.c: Likewise.
2907 * elf32-s390.c: Likewise.
2908 * elf32-score.c: Likewise.
2909 * elf32-score7.c: Likewise.
2910 * elf32-sh.c: Likewise.
2911 * elf32-tic6x.c: Likewise.
2912 * elf32-tilepro.c: Likewise.
2913 * elf32-v850.c: Likewise.
2914 * elf32-vax.c: Likewise.
2915 * elf32-xstormy16.c: Likewise.
2916 * elf32-xtensa.c: Likewise.
2917 * elf64-alpha.c: Likewise.
2918 * elf64-hppa.c: Likewise.
2919 * elf64-ia64-vms.c: Likewise.
2920 * elf64-mmix.c: Likewise.
2921 * elf64-ppc.c: Likewise.
2922 * elf64-s390.c: Likewise.
2923 * elf64-sh64.c: Likewise.
2924 * elf64-x86-64.c: Likewise.
2925 * elflink.c: Likewise.
2926 * elfnn-aarch64.c: Likewise.
2927 * elfnn-ia64.c: Likewise.
2928 * elfnn-riscv.c: Likewise.
2929 * elfxx-mips.c: Likewise.
2930 * elfxx-sparc.c: Likewise.
2931 * elfxx-tilegx.c: Likewise.
2932 * linker.c: Likewise.
2934 2017-05-16 Alan Modra <amodra@gmail.com>
2936 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2937 * elflink.c (elf_link_add_object_symbols): Update to use
2939 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2941 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2943 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2945 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2947 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2949 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2950 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2952 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2954 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2956 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2958 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2959 to plt_second/plt_second_eh_frame.
2960 (elf_x86_64_link_hash_newfunc): Updated.
2961 (elf_x86_64_allocate_dynrelocs): Likewise.
2962 (elf_x86_64_size_dynamic_sections): Likewise.
2963 (elf_x86_64_relocate_section): Likewise.
2964 (elf_x86_64_finish_dynamic_symbol): Likewise.
2965 (elf_x86_64_finish_dynamic_sections): Likewise.
2966 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2967 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2969 (elf_backend_setup_gnu_properties): Updated. Create the
2970 .plt.sec section instead of the .plt.sec section.
2972 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2974 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2975 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2976 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2978 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2980 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2981 (bfd_elf64_set_reloc): Define.
2982 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2984 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2986 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2987 (struct bfd_target): New field _bfd_set_reloc.
2988 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2989 * reloc.c (_bfd_generic_set_reloc): New function.
2990 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2991 * nlm-target.h (nlm_set_reloc): Likewise.
2992 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2993 * aout-tic30.c (MY_set_reloc): Likewise.
2994 * aout-target.h (MY_set_reloc): Likewise.
2995 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2996 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2997 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2998 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2999 * aout-adobe.c (aout_32_set_reloc): Likewise.
3000 * bout.c (b_out_set_reloc): Likewise.
3001 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3002 * i386os9k.c (aout_32_set_reloc): Likewise.
3003 * ieee.c (ieee_set_reloc): Likewise.
3004 * oasys.c (oasys_set_reloc): Likewise.
3005 * som.c (som_set_reloc): Likewise.
3006 * versados.c (versados_set_reloc): Likewise.
3007 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3008 _bfd_generic_set_reloc.
3009 (rs6000_xcoff64_aix_vec): LIkewise.
3010 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3011 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3012 * i386msdos.c (msdos_set_reloc): Define to
3013 _bfd_norelocs_set_reloc.
3014 * elfcode.h (elf_set_reloc): Define.
3015 * bfd-in2.h: Regenerated.
3017 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3020 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3021 for IFUNC function address.
3023 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3025 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3026 (CONFLICT_LIST): Likewise.
3027 (opcode/arc-attrs.h): Include.
3028 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3029 (arc_extract_features): New file.
3030 (arc_stralloc): Likewise.
3031 (arc_elf_merge_attributes): Likewise.
3032 (arc_elf_merge_private_bfd_data): Use object attributes.
3033 (bfd_arc_get_mach_from_attributes): New function.
3034 (arc_elf_object_p): Use object attributes.
3035 (arc_elf_final_write_processing): Likewise.
3036 (elf32_arc_obj_attrs_arg_type): New function.
3037 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3038 (elf32_arc_section_from_shdr): Likewise.
3039 (elf_backend_obj_attrs_vendor): Define.
3040 (elf_backend_obj_attrs_section): Likewise.
3041 (elf_backend_obj_attrs_arg_type): Likewise.
3042 (elf_backend_obj_attrs_section_type): Likewise.
3043 (elf_backend_obj_attrs_handle_unknown): Likewise.
3044 (elf_backend_section_from_shdr): Likewise.
3046 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3049 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3050 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3051 and the destination is a Thumb symbol.
3053 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3055 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3056 initializer to silence GCC 4.2.
3057 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3059 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3061 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3062 (LAZY_PLT_ENTRY_SIZE): This.
3063 (NON_LAZY_PLT_ENTRY_SIZE): New.
3064 (elf_x86_64_plt0_entry): Renamed to ...
3065 (elf_x86_64_lazy_plt0_entry): This.
3066 (elf_x86_64_plt_entry): Renamed to ...
3067 (elf_x86_64_lazy_plt_entry): This.
3068 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3069 (elf_x86_64_lazy_bnd_plt0_entry): This.
3070 (elf_x86_64_legacy_plt_entry): Removed.
3071 (elf_x86_64_bnd_plt_entry): Renamed to ...
3072 (elf_x86_64_lazy_bnd_plt_entry): This.
3073 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3074 (elf_x86_64_non_lazy_plt_entry): This.
3075 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3076 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3077 (elf_x86_64_eh_frame_plt): Renamed to ...
3078 (elf_x86_64_eh_frame_lazy_plt): This.
3079 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3080 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3081 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3082 (elf_x86_64_eh_frame_non_lazy_plt): This.
3083 (elf_x86_64_lazy_plt_layout): New.
3084 (elf_x86_64_non_lazy_plt_layout): Likewise.
3085 (elf_x86_64_plt_layout): Likewise.
3086 (elf_x86_64_backend_data): Remove PLT layout information. Add
3087 os for target system.
3088 (GET_PLT_ENTRY_SIZE): Removed.
3089 (elf_x86_64_lazy_plt): New.
3090 (elf_x86_64_non_lazy_plt): Likewise.
3091 (elf_x86_64_lazy_bnd_plt): Likewise.
3092 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3093 (elf_x86-64_arch_bed): Updated.
3094 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3095 (elf_x86_64_create_dynamic_sections): Removed.
3096 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3097 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3098 (elf_x86-64_adjust_dynamic_symbol): Updated.
3099 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3100 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3101 size for PLT0 if there is no PLT0. Get plt_entry_size from
3102 non_lazy_plt for non-lazy PLT entries.
3103 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3104 from non_lazy_plt for non-lazy PLT entries.
3105 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3106 if there is no PLT0.
3107 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3108 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3109 entries with non-lazy PLT layout. Don't fill the second and third
3110 slots in the PLT entry if there is no PLT0.
3111 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3112 if there is no PLT0. Set sh_entsize on the .plt.got section.
3113 (compare_relocs): New.
3114 (elf_x86_64_plt_type): Likewise.
3115 (elf_x86_64_plt): Likewise.
3116 (elf_x86_64_nacl_plt): New. Forward declaration.
3117 (elf_x86_64_get_plt_sym_val): Removed.
3118 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3119 against all dynamic relocations.
3120 (elf_x86_64_link_setup_gnu_properties): New function.
3121 (elf_backend_create_dynamic_sections): Updated.
3122 (elf_backend_setup_gnu_properties): New.
3123 (elf_x86_64_nacl_plt): New.
3124 (elf_x86_64_nacl_arch_bed): Updated.
3126 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3128 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3129 (LAZY_PLT_ENTRY_SIZE): This.
3130 (NON_LAZY_PLT_ENTRY_SIZE): New.
3131 (elf_i386_plt0_entry): Renamed to ...
3132 (elf_i386_lazy_plt0_entry): This.
3133 (elf_i386_plt_entry): Renamed to ...
3134 (elf_i386_lazy_plt_entry): This.
3135 (elf_i386_pic_plt0_entry): Renamed to ...
3136 (elf_i386_pic_lazy_plt0_entry): This.
3137 (elf_i386_pic_plt_entry): Renamed to ...
3138 (elf_i386_pic_lazy_plt_entry): This.
3139 (elf_i386_got_plt_entry): Renamed to ...
3140 (elf_i386_non_lazy_plt_entry): This.
3141 (elf_i386_pic_got_plt_entry): Renamed to ...
3142 (elf_i386_pic_non_lazy_plt_entry): This.
3143 (elf_i386_eh_frame_plt): Renamed to ...
3144 (elf_i386_eh_frame_lazy_plt): This.
3145 (elf_i386_eh_frame_plt_got): Renamed to ...
3146 (elf_i386_eh_frame_non_lazy_plt): This.
3147 (elf_i386_plt_layout): Renamed to ...
3148 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3149 eh_frame_plt_got_size.
3150 (elf_i386_non_lazy_plt_layout): New.
3151 (elf_i386_plt_layout): Likewise.
3152 (elf_i386_non_lazy_plt): Likewise.
3153 (GET_PLT_ENTRY_SIZE): Removed.
3154 (elf_i386_plt): Renamed to ...
3155 (elf_i386_lazy_plt): This.
3156 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3157 (elf_i386_arch_bed): Updated.
3158 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3159 (elf_i386_create_dynamic_sections): Removed.
3160 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3161 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3162 (elf_i386_adjust_dynamic_symbol): Updated.
3163 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3164 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3165 size for PLT0 if there is no PLT0.
3166 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3167 output section is discarded only if GOT isn't empty.
3168 (elf_i386_relocate_section): Updated. Properly get PLT index
3169 if there is no PLT0.
3170 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3171 second and third slots in the PLT entry if there is no PLT0.
3172 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3173 if there is no PLT0. Set sh_entsize on the .plt.got section.
3174 (elf_i386_nacl_plt): Forward declaration.
3175 (elf_i386_get_plt_sym_val): Removed.
3176 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3177 against all dynamic relocations.
3178 (elf_i386_link_setup_gnu_properties): New function.
3179 (elf_backend_create_dynamic_sections): Updated.
3180 (elf_backend_setup_gnu_properties): New.
3181 (elf_i386_nacl_plt): Updated.
3182 (elf_i386_nacl_arch_bed): Likewise.
3183 (elf_i386_vxworks_arch_bed): Likewise.
3185 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3187 * elflink.c (elf_output_implib): Remove executable flag from import
3189 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3190 library is a relocatable object file.
3192 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3195 * elf32-avr.c (avr_should_move_sym): New function.
3196 (avr_should_reduce_sym_size): Likewise.
3197 (avr_should_increase_sym_size): Likewise.
3198 (elf32_avr_relax_delete_bytes): Adjust symbol values
3199 and sizes by calling new functions.
3201 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3203 * config.bfd (riscv32-*): Enable rv64.
3205 2017-05-02 Alan Modra <amodra@gmail.com>
3208 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3209 rather than h->root.type == bfd_link_hash_new.
3210 (bfd_elf_record_link_assignment): Similarly, call
3211 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3213 2017-04-29 Alan Modra <amodra@gmail.com>
3216 * reloc.c (reloc_offset_in_range): New function.
3217 (bfd_perform_relocation, bfd_install_relocation): Use it.
3218 (_bfd_final_link_relocate): Likewise.
3220 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3222 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3223 before using .plt.got.
3224 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3226 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3228 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3229 instead of "+=" to update 0.
3231 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3233 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3234 .plt.got section here.
3235 (elf_i386_check_relocs): Don't create the .plt.got section.
3236 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3237 the .plt.got and .plt.bnd sections here.
3238 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3241 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3243 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3245 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3246 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3247 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3248 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3251 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3253 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3255 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3256 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3257 the first relocatable ELF input with GNU properties.
3259 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3261 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3262 VxWorks for non-PIC.
3264 2017-04-27 Alan Modra <amodra@gmail.com>
3266 * elf-bfd.h (struct elf_backend_data): Make asection param of
3267 elf_backend_eh_frame_address_size const.
3268 (_bfd_elf_eh_frame_address_size): Likewise.
3269 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3270 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3271 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3272 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3273 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3274 (next_cie_fde_offset): Constify params.
3275 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3277 2017-04-27 Alan Modra <amodra@gmail.com>
3279 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3280 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3281 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3283 (offset_adjust): New function.
3284 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3285 (adjust_eh_frame_local_symbols): Likewise.
3286 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3287 after changing anything. Return true if anything changed.
3288 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3289 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3291 2017-04-27 Alan Modra <amodra@gmail.com>
3293 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3296 2017-04-27 Alan Modra <amodra@gmail.com>
3298 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3299 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3300 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3301 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3302 for undef and undefweak dyn_relocs.
3303 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3304 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3305 (allocate_got, allocate_dynrelocs): Likewise.
3306 (ppc64_elf_relocate_section): Likewise.
3308 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3310 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3311 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3312 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3313 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3315 2017-04-26 Nick Clifton <nickc@redhat.com>
3318 * reloc.c (bfd_perform_relocation): Check for a negative address
3321 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3324 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3326 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3327 (elf_backend_always_renumber_dynsyms): Define.
3328 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3329 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3330 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3331 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3333 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3335 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3337 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3338 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3339 sections have been created.
3341 2017-04-26 Nick Clifton <nickc@redhat.com>
3344 * compress.c (bfd_init_section_compress_status): Check the return
3345 value from bfd_malloc.
3347 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3349 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3350 no_finish_dynamic_symbol.
3351 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3353 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3354 weak symbol, don't make it dynamic.
3355 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3356 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3357 relocation for GOT reference.
3358 (elf_x86_64_finish_dynamic_symbol): Abort if
3359 no_finish_dynamic_symbol isn't 0.
3361 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3364 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3365 undefined weak symbol, don't make it dynamic.
3366 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3367 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3368 relocation for R_386_GOT32.
3370 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3373 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3375 2017-04-23 Alan Modra <amodra@gmail.com>
3378 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3379 * elf.c (lcomm_sym): New.
3380 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3381 * bfd-in2.h: Regenerate.
3383 2017-04-23 Alan Modra <amodra@gmail.com>
3386 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3387 parameters and comment.
3388 (_bfd_elf_get_reloc_section): Delete.
3389 (_bfd_elf_plt_get_reloc_section): Declare.
3390 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3391 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3393 (_bfd_elf_get_reloc_section): ..here. Delete.
3394 (assign_section_numbers): Call elf_get_reloc_section.
3395 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3396 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3398 2017-04-23 Alan Modra <amodra@gmail.com>
3401 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3404 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3407 * elf32-i386.c (elf_i386_link_hash_entry): Add
3408 no_finish_dynamic_symbol.
3409 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3410 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3411 symbol, don't make it dynamic in PIE.
3412 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3413 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3414 relocation for R_386_GOT32
3415 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3418 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3422 * elflink.c (elf_link_add_object_symbols): Require
3423 --no-dynamic-linker with -E/--dynamic-list when creating
3426 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3428 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3431 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3433 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3434 dynamic symbol sorting.
3436 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3439 * elflink.c (elf_link_add_object_symbols): Preserve
3440 dynamic_ref_after_ir_def when restoring the symbol table for
3441 unneeded dynamic object.
3443 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3446 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3447 on on undefined IFUNC symbol in the second PLT.
3449 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3451 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3453 2017-04-19 Alan Modra <amodra@gmail.com>
3455 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3456 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3457 * elf32-ppc.c:Formatting.
3458 (ensure_undefweak_dynamic): Don't make dynamic when
3459 info->dynamic_undefined_weak is zero.
3460 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3461 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3462 not default visibility. Discard undef and undefweak
3464 (ppc_elf_relocate_section): Adjust to suit.
3465 * elf64-ppc.c: Formatting.
3466 (ensure_undefweak_dynamic): Don't make dynamic when
3467 info->dynamic_undefined_weak is zero.
3468 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3469 info->dynamic_undefined_weak. Discard them earlier.
3471 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3474 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3475 before generating the version definition section.
3477 2017-04-17 Alan Modra <amodra@gmail.com>
3479 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3480 state when a regular object file defines a symbol with
3481 incompatible type to that defined by an earlier shared lib.
3483 2017-04-13 Alan Modra <amodra@gmail.com>
3485 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3487 * elf32-arm.c: Likewise.
3488 * elf32-i386.c: Likewise.
3489 * elf32-mep.c: Likewise.
3490 * elf64-ia64-vms.c: Likewise.
3491 * elf64-x86-64.c: Likewise.
3492 * elflink.c: Likewise.
3493 * elfnn-ia64.c: Likewise.
3494 * elfxx-mips.c: Likewise.
3496 2017-04-13 Alan Modra <amodra@gmail.com>
3498 * aoutx.h: Use %B and %A in error messages throughout file.
3499 * aout-cris.c: Likewise.
3500 * archive.c: Likewise.
3501 * binary.c: Likewise.
3502 * coff-rs6000.c: Likewise.
3503 * coff-tic4x.c: Likewise.
3504 * coffcode.h: Likewise.
3505 * coffgen.c: Likewise.
3506 * cofflink.c: Likewise.
3507 * coffswap.h: Likewise.
3508 * cpu-arm.c: Likewise.
3509 * elf-eh-frame.c: Likewise.
3510 * elf-m10300.c: Likewise.
3512 * elf32-arc.c: Likewise.
3513 * elf32-arm.c: Likewise.
3514 * elf32-bfin.c: Likewise.
3515 * elf32-frv.c: Likewise.
3516 * elf32-iq2000.c: Likewise.
3517 * elf32-m32c.c: Likewise.
3518 * elf32-microblaze.c: Likewise.
3519 * elf32-nds32.c: Likewise.
3520 * elf32-rl78.c: Likewise.
3521 * elf32-rx.c: Likewise.
3522 * elf32-score.c: Likewise.
3523 * elf32-score7.c: Likewise.
3524 * elf32-sh64.c: Likewise.
3525 * elf32-v850.c: Likewise.
3526 * elf32-vax.c: Likewise.
3527 * elf32-visium.c: Likewise.
3528 * elf64-ia64-vms.c: Likewise.
3529 * elf64-mmix.c: Likewise.
3530 * elf64-sh64.c: Likewise.
3531 * elfcode.h: Likewise.
3532 * elfnn-aarch64.c: Likewise.
3533 * elfnn-ia64.c: Likewise.
3534 * elfxx-mips.c: Likewise.
3535 * hpux-core.c: Likewise.
3538 * linker.c: Likewise.
3539 * merge.c: Likewise.
3541 * oasys.c: Likewise.
3542 * pdp11.c: Likewise.
3543 * peXXigen.c: Likewise.
3544 * rs6000-core.c: Likewise.
3545 * vms-alpha.c: Likewise.
3546 * xcofflink.c: Likewise.
3548 2017-04-13 Alan Modra <amodra@gmail.com>
3550 * bfd.c (PRINT_TYPE): Define.
3551 (_doprnt): New function.
3552 (error_handler_internal): Use _doprnt.
3553 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3554 calls in their natural order, throughout file.
3555 * coff-mcore.c: Likewise.
3556 * coff-ppc.c: Likewise.
3557 * coff-tic80.c: Likewise.
3558 * cofflink.c: Likewise.
3559 * elf-s390-common.c: Likewise.
3561 * elf32-arm.c: Likewise.
3562 * elf32-i386.c: Likewise.
3563 * elf32-m32r.c: Likewise.
3564 * elf32-msp430.c: Likewise.
3565 * elf32-spu.c: Likewise.
3566 * elf64-ia64-vms.c: Likewise.
3567 * elf64-sparc.c: Likewise.
3568 * elf64-x86-64.c: Likewise.
3569 * elflink.c: Likewise.
3570 * elfnn-aarch64.c: Likewise.
3571 * elfnn-ia64.c: Likewise.
3572 * elfxx-mips.c: Likewise.
3574 2017-04-13 Alan Modra <amodra@gmail.com>
3576 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3577 branch veneers" error. Fix double space and format message.
3578 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3579 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3581 2017-04-13 Alan Modra <amodra@gmail.com>
3583 * bfd-in2.h: Regenerate.
3585 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3587 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3588 extra `\n' in warning/error messages.
3589 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3590 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3592 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3594 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3595 processor-specific properties with generic ELF target vector.
3597 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3599 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3600 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3601 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3602 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3604 (link_hash_newfunc): Initialize has_got_reloc and
3606 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3608 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3610 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3612 (_bfd_sparc_elf_fixup_symbol): New function.
3613 (allocate_dynrelocs): Don't allocate space for dynamic
3614 relocations and discard relocations against resolved undefined
3615 weak symbols in executable. Don't make resolved undefined weak
3616 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3617 relocation against undefined weak symbols in PIE.
3618 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3619 relocations against resolved undefined weak symbols in PIE
3620 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3621 without ynamic PLT/GOT relocations for resolved undefined weak
3623 Don't generate dynamic relocation against resolved undefined
3624 weak symbol in executable.
3625 (pie_finish_undefweak_symbol): New function.
3626 (_bfd_sparc_elf_finish_dynamic_sections): Call
3627 pie_finish_undefweak_symbol on all symbols in PIE.
3628 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3629 (_bfd_sparc_elf_fixup_symbol): New function.
3631 2017-04-10 Nick Clifton <nickc@redhat.com>
3633 * config.bfd: Remove ns32k from obsolete list.
3635 2017-04-10 Alan Modra <amodra@gmail.com>
3638 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3639 (special_sections_i): Likewise for .init_array.
3640 (special_sections_p): Likewise for .preinit_array.
3642 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3646 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3647 ELF_COMMON_DEF_P for common symbols.
3648 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3649 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3650 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3651 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3652 07492f668d2173da7a2bda3707ff0985e0f460b6.
3654 2017-04-07 Pedro Alves <palves@redhat.com>
3656 * opncls.c (bfd_get_debug_link_info): Rename to...
3657 (bfd_get_debug_link_info_1): ... this. Change type of second
3658 parameter to void pointer. Adjust.
3659 (bfd_get_debug_link_info): Reimplement on top of
3660 bfd_get_debug_link_info_1.
3661 (separate_debug_file_exists, separate_alt_debug_file_exists):
3662 Change type of second parameter to void pointer. Adjust.
3663 (get_func_type, check_func_type): Change type of second parameter
3665 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3666 the callback functions instead of passing the address of a local.
3667 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3668 find_separate_debug_file.
3669 (get_alt_debug_link_info_shim): Change type of second parameter to
3670 void pointer. Adjust.
3671 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3672 find_separate_debug_file.
3673 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3674 of second parameter to void pointer. Adjust.
3675 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3676 pointer local to find_separate_debug_file.
3678 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3680 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3681 external symbols with a definition.
3682 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3684 2017-04-07 Alan Modra <amodra@gmail.com>
3686 * po/SRC-POTFILES.in: Regenerate.
3688 2017-04-05 Alan Modra <amodra@gmail.com>
3690 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3693 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3695 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3696 numbers for DataDirectory entry indicies passed to
3699 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3701 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3702 each GNU_MBIND section and align GNU_MBIND section to page size.
3703 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3704 segment for each GNU_MBIND section.
3705 (_bfd_elf_init_private_section_data): Copy sh_info from input
3706 for GNU_MBIND section.
3708 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3710 * elfnn-riscv.c (GP_NAME): Delete.
3711 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3712 (_bfd_riscv_relax_lui): Likewise.
3714 2017-04-04 Nick Clifton <nickc@redhat.com>
3717 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3719 (bfd_elf_final_link): Only initialize the extended symbol index
3720 section if there are extended symbol tables to list.
3722 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3724 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3725 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3726 * configure.ac (elf): Add elf-properties.lo.
3727 * Makefile.in: Regenerated.
3728 * configure: Likewise.
3729 * elf-bfd.h (elf_property_kind): New.
3730 (elf_property): Likewise.
3731 (elf_property_list): Likewise.
3732 (elf_properties): Likewise.
3733 (_bfd_elf_parse_gnu_properties): Likewise.
3734 (_bfd_elf_get_property): Likewise.
3735 (_bfd_elf_link_setup_gnu_properties): Likewise.
3736 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3737 and setup_gnu_properties.
3738 (elf_obj_tdata): Add properties.
3739 * elf-properties.c: New file.
3740 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3741 (elf_i386_merge_gnu_properties): Likewise.
3742 (elf_backend_parse_gnu_properties): Likewise.
3743 (elf_backend_merge_gnu_properties): Likewise.
3744 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3745 (elf_x86_64_merge_gnu_properties): Likewise.
3746 (elf_backend_parse_gnu_properties): Likewise.
3747 (elf_backend_merge_gnu_properties): Likewise.
3748 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3749 (elf_backend_parse_gnu_properties): Likewise.
3750 (elf_backend_setup_gnu_properties): Likewise.
3751 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3752 elf_backend_merge_gnu_properties and
3753 elf_backend_setup_gnu_properties.
3755 2017-03-30 Pip Cet <pipcet@gmail.com>
3757 * elf32-wasm32.c: Add relocation code, two relocs.
3758 * reloc.c: Add wasm32 relocations.
3759 * libbfd.h: Regenerate.
3760 * bfd-in2.h: Regenerate.
3761 * bfd/po/bfd.pot: Regenerate.
3763 2017-03-29 Nick Clifton <nickc@redhat.com>
3766 * coff-bfd.h (struct coff_section_data): Add new fields:
3767 saved_bias and bias.
3768 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3769 computed for PE binaries.
3770 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3773 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3776 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3777 to handle a local symbol with a hash-symbol-entry; without PLT.
3778 Add BFD_ASSERT for an incidental case with GOT entry present.
3779 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3780 isn't forced-or-set local.
3782 2017-03-27 Pip Cet <pipcet@gmail.com>
3784 * wasm-module.c: New file to support WebAssembly modules.
3785 * wasm-module.h: New file to support WebAssembly modules.
3786 * doc/webassembly.texi: Start documenting wasm-module.c.
3787 * config.bfd: Add wasm_vec.
3788 * targets.c: Likewise.
3789 * configure.ac: Likewise.
3790 * Makefile.am: Add entries for wasm-module.c.
3791 * Makefile.in: Regenerate.
3792 * configure: Regenerate.
3793 * po/SRC-POTFILES.in: Regenerate.
3795 2017-03-27 Pip Cet <pipcet@gmail.com>
3797 * cpu-wasm32.c: New file to support wasm32 architecture.
3798 * elf32-wasm32.c: New file to support wasm32 architecture.
3799 * Makefile.am: Add wasm32 architecture.
3800 * archures.c: Likewise.
3801 * config.bfd: Likewise.
3802 * configure.ac: Likewise.
3803 * targets.c: Likewise.
3804 * Makefile.in: Regenerate.
3805 * bfd-in2.h: Regenerate.
3806 * configure: Regenerate.
3807 * po/SRC-POTFILES.in: Regenerate.
3809 2017-03-20 Alan Modra <amodra@gmail.com>
3812 * elf64-ppc.c (compare_symbols): Stabilize sort.
3814 2017-03-18 Alan Modra <amodra@gmail.com>
3816 * elf64-ppc.c (struct ppc_link_hash_table): Add
3817 local_ifunc_resolver and maybe_local_ifunc_resolver.
3818 (ppc_build_one_stub): Set flags on emitting dynamic
3819 relocation to ifunc.
3820 (ppc64_elf_relocate_section): Likewise.
3821 (ppc64_elf_finish_dynamic_symbol): Likewise.
3822 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3823 local dynamic relocs to ifuncs.
3824 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3825 local_ifunc_resolver and maybe_local_ifunc_resolver.
3826 (ppc_elf_relocate_section): Set flag on emitting dynamic
3827 relocation to ifuncs.
3828 (ppc_elf_finish_dynamic_symbol): Likewise.
3829 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3830 dynamic relocs to ifuncs.
3832 2017-03-13 Nick Clifton <nickc@redhat.com>
3835 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3836 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3837 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3838 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3839 * bfd-in2.h: Regenerate.
3840 * libbfd.h: Regenerate.
3841 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3843 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3844 (elfNN_aarch64_howto_table): Likewise.
3845 (aarch64_tls_transition_without_check): Likewise.
3846 (aarch64_reloc_got_type): Likewise.
3847 (elfNN_aarch64_final_link_relocate): Likewise.
3848 (elfNN_aarch64_tls_relax): Likewise.
3849 (elfNN_aarch64_relocate_section): Likewise.
3850 (elfNN_aarch64_gc_sweep_hook): Likewise.
3851 (elfNN_aarch64_check_relocs): Likewise.
3852 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3853 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3855 2017-03-11 Alan Modra <amodra@gmail.com>
3857 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3858 parameter is in fact used. Whitespace fixes.
3859 * elf64-ppc.c: Likewise.
3861 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3863 * rs6000-core.c (CORE_NEW): Simplify macro when
3864 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3866 2017-03-07 Alan Modra <amodra@gmail.com>
3870 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3873 2017-03-05 Alan Modra <amodra@gmail.com>
3875 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3876 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3877 (next_cie_fde_offset): New function.
3878 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3879 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3880 four bytes. Align CIEs to four or eight bytes depending on
3881 per_encoding_aligned8. Align FDEs according to their encoding.
3882 Pad last FDE to output section alignment.
3883 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3885 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3886 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3887 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3889 2017-03-02 Martin Bickel <binutils@ineranves.de>
3892 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3893 empty segments which have a zero filesz, but a non-zero memsz.
3895 2017-03-02 Alan Modra <amodra@gmail.com>
3897 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3899 2017-02-28 Alan Modra <amodra@gmail.com>
3901 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3902 (ppc64_elf_relocate_section): Likewise.
3904 2017-02-28 Alan Modra <amodra@gmail.com>
3907 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3908 rather than elf32_nios2_hash_table or elf_hash_table.
3909 (create_got_section): Likewise.
3910 (nios2_elf32_finish_dynamic_symbol): Likewise.
3911 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3912 (nios2_elf32_size_dynamic_sections): Likewise.
3913 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3914 vars. Use htab equivalents directly instead. Don't create
3915 all dynamic sections on needing just the GOT. Use a goto
3916 rather than a fall-through with reloc test. Ensure
3917 htab->dynobj is set when making dynamic sreloc section.
3918 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3919 equivalent directly instead. Don't segfault on looking for
3920 .dynamic when dynamic sections have not been created. Don't
3921 segfault on .got.plt being discarded.
3922 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3923 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3924 fixme and another not so relevant comment.
3925 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3926 already set, set hash table dynobj on creating .sbss.
3928 2017-02-28 Alan Modra <amodra@gmail.com>
3930 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3931 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3932 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3933 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3934 (ppc64_elf_relocate_section): Likewise.
3935 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3936 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3937 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3938 * libbfd.h: Regenerate.
3939 * bfd-in2.h: Regenerate.
3941 2017-02-28 Alan Modra <amodra@gmail.com>
3943 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3944 dynamic .data.rel.ro read-only.
3945 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3946 rather than section flags when deciding where copy reloc goes.
3947 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3948 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3949 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3950 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3951 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3952 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3953 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3954 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3955 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3956 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3957 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3958 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3959 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3960 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3961 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3962 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3963 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3964 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3965 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3967 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3969 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3970 `jalr $0, $25' instruction encoding.
3972 2017-02-27 Nick Clifton <nickc@redhat.com>
3975 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3976 generating a seg-fault when encountering a symbol that has been
3977 deleted by garbage collection.
3979 2017-02-25 Alan Modra <amodra@gmail.com>
3981 * elf32-arc.c (struct dynamic_sections): Delete.
3982 (enum dyn_section_types): Delete.
3983 (dyn_section_names): Delete.
3984 (arc_create_dynamic_sections): Delete.
3985 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3986 segfault on discarded .rela.plt section.
3987 (elf_arc_size_dynamic_sections): Formatting. Don't call
3988 arc_create_dynamic_sections. Don't allocate memory for sections
3989 handled by the generic linker. Correct code finding relocs in
3990 read-only sections. Set SEC_EXCLUDE on zero size .got,
3991 .got.plt, and .dynbss sections. Do set .interp for pies.
3993 2017-02-24 Andrew Waterman <andrew@sifive.com>
3995 * elfnn-riscv.c (GP_NAME): New macro.
3996 (riscv_global_pointer_value): Use it.
3997 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3998 output section, consider only that section's alignment.
4000 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4002 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4003 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4004 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4005 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4007 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4009 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4010 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4013 2017-02-23 Alan Modra <amodra@gmail.com>
4016 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4018 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4019 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4022 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4025 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4026 processing ahead of the call to `elf_gc_sweep_symbol'.
4028 2017-02-22 Nick Clifton <nickc@redhat.com>
4031 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4032 created section 4-byte alignment.
4034 2017-02-22 Alan Modra <amodra@gmail.com>
4036 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4037 on .got or .plt output section being discarded by script.
4038 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4041 2017-02-21 Alan Modra <amodra@gmail.com>
4043 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4044 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4046 2017-02-20 Alan Modra <amodra@gmail.com>
4049 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4050 if DT_RELSZ/DT_RELASZ is zero.
4052 2017-02-17 Nick Clifton <nickc@redhat.com>
4054 * compress.c (bfd_get_full_section_contents): Remember to reduce
4055 compressed size by the sizeof the compression header when
4056 decompressing the contents.
4058 2017-02-17 Pedro Alves <palves@redhat.com>
4060 * srec.c (Chunk): Rename to ...
4061 (_bfd_srec_len): ... this.
4062 (S3Forced): Rename to ...
4063 (_bfd_srec_forceS3): ... this.
4064 * objcopy.c: Adjust all references.
4066 2017-02-17 Pedro Alves <palves@redhat.com>
4068 * archive.c (bsd_write_armap): Rename to ...
4069 (_bfd_bsd_write_armap): ... this.
4070 (coff_write_armap): Rename to ...
4071 (_bfd_coff_write_armap): ... this.
4072 * libbfd-in.h (bsd_write_armap): Rename to ...
4073 (_bfd_bsd_write_armap): ... this.
4074 (coff_write_armap): Rename to ...
4075 (_bfd_coff_write_armap): ... this.
4076 * aout-target.h, aout-tic30.c: Adjust all users.
4077 * libbfd.h: Regenerate.
4079 2017-02-17 Pedro Alves <palves@redhat.com>
4081 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4082 (warn_deprecated): Rename to ...
4083 (_bfd_warn_deprecated): ... this.
4084 * libbfd.c (warn_deprecated): Rename to ...
4085 (_bfd_warn_deprecated): ... this.
4086 * bfd-in2.h: Regenerate.
4088 2017-02-17 Pedro Alves <palves@redhat.com>
4090 * bfdio.c (real_ftell): Rename to ...
4091 (_bfd_real_ftell): ... this.
4092 (real_fseek): Rename to ...
4093 (_bfd_real_fseek): ... this.
4094 (real_fopen): Rename to ...
4095 (_bfd_real_fopen): ... this.
4096 * libbfd-in.h (real_ftell): Rename to ...
4097 (_bfd_real_ftell): ... this.
4098 (real_fseek): Rename to ...
4099 (_bfd_real_fseek): ... this.
4100 (real_fopen): Rename to ...
4101 (_bfd_real_fopen): ... this.
4102 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4103 * libbfd.h: Regenerate.
4105 2017-02-17 Pedro Alves <palves@redhat.com>
4107 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4108 * libbfd.c (read_unsigned_leb128): Rename to ...
4109 (_bfd_read_unsigned_leb128): ... this.
4110 (read_signed_leb128): Rename to ...
4111 (_bfd_read_signed_leb128): ... this.
4112 (safe_read_leb128): Rename to ...
4113 (_bfd_safe_read_leb128): ... this.
4114 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4115 (_bfd_read_unsigned_leb128): ... this.
4116 (read_signed_leb128): Rename to ...
4117 (_bfd_read_signed_leb128): ... this.
4118 (safe_read_leb128): Rename to ...
4119 (_bfd_safe_read_leb128): ... this.
4120 * libbfd.h: Renegerate.
4122 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4124 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4125 before trying to fine matching file and line information.
4127 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4129 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4130 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4131 not match current bfd, then reload debug information. Record bfd
4132 we're loading debug info for in the stash. If we have debug
4133 informatin in the cache then perform section placement before
4136 2017-02-16 Alan Modra <amodra@gmail.com>
4139 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4140 * elfxx-target.h (elf_backend_no_page_alias): Define.
4141 (elfNN_bed): Init new field.
4142 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4143 ensure PT_LOAD segment starts on a new page.
4144 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4146 2017-02-16 Alan Modra <amodra@gmail.com>
4149 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4152 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4154 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4155 * bfd-in2.h: Regenerated.
4157 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4160 * elf32-i386.c (elf_i386_relocate_section): Allow
4161 "lea foo@GOT, %reg" in PIC.
4163 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4166 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4167 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4168 error against local IFUNC symbol without a base register for
4171 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4173 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4174 `%P: %H:' with `info->callbacks->einfo'.
4175 (ppc_elf_relocate_section): Likewise.
4176 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4177 (ppc64_elf_edit_toc): Likewise.
4178 (ppc64_elf_relocate_section): Likewise.
4180 2017-02-14 Alan Modra <amodra@gmail.com>
4182 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4183 --gc-keep-exported, and test versioned field of sym rather than
4184 looking for @ in name.
4186 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4188 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4191 2017-02-13 Nick Clifton <nickc@redhat.com>
4194 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4197 2017-02-07 Andrew Waterman <andrew@sifive.com>
4199 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4200 entry size if PLT header is written.
4202 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4204 Fix sparc64 dynamic relocation processing to use the dynamic
4206 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4207 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4210 2017-02-03 Nick Clifton <nickc@redhat.com>
4213 * coffcode.h (coff_write_object_contents): Enlarge size of
4214 s_name_buf in order to avoid compile time warning about possible
4216 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4217 32-bits of insn value before printing into buffer.
4219 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4221 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4222 `max_local_dynindx'.
4223 (mips_elf_sort_hash_table): Handle it.
4224 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4225 symbols bump up `max_local_dynindx' rather than
4226 `max_non_got_dynindx'.
4228 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4230 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4231 `min_got_dynindx', `max_unref_got_dynindx' and
4232 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4233 (mips_elf_sort_hash_table): Adjust accordingly.
4235 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4237 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4238 to access the hash table.
4240 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4242 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4243 non-NULL `htab' to the beginning.
4245 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4247 * elflink.c (elf_gc_sweep): Wrap overlong line.
4249 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4251 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4252 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4253 * elfxx-mips.c (mips_elf_link_hash_table): Add
4254 `ignore_branch_isa' member.
4255 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4256 in branch relocation calculation as an error if
4257 `ignore_branch_isa' has been set.
4258 (_bfd_mips_elf_insn32): Rename to...
4259 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4260 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4261 Handle the new parameter.
4263 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4265 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4266 local variable dynobj.
4269 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4270 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4271 executable from read-only sections into sdynrelro.
4272 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4273 dynamic relocs in sdynrelro.
4274 (elf_backend_want_dynrelro): Define.
4276 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4278 * config.bfd (*-*-rtemsaout*): Mark as removed.
4280 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4282 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4283 (arm-*-rtems*): Move to (arm*-*-eabi*).
4284 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4285 (m68-*-rtems*): Move to (m68*-*-elf*).
4287 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4289 * config.bfd (*-*-rtemscoff*): Mark as removed.
4291 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4294 * elflink.c (bfd_elf_record_link_assignment): Revert last
4295 change and don't ever clear `forced_local'. Set `mark'
4297 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4299 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4300 (bfd_elf_size_dynamic_sections): ... here.
4301 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4302 and set `mark' instead in `__tls_get_addr_opt' processing.
4303 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4305 2017-01-24 Alan Modra <amodra@gmail.com>
4307 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4308 where dynamic relocs are preferable. Allow ifunc too.
4309 (ensure_undefweak_dynamic): New function.
4310 (allocate_dynrelocs): Use it here. Move plt handling last and
4311 don't make symbols dynamic, simplifying loop. Only make undef
4312 weak symbols with GOT entries dynamic. Correct condition
4313 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4314 comments. Remove goto.
4315 (ppc_elf_relocate_section): Correct test for using dynamic
4316 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4317 to suit. Set up explicit tls_index entries and implicit GOT
4318 tls_index entries resolvable at link time for
4319 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4320 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4321 (ensure_undefweak_dynamic): New function.
4322 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4323 with GOT entries dynamic. Remove unnecessary test of
4324 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4325 (ppc64_elf_relocate_section): Correct test for using dynamic
4326 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4327 to suit. Set up explicit tls_index entries and implicit GOT
4328 tls_index entries resolvable at link time for __tls_get_addr_opt.
4329 Simplify expression to clear mem for prelink.
4331 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4333 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4335 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4337 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4338 (elf_backend_hash_symbol): Define.
4340 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4343 * elflink.c (bfd_elf_record_link_assignment): Clear any
4344 `forced_local' marking for DSO symbols that are not being
4347 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4349 * elfnn-riscv.c (riscv_elf_object_p): New function.
4351 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4354 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4356 (elf_x86_64_check_relocs): Create .eh_frame section for the
4358 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4359 .eh_frame section for the .plt.bnd section.
4360 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4361 for the .plt.bnd section.
4363 2017-01-12 Nick Clifton <nickc@redhat.com>
4366 * opncls.c (find_separate_debug_file): Add include_dirs
4367 parameter. Only include the directory part of the bfd's filename
4368 in search paths if include_dirs is true. Add a couple of extra
4369 locations for looking for debug files.
4370 ( bfd_follow_gnu_debuglink): Update invocation of
4371 find_separate_debug_file.
4372 (bfd_follow_gnu_debugaltlink): Likewise.
4373 (get_build_id): New function: Finds the build-id of the given bfd.
4374 (get_build_id_name): New function: Computes the name of the
4375 separate debug info file for a bfd, based upon its build-id.
4376 (check_build_id_file): New function: Checks to see if a separate
4377 debug info file exists at the given location, and that its
4378 build-id matches that of the original bfd.
4379 (bfd_follow_build_id_debuglink): New function: Finds a separate
4380 debug info file for a given bfd by using the build-id method.
4381 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4382 method of locating a separate debug info file before using the
4384 * bfd-in2.h: Regenerate.
4386 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4389 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4390 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4391 elf_x86_64_eh_frame_plt_got.
4392 (elf_x86_64_size_dynamic_sections): Get unwind info from
4393 elf_x86_64_bnd_arch_bed for the BND PLT.
4395 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4397 * config.bfd: Add entries for i686-redox and x86_64-redox.
4399 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4401 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4403 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4404 .eh_frame section to 4 bytes for x32.
4405 (elf_x86_64_check_relocs): Likewise.
4407 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4410 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4411 (PLT_GOT_FDE_LENGTH): Likewise.
4412 (elf_i386_plt_layout): Add eh_frame_plt_got and
4413 eh_frame_plt_got_size.
4414 (elf_i386_plt): Updated.
4415 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4416 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4417 (elf_i386_size_dynamic_sections): Allocate and initialize
4418 .eh_frame section for .plt.got.
4419 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4421 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4422 eh_frame_plt_got_size.
4423 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4424 (PLT_GOT_FDE_LENGTH): Likewise.
4425 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4426 eh_frame_plt_got_size.
4427 (elf_x86_64_arch_bed): Updated.
4428 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4429 eh_frame_plt_got_size.
4430 (elf_x86_64_nacl_arch_bed): Likewise.
4431 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4432 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4433 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4434 .eh_frame section for .plt.got.
4435 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4438 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4440 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4441 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4443 2017-01-09 Nick Clifton <nickc@redhat.com>
4445 * dwarf2.c (lookup_address_in_function_table): Return early if
4446 there are no functions in the given comp unit, or if the high
4447 address of the last function in the comp unit is less than the
4450 2017-01-09 Nick Clifton <nickc@redhat.com>
4453 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4454 message if there are too many symbols to load.
4456 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4458 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4459 if relocs are cached.
4461 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4464 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4465 for R_MICROBLAZE_GOTOFF_64.
4467 2017-01-03 Nick Clifton <nickc@redhat.com>
4469 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4470 warning about using a possibly uninitialised variable.
4472 2017-01-02 Alan Modra <amodra@gmail.com>
4474 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4475 (allocate_plt_static, allocate_dynrelocs): Use it.
4477 2017-01-02 Alan Modra <amodra@gmail.com>
4479 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4480 .PARISC.unwind section.
4482 2017-01-02 Alan Modra <amodra@gmail.com>
4485 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4486 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4487 indirect to GOT pointer relative code edit.
4489 2017-01-02 Alan Modra <amodra@gmail.com>
4491 Update year range in copyright notice of all files.
4493 For older changes see ChangeLog-2016
4495 Copyright (C) 2017 Free Software Foundation, Inc.
4497 Copying and distribution of this file, with or without modification,
4498 are permitted in any medium without royalty provided the copyright
4499 notice and this notice are preserved.
4505 version-control: never