1 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
4 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
5 hide symbol which was forced to be dynamic.
7 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
10 * elf32-cris.c (cris_elf_relocate_section): Don't generate
11 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
12 (cris_elf_check_relocs): Don't allocate dynamic relocation
13 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
15 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
18 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
19 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
20 (sh_elf_relocate_section): Don't generate dynamic relocation if
21 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
23 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
26 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
27 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
28 (elf_s390_relocate_section): Don't generate dynamic relocation
29 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
30 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
31 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
32 (elf_s390_relocate_section): Don't generate dynamic relocation
33 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
35 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
38 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
39 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
40 (allocate_dynrelocs): Discard dynamic relocations if
41 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
43 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
46 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
47 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
49 (allocate_dynrelocs): Discard dynamic relocations if
50 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
52 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
55 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
56 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
57 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
58 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
59 (elf_m68k_relocate_section): Don't generate dynamic relocation
60 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
62 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
65 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
66 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
67 (allocate_dynrelocs): Discard dynamic relocations if
68 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
69 (elf32_hppa_relocate_section): Don't generate dynamic
70 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
72 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
75 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
76 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
77 (allocate_fptr): Don't allocate function pointer if
78 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
79 (allocate_dynrel_entries): Don't allocate dynamic relocation
80 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
81 (set_got_entry): Don't set GOT entry if
82 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
83 (set_pltoff_entry): Don't set PLTOFF entry if
84 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
85 (elfNN_ia64_relocate_section): Don't install dynamic relocation
86 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
88 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
91 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
92 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
93 (allocate_dynrelocs): Don't allocate dynamic relocations if
94 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
96 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
99 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
100 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
101 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
102 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
104 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
107 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
108 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
109 (tilepro_elf_relocate_section): Don't generate dynamic
110 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
111 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
112 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
113 (tilegx_elf_relocate_section): Don't generate dynamic
114 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
116 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
119 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
120 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
122 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
123 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
125 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
127 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
128 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
129 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
131 2017-10-12 James Bowman <james.bowman@ftdichip.com>
133 * bfd-in2.h: Regenerate.
134 * libbfd.h: Regenerate.
135 * elf32-ft32.c: Add HOWTO R_FT32_15.
136 * reloc.c: Add BFD_RELOC_FT32_15.
138 2017-10-12 Nick Clifton <nickc@redhat.com>
140 * reloc.c (enum bfd_reloc_status): Start values at 2.
141 * bfd-in2.h: Regenerate.
142 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
143 that a TRUE return indicates success. Compare the result of
144 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
145 (build_one_stub): Change sense of tests against aarch64_relocate
147 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
148 than FALSE, when an error is detected.
149 (elfNN_aarch64_final_link_relocate): Likewise.
151 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
153 * elf32-i386.c (elf_backend_hide_symbol): New.
154 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
155 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
156 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
158 2017-10-12 Alan Modra <amodra@gmail.com>
160 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
161 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
162 (bfd_elf_define_start_stop): Likewise.
164 2017-10-12 Alan Modra <amodra@gmail.com>
166 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
167 when executable rather than non-PIC.
168 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
169 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
171 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
173 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
175 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
176 (elf_external_linux_prpsinfo64_ugid32): ... this.
177 (swap_linux_prpsinfo32_out): Rename to...
178 (swap_linux_prpsinfo32_ugid32_out): ... this.
179 (elf_external_linux_prpsinfo64_ugid16): New structure.
180 (swap_linux_prpsinfo64_ugid16_out): New function.
181 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
182 (elf_backend_linux_prpsinfo64_ugid16): Define.
183 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
184 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
185 of the 64-bit Linux core PRPSINFO note.
186 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
188 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
190 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
192 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
193 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
194 (elf_external_ppc_linux_prpsinfo32)
195 (swap_ppc_linux_prpsinfo32_out): Move to...
196 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
197 (swap_linux_prpsinfo32_ugid32_out): ... these.
198 (elf_external_linux_prpsinfo32): Rename to...
199 (elf_external_linux_prpsinfo32_ugid16): ... this.
200 (swap_linux_prpsinfo32_out): Rename to...
201 (swap_linux_prpsinfo32_ugid16_out): ... this.
202 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
203 (elf_backend_linux_prpsinfo32_ugid16): Define.
204 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
205 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
206 of the 32-bit Linux core PRPSINFO note.
207 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
208 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
209 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
210 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
211 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
212 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
213 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
214 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
215 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
216 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
218 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
220 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
221 `gap' member ahead of `pr_flag'.
223 2017-10-11 Pedro Alves <palves@redhat.com>
225 * bfd.c (_doprnt): Rename to ...
226 (_bfd_doprnt): ... this.
227 (error_handler_internal): Adjust.
229 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
231 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
232 instead of incrementing it.
233 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
235 2017-10-10 Renlin Li <renlin.li@arm.com>
238 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
239 symbols into dynamic.
241 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
244 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
245 (riscv_elf_link_hash_table_create): Initialize max_alignment to
247 (_bfd_riscv_relax_section): Cache the max alignment of output
248 sections if possible.
250 2017-10-10 Alan Modra <amodra@gmail.com>
252 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
253 .opd whenever .opd is present and non-zero size. Move code
254 setting abiversion to/from output file earlier. Only set
255 u.opd.func_sec when --gc-sections. Read relocs and set up
256 u.opd.func_sec values here..
257 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
259 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
261 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
263 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
266 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
268 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
269 .interp section with "ld --no-dynamic-linker".
271 2017-10-09 Alan Modra <amodra@gmail.com>
274 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
275 funcinfo_hash_table and varinfo_hash_table.
277 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
279 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
280 in read-only section with minfo.
281 (sh_elf_size_dynamic_sections): Likewise.
283 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
285 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
288 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
290 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
291 this_hdr.sh_entsize only if section size > 0.
293 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
295 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
297 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
299 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
300 in read-only section with minfo.
301 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
303 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
305 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
308 2017-10-06 John Baldwin <jhb@FreeBSD.org>
310 * elf-bfd.h (struct elf_backend_data): Add
311 `elf_backend_grok_freebsd_prstatus'.
312 * elf.c (elfcore_grok_freebsd_note): Call
313 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
315 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
317 (elf_backend_grok_freebsd_prstatus): Define.
318 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
319 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
321 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
323 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
324 and has_non_got_reloc with zero_undefweak.
325 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
326 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
328 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
329 has_non_got_reloc with zero_undefweak.
330 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
331 has_got_reloc and has_non_got_reloc with zero_undefweak.
332 (elf_x86_link_hash_entry): Likewise.
334 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
336 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
337 (VERIFY_COPY_RELOC): Likewise.
339 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
341 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
342 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
343 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
345 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
347 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
348 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
349 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
351 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
353 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
354 * elf32-i386.c (elf_i386_relocate_section): Use it.
355 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
357 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
359 * elf32-i386.c (X86_SIZE_TYPE_P): New.
360 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
361 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
362 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
363 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
365 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
367 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
368 (PLT_LOCAL_IFUNC_P): Likewise.
369 * elf32-i386.c (elf_i386_relocate_section): Use them.
370 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
372 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
374 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
375 * elf32-i386.c (elf_i386_relocate_section): Use it.
376 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
378 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
380 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
381 * elf32-i386.c (elf_i386_relocate_section): Use it.
382 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
384 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
386 * elf32-i386.c (X86_PCREL_TYPE_P): New.
387 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
388 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
389 (X86_PCREL_TYPE_P): This.
390 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
391 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
392 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
394 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
396 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
398 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
399 * elf32-i386.c (elf_i386_tls_transition): Use it.
400 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
402 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
404 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
405 Dump dynamic relocation in read-only section with minfo if
407 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
408 (maybe_set_textrel): Likewise.
409 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
410 read-only section with minfo.
412 2017-10-05 John Baldwin <jhb@FreeBSD.org>
414 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
416 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
418 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
419 in read-only section with minfo.
420 (tilepro_elf_size_dynamic_sections): Likewise.
421 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
422 (tilegx_elf_size_dynamic_sections): Likewise.
424 2017-10-05 Pedro Alves <palves@redhat.com>
427 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
428 ellipsis parameter. Split out bfd_error_on_input code to..
429 (bfd_set_input_error): .. New function.
430 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
431 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
432 * bfd-in2.h: Regenerate.
434 2017-10-05 Alan Modra <amodra@gmail.com>
436 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
437 fini_array error value.
439 2017-10-05 Alan Modra <amodra@gmail.com>
442 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
444 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
446 (elf_fake_sections): Adjust calls. Exit immediately on failure.
447 (bfd_elf_set_group_contents): Add associated reloc section indices
450 2017-10-04 Alan Modra <amodra@gmail.com>
452 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
453 classify symbols for ELFv2.
455 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
458 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
459 undergoes default promotion.
460 * bfd-in2.h: Regenerate.
462 2017-10-02 Alan Modra <amodra@gmail.com>
464 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
465 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
467 2017-10-01 Alan Modra <amodra@gmail.com>
470 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
471 (add_line_info): Always put end_sequence last.
473 2017-10-01 Alan Modra <amodra@gmail.com>
476 * dwarf2.c (read_section): Allocate buffer with extra byte for
477 bfd_simple_get_relocated_section_contents rather than copying
480 2017-09-29 Alan Modra <amodra@gmail.com>
482 * merge.c (merge_strings): Return FALSE on malloc failure.
483 (_bfd_merge_sections): Return failures from record_section and
486 2017-09-28 Alan Modra <amodra@gmail.com>
489 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
490 a case where plugin_notice isn't called.
492 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
494 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
497 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
500 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
501 output_bfd to info->callbacks->minfo.
503 2017-09-26 Nick Clifton <nickc@redhat.com>
506 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
507 assertion failure if elf_x86_64_rtype_to_howto has already issued
510 2017-09-26 Alan Modra <amodra@gmail.com>
513 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
516 2017-09-26 Nick Clifton <nickc@redhat.com>
519 * dwarf2.c (read_formatted_entries): Fail early if we know that
520 the loop parsing data entries will overflow the end of the
523 2017-09-26 Alan Modra <amodra@gmail.com>
526 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
527 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
528 to stash->info_ptr_memory, and check die_ref is within that memory.
529 Set info_ptr_end correctly when another CU is refd. Check die_ref
530 for DW_FORM_ref4 etc. is within CU.
532 2017-09-26 Alan Modra <amodra@gmail.com>
535 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
536 (read_formatted_entries): Init "fe".
537 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
539 2017-09-26 Alan Modra <amodra@gmail.com>
542 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
543 bounds in inner loop.
545 2017-09-25 Alan Modra <amodra@gmail.com>
548 * dwarf1.c (parse_die): Sanity check pointer against section limit
549 before dereferencing.
550 (parse_line_table): Likewise.
552 2017-09-25 Alan Modra <amodra@gmail.com>
555 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
557 (parse_comp_unit): Likewise.
559 2017-09-25 Alan Modra <amodra@gmail.com>
562 * dwarf2.c (read_formatted_entries): Error on format_count zero.
564 2017-09-24 Alan Modra <amodra@gmail.com>
567 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
568 within section bounds.
570 2017-09-24 Alan Modra <amodra@gmail.com>
573 * dwarf2.c (decode_line_info): Properly free line sequences on error.
575 2017-09-24 Alan Modra <amodra@gmail.com>
578 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
579 pname param. Return status. Make name const. Don't abort,
580 return an error. Formatting. Exit if current info_ptr matches
581 orig_info_ptr. Update callers.
582 (scan_unit_for_symbols): Start at nesting_level of zero. Make
583 nested_funcs an array of structs for extensibility. Formatting.
585 2017-09-24 Alan Modra <amodra@gmail.com>
588 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
589 rather than dividing by zero.
591 2017-09-24 Alan Modra <amodra@gmail.com>
594 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
596 2017-09-24 Alan Modra <amodra@gmail.com>
599 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
601 2017-09-24 Alan Modra <amodra@gmail.com>
604 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
605 SHT_GNU_verneed section for sanity. Don't zalloc memory for
608 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
611 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
614 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
617 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
618 -1 if bfd_canonicalize_dynamic_reloc returns 0.
620 2017-09-22 Pedro Alves <palves@redhat.com>
621 Alan Modra <amodra@gmail.com>
623 * version.h: Add comment.
625 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
627 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
628 NT_S390_GS_BC, correct the previously swapped invocations of
629 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
631 2017-09-19 Alan Modra <amodra@gmail.com>
634 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
637 2017-09-19 Alan Modra <amodra@gmail.com>
640 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
641 symbols before calculating verrefs. Don't renumber dynsyms
642 after gc. Exclude .gnu.version when zero or one dynsym.
643 Localize some vars and reindent.
645 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
648 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
649 return from bfd_canonicalize_dynamic_reloc.
651 2017-09-15 Alan Modra <amodra@gmail.com>
654 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
655 overflows bfd_size_type.
657 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
660 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
661 to indicate if conversion is performed.
662 (elf_i386_check_relocs): Cache section contents and relocations
663 if conversion is performed.
664 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
665 contents and relocations if conversion is performed.
667 2017-09-14 Nick Clifton <nickc@redhat.com>
670 * peXXigen.c (pe_print_idata): Extend check for HintName vector
673 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
675 * elfxx-x86.h: Fix a typo in comments.
677 2017-09-09 Kamil Rytarowski <n54@gmx.com>
679 * elf32-nds32.c: Rename __BIT() to N32_BIT().
681 2017-09-09 Alan Modra <amodra@gmail.com>
683 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
686 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
688 * elf32-i386.c (elf_i386_relocate_section): Update usage of
689 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
690 (elf_i386_finish_dynamic_symbol): Likewise.
691 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
692 (elf_x86_64_finish_dynamic_symbol): Likewise.
693 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
694 (_bfd_x86_elf_fixup_symbol): Likewise.
696 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
698 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
699 check has_non_got_reloc.
701 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
704 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
705 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
706 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
707 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
708 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
709 and linker_def on __ehdr_start if it is referenced and not
711 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
712 and return TRUE when building executable, if a symbol has
713 non-GOT/non-PLT relocations in text section or there is no
715 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
717 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
719 * elfxx-x86.h: Update comments.
721 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
723 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
724 elf_x86_plt_layout_table with elf_x86_init_table.
725 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
727 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
729 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
730 (elf_x86_init_table): This.
731 (_bfd_x86_elf_link_setup_gnu_properties): Replace
732 elf_x86_plt_layout_table with elf_x86_init_table.
734 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
736 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
737 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
738 * configure: Regenerated.
739 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
740 and r_sym fields of plt_layout.
741 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
743 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
744 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
745 r_info nor r_sym fields.
746 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
748 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
750 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
752 * (_bfd_riscv_relax_align): Call bfd_set_error and
753 print an error message when unable to relax a .align directive.
755 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
757 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
758 (riscv_record_pcrel_hi_reloc): Add absolute argument.
759 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
760 R_RISCV_PCREL_HI20 relocs, and pass the result to
761 riscv_record_pcrel_hi_reloc.
763 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
765 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
766 r_type_p. Remove the converted argument. Replace
767 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
768 the new relocation type via r_type_p.
769 (elf_i386_relocate_section): Likewise.
770 (elf_i386_finish_dynamic_symbol): Likewise.
771 (need_convert_load): Removed.
772 (check_relocs_failed): Updated.
773 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
774 instead of setting need_convert_load.
775 (_bfd_i386_elf_convert_load): Removed.
776 * elf64-x86-64.c (need_convert_load): Removed.
777 (check_relocs_failed): Updated.
778 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
779 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
780 Return the new relocation type via r_type_p.
781 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
782 instead of setting need_convert_load.
783 (elf_x86_64_check_relocs): Don't check PIC if relocation has
785 (_bfd_x86_64_elf_convert_load): Removed.
786 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
787 with SYMBOL_REFERENCES_LOCAL_P.
788 (elf_x86_64_finish_dynamic_symbol): Likewise.
789 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
791 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
792 (_bfd_x86_elf_link_symbol_references_local): New function.
793 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
794 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
795 SYMBOL_REFERENCES_LOCAL_P.
796 (elf_x86_link_hash_entry): Add local_ref.
797 (elf_x86_link_hash_table): Remove convert_load.
798 (_bfd_i386_elf_convert_load): Removed.
799 (_bfd_x86_64_elf_convert_load): Likewise.
800 (_bfd_x86_elf_link_symbol_references_local): New.
802 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
804 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
805 (elf_x86_64_info_to_howto): Get the real relocation type by
806 masking out R_X86_64_converted_reloc_bit.
807 (elf_x86_64_check_tls_transition): Get the real relocation type
808 by masking out R_X86_64_converted_reloc_bit.
809 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
810 instead of setting converted_reloc.
811 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
812 instead of converted_reloc. Get the real relocation type by
813 masking out R_X86_64_converted_reloc_bit.
814 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
815 R_X86_64_converted_reloc_bit is valid.
816 * elfxx-x86.h (converted_reloc): Removed.
818 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
820 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
821 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
822 to get the relocation type again.
823 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
824 r_type when calling elf_x86_64_tls_transition. Don't use
825 ELF32_R_TYPE to get the relocation type again.
827 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
829 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
832 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
834 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
835 argument. Don't check relocation overflow. Avoid relocation
836 overflow if --no-relax is used. Set converted_reloc on symbol
837 if a GOTPCREL relocation is converted.
838 (elf_x86_64_relocate_section): Issue a fatal error and suggest
839 --no-relax if GOTPCREL relocation conversion leads to relocation
841 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
843 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
844 Edmar Wienskoski <edmar.wienskoski@nxp.com
846 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
847 (ppc_elf_check_relocs): Handle it.
848 (ppc_elf_vle_split20): New function.
849 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
851 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
854 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
855 for x86-64 if GOT_TLS_GDESC_P is true.
857 2017-09-03 Alan Modra <amodra@gmail.com>
860 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
862 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
864 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
865 tls_get_addr for x86-64 in one place.
867 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
869 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
870 with elfxx-x86.lo for 64-bit BFD.
871 * configure: Regenerated.
873 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
875 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
876 (_bfd_i386_elf_convert_load): This. Remove static.
877 (elf_i386_size_dynamic_sections): Removed.
878 (elf_backend_size_dynamic_sections): Likewise.
879 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
880 (_bfd_x86_64_elf_convert_load): This. Remove static.
881 (elf_x86_64_size_dynamic_sections): Removed.
882 (elf_backend_size_dynamic_sections): Likewise.
883 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
884 (elf_x86_allocate_dynrelocs): This. Make it static.
885 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
886 (elf_x86_allocate_local_dynreloc): This. Make it static.
887 (elf_i386_is_reloc_section): New function.
888 (elf_x86_64_is_reloc_section): Likewise.
889 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
890 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
891 Rearrange got_entry_size initialization.
892 (_bfd_x86_elf_size_dynamic_sections): New function.
893 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
894 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
895 (_bfd_i386_elf_convert_load): New.
896 (_bfd_x86_64_elf_convert_load): Likewise.
897 (_bfd_x86_elf_size_dynamic_sections): Likewise.
898 (elf_backend_size_dynamic_sections): Likewise.
899 (_bfd_x86_elf_allocate_dynrelocs): Removed.
900 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
902 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
904 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
907 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
909 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
910 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
912 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
914 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
915 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
916 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
917 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
918 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
919 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
921 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
923 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
924 (elf_i386_allocate_local_dynrelocs): Likewise.
925 (elf_i386_size_dynamic_sections): Replace
926 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
927 with _bfd_x86_elf_allocate_dynrelocs and
928 _bfd_x86_elf_allocate_local_dynrelocs.
929 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
930 (elf_x86_64_allocate_local_dynrelocs): Likewise.
931 (elf_x86_64_size_dynamic_sections): Replace
932 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
933 with _bfd_x86_elf_allocate_dynrelocs and
934 _bfd_x86_elf_allocate_local_dynrelocs.
935 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
936 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
937 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
938 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
940 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
942 * elf32-i386.c (is_i386_elf): Removed.
943 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
944 (elf_i386_size_dynamic_sections): Likewise.
945 (elf_i386_relocate_section): Likewise.
946 * elf64-x86-64.c (is_x86_64_elf): Removed.
947 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
949 (elf_x86_64_size_dynamic_sections): Likewise.
950 (elf_x86_64_relocate_section): Likewise.
951 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
953 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
956 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
958 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
959 (elf_i386_allocate_dynrelocs): Replace
960 elf_i386_compute_jump_table_size with
961 elf_x86_compute_jump_table_size.
962 (elf_i386_size_dynamic_sections): Likewise.
963 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
964 (elf_x86_64_allocate_dynrelocs): Replace
965 elf_x86_64_compute_jump_table_size with
966 elf_x86_compute_jump_table_size.
967 (elf_x86_64_size_dynamic_sections): Likewise.
968 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
970 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
971 (elf_x86_compute_jump_table_size): New.
973 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
975 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
977 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
978 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
980 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
982 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
983 with htab->is_vxworks.
984 (elf_i386_size_dynamic_sections): Likewise.
985 (elf_i386_relocate_section): Likewise.
986 (elf_i386_finish_dynamic_symbol): Likewise.
987 (elf_i386_finish_dynamic_sections): Likewise.
989 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
991 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
992 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
993 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
994 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
995 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
996 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
997 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
998 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1000 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1003 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1004 ELF_COMMON_DEF_P for common symbols.
1006 2017-09-02 Alan Modra <amodra@gmail.com>
1008 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1009 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1010 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1012 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1014 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1015 (elf_backend_gc_mark_hook): Likewise.
1016 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1017 (elf_backend_gc_mark_hook): Likewise.
1018 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1019 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1020 (elf_backend_gc_mark_hook): Likewise.
1022 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1024 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1025 (elf_backend_adjust_dynamic_symbol): Likewise.
1026 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1027 (elf_backend_adjust_dynamic_symbol): Likewise.
1028 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1029 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1030 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1031 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1032 (elf_backend_adjust_dynamic_symbol): Likewise.
1034 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1036 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1039 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1041 * elf32-i386.c (elf_i386_mkobject): Removed.
1042 (bfd_elf32_mkobject): Likewise.
1043 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1044 (bfd_elf64_mkobject): Likewise.
1045 (bfd_elf32_mkobject): Likewise.
1046 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1047 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1048 (bfd_elf64_mkobject): Likewise.
1049 (bfd_elf32_mkobject): Likewise.
1051 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1053 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1054 Call _bfd_x86_elf_link_setup_gnu_properties.
1055 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1056 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1058 (elf_x86_64_non_lazy_plt): Likewise.
1059 (elf_x86_64_lazy_bnd_plt): Likewise.
1060 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1061 (elf_x86_64_lazy_ibt_plt): Likewise.
1062 (elf_x32_lazy_ibt_plt): Likewise.
1063 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1064 (elf_x32_non_lazy_ibt_plt): Likewise.
1065 (elf_x86_64_nacl_plt): Likewise.
1066 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1067 _bfd_x86_elf_link_setup_gnu_properties.
1068 * elfxx-x86.c: Include elf-vxworks.h".
1069 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1070 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1071 comments for pic_plt0_entry and pic_plt_entry.
1072 (elf_x86_non_lazy_plt_layout): Likewise.
1073 (elf_x86_plt_layout_table): New.
1074 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1076 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1079 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1080 .eh_frame section for the second PLT.
1081 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1082 alignment of .eh_frame section for the second PLT.
1084 2017-09-01 Nick Clifton <nickc@redhat.com>
1087 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1090 2017-09-01 Nick Clifton <nickc@redhat.com>
1093 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1094 attribute buffer is NUL terminated.
1096 2017-08-31 Nick Clifton <nickc@redhat.com>
1099 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1100 to dwarf string sections.
1102 2017-08-31 Alan Modra <amodra@gmail.com>
1104 * po/SRC-POTFILES.in: Regenerate.
1106 2017-08-31 Alan Modra <amodra@gmail.com>
1108 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1109 for a section containing just a terminator. Allow multiple
1110 terminators at end of section.
1111 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1112 sections when not adding alignment. Assert on terminator in
1115 2017-08-31 Alan Modra <amodra@gmail.com>
1119 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1122 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1124 * configure.ac (bfd_backends): Add elf64.lo together with
1125 elfxx-x86.lo for 64-bit BFD.
1126 * configure: Regenerated.
1128 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1130 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1133 2017-08-31 Alan Modra <amodra@gmail.com>
1136 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1137 before _close_and_cleanup. Call iovec->bclose after.
1138 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1140 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1142 * elf32-i386.c (elf_i386_plt_type): Removed.
1143 (elf_i386_plt): Likewise.
1144 (elf_i386_get_synthetic_symtab): Updated. Call
1145 _bfd_x86_elf_get_synthetic_symtab.
1146 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1147 (elf_x86_64_plt): Likewise.
1148 (elf_x86_64_get_synthetic_symtab): Updated. Call
1149 _bfd_x86_elf_get_synthetic_symtab.
1150 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1151 (elf_x86_64_get_plt_got_vma): Likewise.
1152 (elf_i386_valid_plt_reloc_p): Likewise.
1153 (elf_x86_64_valid_plt_reloc_p): Likewise.
1154 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1155 * elfxx-x86.h (elf_x86_plt_type): New.
1156 (elf_x86_plt): Likewise.
1157 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1159 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1161 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1162 target_id instead of elf_machine_code.
1164 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1166 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1167 (elf_i386_lazy_plt_layout): Likewise.
1168 (elf_i386_non_lazy_plt_layout): Likewise.
1169 (elf_i386_plt_layout): Likewise.
1170 (elf_i386_link_hash_table): Likewise.
1171 (elf_i386_next_tls_desc_index): Likewise.
1172 (elf_i386_srelplt2): Likewise.
1173 (elf_i386_plt): Likewise.
1174 (elf_i386_lazy_plt): Likewise.
1175 (elf_i386_non_lazy_plt): Likewise.
1176 (elf_i386_link_hash_table_create): Likewise.
1177 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1178 (elf_i386_lazy_plt): Updated.
1179 (elf_i386_non_lazy_plt): Likewise.
1180 (elf_i386_lazy_ibt_plt): Likewise.
1181 (elf_i386_non_lazy_ibt_plt): Likewise.
1182 (elf_i386_allocate_dynrelocs): Likewise.
1183 (elf_i386_size_dynamic_sections): Likewise.
1184 (elf_i386_relocate_section): Likewise.
1185 (elf_i386_finish_dynamic_symbol): Likewise.
1186 (elf_i386_finish_dynamic_sections): Likewise.
1187 (elf_i386_get_synthetic_symtab): Likewise.
1188 (elf_i386_link_setup_gnu_properties): Likewise.
1189 (elf_i386_nacl_plt): Likewise.
1190 * elf64-x86-64.c (ABI_64_P): Removed.
1191 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1192 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1193 (elf_x86_64_lazy_plt_layout): Likewise.
1194 (elf_x86_64_non_lazy_plt_layout): Likewise.
1195 (elf_x86_64_plt_layout): Likewise.
1196 (elf_x86_64_link_hash_table): Likewise.
1197 (elf_x86_64_plt): Likewise.
1198 (elf_x86_64_lazy_plt): Likewise.
1199 (elf_x86_64_non_lazy_plt): Likewise.
1200 (elf_x86_64_link_hash_table_create): Likewise.
1201 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1202 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1203 (elf_x86_64_lazy_plt): Updated.
1204 (elf_x86_64_non_lazy_plt): Likewise.
1205 (elf_x86_64_lazy_bnd_plt): Likewise.
1206 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1207 (elf_x86_64_lazy_ibt_plt): Likewise.
1208 (elf_x32_lazy_ibt_plt): Likewise.
1209 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1210 (elf_x32_non_lazy_ibt_plt): Likewise.
1211 (elf_x86_64_allocate_dynrelocs): Likewise.
1212 (elf_x86_64_size_dynamic_sections): Likewise.
1213 (elf_x86_64_relocate_section): Likewise.
1214 (elf_x86_64_finish_dynamic_symbol): Likewise.
1215 (elf_x86_64_finish_dynamic_sections): Likewise.
1216 (elf_x86_64_get_synthetic_symtab): Likewise.
1217 (elf_x86_64_link_setup_gnu_properties): Likewise.
1218 (elf_x86_64_nacl_plt): Likewise.
1219 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1221 (ELF32_DYNAMIC_INTERPRETER): New.
1222 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1223 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1224 (_bfd_x86_elf_link_hash_table_create): Likewise.
1225 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1226 (elf_x86_link_hash_table_free): This. Make it static.
1227 * elfxx-x86.h: Don't include "objalloc.h".
1229 (elf_x86_lazy_plt_layout): Likewise.
1230 (elf_x86_non_lazy_plt_layout): Likewise.
1231 (elf_x86_plt_layout): Likewise.
1232 (_bfd_x86_elf_link_hash_table_create): Likewise.
1233 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1234 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1235 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1236 srelplt2 and next_tls_desc_index.
1237 (_bfd_x86_elf_link_hash_table_free): Removed.
1239 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1241 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1242 branch offset interpretation.
1244 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1247 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1249 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1251 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1252 (elf_x86_64_srelplt2): Likewise.
1254 2017-08-30 Alan Modra <amodra@gmail.com>
1256 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1257 (ppc64_elf_tls_optimize): Set it.
1258 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1259 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1260 addis would add zero.
1261 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1262 (ppc_elf_tls_optimize): Set it.
1263 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1264 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1266 2017-08-30 Alan Modra <amodra@gmail.com>
1268 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1269 __tls_get_addr call sequences to LE, don't move the addi down
1270 to the nop. Replace the bl with addi and leave the nop alone.
1272 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1274 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1276 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1278 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1280 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1282 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1283 (BFD64_BACKENDS): Likewise.
1284 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1285 (BFD64_BACKENDS_CFILES): Likewise.
1286 * Makefile.in: Regenerated.
1287 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1288 elf32-i386.lo and elf64-x86-64.lo.
1289 * configure: Regenerated.
1290 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1291 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1292 "objalloc.h" and "hashtab.h".
1293 (ELIMINATE_COPY_RELOCS): Removed.
1294 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1295 (SYMBOL_NO_COPYRELOC): Likewise.
1296 (elf_i386_link_hash_entry): Likewise.
1297 (GOT_UNKNOWN): Likewise.
1298 (GOT_NORMAL): Likewise.
1299 (GOT_TLS_GD): Likewise.
1300 (elf_i386_hash_entry): Likewise.
1301 (elf_i386_obj_tdata): Likewise.
1302 (elf_i386_tdata): Likewise.
1303 (elf_i386_local_got_tls_type): Likewise.
1304 (elf_i386_local_tlsdesc_gotent): Likewise.
1305 (elf_i386_hash_table): Likewise.
1306 (elf_i386_link_hash_newfunc): Likewise.
1307 (elf_i386_local_htab_hash): Likewise.
1308 (elf_i386_local_htab_eq): Likewise.
1309 (elf_i386_get_local_sym_hash): Likewise.
1310 (elf_i386_link_hash_table_free): Likewise.
1311 (elf_i386_copy_indirect_symbol): Likewise.
1312 (elf_i386_fixup_symbol): Likewise.
1313 (elf_i386_readonly_dynrelocs): Likewise.
1314 (elf_i386_always_size_sections): Likewise.
1315 (elf_i386_set_tls_module_base): Likewise.
1316 (elf_i386_dtpoff_base): Likewise.
1317 (compare_relocs): Likewise.
1318 (elf_i386_hash_symbol): Likewise.
1319 (elf_i386_parse_gnu_properties): Likewise.
1320 (elf_i386_merge_gnu_properties): Likewise.
1321 (elf_i386_link_check_relocs): Likewise.
1322 (elf_i386_merge_symbol_attribute): Likewise.
1323 (bfd_elf32_bfd_link_check_relocs): Likewise.
1324 (elf_backend_copy_indirect_symbol): Likewise.
1325 (elf_backend_always_size_sections): Likewise.
1326 (elf_backend_omit_section_dynsym): Likewise.
1327 (elf_backend_hash_symbol): Likewise.
1328 (elf_backend_fixup_symbol): Likewise.
1329 (elf_backend_parse_gnu_properties): Likewise.
1330 (elf_backend_merge_gnu_properties): Likewise.
1331 (elf_backend_merge_symbol_attribute): Likewise.
1332 (elf_i386_mkobject): Updated.
1333 (elf_i386_link_hash_table_create): Likewise.
1334 (elf_i386_check_tls_transition): Likewise.
1335 (elf_i386_tls_transition): Likewise.
1336 (elf_i386_convert_load_reloc): Likewise.
1337 (elf_i386_check_relocs): Likewise.
1338 (elf_i386_adjust_dynamic_symbol): Likewise.
1339 (elf_i386_allocate_dynrelocs): Likewise.
1340 (elf_i386_convert_load): Likewise.
1341 (elf_i386_size_dynamic_sections): Likewise.
1342 (elf_i386_relocate_section): Likewise.
1343 (elf_i386_finish_dynamic_symbol ): Likewise.
1344 (elf_i386_finish_dynamic_sections): Likewise.
1345 (elf_i386_output_arch_local_syms): Likewise.
1346 (elf_i386_get_synthetic_symtab): Likewise.
1347 (elf_i386_link_setup_gnu_properties): Likewise.
1348 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1349 of elf_link_hash_table, as base.
1350 (elf_i386_next_tls_desc_index): New.
1351 (elf_i386_srelplt2): Likewise.
1352 (elf_i386_plt): Likewise.
1353 (elf_i386_lazy_plt): Likewise.
1354 (elf_i386_non_lazy_plt): Likewise.
1355 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1356 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1357 "objalloc.h" and "hashtab.h".
1358 (ELIMINATE_COPY_RELOCS): Removed.
1359 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1360 (SYMBOL_NO_COPYRELOC): Likewise.
1361 (elf_x86_64_link_hash_entry): Likewise.
1362 (GOT_UNKNOWN): Likewise.
1363 (GOT_NORMAL): Likewise.
1364 (GOT_TLS_GD): Likewise.
1365 (elf_x86_64_hash_entry): Likewise.
1366 (elf_x86_64_obj_tdata): Likewise.
1367 (elf_x86_64_tdata): Likewise.
1368 (elf_x86_64_local_got_tls_type): Likewise.
1369 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1370 (elf_x86_64_hash_table): Likewise.
1371 (elf_x86_64_link_hash_newfunc): Likewise.
1372 (elf_x86_64_local_htab_hash): Likewise.
1373 (elf_x86_64_local_htab_eq): Likewise.
1374 (elf_x86_64_get_local_sym_hash): Likewise.
1375 (elf_x86_64_link_hash_table_free): Likewise.
1376 (elf_x86_64_copy_indirect_symbol): Likewise.
1377 (elf_x86_64_fixup_symbol): Likewise.
1378 (elf_x86_64_readonly_dynrelocs): Likewise.
1379 (elf_x86_64_always_size_sections): Likewise.
1380 (elf_x86_64_set_tls_module_base): Likewise.
1381 (elf_x86_64_dtpoff_base): Likewise.
1382 (compare_relocs): Likewise.
1383 (elf_x86_64_merge_symbol_attribute): Likewise.
1384 (elf_x86_64_hash_symbol): Likewise.
1385 (elf_x86_64_parse_gnu_properties): Likewise.
1386 (elf_x86_64_merge_gnu_properties): Likewise.
1387 (elf_x86_64_link_check_relocs): Likewise.
1388 (elf_backend_copy_indirect_symbol): Likewise.
1389 (elf_backend_always_size_sections): Likewise.
1390 (bfd_elf64_bfd_link_check_relocs): Likewise.
1391 (elf_backend_merge_symbol_attribute): Likewise.
1392 (elf_backend_hash_symbol): Likewise.
1393 (elf_backend_omit_section_dynsym): Likewise.
1394 (elf_backend_fixup_symbol): Likewise.
1395 (elf_backend_parse_gnu_properties): Likewise.
1396 (elf_backend_merge_gnu_properties): Likewise.
1397 (bfd_elf32_bfd_link_check_relocs): Likewise.
1398 (elf_x86_64_mkobject): Updated.
1399 (elf_x86_64_link_hash_table_create): Likewise.
1400 (elf_x86_64_check_tls_transition): Likewise.
1401 (elf_x86_64_tls_transition): Likewise.
1402 (elf_x86_64_convert_load_reloc): Likewise.
1403 (elf_x86_64_check_relocs): Likewise.
1404 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1405 (elf_x86_64_allocate_dynrelocs): Likewise.
1406 (elf_x86_64_convert_load): Likewise.
1407 (elf_x86_64_size_dynamic_sections): Likewise.
1408 (elf_x86_64_relocate_section): Likewise.
1409 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1410 (elf_x86_64_finish_dynamic_sections): Likewise.
1411 (elf_x86_64_output_arch_local_syms): Likewise.
1412 (elf_x86_64_get_synthetic_symtab): Likewise.
1413 (elf_x86_64_link_setup_gnu_properties): Likewise.
1414 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1415 instead of elf_link_hash_table, as base.
1416 (elf_x86_64_next_tls_desc_index): New.
1417 (elf_x86_64_srelplt2): Likewise.
1418 (elf_x86_64_plt): Likewise.
1419 (elf_x86_64_lazy_plt): Likewise.
1420 (elf_x86_64_non_lazy_plt): Likewise.
1421 * elfxx-x86.c: New file.
1422 * elfxx-x86.h: Likewise.
1424 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1426 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1428 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1430 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1432 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1433 sections before checking dynamic relocations and free invalid
1434 PLT section contents.
1435 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1437 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1439 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1440 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1442 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1445 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1447 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1449 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1451 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1453 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1455 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1458 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1459 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1460 Add a has_no_copy_on_protected bitfield.
1461 (elf_has_no_copy_on_protected): New.
1462 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1463 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1464 (elf_merge_gnu_property_list): Likewise.
1465 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1466 to FALSE for elf_has_no_copy_on_protected.
1467 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1468 (elf_i386_link_hash_entry): Add def_protected.
1469 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1470 when checking info->nocopyreloc.
1471 (elf_i386_link_setup_gnu_properties): Don't set
1472 extern_protected_data here.
1473 (elf_i386_merge_symbol_attribute): New function.
1474 (elf_backend_merge_symbol_attribute): New.
1475 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1476 (elf_x86_64_link_hash_entry): Add def_protected.
1477 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1478 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1479 when checking info->nocopyreloc.
1480 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1481 relocation run-time overflow and unresolvable R_X86_64_32S
1482 relocation against protected data symbol defined in shared object
1483 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1484 (elf_x86_64_link_setup_gnu_properties): Don't set
1485 extern_protected_data here.
1486 (elf_x86_64_merge_symbol_attribute): New function.
1487 (elf_backend_merge_symbol_attribute): New.
1489 2017-08-26 Alan Modra <amodra@gmail.com>
1491 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1492 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1493 (ppc_elf_relocate_section): Comment fix.
1494 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1495 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1496 Support dynamic relocs for TPREL16 when non-pic too.
1497 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1498 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1501 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1503 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1504 "symbol" in comments.
1505 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1507 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1510 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1511 R_X86_64_PC32 relocation run-time overflow and unresolvable
1512 R_X86_64_32S relocation with -z nocopyreloc.
1514 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1516 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1517 Undefined symbols may not have a type.
1518 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1520 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1522 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1523 bfd_link_info. Report shared, PIE or PDE object based on
1525 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1526 (elf_x86_64_relocate_section): Likewise.
1528 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1530 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1531 for function symbols.
1532 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1534 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1536 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1537 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1538 is set on any input relocatable file.
1539 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1541 2017-08-23 Alan Modra <amodra@gmail.com>
1544 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1545 ensure_undefweak_dynamic. Handle undefined too.
1546 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1547 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1548 (allocate_dynrelocs): Discard undefined non-default visibility
1549 relocs first. Make undefined syms dynamic. Tidy goto.
1551 2017-08-21 Alan Modra <amodra@gmail.com>
1552 H.J. Lu <hongjiu.lu@intel.com>
1555 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1556 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1558 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1561 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1562 undefined weak symbols.
1564 2017-08-18 Nick Clifton <nickc@redhat.com>
1567 * tekhex.c (getsym): Fix check for source pointer walking off the
1568 end of the input buffer.
1570 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1573 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1574 relocations in debug sections, change abort to _bfd_error_handler.
1576 2017-08-14 Nick Clifton <nickc@redhat.com>
1579 * elf.c (setup_group): Check for an empty or very small group
1581 * po/bfd.pot: Regenerate.
1583 2017-08-14 Alan Modra <amodra@gmail.com>
1586 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1587 alignment padding here.
1588 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1589 in a reverse pass over sections.
1591 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1594 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1595 for @plt suffixes first.
1596 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1598 2017-08-08 Nick Clifton <nickc@redhat.com>
1601 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1602 small section lengths.
1603 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1605 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1606 there is enough data present in the note.
1608 2017-08-08 Alan Modra <amodra@gmail.com>
1611 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1612 got.refcount for GOTOFF relocs, just create .got section.
1614 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1616 * elflink.c (elf_link_add_object_symbols): Move common symbol
1617 check after bed->common_definition.
1619 2017-08-07 Alan Modra <amodra@gmail.com>
1622 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1623 needed to define various dynamic tags have been discarded.
1625 2017-08-07 Nick Clifton <nickc@redhat.com>
1628 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1629 has not been set then use the bfd returned by
1630 _bfd_elf_link_setup_gnu_properties. If that is null then search
1631 through all the input bfds selecting the first normal, ELF format
1633 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1635 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1637 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1639 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1640 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1641 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1642 (elf_i386_link_check_relocs): New function.
1643 (bfd_elf32_bfd_link_check_relocs): New.
1644 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1646 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1647 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1648 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1649 (elf_x86_64_link_check_relocs): New function.
1650 (bfd_elf64_bfd_link_check_relocs): New.
1651 (bfd_elf32_bfd_link_check_relocs): Likewise.
1653 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1656 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1657 as undefined for --no-define-common.
1659 2017-08-05 Alan Modra <amodra@gmail.com>
1661 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1662 hppa_link_hash_table.
1664 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1666 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1667 entries for sysregs with negative indices.
1669 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1671 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1672 isn't the S/390 specific elf data.
1673 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1675 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1677 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1678 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1679 [R_RISCV_ADD16]: Likewise.
1680 [R_RISCV_ADD32]: Likewise.
1681 [R_RISCV_ADD64]: Likewise.
1682 [R_RISCV_SUB6]: Likewise.
1683 [R_RISCV_SUB8]: Likewise.
1684 [R_RISCV_SUB16]: Likewise.
1685 [R_RISCV_SUB32]: Likewise.
1686 [R_RISCV_SUB64]: Likewise.
1688 2017-07-31 Alan Modra <amodra@gmail.com>
1690 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1691 without ld.so checks.
1693 2017-07-29 Alan Modra <amodra@gmail.com>
1696 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1697 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1698 (is_elfv2_localentry0): Test non_zero_localentry.
1699 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1701 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1703 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1704 pointer check for htab->elf.irelplt.
1705 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1707 2017-07-27 Nick Clifton <nickc@redhat.com>
1710 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1712 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1714 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1716 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1718 (evax_bfd_print_emh): Check for invalid string lengths.
1720 2017-07-25 Nick Clifton <nickc@redhat.com>
1722 * po/fr.po: Updated French translation.
1724 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1727 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1728 16-bit absolute branches into 10-bit pc-relative branches on the
1729 MSP430 as well as the MSP430X.
1731 2017-07-25 Alan Modra <amodra@gmail.com>
1733 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1734 (stub_eh_frame_size): New function.
1735 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1736 (group_sections): Init group tls_get_addr_opt_bctrl.
1737 (ppc64_elf_size_stubs): Update sizing and initialization of
1738 .eh_frame. Iteration over stubs via group list.
1739 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1740 (ppc64_elf_finish_dynamic_sections): Update finalization of
1743 2017-07-24 Nick Clifton <nickc@redhat.com>
1746 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1747 of the relocs to the canonicalize_one_reloc routine.
1748 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1749 for the _bfd_mach_o_canonicalize_one_reloc field.
1750 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1751 res_base parameter. Use to check for corrupt pair relocs.
1752 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1754 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1756 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1759 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1760 enough data in the record before attempting to parse it.
1761 (_bfd_vms_slurp_eeom): Likewise.
1763 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1764 (image_set_ptr): Likewise.
1765 (alpha_vms_slurp_relocs): Likewise.
1767 (alpha_vms_object_p): Check for a truncated record.
1769 2017-07-24 Nick Clifton <nickc@redhat.com>
1772 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1773 an unrecognized reloc and sets the bfd_error value.
1774 * libbfd.h: Regenerate.
1775 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1777 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1778 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1779 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1780 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1781 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1783 2017-07-23 Alan Modra <amodra@gmail.com>
1785 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1788 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1791 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1792 reloc_class_ifunc for ifunc symbols.
1794 2017-07-19 Nick Clifton <nickc@redhat.com>
1797 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1798 correct magic bytes at the start, set the error to wrong format
1799 and clear the format selector before returning NULL.
1801 2017-07-19 Nick Clifton <nickc@redhat.com>
1804 * coff-rs6000.c (_bfd_strntol): New function.
1805 (_bfd_strntoll): New function.
1806 (GET_VALUE_IN_FIELD): New macro.
1807 (EQ_VALUE_IN_FIELD): new macro.
1808 (_bfd_xcoff_slurp_armap): Use new macros.
1809 (_bfd_xcoff_archive_p): Likewise.
1810 (_bfd_xcoff_read_ar_hdr): Likewise.
1811 (_bfd_xcoff_openr_next_archived_file): Likewise.
1812 (_bfd_xcoff_stat_arch_elt): Likewise.
1813 * coff64-rs6000.c (_bfd_strntol): New function.
1814 (_bfd_strntoll): New function.
1815 (GET_VALUE_IN_FIELD): New macro.
1816 (xcoff64_slurp_armap): Use new macros.
1818 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1819 John Eric Martin <John.Martin@emmicro-us.com>
1821 * bfd-in2.h: Regenerate.
1822 * libbfd.h: Regenerate.
1823 * elf32-arc.c (JLI): Define.
1824 * reloc.c: Add JLI relocations.
1826 2017-07-18 Nick Clifton <nickc@redhat.com>
1829 * coff-sh.c: Fix spelling typos.
1830 * compress.c: Likewise.
1831 * cpu-pdp11.c: Likewise.
1832 * ecofflink.c: Likewise.
1833 * elf-m10300.c: Likewise.
1835 * elf32-arm.c: Likewise.
1836 * elf32-m68k.c: Likewise.
1837 * elf32-nds32.c: Likewise.
1838 * elf32-ppc.c: Likewise.
1839 * elf32-sh.c: Likewise.
1840 * elf32-v850.c: Likewise.
1841 * elf64-ppc.c: Likewise.
1842 * elf64-x86-64.c: Likewise.
1843 * elflink.c: Likewise.
1844 * elfnn-aarch64.c: Likewise.
1845 * elfxx-mips.c: Likewise.
1847 * sunos.c: Likewise.
1848 * vms-alpha.c: Likewise.
1849 * xcofflink.c: Likewise.
1851 2017-07-18 Nick Clifton <nickc@redhat.com>
1854 * coffcode.h (handle_COMDAT): Replace abort with an error message
1857 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1860 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1863 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1865 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1867 2017-07-16 Alan Modra <amodra@gmail.com>
1869 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1870 __tls_index GOT entries when using __tls_get_addr_opt stub.
1871 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1873 2017-07-12 Alan Modra <amodra@gmail.com>
1875 * po/es.po: Update from translationproject.org/latest/bfd/.
1876 * po/fi.po: Likewise.
1877 * po/fr.po: Likewise.
1878 * po/id.po: Likewise.
1879 * po/ja.po: Likewise.
1880 * po/ro.po: Likewise.
1881 * po/ru.po: Likewise.
1882 * po/sr.po: Likewise.
1883 * po/sv.po: Likewise.
1884 * po/tr.po: Likewise.
1885 * po/uk.po: Likewise.
1886 * po/vi.po: Likewise.
1887 * po/zh_CN.po: Likewise.
1888 * po/hr.po: New file from translationproject.org.
1889 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1890 * configure: Regenerate.
1892 2017-07-12 Nick Clifton <nickc@redhat.com>
1894 Fix compile time warnings using gcc 7.1.1.
1895 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1897 (elf_xtensa_get_gotplt_section): Increase length of got_name
1899 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1900 default return of FALSE.
1901 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1902 default return of FALSE.
1904 2017-07-12 Alan Modra <amodra@gmail.com>
1906 * binary.c (binary_set_section_contents): Don't print filepos in
1908 (coff_write_object_contents): Cast size_t for error message.
1909 (coff_slurp_line_table): Don't use bfd_vma symndx.
1910 (coff_slurp_reloc_table): Remove unneeded cast.
1911 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1913 (find_abstract_instance_name): Likewise.
1914 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1915 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1916 (elf32_arm_check_relocs): Make r_symndx an int.
1917 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1919 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1921 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1923 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1924 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1925 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1926 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1927 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1928 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1929 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1930 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1931 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1932 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1933 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1934 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1935 and use %lu for error message.
1936 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1937 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1940 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1942 (elf32_arm_final_link_relocate): Likewise.
1943 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1944 * coffcode.h (styp_to_sec_flags): Likewise.
1945 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1946 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1947 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1948 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1949 (elf32_bfin_merge_private_bfd_data): Likewise.
1950 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1951 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1952 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1953 (i370_elf_relocate_section): Likewise.
1954 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1955 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1956 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1957 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1958 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1959 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1960 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1961 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1962 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1963 * ieee.c (ieee_write_id, read_id): Likewise.
1964 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1965 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1966 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1967 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1968 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1969 * stabs.c (_bfd_link_section_stabs): Likewise.
1971 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1973 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1974 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1975 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1976 * coff-sh.c (sh_relax_section): Likewise.
1977 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1978 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1979 * coffcode.h (coff_slurp_reloc_table): Likewise.
1980 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1981 (_bfd_coff_read_string_table): Likewise.
1982 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1983 * compress.c (bfd_get_full_section_contents): Likewise.
1984 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1985 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1986 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1987 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1988 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1989 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1990 (elf32_arm_write_section): Likewise.
1991 * elf32-bfin.c (bfin_relocate_section): Likewise.
1992 (bfinfdpic_relocate_section): Likewise.
1993 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1994 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1995 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1996 (elf_i386_relocate_section): Likewise.
1997 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1998 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1999 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2000 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2001 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2002 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2003 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2004 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2005 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2006 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2007 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2008 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2009 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2010 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2011 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2012 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2013 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2014 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2015 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2016 * elf32-sh.c (sh_elf_relax_section): Likewise.
2017 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2018 (sh_elf_relocate_section): Likewise.
2019 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2020 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2021 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2022 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2023 * elf32-v850.c (v850_elf_relax_section): Likewise.
2024 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2025 (elf_vax_relocate_section): Likewise.
2026 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2027 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2028 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2029 (do_fix_for_relocatable_link): Likewise.
2030 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2031 (elf64_alpha_relax_with_lituse): Likewise.
2032 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2033 (elf_hppa_final_link_relocate): Likewise.
2034 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2035 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2036 (elf64_vms_link_add_object_symbols): Likewise.
2037 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2038 (mmix_final_link_relocate): Likewise.
2039 * elf64-s390.c (invalid_tls_insn): Likewise.
2040 (elf_s390_relocate_section): Likewise.
2041 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2042 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2043 (elf_x86_64_relocate_section): Likewise.
2044 * elfcode.h (elf_slurp_symbol_table): Likewise.
2045 * elfcore.h (elf_core_file_p): Likewise.
2046 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2047 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2048 (elfNN_aarch64_relocate_section): Likewise.
2049 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2050 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2051 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2052 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2053 (_bfd_mips_elf_relocate_section): Likewise.
2054 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2055 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2056 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2057 * ieee.c (ieee_slurp_external_symbols): Likewise.
2058 * ihex.c (ihex_write_object_content): Likewise.
2059 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2060 * merge.c (_bfd_merged_section_offset): Likewise.
2061 * mmo.c (mmo_write_loc_chunk): Likewise.
2062 (mmo_write_object_contents): Likewise.
2063 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2064 * stabs.c (_bfd_link_section_stabs): Likewise.
2065 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2067 2017-07-11 Alan Modra <amodra@gmail.com>
2069 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2071 2017-07-11 Alan Modra <amodra@gmail.com>
2073 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2074 instruction" error using _bfd_error_handler, not einfo.
2076 2017-07-10 Nick Clifton <nickc@redhat.com>
2078 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2079 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2081 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2083 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2085 2017-07-07 Alan Modra <amodra@gmail.com>
2087 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2089 2017-07-07 Alan Modra <amodra@gmail.com>
2091 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2092 as long long. Move code replacing "ll" with "I64", and simplify.
2094 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2096 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2099 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2101 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2103 (line_info_add_file_name): Likewise.
2104 (decode_line_info): Likewise.
2106 2017-07-04 Tristan Gingold <gingold@adacore.com>
2108 * version.m4: Bump version to 2.29.51
2109 * configure: Regenerate.
2111 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2113 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2114 sanity check at the head of this function.
2116 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2118 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2119 dwarf_line_str_size.
2120 (struct attr_abbrev): Add field implicit_const.
2121 (dwarf_debug_sections): Add .debug_line_str.
2122 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2123 (dwarf_debug_section_assert): Add static assertion.
2124 (read_indirect_line_string): New.
2125 (read_abbrevs): Support DW_FORM_implicit_const.
2126 (is_str_attr): Support DW_FORM_line_strp.
2127 (read_attribute_value): Support DW_FORM_line_strp and
2128 DW_FORM_implicit_const.
2129 (read_attribute): Support DW_FORM_implicit_const.
2130 (line_info_add_include_dir, line_info_add_include_dir_stub):
2131 (line_info_add_file_name, read_formatted_entries): New.
2132 (decode_line_info, parse_comp_unit): Support DWARF 5.
2133 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2135 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2137 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2138 abort statement that was put for symbols that are not dynamic.
2140 2017-07-03 Tristan Gingold <gingold@adacore.com>
2142 * po/bfd.pot: Regenerate
2144 2017-07-03 Alan Modra <amodra@gmail.com>
2146 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2147 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2148 * elf.c (setup_group): Use "Lx" to print sh_size.
2149 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2150 unknown section type in hex.
2151 (copy_special_section_fields): Style fix.
2152 (bfd_section_from_shdr): Correct format for sh_link. Use a
2153 common error message for all the variants of unrecognized
2155 (assign_file_positions_for_load_sections): Use "Lx" for lma
2156 adjust error message.
2157 (assign_file_positions_for_non_load_sections): Formatting.
2158 (rewrite_elf_program_header): Formatting. Use "Lx" for
2159 bfd_vma values in error messages.
2160 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2161 ELF_R_SYM value to type expected by format.
2162 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2164 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2165 (elf_link_input_bfd): Use "Lx" for r_info.
2166 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2168 2017-07-03 Alan Modra <amodra@gmail.com>
2170 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2171 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2172 Microsoft C library variant of long long format specifier.
2173 (PRINT20): Cast value to bfd_uint64_t not long long.
2174 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2175 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2176 long long. Don't cast to bfd_vma.
2177 * elf32-score.c (score3_bfd_getl48): Likewise.
2178 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2180 2017-07-03 Alan Modra <amodra@gmail.com>
2182 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2184 (bfd_elf_print_symbol): Don't cast symbol->flags.
2185 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2186 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2187 _bfd_error_handler argument order.
2188 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2190 2017-07-03 Alan Modra <amodra@gmail.com>
2192 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2193 AC_TYPE_LONG_DOUBLE.
2194 * configure: Regenerate.
2195 * config.in: Regenerate.
2197 2017-06-29 Andrew Waterman <andrew@sifive.com>
2199 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2202 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2204 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2205 unless it is undefined weak.
2206 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2207 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2209 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2210 is not dynamic in PIC, abort.
2212 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2215 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2216 undefined weak symbols into dynamic.
2217 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2218 relocation for non-dynamic symbols.
2219 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2221 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2223 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2224 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2225 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2226 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2227 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2230 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2232 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2233 (elfcore_write_s390_gs_bc): Likewise.
2234 * elf.c (elfcore_grok_s390_gs_cb): New function.
2235 (elfcore_grok_s390_gs_bc): New function.
2236 (elfcore_grok_note): Call them.
2237 (elfcore_write_s390_gs_cb): New function.
2238 (elfcore_write_s390_gs_bc): New function.
2239 (elfcore_write_register_note): Call them.
2241 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2243 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2244 bfd_get_file_size. Check archive element size.
2245 (_bfd_generic_get_section_contents_in_window): Likewise.
2247 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2249 * bfd-in2.h: Regenerated.
2250 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2251 (bfd_get_file_size): Likewise.
2253 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2254 Matthew Fortune <matthew.fortune@imgtec.com>
2256 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2257 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2258 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2259 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2261 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2262 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2263 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2264 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2265 `bfd_mach_mips_interaptiv_mr2' entries.
2266 * bfd-in2.h: Regenerate.
2268 2017-06-27 Nick Clifton <nickc@redhat.com>
2270 * tekhex.c (pass_over): Revert accidental conversion of a local
2271 array to a static array.
2273 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2276 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2277 reloc addend if necessary. Adjust diff only if
2278 shrinked_insn_address < end_address.
2280 2017-06-27 Alan Modra <amodra@gmail.com>
2283 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2284 (_bfd_generic_get_section_contents_in_window): Likewise.
2286 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2288 * elfnn-riscv.c (perform_relocation): Support the new
2289 R_RISCV_32_PCREL relocation.
2290 (riscv_elf_relocate_section): Likewise.
2291 * elfxx-riscv.c (howto_table): Likewise.
2292 (riscv_reloc_map): Likewise.
2293 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2294 * libbfd.h: Regenerate.
2296 2017-06-27 Alan Modra <amodra@gmail.com>
2299 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2300 Use unsigned file pointer type, and remove cast.
2301 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2302 Add "count", not "sz".
2304 2017-06-26 Pedro Alves <palves@redhat.com>
2307 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2310 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2313 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2316 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2318 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2319 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2320 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2321 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2322 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2324 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2327 * compress.c (bfd_get_full_section_contents): Don't check the
2329 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2330 reject a section whose size + offset is greater than the size
2332 (_bfd_generic_get_section_contents_in_window): Likewise.
2334 2017-06-26 Nick Clifton <nickc@redhat.com>
2337 * tekhex.c (getvalue): Check for the source pointer exceeding the
2338 end pointer before the first byte is read.
2340 2017-06-26 Nick Clifton <nickc@redhat.com>
2343 * opncls.c (get_build_id): Check that the section is big enough
2344 to contain the whole note.
2345 * compress.c (bfd_get_full_section_contents): Check for and reject
2346 a section whose size is greater than the size of the entire file.
2347 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2348 contain a notes section.
2350 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2352 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2354 (elf_s390_modify_segment_map): Likewise.
2355 (bfd_elf_s390_set_options): Lisewise.
2357 2017-06-26 Alan Modra <amodra@gmail.com>
2359 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2361 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2362 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2363 .preinit_array on --just-syms bfds.
2364 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2365 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2366 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2368 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2370 * elf.c (find_link): Bounds check "hint".
2372 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2374 * elf32-arm.c (using_thumb_only): Update list of architectures in
2375 BFD_ASSERT for which the logic is valid.
2376 (using_thumb2_bl): Likewise.
2377 (using_thumb2): Likewise and return true for ARMv8-R.
2378 (arch_has_arm_nop): Likewise.
2379 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2380 merging logic. Update commentis for value 15 of v8m_baseline,
2381 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2382 merging of value 15 of Tag_CPU_arch.
2384 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2386 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2387 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2388 * bfd-in2.h: Regenerate.
2390 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2392 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2393 the error_alignment label forward. Properly align program
2394 property note section.
2396 2017-06-22 Eric Christopher <echristo@gmail.com>
2398 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2399 abs to fix a truncation warning.
2401 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2403 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2404 local undefined weak symbol to 0.
2405 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2407 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2409 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2410 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2411 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2412 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2413 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2414 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2415 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2416 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2418 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2420 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2421 (elf_i386_lazy_ibt_plt_entry): Likewise.
2422 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2423 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2424 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2425 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2426 (elf_i386_lazy_plt_layout): Likewise.
2427 (elf_i386_non_lazy_plt_layout): Likewise.
2428 (elf_i386_link_hash_entry): Add plt_second.
2429 (elf_i386_link_hash_table): Add plt_second and
2430 plt_second_eh_frame.
2431 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2432 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2433 the second PLT. Check the second PLT.
2434 (elf_i386_relocate_section): Use the second PLT to resolve
2435 PLT reference if needed.
2436 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2438 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2439 second PLT. Generate unwind info for the second PLT.
2440 (elf_i386_plt_type): Add plt_second.
2441 (elf_i386_get_synthetic_symtab): Support the second PLT.
2442 (elf_i386_parse_gnu_properties): Support
2443 GNU_PROPERTY_X86_FEATURE_1_AND.
2444 (elf_i386_merge_gnu_properties): Support
2445 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2446 on GNU_PROPERTY_X86_FEATURE_1_IBT
2447 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2448 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2449 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2450 is set on all relocatable inputs.
2451 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2452 (elf_x32_lazy_ibt_plt_entry): Likewise.
2453 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2454 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2455 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2456 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2457 (elf_x86_64_lazy_ibt_plt): Likewise.
2458 (elf_x32_lazy_ibt_plt): Likewise.
2459 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2460 (elf_x32_non_lazy_ibt_plt): Likewise.
2461 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2462 (elf_x86_64_parse_gnu_properties): Support
2463 GNU_PROPERTY_X86_FEATURE_1_AND.
2464 (elf_x86_64_merge_gnu_properties): Support
2465 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2466 on GNU_PROPERTY_X86_FEATURE_1_IBT
2467 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2468 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2469 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2470 is set on all relocatable inputs.
2472 2017-06-22 Nick Clifton <nickc@redhat.com>
2475 * som.c (setup_sections): NUL terminate the space_strings buffer.
2476 Check that the space.name field does not index beyond the end of
2477 the space_strings buffer.
2479 2017-06-21 Nick Clifton <nickc@redhat.com>
2482 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2484 2017-06-21 Nick Clifton <nickc@redhat.com>
2487 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2488 type of the size parameter.
2489 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2490 length of the counted string.
2491 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2492 (_bfd_vms_save_counted_string): Likewise.
2493 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2494 _bfd_vms_save_counted_string.
2495 (_bfd_vms_slurp_ehdr): Likewise.
2496 (_bfd_vms_slurp_egsd): Likewise.
2497 (Parse_module): Likewise.
2499 2017-06-21 Alan Modra <amodra@gmail.com>
2501 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2502 calls before tocsave calls.
2503 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2506 2017-06-21 Nick Clifton <nickc@redhat.com>
2509 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2510 bfd_get_full_section_contents returns no contents.
2512 2017-06-21 Nick Clifton <nickc@redhat.com>
2515 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2518 2017-06-21 Nick Clifton <nickc@redhat.com>
2521 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2523 (image_set_ptr): Likewise.
2524 (alpha_vms_fix_sec_rel): Likewise.
2525 (alpha_vms_slurp_relocs): Likewise.
2527 2017-06-21 Nick Clifton <nickc@redhat.com>
2530 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2532 (ieee_archive_p): Likewise.
2533 (ieee_object_p): Likewise.
2535 2017-06-21 Nick Clifton <nickc@redhat.com>
2538 * elf.c (setup_group): Zero the group section pointer list after
2539 allocation so that loops can be caught. Check for NULL pointers
2540 when processing a group list.
2542 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2544 * elf-s390.h: New file.
2545 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2547 (elf_s390_additional_program_headers): New function.
2548 (elf_s390_modify_segment_map): New function.
2549 (bfd_elf_s390_set_options): New function.
2550 (elf_backend_additional_program_headers)
2551 (elf_backend_modify_segment_map): Add macro definitions.
2553 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2556 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2557 the DYNAMIC bit instead of bfd_count_sections.
2559 2017-06-19 Nick Clifton <nickc@redhat.com>
2562 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2564 (evax_bfd_print_eeom): Likewise.
2565 (evax_bfd_print_egsd): Check for an overlarge record length.
2566 (evax_bfd_print_etir): Likewise.
2568 2017-06-19 Nick Clifton <nickc@redhat.com>
2571 * libieee.h (struct common_header_type): Add end_p field.
2572 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2574 (read_id): Check for a length that exceeds the remaining bytes in
2576 (ieee_seek): Initialise end_p.
2577 (ieee_archive_p): Likewise.
2578 (ieee_object_p): Likewise.
2580 2017-06-19 Nick Clifton <nickc@redhat.com>
2583 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2584 before reading the EIHS structure entries.
2586 2017-06-19 Nick Clifton <nickc@redhat.com>
2589 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2590 gsd_size. Check that there are enough bytes remaining to read the
2591 type and size of the next egsd. Check that the size of the egsd
2592 does not exceed the size of the record.
2594 2017-06-19 Alan Modra <amodra@gmail.com>
2596 * config.bfd: Correct targ_underscore for cris.
2598 2017-06-18 Alan Modra <amodra@gmail.com>
2600 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2601 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2603 2017-06-16 Nick Clifton <nickc@redhat.com>
2605 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2606 bucketlist is empty because there are no symbols to add to the
2609 2017-06-16 Alan Modra <amodra@gmail.com>
2615 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2616 (BFD_JUMP_TABLE_LINK): Likewise.
2617 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2618 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2619 (bfd_elf_define_start_stop): New function.
2620 * linker.c (bfd_generic_define_start_stop): New function.
2621 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2623 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2624 * aout-target.h (MY_bfd_define_start_stop): Define.
2625 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2626 * binary.c (binary_bfd_define_start_stop): Define.
2627 * bout.c (b_out_bfd_define_start_stop): Define.
2628 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2629 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2630 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2631 * coffcode.h (coff_bfd_define_start_stop): Define.
2632 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2633 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2634 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2635 * ieee.c (ieee_bfd_define_start_stop): Define.
2636 * ihex.c (ihex_bfd_define_start_stop): Define.
2637 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2638 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2639 * mmo.c (mmo_bfd_define_start_stop): Define.
2640 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2641 * oasys.c (oasys_bfd_define_start_stop): Define.
2642 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2643 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2644 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2645 * som.c (som_bfd_define_start_stop): Define.
2646 * srec.c (srec_bfd_define_start_stop): Define.
2647 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2648 * versados.c (versados_bfd_define_start_stop): Define.
2649 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2650 (alpha_vms_bfd_define_start_stop): Define.
2651 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2652 * bfd-in2.h: Regenerate.
2653 * libbfd.h: Regenerate.
2655 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2657 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2658 SYMBOL_REFERENCES_LOCAL.
2660 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2663 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2664 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2665 runtime for if there needs copy relocation elimination.
2666 (need_copy_relocation_p): New function. Return true for symbol with
2667 pc-relative references and if it's against read-only sections.
2668 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2669 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2670 that are related with accessing external objects.
2671 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2672 in elfNN_aarch64_check_relocs.
2674 2017-06-15 Nick Clifton <nickc@redhat.com>
2677 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2680 (ieee_archive_p): Likewise.
2682 2017-06-15 Nick Clifton <nickc@redhat.com>
2685 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2687 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2689 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2690 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2691 keep both windowed and call0 ABI PLT definitions.
2692 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2693 elf_xtensa_*_plt_entry endex.
2694 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2696 2017-06-14 Nick Clifton <nickc@redhat.com>
2699 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2702 2017-06-14 Nick Clifton <nickc@redhat.com>
2705 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2706 maximum value for the ascic pointer. Check that name processing
2707 does not read beyond this value.
2708 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2711 2017-06-14 Nick Clifton <nickc@redhat.com>
2714 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2715 (process_otr): Check for an invalid offset in the otr structure.
2717 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2719 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2721 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2727 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2728 vtable field to a union.
2729 (_bfd_elf_is_start_stop): Removed.
2730 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2731 __start_SECNAME and __stop_SECNAME symbols.
2732 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2733 * elflink.c (_bfd_elf_is_start_stop): Removed.
2734 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2735 _bfd_elf_is_start_stop.
2736 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2737 __stop_SECNAME symbols. Updated.
2738 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2739 (bfd_elf_gc_record_vtinherit): Likewise.
2740 (bfd_elf_gc_record_vtentry): Likewise.
2742 2017-06-13 Nick Clifton <nickc@redhat.com>
2745 * elflink.c (elf_link_adjust_relocs): Generate an error when
2746 encountering a reloc against a symbol removed by garbage
2749 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2751 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2752 to merge_gnu_properties.
2753 * elf-properties.c (elf_merge_gnu_properties): Add struct
2754 bfd_link_info * and pass it to merge_gnu_properties.
2755 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2756 and pass it to elf_merge_gnu_properties.
2757 (_bfd_elf_link_setup_gnu_properties): Pass info to
2758 elf_merge_gnu_property_list.
2759 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2761 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2763 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2766 * binary.c (binary_set_section_contents): Scale lma by octets
2767 per byte to set filepos.
2769 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2771 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2774 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2776 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2779 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2781 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2782 patched section contents for TLS IE reloc.
2783 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2785 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2787 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2788 RELOC_FOR_GLOBAL_SYMBOL macro.
2790 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2792 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2795 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2797 * config/tc-arc.c (md_undefined_symbol): Changed.
2798 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2800 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2802 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2805 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2807 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2808 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2810 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2812 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2815 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2817 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2818 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2819 is non-zero. Add clarifying comments.
2821 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2823 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2824 name. Use local IFUNC symbol name string to report unsupported
2825 non-PIC call to IFUNC function.
2826 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2827 when generating R_386_IRELATIVE relocation.
2828 (elf_i386_finish_dynamic_symbol): Likewise.
2829 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2831 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2832 when generating R_X86_64_IRELATIVE relocation.
2833 (elf_x86_64_finish_dynamic_symbol): Likewise.
2835 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2837 * elf.c (setup_group): Make sure BFD sections are created for all
2838 group sections in the input file when processing SHF_GROUP
2840 (bfd_section_from_shdr): Avoid duplicating logic already
2841 implemented in `setup_group'.
2843 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2846 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2847 if the hint address is zero.
2849 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2852 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2853 ELF_COMMON_DEF_P for common symbols.
2855 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2857 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2858 SEC_GROUP sections as SEC_EXCLUDE.
2859 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2860 (assign_section_numbers): Use resolve_section_groups flag instead
2861 of relocatable link type.
2862 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2863 flag instead of checking the final_link flag for part of the
2864 checks in here. Fix white space as a result.
2865 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2866 instead of relocatable link type.
2867 (bfd_elf_final_link): Likewise.
2869 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2871 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2873 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2874 (s3_bfd_score_elf_check_relocs): Likewise.
2875 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2876 (score_elf_final_link_relocate): Likewise.
2877 (s7_bfd_score_elf_check_relocs): Likewise.
2879 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2881 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2884 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2886 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2887 from `reloc_count' rather than decrementing it.
2888 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2889 `reloc_count' by `int_rels_per_ext_rel'.
2890 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2891 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2892 entry determination.
2893 (s3_bfd_score_elf_check_relocs): Likewise.
2894 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2895 (s7_bfd_score_elf_relocate_section): Likewise.
2896 (s7_bfd_score_elf_check_relocs): Likewise.
2897 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2898 prototype and function.
2899 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2900 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2901 triple rather than once the sum of REL and RELA relocation entry
2903 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2904 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2905 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2906 storage allocation size determination.
2907 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2908 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2909 by `int_rels_per_ext_rel' for last relocation entry
2911 (bfd_elf_final_link): Do not multiply `reloc_count' by
2912 `int_rels_per_ext_rel' for internal relocation storage
2913 allocation size determination.
2914 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2915 `int_rels_per_ext_rel' for last relocation entry determination.
2916 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2917 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2918 (_bfd_mips_elf_relocate_section): Likewise.
2920 2017-06-05 Alan Modra <amodra@gmail.com>
2923 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2925 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2927 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2928 determine structure sizes.
2929 (elfcore_grok_freebsd_prstatus): Likewise.
2931 2017-06-01 Alan Modra <amodra@gmail.com>
2933 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2934 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2936 (is_elfv2_localentry0): New function.
2937 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2938 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2939 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2940 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2941 optimized localentry:0 stubs.
2942 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2943 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2945 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2947 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2949 2017-05-30 Casey Smith <clegg89@gmail.com>
2952 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2953 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2955 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2957 * cpu-arc.c (arc_compatible): New function.
2959 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2961 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2963 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2966 * bfdio.c (bfd_get_file_size): New function.
2967 * bfd-in2.h: Regenerated.
2969 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2971 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2974 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2976 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2977 dynobj instead of htab->elf.dynobj.
2979 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2981 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2983 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2984 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2985 actual number of internal relocations retrieved. Adjust
2986 function description.
2987 (bfd_elf64_canonicalize_reloc): Remove macro.
2988 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2990 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2992 * archures.c (bfd_mach_sparc_v9m8): Define.
2993 (bfd_mach_sparc_v8plusm8): Likewise.
2994 (bfd_mach_sparc_v9_p): Adjust to M8.
2995 (bfd_mach_sparc_64bit_p): Likewise.
2996 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2997 bfd_mach_sparc_v8plusm8.
2998 * bfd-in2.h: Regenerated.
2999 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3001 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3002 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3003 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3005 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3006 bfd_mach_sparc_v8plusm8.
3008 2017-05-19 Alan Modra <amodra@gmail.com>
3010 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3011 debug and special sections when no non-note alloc sections in an
3014 2017-05-18 Alan Modra <amodra@gmail.com>
3016 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3017 * elf-m10300.c: Likewise.
3019 * elf32-arc.c: Likewise.
3020 * elf32-bfin.c: Likewise.
3021 * elf32-m68k.c: Likewise.
3022 * elf32-nds32.c: Likewise.
3023 * elf32-tilepro.c: Likewise.
3024 * elflink.c: Likewise.
3025 * elfnn-aarch64.c: Likewise.
3026 * elfnn-riscv.c: Likewise.
3027 * elfxx-tilegx.c: Likewise.
3028 * mach-o.c: Likewise.
3029 * peXXigen.c: Likewise.
3030 * vms-alpha.c: Likewise.
3031 * vms-lib.c: Likewise.
3033 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3036 * elflink.c (elf_gc_mark_debug_section): New function.
3037 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3038 referenced by kept debug sections.
3040 2017-05-16 Alan Modra <amodra@gmail.com>
3042 * elf-m10300.c: Rename occurrences of non_ir_ref.
3043 * elf32-arm.c: Likewise.
3044 * elf32-bfin.c: Likewise.
3045 * elf32-cr16.c: Likewise.
3046 * elf32-cris.c: Likewise.
3047 * elf32-d10v.c: Likewise.
3048 * elf32-dlx.c: Likewise.
3049 * elf32-fr30.c: Likewise.
3050 * elf32-frv.c: Likewise.
3051 * elf32-hppa.c: Likewise.
3052 * elf32-i370.c: Likewise.
3053 * elf32-i386.c: Likewise.
3054 * elf32-iq2000.c: Likewise.
3055 * elf32-lm32.c: Likewise.
3056 * elf32-m32c.c: Likewise.
3057 * elf32-m32r.c: Likewise.
3058 * elf32-m68hc1x.c: Likewise.
3059 * elf32-m68k.c: Likewise.
3060 * elf32-mcore.c: Likewise.
3061 * elf32-metag.c: Likewise.
3062 * elf32-microblaze.c: Likewise.
3063 * elf32-moxie.c: Likewise.
3064 * elf32-msp430.c: Likewise.
3065 * elf32-mt.c: Likewise.
3066 * elf32-nios2.c: Likewise.
3067 * elf32-or1k.c: Likewise.
3068 * elf32-ppc.c: Likewise.
3069 * elf32-rl78.c: Likewise.
3070 * elf32-s390.c: Likewise.
3071 * elf32-score.c: Likewise.
3072 * elf32-score7.c: Likewise.
3073 * elf32-sh.c: Likewise.
3074 * elf32-tic6x.c: Likewise.
3075 * elf32-tilepro.c: Likewise.
3076 * elf32-v850.c: Likewise.
3077 * elf32-vax.c: Likewise.
3078 * elf32-xstormy16.c: Likewise.
3079 * elf32-xtensa.c: Likewise.
3080 * elf64-alpha.c: Likewise.
3081 * elf64-hppa.c: Likewise.
3082 * elf64-ia64-vms.c: Likewise.
3083 * elf64-mmix.c: Likewise.
3084 * elf64-ppc.c: Likewise.
3085 * elf64-s390.c: Likewise.
3086 * elf64-sh64.c: Likewise.
3087 * elf64-x86-64.c: Likewise.
3088 * elflink.c: Likewise.
3089 * elfnn-aarch64.c: Likewise.
3090 * elfnn-ia64.c: Likewise.
3091 * elfnn-riscv.c: Likewise.
3092 * elfxx-mips.c: Likewise.
3093 * elfxx-sparc.c: Likewise.
3094 * elfxx-tilegx.c: Likewise.
3095 * linker.c: Likewise.
3097 2017-05-16 Alan Modra <amodra@gmail.com>
3099 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3100 * elflink.c (elf_link_add_object_symbols): Update to use
3102 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3104 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3106 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3108 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3110 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3112 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3113 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3115 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3117 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3119 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3121 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3122 to plt_second/plt_second_eh_frame.
3123 (elf_x86_64_link_hash_newfunc): Updated.
3124 (elf_x86_64_allocate_dynrelocs): Likewise.
3125 (elf_x86_64_size_dynamic_sections): Likewise.
3126 (elf_x86_64_relocate_section): Likewise.
3127 (elf_x86_64_finish_dynamic_symbol): Likewise.
3128 (elf_x86_64_finish_dynamic_sections): Likewise.
3129 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3130 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3132 (elf_backend_setup_gnu_properties): Updated. Create the
3133 .plt.sec section instead of the .plt.sec section.
3135 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3137 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3138 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3139 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3141 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3143 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3144 (bfd_elf64_set_reloc): Define.
3145 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3147 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3149 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3150 (struct bfd_target): New field _bfd_set_reloc.
3151 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3152 * reloc.c (_bfd_generic_set_reloc): New function.
3153 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3154 * nlm-target.h (nlm_set_reloc): Likewise.
3155 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3156 * aout-tic30.c (MY_set_reloc): Likewise.
3157 * aout-target.h (MY_set_reloc): Likewise.
3158 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3159 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3160 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3161 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3162 * aout-adobe.c (aout_32_set_reloc): Likewise.
3163 * bout.c (b_out_set_reloc): Likewise.
3164 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3165 * i386os9k.c (aout_32_set_reloc): Likewise.
3166 * ieee.c (ieee_set_reloc): Likewise.
3167 * oasys.c (oasys_set_reloc): Likewise.
3168 * som.c (som_set_reloc): Likewise.
3169 * versados.c (versados_set_reloc): Likewise.
3170 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3171 _bfd_generic_set_reloc.
3172 (rs6000_xcoff64_aix_vec): LIkewise.
3173 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3174 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3175 * i386msdos.c (msdos_set_reloc): Define to
3176 _bfd_norelocs_set_reloc.
3177 * elfcode.h (elf_set_reloc): Define.
3178 * bfd-in2.h: Regenerated.
3180 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3183 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3184 for IFUNC function address.
3186 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3188 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3189 (CONFLICT_LIST): Likewise.
3190 (opcode/arc-attrs.h): Include.
3191 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3192 (arc_extract_features): New file.
3193 (arc_stralloc): Likewise.
3194 (arc_elf_merge_attributes): Likewise.
3195 (arc_elf_merge_private_bfd_data): Use object attributes.
3196 (bfd_arc_get_mach_from_attributes): New function.
3197 (arc_elf_object_p): Use object attributes.
3198 (arc_elf_final_write_processing): Likewise.
3199 (elf32_arc_obj_attrs_arg_type): New function.
3200 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3201 (elf32_arc_section_from_shdr): Likewise.
3202 (elf_backend_obj_attrs_vendor): Define.
3203 (elf_backend_obj_attrs_section): Likewise.
3204 (elf_backend_obj_attrs_arg_type): Likewise.
3205 (elf_backend_obj_attrs_section_type): Likewise.
3206 (elf_backend_obj_attrs_handle_unknown): Likewise.
3207 (elf_backend_section_from_shdr): Likewise.
3209 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3212 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3213 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3214 and the destination is a Thumb symbol.
3216 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3218 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3219 initializer to silence GCC 4.2.
3220 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3222 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3224 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3225 (LAZY_PLT_ENTRY_SIZE): This.
3226 (NON_LAZY_PLT_ENTRY_SIZE): New.
3227 (elf_x86_64_plt0_entry): Renamed to ...
3228 (elf_x86_64_lazy_plt0_entry): This.
3229 (elf_x86_64_plt_entry): Renamed to ...
3230 (elf_x86_64_lazy_plt_entry): This.
3231 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3232 (elf_x86_64_lazy_bnd_plt0_entry): This.
3233 (elf_x86_64_legacy_plt_entry): Removed.
3234 (elf_x86_64_bnd_plt_entry): Renamed to ...
3235 (elf_x86_64_lazy_bnd_plt_entry): This.
3236 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3237 (elf_x86_64_non_lazy_plt_entry): This.
3238 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3239 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3240 (elf_x86_64_eh_frame_plt): Renamed to ...
3241 (elf_x86_64_eh_frame_lazy_plt): This.
3242 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3243 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3244 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3245 (elf_x86_64_eh_frame_non_lazy_plt): This.
3246 (elf_x86_64_lazy_plt_layout): New.
3247 (elf_x86_64_non_lazy_plt_layout): Likewise.
3248 (elf_x86_64_plt_layout): Likewise.
3249 (elf_x86_64_backend_data): Remove PLT layout information. Add
3250 os for target system.
3251 (GET_PLT_ENTRY_SIZE): Removed.
3252 (elf_x86_64_lazy_plt): New.
3253 (elf_x86_64_non_lazy_plt): Likewise.
3254 (elf_x86_64_lazy_bnd_plt): Likewise.
3255 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3256 (elf_x86-64_arch_bed): Updated.
3257 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3258 (elf_x86_64_create_dynamic_sections): Removed.
3259 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3260 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3261 (elf_x86-64_adjust_dynamic_symbol): Updated.
3262 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3263 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3264 size for PLT0 if there is no PLT0. Get plt_entry_size from
3265 non_lazy_plt for non-lazy PLT entries.
3266 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3267 from non_lazy_plt for non-lazy PLT entries.
3268 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3269 if there is no PLT0.
3270 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3271 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3272 entries with non-lazy PLT layout. Don't fill the second and third
3273 slots in the PLT entry if there is no PLT0.
3274 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3275 if there is no PLT0. Set sh_entsize on the .plt.got section.
3276 (compare_relocs): New.
3277 (elf_x86_64_plt_type): Likewise.
3278 (elf_x86_64_plt): Likewise.
3279 (elf_x86_64_nacl_plt): New. Forward declaration.
3280 (elf_x86_64_get_plt_sym_val): Removed.
3281 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3282 against all dynamic relocations.
3283 (elf_x86_64_link_setup_gnu_properties): New function.
3284 (elf_backend_create_dynamic_sections): Updated.
3285 (elf_backend_setup_gnu_properties): New.
3286 (elf_x86_64_nacl_plt): New.
3287 (elf_x86_64_nacl_arch_bed): Updated.
3289 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3291 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3292 (LAZY_PLT_ENTRY_SIZE): This.
3293 (NON_LAZY_PLT_ENTRY_SIZE): New.
3294 (elf_i386_plt0_entry): Renamed to ...
3295 (elf_i386_lazy_plt0_entry): This.
3296 (elf_i386_plt_entry): Renamed to ...
3297 (elf_i386_lazy_plt_entry): This.
3298 (elf_i386_pic_plt0_entry): Renamed to ...
3299 (elf_i386_pic_lazy_plt0_entry): This.
3300 (elf_i386_pic_plt_entry): Renamed to ...
3301 (elf_i386_pic_lazy_plt_entry): This.
3302 (elf_i386_got_plt_entry): Renamed to ...
3303 (elf_i386_non_lazy_plt_entry): This.
3304 (elf_i386_pic_got_plt_entry): Renamed to ...
3305 (elf_i386_pic_non_lazy_plt_entry): This.
3306 (elf_i386_eh_frame_plt): Renamed to ...
3307 (elf_i386_eh_frame_lazy_plt): This.
3308 (elf_i386_eh_frame_plt_got): Renamed to ...
3309 (elf_i386_eh_frame_non_lazy_plt): This.
3310 (elf_i386_plt_layout): Renamed to ...
3311 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3312 eh_frame_plt_got_size.
3313 (elf_i386_non_lazy_plt_layout): New.
3314 (elf_i386_plt_layout): Likewise.
3315 (elf_i386_non_lazy_plt): Likewise.
3316 (GET_PLT_ENTRY_SIZE): Removed.
3317 (elf_i386_plt): Renamed to ...
3318 (elf_i386_lazy_plt): This.
3319 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3320 (elf_i386_arch_bed): Updated.
3321 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3322 (elf_i386_create_dynamic_sections): Removed.
3323 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3324 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3325 (elf_i386_adjust_dynamic_symbol): Updated.
3326 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3327 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3328 size for PLT0 if there is no PLT0.
3329 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3330 output section is discarded only if GOT isn't empty.
3331 (elf_i386_relocate_section): Updated. Properly get PLT index
3332 if there is no PLT0.
3333 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3334 second and third slots in the PLT entry if there is no PLT0.
3335 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3336 if there is no PLT0. Set sh_entsize on the .plt.got section.
3337 (elf_i386_nacl_plt): Forward declaration.
3338 (elf_i386_get_plt_sym_val): Removed.
3339 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3340 against all dynamic relocations.
3341 (elf_i386_link_setup_gnu_properties): New function.
3342 (elf_backend_create_dynamic_sections): Updated.
3343 (elf_backend_setup_gnu_properties): New.
3344 (elf_i386_nacl_plt): Updated.
3345 (elf_i386_nacl_arch_bed): Likewise.
3346 (elf_i386_vxworks_arch_bed): Likewise.
3348 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3350 * elflink.c (elf_output_implib): Remove executable flag from import
3352 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3353 library is a relocatable object file.
3355 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3358 * elf32-avr.c (avr_should_move_sym): New function.
3359 (avr_should_reduce_sym_size): Likewise.
3360 (avr_should_increase_sym_size): Likewise.
3361 (elf32_avr_relax_delete_bytes): Adjust symbol values
3362 and sizes by calling new functions.
3364 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3366 * config.bfd (riscv32-*): Enable rv64.
3368 2017-05-02 Alan Modra <amodra@gmail.com>
3371 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3372 rather than h->root.type == bfd_link_hash_new.
3373 (bfd_elf_record_link_assignment): Similarly, call
3374 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3376 2017-04-29 Alan Modra <amodra@gmail.com>
3379 * reloc.c (reloc_offset_in_range): New function.
3380 (bfd_perform_relocation, bfd_install_relocation): Use it.
3381 (_bfd_final_link_relocate): Likewise.
3383 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3385 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3386 before using .plt.got.
3387 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3389 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3391 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3392 instead of "+=" to update 0.
3394 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3396 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3397 .plt.got section here.
3398 (elf_i386_check_relocs): Don't create the .plt.got section.
3399 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3400 the .plt.got and .plt.bnd sections here.
3401 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3404 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3406 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3408 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3409 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3410 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3411 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3414 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3416 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3418 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3419 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3420 the first relocatable ELF input with GNU properties.
3422 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3424 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3425 VxWorks for non-PIC.
3427 2017-04-27 Alan Modra <amodra@gmail.com>
3429 * elf-bfd.h (struct elf_backend_data): Make asection param of
3430 elf_backend_eh_frame_address_size const.
3431 (_bfd_elf_eh_frame_address_size): Likewise.
3432 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3433 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3434 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3435 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3436 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3437 (next_cie_fde_offset): Constify params.
3438 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3440 2017-04-27 Alan Modra <amodra@gmail.com>
3442 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3443 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3444 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3446 (offset_adjust): New function.
3447 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3448 (adjust_eh_frame_local_symbols): Likewise.
3449 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3450 after changing anything. Return true if anything changed.
3451 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3452 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3454 2017-04-27 Alan Modra <amodra@gmail.com>
3456 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3459 2017-04-27 Alan Modra <amodra@gmail.com>
3461 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3462 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3463 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3464 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3465 for undef and undefweak dyn_relocs.
3466 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3467 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3468 (allocate_got, allocate_dynrelocs): Likewise.
3469 (ppc64_elf_relocate_section): Likewise.
3471 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3473 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3474 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3475 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3476 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3478 2017-04-26 Nick Clifton <nickc@redhat.com>
3481 * reloc.c (bfd_perform_relocation): Check for a negative address
3484 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3487 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3489 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3490 (elf_backend_always_renumber_dynsyms): Define.
3491 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3492 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3493 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3494 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3496 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3498 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3500 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3501 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3502 sections have been created.
3504 2017-04-26 Nick Clifton <nickc@redhat.com>
3507 * compress.c (bfd_init_section_compress_status): Check the return
3508 value from bfd_malloc.
3510 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3512 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3513 no_finish_dynamic_symbol.
3514 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3516 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3517 weak symbol, don't make it dynamic.
3518 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3519 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3520 relocation for GOT reference.
3521 (elf_x86_64_finish_dynamic_symbol): Abort if
3522 no_finish_dynamic_symbol isn't 0.
3524 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3527 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3528 undefined weak symbol, don't make it dynamic.
3529 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3530 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3531 relocation for R_386_GOT32.
3533 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3536 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3538 2017-04-23 Alan Modra <amodra@gmail.com>
3541 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3542 * elf.c (lcomm_sym): New.
3543 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3544 * bfd-in2.h: Regenerate.
3546 2017-04-23 Alan Modra <amodra@gmail.com>
3549 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3550 parameters and comment.
3551 (_bfd_elf_get_reloc_section): Delete.
3552 (_bfd_elf_plt_get_reloc_section): Declare.
3553 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3554 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3556 (_bfd_elf_get_reloc_section): ..here. Delete.
3557 (assign_section_numbers): Call elf_get_reloc_section.
3558 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3559 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3561 2017-04-23 Alan Modra <amodra@gmail.com>
3564 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3567 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3570 * elf32-i386.c (elf_i386_link_hash_entry): Add
3571 no_finish_dynamic_symbol.
3572 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3573 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3574 symbol, don't make it dynamic in PIE.
3575 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3576 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3577 relocation for R_386_GOT32
3578 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3581 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3585 * elflink.c (elf_link_add_object_symbols): Require
3586 --no-dynamic-linker with -E/--dynamic-list when creating
3589 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3591 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3594 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3596 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3597 dynamic symbol sorting.
3599 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3602 * elflink.c (elf_link_add_object_symbols): Preserve
3603 dynamic_ref_after_ir_def when restoring the symbol table for
3604 unneeded dynamic object.
3606 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3609 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3610 on on undefined IFUNC symbol in the second PLT.
3612 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3614 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3616 2017-04-19 Alan Modra <amodra@gmail.com>
3618 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3619 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3620 * elf32-ppc.c:Formatting.
3621 (ensure_undefweak_dynamic): Don't make dynamic when
3622 info->dynamic_undefined_weak is zero.
3623 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3624 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3625 not default visibility. Discard undef and undefweak
3627 (ppc_elf_relocate_section): Adjust to suit.
3628 * elf64-ppc.c: Formatting.
3629 (ensure_undefweak_dynamic): Don't make dynamic when
3630 info->dynamic_undefined_weak is zero.
3631 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3632 info->dynamic_undefined_weak. Discard them earlier.
3634 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3637 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3638 before generating the version definition section.
3640 2017-04-17 Alan Modra <amodra@gmail.com>
3642 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3643 state when a regular object file defines a symbol with
3644 incompatible type to that defined by an earlier shared lib.
3646 2017-04-13 Alan Modra <amodra@gmail.com>
3648 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3650 * elf32-arm.c: Likewise.
3651 * elf32-i386.c: Likewise.
3652 * elf32-mep.c: Likewise.
3653 * elf64-ia64-vms.c: Likewise.
3654 * elf64-x86-64.c: Likewise.
3655 * elflink.c: Likewise.
3656 * elfnn-ia64.c: Likewise.
3657 * elfxx-mips.c: Likewise.
3659 2017-04-13 Alan Modra <amodra@gmail.com>
3661 * aoutx.h: Use %B and %A in error messages throughout file.
3662 * aout-cris.c: Likewise.
3663 * archive.c: Likewise.
3664 * binary.c: Likewise.
3665 * coff-rs6000.c: Likewise.
3666 * coff-tic4x.c: Likewise.
3667 * coffcode.h: Likewise.
3668 * coffgen.c: Likewise.
3669 * cofflink.c: Likewise.
3670 * coffswap.h: Likewise.
3671 * cpu-arm.c: Likewise.
3672 * elf-eh-frame.c: Likewise.
3673 * elf-m10300.c: Likewise.
3675 * elf32-arc.c: Likewise.
3676 * elf32-arm.c: Likewise.
3677 * elf32-bfin.c: Likewise.
3678 * elf32-frv.c: Likewise.
3679 * elf32-iq2000.c: Likewise.
3680 * elf32-m32c.c: Likewise.
3681 * elf32-microblaze.c: Likewise.
3682 * elf32-nds32.c: Likewise.
3683 * elf32-rl78.c: Likewise.
3684 * elf32-rx.c: Likewise.
3685 * elf32-score.c: Likewise.
3686 * elf32-score7.c: Likewise.
3687 * elf32-sh64.c: Likewise.
3688 * elf32-v850.c: Likewise.
3689 * elf32-vax.c: Likewise.
3690 * elf32-visium.c: Likewise.
3691 * elf64-ia64-vms.c: Likewise.
3692 * elf64-mmix.c: Likewise.
3693 * elf64-sh64.c: Likewise.
3694 * elfcode.h: Likewise.
3695 * elfnn-aarch64.c: Likewise.
3696 * elfnn-ia64.c: Likewise.
3697 * elfxx-mips.c: Likewise.
3698 * hpux-core.c: Likewise.
3701 * linker.c: Likewise.
3702 * merge.c: Likewise.
3704 * oasys.c: Likewise.
3705 * pdp11.c: Likewise.
3706 * peXXigen.c: Likewise.
3707 * rs6000-core.c: Likewise.
3708 * vms-alpha.c: Likewise.
3709 * xcofflink.c: Likewise.
3711 2017-04-13 Alan Modra <amodra@gmail.com>
3713 * bfd.c (PRINT_TYPE): Define.
3714 (_doprnt): New function.
3715 (error_handler_internal): Use _doprnt.
3716 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3717 calls in their natural order, throughout file.
3718 * coff-mcore.c: Likewise.
3719 * coff-ppc.c: Likewise.
3720 * coff-tic80.c: Likewise.
3721 * cofflink.c: Likewise.
3722 * elf-s390-common.c: Likewise.
3724 * elf32-arm.c: Likewise.
3725 * elf32-i386.c: Likewise.
3726 * elf32-m32r.c: Likewise.
3727 * elf32-msp430.c: Likewise.
3728 * elf32-spu.c: Likewise.
3729 * elf64-ia64-vms.c: Likewise.
3730 * elf64-sparc.c: Likewise.
3731 * elf64-x86-64.c: Likewise.
3732 * elflink.c: Likewise.
3733 * elfnn-aarch64.c: Likewise.
3734 * elfnn-ia64.c: Likewise.
3735 * elfxx-mips.c: Likewise.
3737 2017-04-13 Alan Modra <amodra@gmail.com>
3739 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3740 branch veneers" error. Fix double space and format message.
3741 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3742 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3744 2017-04-13 Alan Modra <amodra@gmail.com>
3746 * bfd-in2.h: Regenerate.
3748 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3750 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3751 extra `\n' in warning/error messages.
3752 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3753 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3755 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3757 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3758 processor-specific properties with generic ELF target vector.
3760 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3762 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3763 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3764 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3765 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3767 (link_hash_newfunc): Initialize has_got_reloc and
3769 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3771 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3773 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3775 (_bfd_sparc_elf_fixup_symbol): New function.
3776 (allocate_dynrelocs): Don't allocate space for dynamic
3777 relocations and discard relocations against resolved undefined
3778 weak symbols in executable. Don't make resolved undefined weak
3779 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3780 relocation against undefined weak symbols in PIE.
3781 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3782 relocations against resolved undefined weak symbols in PIE
3783 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3784 without ynamic PLT/GOT relocations for resolved undefined weak
3786 Don't generate dynamic relocation against resolved undefined
3787 weak symbol in executable.
3788 (pie_finish_undefweak_symbol): New function.
3789 (_bfd_sparc_elf_finish_dynamic_sections): Call
3790 pie_finish_undefweak_symbol on all symbols in PIE.
3791 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3792 (_bfd_sparc_elf_fixup_symbol): New function.
3794 2017-04-10 Nick Clifton <nickc@redhat.com>
3796 * config.bfd: Remove ns32k from obsolete list.
3798 2017-04-10 Alan Modra <amodra@gmail.com>
3801 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3802 (special_sections_i): Likewise for .init_array.
3803 (special_sections_p): Likewise for .preinit_array.
3805 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3809 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3810 ELF_COMMON_DEF_P for common symbols.
3811 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3812 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3813 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3814 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3815 07492f668d2173da7a2bda3707ff0985e0f460b6.
3817 2017-04-07 Pedro Alves <palves@redhat.com>
3819 * opncls.c (bfd_get_debug_link_info): Rename to...
3820 (bfd_get_debug_link_info_1): ... this. Change type of second
3821 parameter to void pointer. Adjust.
3822 (bfd_get_debug_link_info): Reimplement on top of
3823 bfd_get_debug_link_info_1.
3824 (separate_debug_file_exists, separate_alt_debug_file_exists):
3825 Change type of second parameter to void pointer. Adjust.
3826 (get_func_type, check_func_type): Change type of second parameter
3828 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3829 the callback functions instead of passing the address of a local.
3830 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3831 find_separate_debug_file.
3832 (get_alt_debug_link_info_shim): Change type of second parameter to
3833 void pointer. Adjust.
3834 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3835 find_separate_debug_file.
3836 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3837 of second parameter to void pointer. Adjust.
3838 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3839 pointer local to find_separate_debug_file.
3841 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3843 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3844 external symbols with a definition.
3845 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3847 2017-04-07 Alan Modra <amodra@gmail.com>
3849 * po/SRC-POTFILES.in: Regenerate.
3851 2017-04-05 Alan Modra <amodra@gmail.com>
3853 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3856 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3858 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3859 numbers for DataDirectory entry indicies passed to
3862 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3864 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3865 each GNU_MBIND section and align GNU_MBIND section to page size.
3866 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3867 segment for each GNU_MBIND section.
3868 (_bfd_elf_init_private_section_data): Copy sh_info from input
3869 for GNU_MBIND section.
3871 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3873 * elfnn-riscv.c (GP_NAME): Delete.
3874 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3875 (_bfd_riscv_relax_lui): Likewise.
3877 2017-04-04 Nick Clifton <nickc@redhat.com>
3880 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3882 (bfd_elf_final_link): Only initialize the extended symbol index
3883 section if there are extended symbol tables to list.
3885 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3887 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3888 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3889 * configure.ac (elf): Add elf-properties.lo.
3890 * Makefile.in: Regenerated.
3891 * configure: Likewise.
3892 * elf-bfd.h (elf_property_kind): New.
3893 (elf_property): Likewise.
3894 (elf_property_list): Likewise.
3895 (elf_properties): Likewise.
3896 (_bfd_elf_parse_gnu_properties): Likewise.
3897 (_bfd_elf_get_property): Likewise.
3898 (_bfd_elf_link_setup_gnu_properties): Likewise.
3899 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3900 and setup_gnu_properties.
3901 (elf_obj_tdata): Add properties.
3902 * elf-properties.c: New file.
3903 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3904 (elf_i386_merge_gnu_properties): Likewise.
3905 (elf_backend_parse_gnu_properties): Likewise.
3906 (elf_backend_merge_gnu_properties): Likewise.
3907 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3908 (elf_x86_64_merge_gnu_properties): Likewise.
3909 (elf_backend_parse_gnu_properties): Likewise.
3910 (elf_backend_merge_gnu_properties): Likewise.
3911 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3912 (elf_backend_parse_gnu_properties): Likewise.
3913 (elf_backend_setup_gnu_properties): Likewise.
3914 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3915 elf_backend_merge_gnu_properties and
3916 elf_backend_setup_gnu_properties.
3918 2017-03-30 Pip Cet <pipcet@gmail.com>
3920 * elf32-wasm32.c: Add relocation code, two relocs.
3921 * reloc.c: Add wasm32 relocations.
3922 * libbfd.h: Regenerate.
3923 * bfd-in2.h: Regenerate.
3924 * bfd/po/bfd.pot: Regenerate.
3926 2017-03-29 Nick Clifton <nickc@redhat.com>
3929 * coff-bfd.h (struct coff_section_data): Add new fields:
3930 saved_bias and bias.
3931 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3932 computed for PE binaries.
3933 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3936 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3939 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3940 to handle a local symbol with a hash-symbol-entry; without PLT.
3941 Add BFD_ASSERT for an incidental case with GOT entry present.
3942 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3943 isn't forced-or-set local.
3945 2017-03-27 Pip Cet <pipcet@gmail.com>
3947 * wasm-module.c: New file to support WebAssembly modules.
3948 * wasm-module.h: New file to support WebAssembly modules.
3949 * doc/webassembly.texi: Start documenting wasm-module.c.
3950 * config.bfd: Add wasm_vec.
3951 * targets.c: Likewise.
3952 * configure.ac: Likewise.
3953 * Makefile.am: Add entries for wasm-module.c.
3954 * Makefile.in: Regenerate.
3955 * configure: Regenerate.
3956 * po/SRC-POTFILES.in: Regenerate.
3958 2017-03-27 Pip Cet <pipcet@gmail.com>
3960 * cpu-wasm32.c: New file to support wasm32 architecture.
3961 * elf32-wasm32.c: New file to support wasm32 architecture.
3962 * Makefile.am: Add wasm32 architecture.
3963 * archures.c: Likewise.
3964 * config.bfd: Likewise.
3965 * configure.ac: Likewise.
3966 * targets.c: Likewise.
3967 * Makefile.in: Regenerate.
3968 * bfd-in2.h: Regenerate.
3969 * configure: Regenerate.
3970 * po/SRC-POTFILES.in: Regenerate.
3972 2017-03-20 Alan Modra <amodra@gmail.com>
3975 * elf64-ppc.c (compare_symbols): Stabilize sort.
3977 2017-03-18 Alan Modra <amodra@gmail.com>
3979 * elf64-ppc.c (struct ppc_link_hash_table): Add
3980 local_ifunc_resolver and maybe_local_ifunc_resolver.
3981 (ppc_build_one_stub): Set flags on emitting dynamic
3982 relocation to ifunc.
3983 (ppc64_elf_relocate_section): Likewise.
3984 (ppc64_elf_finish_dynamic_symbol): Likewise.
3985 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3986 local dynamic relocs to ifuncs.
3987 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3988 local_ifunc_resolver and maybe_local_ifunc_resolver.
3989 (ppc_elf_relocate_section): Set flag on emitting dynamic
3990 relocation to ifuncs.
3991 (ppc_elf_finish_dynamic_symbol): Likewise.
3992 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3993 dynamic relocs to ifuncs.
3995 2017-03-13 Nick Clifton <nickc@redhat.com>
3998 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3999 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4000 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4001 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4002 * bfd-in2.h: Regenerate.
4003 * libbfd.h: Regenerate.
4004 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4006 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4007 (elfNN_aarch64_howto_table): Likewise.
4008 (aarch64_tls_transition_without_check): Likewise.
4009 (aarch64_reloc_got_type): Likewise.
4010 (elfNN_aarch64_final_link_relocate): Likewise.
4011 (elfNN_aarch64_tls_relax): Likewise.
4012 (elfNN_aarch64_relocate_section): Likewise.
4013 (elfNN_aarch64_gc_sweep_hook): Likewise.
4014 (elfNN_aarch64_check_relocs): Likewise.
4015 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4016 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4018 2017-03-11 Alan Modra <amodra@gmail.com>
4020 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4021 parameter is in fact used. Whitespace fixes.
4022 * elf64-ppc.c: Likewise.
4024 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4026 * rs6000-core.c (CORE_NEW): Simplify macro when
4027 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4029 2017-03-07 Alan Modra <amodra@gmail.com>
4033 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4036 2017-03-05 Alan Modra <amodra@gmail.com>
4038 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4039 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4040 (next_cie_fde_offset): New function.
4041 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4042 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4043 four bytes. Align CIEs to four or eight bytes depending on
4044 per_encoding_aligned8. Align FDEs according to their encoding.
4045 Pad last FDE to output section alignment.
4046 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4048 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4049 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4050 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4052 2017-03-02 Martin Bickel <binutils@ineranves.de>
4055 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4056 empty segments which have a zero filesz, but a non-zero memsz.
4058 2017-03-02 Alan Modra <amodra@gmail.com>
4060 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4062 2017-02-28 Alan Modra <amodra@gmail.com>
4064 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4065 (ppc64_elf_relocate_section): Likewise.
4067 2017-02-28 Alan Modra <amodra@gmail.com>
4070 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4071 rather than elf32_nios2_hash_table or elf_hash_table.
4072 (create_got_section): Likewise.
4073 (nios2_elf32_finish_dynamic_symbol): Likewise.
4074 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4075 (nios2_elf32_size_dynamic_sections): Likewise.
4076 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4077 vars. Use htab equivalents directly instead. Don't create
4078 all dynamic sections on needing just the GOT. Use a goto
4079 rather than a fall-through with reloc test. Ensure
4080 htab->dynobj is set when making dynamic sreloc section.
4081 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4082 equivalent directly instead. Don't segfault on looking for
4083 .dynamic when dynamic sections have not been created. Don't
4084 segfault on .got.plt being discarded.
4085 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4086 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4087 fixme and another not so relevant comment.
4088 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4089 already set, set hash table dynobj on creating .sbss.
4091 2017-02-28 Alan Modra <amodra@gmail.com>
4093 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4094 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4095 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4096 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4097 (ppc64_elf_relocate_section): Likewise.
4098 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4099 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4100 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4101 * libbfd.h: Regenerate.
4102 * bfd-in2.h: Regenerate.
4104 2017-02-28 Alan Modra <amodra@gmail.com>
4106 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4107 dynamic .data.rel.ro read-only.
4108 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4109 rather than section flags when deciding where copy reloc goes.
4110 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4111 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4112 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4113 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4114 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4115 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4116 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4117 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4118 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4119 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4120 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4121 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4122 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4123 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4124 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4125 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4126 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4127 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4128 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4130 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4132 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4133 `jalr $0, $25' instruction encoding.
4135 2017-02-27 Nick Clifton <nickc@redhat.com>
4138 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4139 generating a seg-fault when encountering a symbol that has been
4140 deleted by garbage collection.
4142 2017-02-25 Alan Modra <amodra@gmail.com>
4144 * elf32-arc.c (struct dynamic_sections): Delete.
4145 (enum dyn_section_types): Delete.
4146 (dyn_section_names): Delete.
4147 (arc_create_dynamic_sections): Delete.
4148 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4149 segfault on discarded .rela.plt section.
4150 (elf_arc_size_dynamic_sections): Formatting. Don't call
4151 arc_create_dynamic_sections. Don't allocate memory for sections
4152 handled by the generic linker. Correct code finding relocs in
4153 read-only sections. Set SEC_EXCLUDE on zero size .got,
4154 .got.plt, and .dynbss sections. Do set .interp for pies.
4156 2017-02-24 Andrew Waterman <andrew@sifive.com>
4158 * elfnn-riscv.c (GP_NAME): New macro.
4159 (riscv_global_pointer_value): Use it.
4160 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4161 output section, consider only that section's alignment.
4163 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4165 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4166 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4167 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4168 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4170 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4172 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4173 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4176 2017-02-23 Alan Modra <amodra@gmail.com>
4179 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4181 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4182 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4185 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4188 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4189 processing ahead of the call to `elf_gc_sweep_symbol'.
4191 2017-02-22 Nick Clifton <nickc@redhat.com>
4194 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4195 created section 4-byte alignment.
4197 2017-02-22 Alan Modra <amodra@gmail.com>
4199 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4200 on .got or .plt output section being discarded by script.
4201 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4204 2017-02-21 Alan Modra <amodra@gmail.com>
4206 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4207 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4209 2017-02-20 Alan Modra <amodra@gmail.com>
4212 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4213 if DT_RELSZ/DT_RELASZ is zero.
4215 2017-02-17 Nick Clifton <nickc@redhat.com>
4217 * compress.c (bfd_get_full_section_contents): Remember to reduce
4218 compressed size by the sizeof the compression header when
4219 decompressing the contents.
4221 2017-02-17 Pedro Alves <palves@redhat.com>
4223 * srec.c (Chunk): Rename to ...
4224 (_bfd_srec_len): ... this.
4225 (S3Forced): Rename to ...
4226 (_bfd_srec_forceS3): ... this.
4227 * objcopy.c: Adjust all references.
4229 2017-02-17 Pedro Alves <palves@redhat.com>
4231 * archive.c (bsd_write_armap): Rename to ...
4232 (_bfd_bsd_write_armap): ... this.
4233 (coff_write_armap): Rename to ...
4234 (_bfd_coff_write_armap): ... this.
4235 * libbfd-in.h (bsd_write_armap): Rename to ...
4236 (_bfd_bsd_write_armap): ... this.
4237 (coff_write_armap): Rename to ...
4238 (_bfd_coff_write_armap): ... this.
4239 * aout-target.h, aout-tic30.c: Adjust all users.
4240 * libbfd.h: Regenerate.
4242 2017-02-17 Pedro Alves <palves@redhat.com>
4244 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4245 (warn_deprecated): Rename to ...
4246 (_bfd_warn_deprecated): ... this.
4247 * libbfd.c (warn_deprecated): Rename to ...
4248 (_bfd_warn_deprecated): ... this.
4249 * bfd-in2.h: Regenerate.
4251 2017-02-17 Pedro Alves <palves@redhat.com>
4253 * bfdio.c (real_ftell): Rename to ...
4254 (_bfd_real_ftell): ... this.
4255 (real_fseek): Rename to ...
4256 (_bfd_real_fseek): ... this.
4257 (real_fopen): Rename to ...
4258 (_bfd_real_fopen): ... this.
4259 * libbfd-in.h (real_ftell): Rename to ...
4260 (_bfd_real_ftell): ... this.
4261 (real_fseek): Rename to ...
4262 (_bfd_real_fseek): ... this.
4263 (real_fopen): Rename to ...
4264 (_bfd_real_fopen): ... this.
4265 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4266 * libbfd.h: Regenerate.
4268 2017-02-17 Pedro Alves <palves@redhat.com>
4270 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4271 * libbfd.c (read_unsigned_leb128): Rename to ...
4272 (_bfd_read_unsigned_leb128): ... this.
4273 (read_signed_leb128): Rename to ...
4274 (_bfd_read_signed_leb128): ... this.
4275 (safe_read_leb128): Rename to ...
4276 (_bfd_safe_read_leb128): ... this.
4277 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4278 (_bfd_read_unsigned_leb128): ... this.
4279 (read_signed_leb128): Rename to ...
4280 (_bfd_read_signed_leb128): ... this.
4281 (safe_read_leb128): Rename to ...
4282 (_bfd_safe_read_leb128): ... this.
4283 * libbfd.h: Renegerate.
4285 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4287 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4288 before trying to fine matching file and line information.
4290 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4292 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4293 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4294 not match current bfd, then reload debug information. Record bfd
4295 we're loading debug info for in the stash. If we have debug
4296 informatin in the cache then perform section placement before
4299 2017-02-16 Alan Modra <amodra@gmail.com>
4302 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4303 * elfxx-target.h (elf_backend_no_page_alias): Define.
4304 (elfNN_bed): Init new field.
4305 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4306 ensure PT_LOAD segment starts on a new page.
4307 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4309 2017-02-16 Alan Modra <amodra@gmail.com>
4312 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4315 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4317 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4318 * bfd-in2.h: Regenerated.
4320 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4323 * elf32-i386.c (elf_i386_relocate_section): Allow
4324 "lea foo@GOT, %reg" in PIC.
4326 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4329 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4330 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4331 error against local IFUNC symbol without a base register for
4334 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4336 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4337 `%P: %H:' with `info->callbacks->einfo'.
4338 (ppc_elf_relocate_section): Likewise.
4339 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4340 (ppc64_elf_edit_toc): Likewise.
4341 (ppc64_elf_relocate_section): Likewise.
4343 2017-02-14 Alan Modra <amodra@gmail.com>
4345 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4346 --gc-keep-exported, and test versioned field of sym rather than
4347 looking for @ in name.
4349 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4351 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4354 2017-02-13 Nick Clifton <nickc@redhat.com>
4357 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4360 2017-02-07 Andrew Waterman <andrew@sifive.com>
4362 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4363 entry size if PLT header is written.
4365 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4367 Fix sparc64 dynamic relocation processing to use the dynamic
4369 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4370 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4373 2017-02-03 Nick Clifton <nickc@redhat.com>
4376 * coffcode.h (coff_write_object_contents): Enlarge size of
4377 s_name_buf in order to avoid compile time warning about possible
4379 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4380 32-bits of insn value before printing into buffer.
4382 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4384 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4385 `max_local_dynindx'.
4386 (mips_elf_sort_hash_table): Handle it.
4387 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4388 symbols bump up `max_local_dynindx' rather than
4389 `max_non_got_dynindx'.
4391 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4393 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4394 `min_got_dynindx', `max_unref_got_dynindx' and
4395 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4396 (mips_elf_sort_hash_table): Adjust accordingly.
4398 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4400 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4401 to access the hash table.
4403 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4405 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4406 non-NULL `htab' to the beginning.
4408 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4410 * elflink.c (elf_gc_sweep): Wrap overlong line.
4412 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4414 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4415 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4416 * elfxx-mips.c (mips_elf_link_hash_table): Add
4417 `ignore_branch_isa' member.
4418 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4419 in branch relocation calculation as an error if
4420 `ignore_branch_isa' has been set.
4421 (_bfd_mips_elf_insn32): Rename to...
4422 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4423 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4424 Handle the new parameter.
4426 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4428 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4429 local variable dynobj.
4432 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4433 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4434 executable from read-only sections into sdynrelro.
4435 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4436 dynamic relocs in sdynrelro.
4437 (elf_backend_want_dynrelro): Define.
4439 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4441 * config.bfd (*-*-rtemsaout*): Mark as removed.
4443 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4445 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4446 (arm-*-rtems*): Move to (arm*-*-eabi*).
4447 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4448 (m68-*-rtems*): Move to (m68*-*-elf*).
4450 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4452 * config.bfd (*-*-rtemscoff*): Mark as removed.
4454 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4457 * elflink.c (bfd_elf_record_link_assignment): Revert last
4458 change and don't ever clear `forced_local'. Set `mark'
4460 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4462 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4463 (bfd_elf_size_dynamic_sections): ... here.
4464 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4465 and set `mark' instead in `__tls_get_addr_opt' processing.
4466 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4468 2017-01-24 Alan Modra <amodra@gmail.com>
4470 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4471 where dynamic relocs are preferable. Allow ifunc too.
4472 (ensure_undefweak_dynamic): New function.
4473 (allocate_dynrelocs): Use it here. Move plt handling last and
4474 don't make symbols dynamic, simplifying loop. Only make undef
4475 weak symbols with GOT entries dynamic. Correct condition
4476 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4477 comments. Remove goto.
4478 (ppc_elf_relocate_section): Correct test for using dynamic
4479 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4480 to suit. Set up explicit tls_index entries and implicit GOT
4481 tls_index entries resolvable at link time for
4482 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4483 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4484 (ensure_undefweak_dynamic): New function.
4485 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4486 with GOT entries dynamic. Remove unnecessary test of
4487 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4488 (ppc64_elf_relocate_section): Correct test for using dynamic
4489 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4490 to suit. Set up explicit tls_index entries and implicit GOT
4491 tls_index entries resolvable at link time for __tls_get_addr_opt.
4492 Simplify expression to clear mem for prelink.
4494 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4496 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4498 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4500 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4501 (elf_backend_hash_symbol): Define.
4503 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4506 * elflink.c (bfd_elf_record_link_assignment): Clear any
4507 `forced_local' marking for DSO symbols that are not being
4510 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4512 * elfnn-riscv.c (riscv_elf_object_p): New function.
4514 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4517 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4519 (elf_x86_64_check_relocs): Create .eh_frame section for the
4521 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4522 .eh_frame section for the .plt.bnd section.
4523 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4524 for the .plt.bnd section.
4526 2017-01-12 Nick Clifton <nickc@redhat.com>
4529 * opncls.c (find_separate_debug_file): Add include_dirs
4530 parameter. Only include the directory part of the bfd's filename
4531 in search paths if include_dirs is true. Add a couple of extra
4532 locations for looking for debug files.
4533 ( bfd_follow_gnu_debuglink): Update invocation of
4534 find_separate_debug_file.
4535 (bfd_follow_gnu_debugaltlink): Likewise.
4536 (get_build_id): New function: Finds the build-id of the given bfd.
4537 (get_build_id_name): New function: Computes the name of the
4538 separate debug info file for a bfd, based upon its build-id.
4539 (check_build_id_file): New function: Checks to see if a separate
4540 debug info file exists at the given location, and that its
4541 build-id matches that of the original bfd.
4542 (bfd_follow_build_id_debuglink): New function: Finds a separate
4543 debug info file for a given bfd by using the build-id method.
4544 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4545 method of locating a separate debug info file before using the
4547 * bfd-in2.h: Regenerate.
4549 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4552 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4553 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4554 elf_x86_64_eh_frame_plt_got.
4555 (elf_x86_64_size_dynamic_sections): Get unwind info from
4556 elf_x86_64_bnd_arch_bed for the BND PLT.
4558 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4560 * config.bfd: Add entries for i686-redox and x86_64-redox.
4562 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4564 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4566 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4567 .eh_frame section to 4 bytes for x32.
4568 (elf_x86_64_check_relocs): Likewise.
4570 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4573 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4574 (PLT_GOT_FDE_LENGTH): Likewise.
4575 (elf_i386_plt_layout): Add eh_frame_plt_got and
4576 eh_frame_plt_got_size.
4577 (elf_i386_plt): Updated.
4578 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4579 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4580 (elf_i386_size_dynamic_sections): Allocate and initialize
4581 .eh_frame section for .plt.got.
4582 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4584 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4585 eh_frame_plt_got_size.
4586 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4587 (PLT_GOT_FDE_LENGTH): Likewise.
4588 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4589 eh_frame_plt_got_size.
4590 (elf_x86_64_arch_bed): Updated.
4591 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4592 eh_frame_plt_got_size.
4593 (elf_x86_64_nacl_arch_bed): Likewise.
4594 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4595 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4596 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4597 .eh_frame section for .plt.got.
4598 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4601 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4603 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4604 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4606 2017-01-09 Nick Clifton <nickc@redhat.com>
4608 * dwarf2.c (lookup_address_in_function_table): Return early if
4609 there are no functions in the given comp unit, or if the high
4610 address of the last function in the comp unit is less than the
4613 2017-01-09 Nick Clifton <nickc@redhat.com>
4616 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4617 message if there are too many symbols to load.
4619 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4621 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4622 if relocs are cached.
4624 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4627 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4628 for R_MICROBLAZE_GOTOFF_64.
4630 2017-01-03 Nick Clifton <nickc@redhat.com>
4632 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4633 warning about using a possibly uninitialised variable.
4635 2017-01-02 Alan Modra <amodra@gmail.com>
4637 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4638 (allocate_plt_static, allocate_dynrelocs): Use it.
4640 2017-01-02 Alan Modra <amodra@gmail.com>
4642 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4643 .PARISC.unwind section.
4645 2017-01-02 Alan Modra <amodra@gmail.com>
4648 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4649 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4650 indirect to GOT pointer relative code edit.
4652 2017-01-02 Alan Modra <amodra@gmail.com>
4654 Update year range in copyright notice of all files.
4656 For older changes see ChangeLog-2016
4658 Copyright (C) 2017 Free Software Foundation, Inc.
4660 Copying and distribution of this file, with or without modification,
4661 are permitted in any medium without royalty provided the copyright
4662 notice and this notice are preserved.
4668 version-control: never