1 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
4 * elf32-cris.c (cris_elf_relocate_section): Don't generate
5 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
6 (cris_elf_check_relocs): Don't allocate dynamic relocation
7 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
9 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
12 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
13 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
14 (sh_elf_relocate_section): Don't generate dynamic relocation if
15 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
17 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
20 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
21 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
22 (elf_s390_relocate_section): Don't generate dynamic relocation
23 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
24 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
25 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
26 (elf_s390_relocate_section): Don't generate dynamic relocation
27 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
29 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
32 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
33 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
34 (allocate_dynrelocs): Discard dynamic relocations if
35 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
37 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
40 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
41 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
43 (allocate_dynrelocs): Discard dynamic relocations if
44 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
46 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
49 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
50 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
51 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
52 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
53 (elf_m68k_relocate_section): Don't generate dynamic relocation
54 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
56 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
59 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
60 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
61 (allocate_dynrelocs): Discard dynamic relocations if
62 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
63 (elf32_hppa_relocate_section): Don't generate dynamic
64 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
66 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
69 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
70 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
71 (allocate_fptr): Don't allocate function pointer if
72 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
73 (allocate_dynrel_entries): Don't allocate dynamic relocation
74 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
75 (set_got_entry): Don't set GOT entry if
76 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
77 (set_pltoff_entry): Don't set PLTOFF entry if
78 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
79 (elfNN_ia64_relocate_section): Don't install dynamic relocation
80 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
82 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
85 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
86 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
87 (allocate_dynrelocs): Don't allocate dynamic relocations if
88 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
90 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
93 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
94 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
95 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
96 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
98 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
101 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
102 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
103 (tilepro_elf_relocate_section): Don't generate dynamic
104 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
105 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
106 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
107 (tilegx_elf_relocate_section): Don't generate dynamic
108 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
110 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
113 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
114 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
116 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
117 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
119 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
121 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
122 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
123 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
125 2017-10-12 James Bowman <james.bowman@ftdichip.com>
127 * bfd-in2.h: Regenerate.
128 * libbfd.h: Regenerate.
129 * elf32-ft32.c: Add HOWTO R_FT32_15.
130 * reloc.c: Add BFD_RELOC_FT32_15.
132 2017-10-12 Nick Clifton <nickc@redhat.com>
134 * reloc.c (enum bfd_reloc_status): Start values at 2.
135 * bfd-in2.h: Regenerate.
136 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
137 that a TRUE return indicates success. Compare the result of
138 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
139 (build_one_stub): Change sense of tests against aarch64_relocate
141 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
142 than FALSE, when an error is detected.
143 (elfNN_aarch64_final_link_relocate): Likewise.
145 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
147 * elf32-i386.c (elf_backend_hide_symbol): New.
148 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
149 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
150 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
152 2017-10-12 Alan Modra <amodra@gmail.com>
154 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
155 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
156 (bfd_elf_define_start_stop): Likewise.
158 2017-10-12 Alan Modra <amodra@gmail.com>
160 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
161 when executable rather than non-PIC.
162 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
163 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
165 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
167 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
169 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
170 (elf_external_linux_prpsinfo64_ugid32): ... this.
171 (swap_linux_prpsinfo32_out): Rename to...
172 (swap_linux_prpsinfo32_ugid32_out): ... this.
173 (elf_external_linux_prpsinfo64_ugid16): New structure.
174 (swap_linux_prpsinfo64_ugid16_out): New function.
175 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
176 (elf_backend_linux_prpsinfo64_ugid16): Define.
177 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
178 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
179 of the 64-bit Linux core PRPSINFO note.
180 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
182 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
184 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
186 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
187 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
188 (elf_external_ppc_linux_prpsinfo32)
189 (swap_ppc_linux_prpsinfo32_out): Move to...
190 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
191 (swap_linux_prpsinfo32_ugid32_out): ... these.
192 (elf_external_linux_prpsinfo32): Rename to...
193 (elf_external_linux_prpsinfo32_ugid16): ... this.
194 (swap_linux_prpsinfo32_out): Rename to...
195 (swap_linux_prpsinfo32_ugid16_out): ... this.
196 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
197 (elf_backend_linux_prpsinfo32_ugid16): Define.
198 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
199 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
200 of the 32-bit Linux core PRPSINFO note.
201 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
202 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
203 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
204 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
205 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
206 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
207 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
208 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
209 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
210 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
212 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
214 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
215 `gap' member ahead of `pr_flag'.
217 2017-10-11 Pedro Alves <palves@redhat.com>
219 * bfd.c (_doprnt): Rename to ...
220 (_bfd_doprnt): ... this.
221 (error_handler_internal): Adjust.
223 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
225 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
226 instead of incrementing it.
227 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
229 2017-10-10 Renlin Li <renlin.li@arm.com>
232 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
233 symbols into dynamic.
235 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
238 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
239 (riscv_elf_link_hash_table_create): Initialize max_alignment to
241 (_bfd_riscv_relax_section): Cache the max alignment of output
242 sections if possible.
244 2017-10-10 Alan Modra <amodra@gmail.com>
246 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
247 .opd whenever .opd is present and non-zero size. Move code
248 setting abiversion to/from output file earlier. Only set
249 u.opd.func_sec when --gc-sections. Read relocs and set up
250 u.opd.func_sec values here..
251 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
253 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
255 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
257 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
260 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
262 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
263 .interp section with "ld --no-dynamic-linker".
265 2017-10-09 Alan Modra <amodra@gmail.com>
268 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
269 funcinfo_hash_table and varinfo_hash_table.
271 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
273 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
274 in read-only section with minfo.
275 (sh_elf_size_dynamic_sections): Likewise.
277 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
279 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
282 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
284 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
285 this_hdr.sh_entsize only if section size > 0.
287 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
289 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
291 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
293 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
294 in read-only section with minfo.
295 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
297 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
299 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
302 2017-10-06 John Baldwin <jhb@FreeBSD.org>
304 * elf-bfd.h (struct elf_backend_data): Add
305 `elf_backend_grok_freebsd_prstatus'.
306 * elf.c (elfcore_grok_freebsd_note): Call
307 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
309 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
311 (elf_backend_grok_freebsd_prstatus): Define.
312 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
313 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
315 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
317 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
318 and has_non_got_reloc with zero_undefweak.
319 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
320 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
322 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
323 has_non_got_reloc with zero_undefweak.
324 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
325 has_got_reloc and has_non_got_reloc with zero_undefweak.
326 (elf_x86_link_hash_entry): Likewise.
328 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
330 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
331 (VERIFY_COPY_RELOC): Likewise.
333 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
335 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
336 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
337 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
339 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
341 * elfxx-x86.h (VERIFY_PLT_ENTRY): 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 (COPY_INPUT_RELOC_P): New.
348 * elf32-i386.c (elf_i386_relocate_section): Use it.
349 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
351 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
353 * elf32-i386.c (X86_SIZE_TYPE_P): New.
354 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
355 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
356 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
357 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
359 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
361 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
362 (PLT_LOCAL_IFUNC_P): Likewise.
363 * elf32-i386.c (elf_i386_relocate_section): Use them.
364 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
366 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
368 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
369 * elf32-i386.c (elf_i386_relocate_section): Use it.
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 (RESOLVED_LOCALLY_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 * elf32-i386.c (X86_PCREL_TYPE_P): New.
381 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
382 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
383 (X86_PCREL_TYPE_P): This.
384 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
385 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
386 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
388 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
390 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
392 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
393 * elf32-i386.c (elf_i386_tls_transition): Use it.
394 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
396 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
398 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
399 Dump dynamic relocation in read-only section with minfo if
401 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
402 (maybe_set_textrel): Likewise.
403 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
404 read-only section with minfo.
406 2017-10-05 John Baldwin <jhb@FreeBSD.org>
408 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
410 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
412 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
413 in read-only section with minfo.
414 (tilepro_elf_size_dynamic_sections): Likewise.
415 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
416 (tilegx_elf_size_dynamic_sections): Likewise.
418 2017-10-05 Pedro Alves <palves@redhat.com>
421 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
422 ellipsis parameter. Split out bfd_error_on_input code to..
423 (bfd_set_input_error): .. New function.
424 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
425 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
426 * bfd-in2.h: Regenerate.
428 2017-10-05 Alan Modra <amodra@gmail.com>
430 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
431 fini_array error value.
433 2017-10-05 Alan Modra <amodra@gmail.com>
436 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
438 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
440 (elf_fake_sections): Adjust calls. Exit immediately on failure.
441 (bfd_elf_set_group_contents): Add associated reloc section indices
444 2017-10-04 Alan Modra <amodra@gmail.com>
446 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
447 classify symbols for ELFv2.
449 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
452 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
453 undergoes default promotion.
454 * bfd-in2.h: Regenerate.
456 2017-10-02 Alan Modra <amodra@gmail.com>
458 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
459 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
461 2017-10-01 Alan Modra <amodra@gmail.com>
464 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
465 (add_line_info): Always put end_sequence last.
467 2017-10-01 Alan Modra <amodra@gmail.com>
470 * dwarf2.c (read_section): Allocate buffer with extra byte for
471 bfd_simple_get_relocated_section_contents rather than copying
474 2017-09-29 Alan Modra <amodra@gmail.com>
476 * merge.c (merge_strings): Return FALSE on malloc failure.
477 (_bfd_merge_sections): Return failures from record_section and
480 2017-09-28 Alan Modra <amodra@gmail.com>
483 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
484 a case where plugin_notice isn't called.
486 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
488 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
491 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
494 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
495 output_bfd to info->callbacks->minfo.
497 2017-09-26 Nick Clifton <nickc@redhat.com>
500 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
501 assertion failure if elf_x86_64_rtype_to_howto has already issued
504 2017-09-26 Alan Modra <amodra@gmail.com>
507 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
510 2017-09-26 Nick Clifton <nickc@redhat.com>
513 * dwarf2.c (read_formatted_entries): Fail early if we know that
514 the loop parsing data entries will overflow the end of the
517 2017-09-26 Alan Modra <amodra@gmail.com>
520 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
521 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
522 to stash->info_ptr_memory, and check die_ref is within that memory.
523 Set info_ptr_end correctly when another CU is refd. Check die_ref
524 for DW_FORM_ref4 etc. is within CU.
526 2017-09-26 Alan Modra <amodra@gmail.com>
529 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
530 (read_formatted_entries): Init "fe".
531 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
533 2017-09-26 Alan Modra <amodra@gmail.com>
536 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
537 bounds in inner loop.
539 2017-09-25 Alan Modra <amodra@gmail.com>
542 * dwarf1.c (parse_die): Sanity check pointer against section limit
543 before dereferencing.
544 (parse_line_table): Likewise.
546 2017-09-25 Alan Modra <amodra@gmail.com>
549 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
551 (parse_comp_unit): Likewise.
553 2017-09-25 Alan Modra <amodra@gmail.com>
556 * dwarf2.c (read_formatted_entries): Error on format_count zero.
558 2017-09-24 Alan Modra <amodra@gmail.com>
561 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
562 within section bounds.
564 2017-09-24 Alan Modra <amodra@gmail.com>
567 * dwarf2.c (decode_line_info): Properly free line sequences on error.
569 2017-09-24 Alan Modra <amodra@gmail.com>
572 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
573 pname param. Return status. Make name const. Don't abort,
574 return an error. Formatting. Exit if current info_ptr matches
575 orig_info_ptr. Update callers.
576 (scan_unit_for_symbols): Start at nesting_level of zero. Make
577 nested_funcs an array of structs for extensibility. Formatting.
579 2017-09-24 Alan Modra <amodra@gmail.com>
582 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
583 rather than dividing by zero.
585 2017-09-24 Alan Modra <amodra@gmail.com>
588 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
590 2017-09-24 Alan Modra <amodra@gmail.com>
593 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
595 2017-09-24 Alan Modra <amodra@gmail.com>
598 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
599 SHT_GNU_verneed section for sanity. Don't zalloc memory for
602 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
605 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
608 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
611 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
612 -1 if bfd_canonicalize_dynamic_reloc returns 0.
614 2017-09-22 Pedro Alves <palves@redhat.com>
615 Alan Modra <amodra@gmail.com>
617 * version.h: Add comment.
619 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
621 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
622 NT_S390_GS_BC, correct the previously swapped invocations of
623 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
625 2017-09-19 Alan Modra <amodra@gmail.com>
628 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
631 2017-09-19 Alan Modra <amodra@gmail.com>
634 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
635 symbols before calculating verrefs. Don't renumber dynsyms
636 after gc. Exclude .gnu.version when zero or one dynsym.
637 Localize some vars and reindent.
639 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
642 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
643 return from bfd_canonicalize_dynamic_reloc.
645 2017-09-15 Alan Modra <amodra@gmail.com>
648 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
649 overflows bfd_size_type.
651 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
654 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
655 to indicate if conversion is performed.
656 (elf_i386_check_relocs): Cache section contents and relocations
657 if conversion is performed.
658 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
659 contents and relocations if conversion is performed.
661 2017-09-14 Nick Clifton <nickc@redhat.com>
664 * peXXigen.c (pe_print_idata): Extend check for HintName vector
667 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
669 * elfxx-x86.h: Fix a typo in comments.
671 2017-09-09 Kamil Rytarowski <n54@gmx.com>
673 * elf32-nds32.c: Rename __BIT() to N32_BIT().
675 2017-09-09 Alan Modra <amodra@gmail.com>
677 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
680 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
682 * elf32-i386.c (elf_i386_relocate_section): Update usage of
683 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
684 (elf_i386_finish_dynamic_symbol): Likewise.
685 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
686 (elf_x86_64_finish_dynamic_symbol): Likewise.
687 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
688 (_bfd_x86_elf_fixup_symbol): Likewise.
690 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
692 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
693 check has_non_got_reloc.
695 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
698 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
699 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
700 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
701 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
702 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
703 and linker_def on __ehdr_start if it is referenced and not
705 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
706 and return TRUE when building executable, if a symbol has
707 non-GOT/non-PLT relocations in text section or there is no
709 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
711 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
713 * elfxx-x86.h: Update comments.
715 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
717 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
718 elf_x86_plt_layout_table with elf_x86_init_table.
719 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
721 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
723 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
724 (elf_x86_init_table): This.
725 (_bfd_x86_elf_link_setup_gnu_properties): Replace
726 elf_x86_plt_layout_table with elf_x86_init_table.
728 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
730 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
731 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
732 * configure: Regenerated.
733 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
734 and r_sym fields of plt_layout.
735 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
737 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
738 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
739 r_info nor r_sym fields.
740 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
742 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
744 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
746 * (_bfd_riscv_relax_align): Call bfd_set_error and
747 print an error message when unable to relax a .align directive.
749 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
751 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
752 (riscv_record_pcrel_hi_reloc): Add absolute argument.
753 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
754 R_RISCV_PCREL_HI20 relocs, and pass the result to
755 riscv_record_pcrel_hi_reloc.
757 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
759 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
760 r_type_p. Remove the converted argument. Replace
761 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
762 the new relocation type via r_type_p.
763 (elf_i386_relocate_section): Likewise.
764 (elf_i386_finish_dynamic_symbol): Likewise.
765 (need_convert_load): Removed.
766 (check_relocs_failed): Updated.
767 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
768 instead of setting need_convert_load.
769 (_bfd_i386_elf_convert_load): Removed.
770 * elf64-x86-64.c (need_convert_load): Removed.
771 (check_relocs_failed): Updated.
772 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
773 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
774 Return the new relocation type via r_type_p.
775 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
776 instead of setting need_convert_load.
777 (elf_x86_64_check_relocs): Don't check PIC if relocation has
779 (_bfd_x86_64_elf_convert_load): Removed.
780 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
781 with SYMBOL_REFERENCES_LOCAL_P.
782 (elf_x86_64_finish_dynamic_symbol): Likewise.
783 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
785 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
786 (_bfd_x86_elf_link_symbol_references_local): New function.
787 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
788 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
789 SYMBOL_REFERENCES_LOCAL_P.
790 (elf_x86_link_hash_entry): Add local_ref.
791 (elf_x86_link_hash_table): Remove convert_load.
792 (_bfd_i386_elf_convert_load): Removed.
793 (_bfd_x86_64_elf_convert_load): Likewise.
794 (_bfd_x86_elf_link_symbol_references_local): New.
796 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
798 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
799 (elf_x86_64_info_to_howto): Get the real relocation type by
800 masking out R_X86_64_converted_reloc_bit.
801 (elf_x86_64_check_tls_transition): Get the real relocation type
802 by masking out R_X86_64_converted_reloc_bit.
803 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
804 instead of setting converted_reloc.
805 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
806 instead of converted_reloc. Get the real relocation type by
807 masking out R_X86_64_converted_reloc_bit.
808 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
809 R_X86_64_converted_reloc_bit is valid.
810 * elfxx-x86.h (converted_reloc): Removed.
812 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
814 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
815 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
816 to get the relocation type again.
817 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
818 r_type when calling elf_x86_64_tls_transition. Don't use
819 ELF32_R_TYPE to get the relocation type again.
821 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
823 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
826 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
828 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
829 argument. Don't check relocation overflow. Avoid relocation
830 overflow if --no-relax is used. Set converted_reloc on symbol
831 if a GOTPCREL relocation is converted.
832 (elf_x86_64_relocate_section): Issue a fatal error and suggest
833 --no-relax if GOTPCREL relocation conversion leads to relocation
835 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
837 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
838 Edmar Wienskoski <edmar.wienskoski@nxp.com
840 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
841 (ppc_elf_check_relocs): Handle it.
842 (ppc_elf_vle_split20): New function.
843 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
845 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
848 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
849 for x86-64 if GOT_TLS_GDESC_P is true.
851 2017-09-03 Alan Modra <amodra@gmail.com>
854 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
856 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
858 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
859 tls_get_addr for x86-64 in one place.
861 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
863 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
864 with elfxx-x86.lo for 64-bit BFD.
865 * configure: Regenerated.
867 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
869 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
870 (_bfd_i386_elf_convert_load): This. Remove static.
871 (elf_i386_size_dynamic_sections): Removed.
872 (elf_backend_size_dynamic_sections): Likewise.
873 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
874 (_bfd_x86_64_elf_convert_load): This. Remove static.
875 (elf_x86_64_size_dynamic_sections): Removed.
876 (elf_backend_size_dynamic_sections): Likewise.
877 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
878 (elf_x86_allocate_dynrelocs): This. Make it static.
879 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
880 (elf_x86_allocate_local_dynreloc): This. Make it static.
881 (elf_i386_is_reloc_section): New function.
882 (elf_x86_64_is_reloc_section): Likewise.
883 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
884 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
885 Rearrange got_entry_size initialization.
886 (_bfd_x86_elf_size_dynamic_sections): New function.
887 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
888 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
889 (_bfd_i386_elf_convert_load): New.
890 (_bfd_x86_64_elf_convert_load): Likewise.
891 (_bfd_x86_elf_size_dynamic_sections): Likewise.
892 (elf_backend_size_dynamic_sections): Likewise.
893 (_bfd_x86_elf_allocate_dynrelocs): Removed.
894 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
896 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
898 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
901 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
903 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
904 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
906 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
908 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
909 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
910 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
911 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
912 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
913 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
915 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
917 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
918 (elf_i386_allocate_local_dynrelocs): Likewise.
919 (elf_i386_size_dynamic_sections): Replace
920 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
921 with _bfd_x86_elf_allocate_dynrelocs and
922 _bfd_x86_elf_allocate_local_dynrelocs.
923 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
924 (elf_x86_64_allocate_local_dynrelocs): Likewise.
925 (elf_x86_64_size_dynamic_sections): Replace
926 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
927 with _bfd_x86_elf_allocate_dynrelocs and
928 _bfd_x86_elf_allocate_local_dynrelocs.
929 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
930 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
931 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
932 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
934 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
936 * elf32-i386.c (is_i386_elf): Removed.
937 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
938 (elf_i386_size_dynamic_sections): Likewise.
939 (elf_i386_relocate_section): Likewise.
940 * elf64-x86-64.c (is_x86_64_elf): Removed.
941 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
943 (elf_x86_64_size_dynamic_sections): Likewise.
944 (elf_x86_64_relocate_section): Likewise.
945 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
947 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
950 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
952 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
953 (elf_i386_allocate_dynrelocs): Replace
954 elf_i386_compute_jump_table_size with
955 elf_x86_compute_jump_table_size.
956 (elf_i386_size_dynamic_sections): Likewise.
957 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
958 (elf_x86_64_allocate_dynrelocs): Replace
959 elf_x86_64_compute_jump_table_size with
960 elf_x86_compute_jump_table_size.
961 (elf_x86_64_size_dynamic_sections): Likewise.
962 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
964 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
965 (elf_x86_compute_jump_table_size): New.
967 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
969 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
971 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
972 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
974 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
976 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
977 with htab->is_vxworks.
978 (elf_i386_size_dynamic_sections): Likewise.
979 (elf_i386_relocate_section): Likewise.
980 (elf_i386_finish_dynamic_symbol): Likewise.
981 (elf_i386_finish_dynamic_sections): Likewise.
983 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
985 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
986 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
987 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
988 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
989 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
990 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
991 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
992 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
994 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
997 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
998 ELF_COMMON_DEF_P for common symbols.
1000 2017-09-02 Alan Modra <amodra@gmail.com>
1002 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1003 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1004 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1006 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1008 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1009 (elf_backend_gc_mark_hook): Likewise.
1010 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1011 (elf_backend_gc_mark_hook): Likewise.
1012 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1013 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1014 (elf_backend_gc_mark_hook): Likewise.
1016 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1018 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1019 (elf_backend_adjust_dynamic_symbol): Likewise.
1020 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1021 (elf_backend_adjust_dynamic_symbol): Likewise.
1022 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1023 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1024 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1025 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1026 (elf_backend_adjust_dynamic_symbol): Likewise.
1028 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1030 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1033 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1035 * elf32-i386.c (elf_i386_mkobject): Removed.
1036 (bfd_elf32_mkobject): Likewise.
1037 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1038 (bfd_elf64_mkobject): Likewise.
1039 (bfd_elf32_mkobject): Likewise.
1040 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1041 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1042 (bfd_elf64_mkobject): Likewise.
1043 (bfd_elf32_mkobject): Likewise.
1045 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1047 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1048 Call _bfd_x86_elf_link_setup_gnu_properties.
1049 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1050 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1052 (elf_x86_64_non_lazy_plt): Likewise.
1053 (elf_x86_64_lazy_bnd_plt): Likewise.
1054 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1055 (elf_x86_64_lazy_ibt_plt): Likewise.
1056 (elf_x32_lazy_ibt_plt): Likewise.
1057 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1058 (elf_x32_non_lazy_ibt_plt): Likewise.
1059 (elf_x86_64_nacl_plt): Likewise.
1060 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1061 _bfd_x86_elf_link_setup_gnu_properties.
1062 * elfxx-x86.c: Include elf-vxworks.h".
1063 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1064 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1065 comments for pic_plt0_entry and pic_plt_entry.
1066 (elf_x86_non_lazy_plt_layout): Likewise.
1067 (elf_x86_plt_layout_table): New.
1068 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1070 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1073 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1074 .eh_frame section for the second PLT.
1075 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1076 alignment of .eh_frame section for the second PLT.
1078 2017-09-01 Nick Clifton <nickc@redhat.com>
1081 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1084 2017-09-01 Nick Clifton <nickc@redhat.com>
1087 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1088 attribute buffer is NUL terminated.
1090 2017-08-31 Nick Clifton <nickc@redhat.com>
1093 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1094 to dwarf string sections.
1096 2017-08-31 Alan Modra <amodra@gmail.com>
1098 * po/SRC-POTFILES.in: Regenerate.
1100 2017-08-31 Alan Modra <amodra@gmail.com>
1102 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1103 for a section containing just a terminator. Allow multiple
1104 terminators at end of section.
1105 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1106 sections when not adding alignment. Assert on terminator in
1109 2017-08-31 Alan Modra <amodra@gmail.com>
1113 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1116 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1118 * configure.ac (bfd_backends): Add elf64.lo together with
1119 elfxx-x86.lo for 64-bit BFD.
1120 * configure: Regenerated.
1122 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1124 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1127 2017-08-31 Alan Modra <amodra@gmail.com>
1130 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1131 before _close_and_cleanup. Call iovec->bclose after.
1132 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1134 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1136 * elf32-i386.c (elf_i386_plt_type): Removed.
1137 (elf_i386_plt): Likewise.
1138 (elf_i386_get_synthetic_symtab): Updated. Call
1139 _bfd_x86_elf_get_synthetic_symtab.
1140 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1141 (elf_x86_64_plt): Likewise.
1142 (elf_x86_64_get_synthetic_symtab): Updated. Call
1143 _bfd_x86_elf_get_synthetic_symtab.
1144 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1145 (elf_x86_64_get_plt_got_vma): Likewise.
1146 (elf_i386_valid_plt_reloc_p): Likewise.
1147 (elf_x86_64_valid_plt_reloc_p): Likewise.
1148 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1149 * elfxx-x86.h (elf_x86_plt_type): New.
1150 (elf_x86_plt): Likewise.
1151 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1153 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1155 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1156 target_id instead of elf_machine_code.
1158 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1160 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1161 (elf_i386_lazy_plt_layout): Likewise.
1162 (elf_i386_non_lazy_plt_layout): Likewise.
1163 (elf_i386_plt_layout): Likewise.
1164 (elf_i386_link_hash_table): Likewise.
1165 (elf_i386_next_tls_desc_index): Likewise.
1166 (elf_i386_srelplt2): Likewise.
1167 (elf_i386_plt): Likewise.
1168 (elf_i386_lazy_plt): Likewise.
1169 (elf_i386_non_lazy_plt): Likewise.
1170 (elf_i386_link_hash_table_create): Likewise.
1171 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1172 (elf_i386_lazy_plt): Updated.
1173 (elf_i386_non_lazy_plt): Likewise.
1174 (elf_i386_lazy_ibt_plt): Likewise.
1175 (elf_i386_non_lazy_ibt_plt): Likewise.
1176 (elf_i386_allocate_dynrelocs): Likewise.
1177 (elf_i386_size_dynamic_sections): Likewise.
1178 (elf_i386_relocate_section): Likewise.
1179 (elf_i386_finish_dynamic_symbol): Likewise.
1180 (elf_i386_finish_dynamic_sections): Likewise.
1181 (elf_i386_get_synthetic_symtab): Likewise.
1182 (elf_i386_link_setup_gnu_properties): Likewise.
1183 (elf_i386_nacl_plt): Likewise.
1184 * elf64-x86-64.c (ABI_64_P): Removed.
1185 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1186 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1187 (elf_x86_64_lazy_plt_layout): Likewise.
1188 (elf_x86_64_non_lazy_plt_layout): Likewise.
1189 (elf_x86_64_plt_layout): Likewise.
1190 (elf_x86_64_link_hash_table): Likewise.
1191 (elf_x86_64_plt): Likewise.
1192 (elf_x86_64_lazy_plt): Likewise.
1193 (elf_x86_64_non_lazy_plt): Likewise.
1194 (elf_x86_64_link_hash_table_create): Likewise.
1195 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1196 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1197 (elf_x86_64_lazy_plt): Updated.
1198 (elf_x86_64_non_lazy_plt): Likewise.
1199 (elf_x86_64_lazy_bnd_plt): Likewise.
1200 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1201 (elf_x86_64_lazy_ibt_plt): Likewise.
1202 (elf_x32_lazy_ibt_plt): Likewise.
1203 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1204 (elf_x32_non_lazy_ibt_plt): Likewise.
1205 (elf_x86_64_allocate_dynrelocs): Likewise.
1206 (elf_x86_64_size_dynamic_sections): Likewise.
1207 (elf_x86_64_relocate_section): Likewise.
1208 (elf_x86_64_finish_dynamic_symbol): Likewise.
1209 (elf_x86_64_finish_dynamic_sections): Likewise.
1210 (elf_x86_64_get_synthetic_symtab): Likewise.
1211 (elf_x86_64_link_setup_gnu_properties): Likewise.
1212 (elf_x86_64_nacl_plt): Likewise.
1213 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1215 (ELF32_DYNAMIC_INTERPRETER): New.
1216 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1217 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1218 (_bfd_x86_elf_link_hash_table_create): Likewise.
1219 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1220 (elf_x86_link_hash_table_free): This. Make it static.
1221 * elfxx-x86.h: Don't include "objalloc.h".
1223 (elf_x86_lazy_plt_layout): Likewise.
1224 (elf_x86_non_lazy_plt_layout): Likewise.
1225 (elf_x86_plt_layout): Likewise.
1226 (_bfd_x86_elf_link_hash_table_create): Likewise.
1227 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1228 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1229 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1230 srelplt2 and next_tls_desc_index.
1231 (_bfd_x86_elf_link_hash_table_free): Removed.
1233 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1235 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1236 branch offset interpretation.
1238 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1241 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1243 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1245 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1246 (elf_x86_64_srelplt2): Likewise.
1248 2017-08-30 Alan Modra <amodra@gmail.com>
1250 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1251 (ppc64_elf_tls_optimize): Set it.
1252 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1253 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1254 addis would add zero.
1255 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1256 (ppc_elf_tls_optimize): Set it.
1257 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1258 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1260 2017-08-30 Alan Modra <amodra@gmail.com>
1262 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1263 __tls_get_addr call sequences to LE, don't move the addi down
1264 to the nop. Replace the bl with addi and leave the nop alone.
1266 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1268 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1270 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1272 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1274 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1276 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1277 (BFD64_BACKENDS): Likewise.
1278 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1279 (BFD64_BACKENDS_CFILES): Likewise.
1280 * Makefile.in: Regenerated.
1281 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1282 elf32-i386.lo and elf64-x86-64.lo.
1283 * configure: Regenerated.
1284 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1285 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1286 "objalloc.h" and "hashtab.h".
1287 (ELIMINATE_COPY_RELOCS): Removed.
1288 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1289 (SYMBOL_NO_COPYRELOC): Likewise.
1290 (elf_i386_link_hash_entry): Likewise.
1291 (GOT_UNKNOWN): Likewise.
1292 (GOT_NORMAL): Likewise.
1293 (GOT_TLS_GD): Likewise.
1294 (elf_i386_hash_entry): Likewise.
1295 (elf_i386_obj_tdata): Likewise.
1296 (elf_i386_tdata): Likewise.
1297 (elf_i386_local_got_tls_type): Likewise.
1298 (elf_i386_local_tlsdesc_gotent): Likewise.
1299 (elf_i386_hash_table): Likewise.
1300 (elf_i386_link_hash_newfunc): Likewise.
1301 (elf_i386_local_htab_hash): Likewise.
1302 (elf_i386_local_htab_eq): Likewise.
1303 (elf_i386_get_local_sym_hash): Likewise.
1304 (elf_i386_link_hash_table_free): Likewise.
1305 (elf_i386_copy_indirect_symbol): Likewise.
1306 (elf_i386_fixup_symbol): Likewise.
1307 (elf_i386_readonly_dynrelocs): Likewise.
1308 (elf_i386_always_size_sections): Likewise.
1309 (elf_i386_set_tls_module_base): Likewise.
1310 (elf_i386_dtpoff_base): Likewise.
1311 (compare_relocs): Likewise.
1312 (elf_i386_hash_symbol): Likewise.
1313 (elf_i386_parse_gnu_properties): Likewise.
1314 (elf_i386_merge_gnu_properties): Likewise.
1315 (elf_i386_link_check_relocs): Likewise.
1316 (elf_i386_merge_symbol_attribute): Likewise.
1317 (bfd_elf32_bfd_link_check_relocs): Likewise.
1318 (elf_backend_copy_indirect_symbol): Likewise.
1319 (elf_backend_always_size_sections): Likewise.
1320 (elf_backend_omit_section_dynsym): Likewise.
1321 (elf_backend_hash_symbol): Likewise.
1322 (elf_backend_fixup_symbol): Likewise.
1323 (elf_backend_parse_gnu_properties): Likewise.
1324 (elf_backend_merge_gnu_properties): Likewise.
1325 (elf_backend_merge_symbol_attribute): Likewise.
1326 (elf_i386_mkobject): Updated.
1327 (elf_i386_link_hash_table_create): Likewise.
1328 (elf_i386_check_tls_transition): Likewise.
1329 (elf_i386_tls_transition): Likewise.
1330 (elf_i386_convert_load_reloc): Likewise.
1331 (elf_i386_check_relocs): Likewise.
1332 (elf_i386_adjust_dynamic_symbol): Likewise.
1333 (elf_i386_allocate_dynrelocs): Likewise.
1334 (elf_i386_convert_load): Likewise.
1335 (elf_i386_size_dynamic_sections): Likewise.
1336 (elf_i386_relocate_section): Likewise.
1337 (elf_i386_finish_dynamic_symbol ): Likewise.
1338 (elf_i386_finish_dynamic_sections): Likewise.
1339 (elf_i386_output_arch_local_syms): Likewise.
1340 (elf_i386_get_synthetic_symtab): Likewise.
1341 (elf_i386_link_setup_gnu_properties): Likewise.
1342 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1343 of elf_link_hash_table, as base.
1344 (elf_i386_next_tls_desc_index): New.
1345 (elf_i386_srelplt2): Likewise.
1346 (elf_i386_plt): Likewise.
1347 (elf_i386_lazy_plt): Likewise.
1348 (elf_i386_non_lazy_plt): Likewise.
1349 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1350 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1351 "objalloc.h" and "hashtab.h".
1352 (ELIMINATE_COPY_RELOCS): Removed.
1353 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1354 (SYMBOL_NO_COPYRELOC): Likewise.
1355 (elf_x86_64_link_hash_entry): Likewise.
1356 (GOT_UNKNOWN): Likewise.
1357 (GOT_NORMAL): Likewise.
1358 (GOT_TLS_GD): Likewise.
1359 (elf_x86_64_hash_entry): Likewise.
1360 (elf_x86_64_obj_tdata): Likewise.
1361 (elf_x86_64_tdata): Likewise.
1362 (elf_x86_64_local_got_tls_type): Likewise.
1363 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1364 (elf_x86_64_hash_table): Likewise.
1365 (elf_x86_64_link_hash_newfunc): Likewise.
1366 (elf_x86_64_local_htab_hash): Likewise.
1367 (elf_x86_64_local_htab_eq): Likewise.
1368 (elf_x86_64_get_local_sym_hash): Likewise.
1369 (elf_x86_64_link_hash_table_free): Likewise.
1370 (elf_x86_64_copy_indirect_symbol): Likewise.
1371 (elf_x86_64_fixup_symbol): Likewise.
1372 (elf_x86_64_readonly_dynrelocs): Likewise.
1373 (elf_x86_64_always_size_sections): Likewise.
1374 (elf_x86_64_set_tls_module_base): Likewise.
1375 (elf_x86_64_dtpoff_base): Likewise.
1376 (compare_relocs): Likewise.
1377 (elf_x86_64_merge_symbol_attribute): Likewise.
1378 (elf_x86_64_hash_symbol): Likewise.
1379 (elf_x86_64_parse_gnu_properties): Likewise.
1380 (elf_x86_64_merge_gnu_properties): Likewise.
1381 (elf_x86_64_link_check_relocs): Likewise.
1382 (elf_backend_copy_indirect_symbol): Likewise.
1383 (elf_backend_always_size_sections): Likewise.
1384 (bfd_elf64_bfd_link_check_relocs): Likewise.
1385 (elf_backend_merge_symbol_attribute): Likewise.
1386 (elf_backend_hash_symbol): Likewise.
1387 (elf_backend_omit_section_dynsym): Likewise.
1388 (elf_backend_fixup_symbol): Likewise.
1389 (elf_backend_parse_gnu_properties): Likewise.
1390 (elf_backend_merge_gnu_properties): Likewise.
1391 (bfd_elf32_bfd_link_check_relocs): Likewise.
1392 (elf_x86_64_mkobject): Updated.
1393 (elf_x86_64_link_hash_table_create): Likewise.
1394 (elf_x86_64_check_tls_transition): Likewise.
1395 (elf_x86_64_tls_transition): Likewise.
1396 (elf_x86_64_convert_load_reloc): Likewise.
1397 (elf_x86_64_check_relocs): Likewise.
1398 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1399 (elf_x86_64_allocate_dynrelocs): Likewise.
1400 (elf_x86_64_convert_load): Likewise.
1401 (elf_x86_64_size_dynamic_sections): Likewise.
1402 (elf_x86_64_relocate_section): Likewise.
1403 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1404 (elf_x86_64_finish_dynamic_sections): Likewise.
1405 (elf_x86_64_output_arch_local_syms): Likewise.
1406 (elf_x86_64_get_synthetic_symtab): Likewise.
1407 (elf_x86_64_link_setup_gnu_properties): Likewise.
1408 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1409 instead of elf_link_hash_table, as base.
1410 (elf_x86_64_next_tls_desc_index): New.
1411 (elf_x86_64_srelplt2): Likewise.
1412 (elf_x86_64_plt): Likewise.
1413 (elf_x86_64_lazy_plt): Likewise.
1414 (elf_x86_64_non_lazy_plt): Likewise.
1415 * elfxx-x86.c: New file.
1416 * elfxx-x86.h: Likewise.
1418 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1420 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1422 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1424 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1426 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1427 sections before checking dynamic relocations and free invalid
1428 PLT section contents.
1429 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1431 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1433 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1434 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1436 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1439 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1441 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1443 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1445 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1447 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1449 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1452 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1453 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1454 Add a has_no_copy_on_protected bitfield.
1455 (elf_has_no_copy_on_protected): New.
1456 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1457 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1458 (elf_merge_gnu_property_list): Likewise.
1459 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1460 to FALSE for elf_has_no_copy_on_protected.
1461 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1462 (elf_i386_link_hash_entry): Add def_protected.
1463 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1464 when checking info->nocopyreloc.
1465 (elf_i386_link_setup_gnu_properties): Don't set
1466 extern_protected_data here.
1467 (elf_i386_merge_symbol_attribute): New function.
1468 (elf_backend_merge_symbol_attribute): New.
1469 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1470 (elf_x86_64_link_hash_entry): Add def_protected.
1471 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1472 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1473 when checking info->nocopyreloc.
1474 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1475 relocation run-time overflow and unresolvable R_X86_64_32S
1476 relocation against protected data symbol defined in shared object
1477 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1478 (elf_x86_64_link_setup_gnu_properties): Don't set
1479 extern_protected_data here.
1480 (elf_x86_64_merge_symbol_attribute): New function.
1481 (elf_backend_merge_symbol_attribute): New.
1483 2017-08-26 Alan Modra <amodra@gmail.com>
1485 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1486 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1487 (ppc_elf_relocate_section): Comment fix.
1488 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1489 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1490 Support dynamic relocs for TPREL16 when non-pic too.
1491 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1492 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1495 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1497 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1498 "symbol" in comments.
1499 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1501 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1504 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1505 R_X86_64_PC32 relocation run-time overflow and unresolvable
1506 R_X86_64_32S relocation with -z nocopyreloc.
1508 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1510 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1511 Undefined symbols may not have a type.
1512 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1514 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1516 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1517 bfd_link_info. Report shared, PIE or PDE object based on
1519 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1520 (elf_x86_64_relocate_section): Likewise.
1522 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1524 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1525 for function symbols.
1526 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1528 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1530 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1531 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1532 is set on any input relocatable file.
1533 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1535 2017-08-23 Alan Modra <amodra@gmail.com>
1538 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1539 ensure_undefweak_dynamic. Handle undefined too.
1540 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1541 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1542 (allocate_dynrelocs): Discard undefined non-default visibility
1543 relocs first. Make undefined syms dynamic. Tidy goto.
1545 2017-08-21 Alan Modra <amodra@gmail.com>
1546 H.J. Lu <hongjiu.lu@intel.com>
1549 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1550 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1552 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1555 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1556 undefined weak symbols.
1558 2017-08-18 Nick Clifton <nickc@redhat.com>
1561 * tekhex.c (getsym): Fix check for source pointer walking off the
1562 end of the input buffer.
1564 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1567 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1568 relocations in debug sections, change abort to _bfd_error_handler.
1570 2017-08-14 Nick Clifton <nickc@redhat.com>
1573 * elf.c (setup_group): Check for an empty or very small group
1575 * po/bfd.pot: Regenerate.
1577 2017-08-14 Alan Modra <amodra@gmail.com>
1580 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1581 alignment padding here.
1582 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1583 in a reverse pass over sections.
1585 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1588 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1589 for @plt suffixes first.
1590 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1592 2017-08-08 Nick Clifton <nickc@redhat.com>
1595 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1596 small section lengths.
1597 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1599 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1600 there is enough data present in the note.
1602 2017-08-08 Alan Modra <amodra@gmail.com>
1605 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1606 got.refcount for GOTOFF relocs, just create .got section.
1608 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1610 * elflink.c (elf_link_add_object_symbols): Move common symbol
1611 check after bed->common_definition.
1613 2017-08-07 Alan Modra <amodra@gmail.com>
1616 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1617 needed to define various dynamic tags have been discarded.
1619 2017-08-07 Nick Clifton <nickc@redhat.com>
1622 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1623 has not been set then use the bfd returned by
1624 _bfd_elf_link_setup_gnu_properties. If that is null then search
1625 through all the input bfds selecting the first normal, ELF format
1627 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1629 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1631 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1633 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1634 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1635 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1636 (elf_i386_link_check_relocs): New function.
1637 (bfd_elf32_bfd_link_check_relocs): New.
1638 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1640 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1641 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1642 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1643 (elf_x86_64_link_check_relocs): New function.
1644 (bfd_elf64_bfd_link_check_relocs): New.
1645 (bfd_elf32_bfd_link_check_relocs): Likewise.
1647 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1650 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1651 as undefined for --no-define-common.
1653 2017-08-05 Alan Modra <amodra@gmail.com>
1655 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1656 hppa_link_hash_table.
1658 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1660 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1661 entries for sysregs with negative indices.
1663 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1665 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1666 isn't the S/390 specific elf data.
1667 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1669 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1671 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1672 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1673 [R_RISCV_ADD16]: Likewise.
1674 [R_RISCV_ADD32]: Likewise.
1675 [R_RISCV_ADD64]: Likewise.
1676 [R_RISCV_SUB6]: Likewise.
1677 [R_RISCV_SUB8]: Likewise.
1678 [R_RISCV_SUB16]: Likewise.
1679 [R_RISCV_SUB32]: Likewise.
1680 [R_RISCV_SUB64]: Likewise.
1682 2017-07-31 Alan Modra <amodra@gmail.com>
1684 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1685 without ld.so checks.
1687 2017-07-29 Alan Modra <amodra@gmail.com>
1690 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1691 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1692 (is_elfv2_localentry0): Test non_zero_localentry.
1693 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1695 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1697 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1698 pointer check for htab->elf.irelplt.
1699 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1701 2017-07-27 Nick Clifton <nickc@redhat.com>
1704 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1706 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1708 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1710 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1712 (evax_bfd_print_emh): Check for invalid string lengths.
1714 2017-07-25 Nick Clifton <nickc@redhat.com>
1716 * po/fr.po: Updated French translation.
1718 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1721 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1722 16-bit absolute branches into 10-bit pc-relative branches on the
1723 MSP430 as well as the MSP430X.
1725 2017-07-25 Alan Modra <amodra@gmail.com>
1727 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1728 (stub_eh_frame_size): New function.
1729 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1730 (group_sections): Init group tls_get_addr_opt_bctrl.
1731 (ppc64_elf_size_stubs): Update sizing and initialization of
1732 .eh_frame. Iteration over stubs via group list.
1733 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1734 (ppc64_elf_finish_dynamic_sections): Update finalization of
1737 2017-07-24 Nick Clifton <nickc@redhat.com>
1740 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1741 of the relocs to the canonicalize_one_reloc routine.
1742 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1743 for the _bfd_mach_o_canonicalize_one_reloc field.
1744 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1745 res_base parameter. Use to check for corrupt pair relocs.
1746 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1748 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1750 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1753 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1754 enough data in the record before attempting to parse it.
1755 (_bfd_vms_slurp_eeom): Likewise.
1757 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1758 (image_set_ptr): Likewise.
1759 (alpha_vms_slurp_relocs): Likewise.
1761 (alpha_vms_object_p): Check for a truncated record.
1763 2017-07-24 Nick Clifton <nickc@redhat.com>
1766 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1767 an unrecognized reloc and sets the bfd_error value.
1768 * libbfd.h: Regenerate.
1769 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1771 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1772 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1773 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1774 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1775 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1777 2017-07-23 Alan Modra <amodra@gmail.com>
1779 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1782 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1785 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1786 reloc_class_ifunc for ifunc symbols.
1788 2017-07-19 Nick Clifton <nickc@redhat.com>
1791 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1792 correct magic bytes at the start, set the error to wrong format
1793 and clear the format selector before returning NULL.
1795 2017-07-19 Nick Clifton <nickc@redhat.com>
1798 * coff-rs6000.c (_bfd_strntol): New function.
1799 (_bfd_strntoll): New function.
1800 (GET_VALUE_IN_FIELD): New macro.
1801 (EQ_VALUE_IN_FIELD): new macro.
1802 (_bfd_xcoff_slurp_armap): Use new macros.
1803 (_bfd_xcoff_archive_p): Likewise.
1804 (_bfd_xcoff_read_ar_hdr): Likewise.
1805 (_bfd_xcoff_openr_next_archived_file): Likewise.
1806 (_bfd_xcoff_stat_arch_elt): Likewise.
1807 * coff64-rs6000.c (_bfd_strntol): New function.
1808 (_bfd_strntoll): New function.
1809 (GET_VALUE_IN_FIELD): New macro.
1810 (xcoff64_slurp_armap): Use new macros.
1812 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1813 John Eric Martin <John.Martin@emmicro-us.com>
1815 * bfd-in2.h: Regenerate.
1816 * libbfd.h: Regenerate.
1817 * elf32-arc.c (JLI): Define.
1818 * reloc.c: Add JLI relocations.
1820 2017-07-18 Nick Clifton <nickc@redhat.com>
1823 * coff-sh.c: Fix spelling typos.
1824 * compress.c: Likewise.
1825 * cpu-pdp11.c: Likewise.
1826 * ecofflink.c: Likewise.
1827 * elf-m10300.c: Likewise.
1829 * elf32-arm.c: Likewise.
1830 * elf32-m68k.c: Likewise.
1831 * elf32-nds32.c: Likewise.
1832 * elf32-ppc.c: Likewise.
1833 * elf32-sh.c: Likewise.
1834 * elf32-v850.c: Likewise.
1835 * elf64-ppc.c: Likewise.
1836 * elf64-x86-64.c: Likewise.
1837 * elflink.c: Likewise.
1838 * elfnn-aarch64.c: Likewise.
1839 * elfxx-mips.c: Likewise.
1841 * sunos.c: Likewise.
1842 * vms-alpha.c: Likewise.
1843 * xcofflink.c: Likewise.
1845 2017-07-18 Nick Clifton <nickc@redhat.com>
1848 * coffcode.h (handle_COMDAT): Replace abort with an error message
1851 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1854 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1857 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1859 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1861 2017-07-16 Alan Modra <amodra@gmail.com>
1863 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1864 __tls_index GOT entries when using __tls_get_addr_opt stub.
1865 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1867 2017-07-12 Alan Modra <amodra@gmail.com>
1869 * po/es.po: Update from translationproject.org/latest/bfd/.
1870 * po/fi.po: Likewise.
1871 * po/fr.po: Likewise.
1872 * po/id.po: Likewise.
1873 * po/ja.po: Likewise.
1874 * po/ro.po: Likewise.
1875 * po/ru.po: Likewise.
1876 * po/sr.po: Likewise.
1877 * po/sv.po: Likewise.
1878 * po/tr.po: Likewise.
1879 * po/uk.po: Likewise.
1880 * po/vi.po: Likewise.
1881 * po/zh_CN.po: Likewise.
1882 * po/hr.po: New file from translationproject.org.
1883 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1884 * configure: Regenerate.
1886 2017-07-12 Nick Clifton <nickc@redhat.com>
1888 Fix compile time warnings using gcc 7.1.1.
1889 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1891 (elf_xtensa_get_gotplt_section): Increase length of got_name
1893 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1894 default return of FALSE.
1895 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1896 default return of FALSE.
1898 2017-07-12 Alan Modra <amodra@gmail.com>
1900 * binary.c (binary_set_section_contents): Don't print filepos in
1902 (coff_write_object_contents): Cast size_t for error message.
1903 (coff_slurp_line_table): Don't use bfd_vma symndx.
1904 (coff_slurp_reloc_table): Remove unneeded cast.
1905 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1907 (find_abstract_instance_name): Likewise.
1908 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1909 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1910 (elf32_arm_check_relocs): Make r_symndx an int.
1911 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1913 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1915 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1917 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1918 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1919 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1920 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1921 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1922 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1923 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1924 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1925 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1926 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1927 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1928 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1929 and use %lu for error message.
1930 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1931 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1934 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1936 (elf32_arm_final_link_relocate): Likewise.
1937 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1938 * coffcode.h (styp_to_sec_flags): Likewise.
1939 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1940 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1941 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1942 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1943 (elf32_bfin_merge_private_bfd_data): Likewise.
1944 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1945 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1946 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1947 (i370_elf_relocate_section): Likewise.
1948 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1949 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1950 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1951 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1952 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1953 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1954 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1955 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1956 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1957 * ieee.c (ieee_write_id, read_id): Likewise.
1958 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1959 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1960 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1961 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1962 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1963 * stabs.c (_bfd_link_section_stabs): Likewise.
1965 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1967 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1968 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1969 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1970 * coff-sh.c (sh_relax_section): Likewise.
1971 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1972 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1973 * coffcode.h (coff_slurp_reloc_table): Likewise.
1974 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1975 (_bfd_coff_read_string_table): Likewise.
1976 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1977 * compress.c (bfd_get_full_section_contents): Likewise.
1978 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1979 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1980 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1981 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1982 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1983 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1984 (elf32_arm_write_section): Likewise.
1985 * elf32-bfin.c (bfin_relocate_section): Likewise.
1986 (bfinfdpic_relocate_section): Likewise.
1987 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1988 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1989 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1990 (elf_i386_relocate_section): Likewise.
1991 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1992 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1993 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1994 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1995 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1996 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1997 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1998 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1999 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2000 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2001 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2002 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2003 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2004 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2005 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2006 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2007 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2008 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2009 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2010 * elf32-sh.c (sh_elf_relax_section): Likewise.
2011 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2012 (sh_elf_relocate_section): Likewise.
2013 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2014 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2015 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2016 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2017 * elf32-v850.c (v850_elf_relax_section): Likewise.
2018 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2019 (elf_vax_relocate_section): Likewise.
2020 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2021 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2022 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2023 (do_fix_for_relocatable_link): Likewise.
2024 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2025 (elf64_alpha_relax_with_lituse): Likewise.
2026 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2027 (elf_hppa_final_link_relocate): Likewise.
2028 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2029 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2030 (elf64_vms_link_add_object_symbols): Likewise.
2031 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2032 (mmix_final_link_relocate): Likewise.
2033 * elf64-s390.c (invalid_tls_insn): Likewise.
2034 (elf_s390_relocate_section): Likewise.
2035 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2036 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2037 (elf_x86_64_relocate_section): Likewise.
2038 * elfcode.h (elf_slurp_symbol_table): Likewise.
2039 * elfcore.h (elf_core_file_p): Likewise.
2040 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2041 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2042 (elfNN_aarch64_relocate_section): Likewise.
2043 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2044 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2045 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2046 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2047 (_bfd_mips_elf_relocate_section): Likewise.
2048 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2049 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2050 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2051 * ieee.c (ieee_slurp_external_symbols): Likewise.
2052 * ihex.c (ihex_write_object_content): Likewise.
2053 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2054 * merge.c (_bfd_merged_section_offset): Likewise.
2055 * mmo.c (mmo_write_loc_chunk): Likewise.
2056 (mmo_write_object_contents): Likewise.
2057 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2058 * stabs.c (_bfd_link_section_stabs): Likewise.
2059 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2061 2017-07-11 Alan Modra <amodra@gmail.com>
2063 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2065 2017-07-11 Alan Modra <amodra@gmail.com>
2067 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2068 instruction" error using _bfd_error_handler, not einfo.
2070 2017-07-10 Nick Clifton <nickc@redhat.com>
2072 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2073 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2075 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2077 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2079 2017-07-07 Alan Modra <amodra@gmail.com>
2081 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2083 2017-07-07 Alan Modra <amodra@gmail.com>
2085 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2086 as long long. Move code replacing "ll" with "I64", and simplify.
2088 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2090 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2093 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2095 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2097 (line_info_add_file_name): Likewise.
2098 (decode_line_info): Likewise.
2100 2017-07-04 Tristan Gingold <gingold@adacore.com>
2102 * version.m4: Bump version to 2.29.51
2103 * configure: Regenerate.
2105 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2107 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2108 sanity check at the head of this function.
2110 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2112 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2113 dwarf_line_str_size.
2114 (struct attr_abbrev): Add field implicit_const.
2115 (dwarf_debug_sections): Add .debug_line_str.
2116 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2117 (dwarf_debug_section_assert): Add static assertion.
2118 (read_indirect_line_string): New.
2119 (read_abbrevs): Support DW_FORM_implicit_const.
2120 (is_str_attr): Support DW_FORM_line_strp.
2121 (read_attribute_value): Support DW_FORM_line_strp and
2122 DW_FORM_implicit_const.
2123 (read_attribute): Support DW_FORM_implicit_const.
2124 (line_info_add_include_dir, line_info_add_include_dir_stub):
2125 (line_info_add_file_name, read_formatted_entries): New.
2126 (decode_line_info, parse_comp_unit): Support DWARF 5.
2127 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2129 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2131 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2132 abort statement that was put for symbols that are not dynamic.
2134 2017-07-03 Tristan Gingold <gingold@adacore.com>
2136 * po/bfd.pot: Regenerate
2138 2017-07-03 Alan Modra <amodra@gmail.com>
2140 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2141 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2142 * elf.c (setup_group): Use "Lx" to print sh_size.
2143 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2144 unknown section type in hex.
2145 (copy_special_section_fields): Style fix.
2146 (bfd_section_from_shdr): Correct format for sh_link. Use a
2147 common error message for all the variants of unrecognized
2149 (assign_file_positions_for_load_sections): Use "Lx" for lma
2150 adjust error message.
2151 (assign_file_positions_for_non_load_sections): Formatting.
2152 (rewrite_elf_program_header): Formatting. Use "Lx" for
2153 bfd_vma values in error messages.
2154 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2155 ELF_R_SYM value to type expected by format.
2156 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2158 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2159 (elf_link_input_bfd): Use "Lx" for r_info.
2160 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2162 2017-07-03 Alan Modra <amodra@gmail.com>
2164 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2165 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2166 Microsoft C library variant of long long format specifier.
2167 (PRINT20): Cast value to bfd_uint64_t not long long.
2168 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2169 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2170 long long. Don't cast to bfd_vma.
2171 * elf32-score.c (score3_bfd_getl48): Likewise.
2172 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2174 2017-07-03 Alan Modra <amodra@gmail.com>
2176 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2178 (bfd_elf_print_symbol): Don't cast symbol->flags.
2179 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2180 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2181 _bfd_error_handler argument order.
2182 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2184 2017-07-03 Alan Modra <amodra@gmail.com>
2186 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2187 AC_TYPE_LONG_DOUBLE.
2188 * configure: Regenerate.
2189 * config.in: Regenerate.
2191 2017-06-29 Andrew Waterman <andrew@sifive.com>
2193 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2196 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2198 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2199 unless it is undefined weak.
2200 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2201 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2203 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2204 is not dynamic in PIC, abort.
2206 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2209 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2210 undefined weak symbols into dynamic.
2211 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2212 relocation for non-dynamic symbols.
2213 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2215 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2217 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2218 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2219 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2220 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2221 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2224 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2226 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2227 (elfcore_write_s390_gs_bc): Likewise.
2228 * elf.c (elfcore_grok_s390_gs_cb): New function.
2229 (elfcore_grok_s390_gs_bc): New function.
2230 (elfcore_grok_note): Call them.
2231 (elfcore_write_s390_gs_cb): New function.
2232 (elfcore_write_s390_gs_bc): New function.
2233 (elfcore_write_register_note): Call them.
2235 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2237 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2238 bfd_get_file_size. Check archive element size.
2239 (_bfd_generic_get_section_contents_in_window): Likewise.
2241 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2243 * bfd-in2.h: Regenerated.
2244 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2245 (bfd_get_file_size): Likewise.
2247 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2248 Matthew Fortune <matthew.fortune@imgtec.com>
2250 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2251 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2252 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2253 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2255 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2256 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2257 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2258 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2259 `bfd_mach_mips_interaptiv_mr2' entries.
2260 * bfd-in2.h: Regenerate.
2262 2017-06-27 Nick Clifton <nickc@redhat.com>
2264 * tekhex.c (pass_over): Revert accidental conversion of a local
2265 array to a static array.
2267 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2270 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2271 reloc addend if necessary. Adjust diff only if
2272 shrinked_insn_address < end_address.
2274 2017-06-27 Alan Modra <amodra@gmail.com>
2277 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2278 (_bfd_generic_get_section_contents_in_window): Likewise.
2280 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2282 * elfnn-riscv.c (perform_relocation): Support the new
2283 R_RISCV_32_PCREL relocation.
2284 (riscv_elf_relocate_section): Likewise.
2285 * elfxx-riscv.c (howto_table): Likewise.
2286 (riscv_reloc_map): Likewise.
2287 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2288 * libbfd.h: Regenerate.
2290 2017-06-27 Alan Modra <amodra@gmail.com>
2293 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2294 Use unsigned file pointer type, and remove cast.
2295 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2296 Add "count", not "sz".
2298 2017-06-26 Pedro Alves <palves@redhat.com>
2301 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2304 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2307 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2310 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2312 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2313 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2314 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2315 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2316 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2318 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2321 * compress.c (bfd_get_full_section_contents): Don't check the
2323 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2324 reject a section whose size + offset is greater than the size
2326 (_bfd_generic_get_section_contents_in_window): Likewise.
2328 2017-06-26 Nick Clifton <nickc@redhat.com>
2331 * tekhex.c (getvalue): Check for the source pointer exceeding the
2332 end pointer before the first byte is read.
2334 2017-06-26 Nick Clifton <nickc@redhat.com>
2337 * opncls.c (get_build_id): Check that the section is big enough
2338 to contain the whole note.
2339 * compress.c (bfd_get_full_section_contents): Check for and reject
2340 a section whose size is greater than the size of the entire file.
2341 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2342 contain a notes section.
2344 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2346 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2348 (elf_s390_modify_segment_map): Likewise.
2349 (bfd_elf_s390_set_options): Lisewise.
2351 2017-06-26 Alan Modra <amodra@gmail.com>
2353 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2355 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2356 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2357 .preinit_array on --just-syms bfds.
2358 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2359 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2360 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2362 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2364 * elf.c (find_link): Bounds check "hint".
2366 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2368 * elf32-arm.c (using_thumb_only): Update list of architectures in
2369 BFD_ASSERT for which the logic is valid.
2370 (using_thumb2_bl): Likewise.
2371 (using_thumb2): Likewise and return true for ARMv8-R.
2372 (arch_has_arm_nop): Likewise.
2373 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2374 merging logic. Update commentis for value 15 of v8m_baseline,
2375 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2376 merging of value 15 of Tag_CPU_arch.
2378 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2380 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2381 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2382 * bfd-in2.h: Regenerate.
2384 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2386 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2387 the error_alignment label forward. Properly align program
2388 property note section.
2390 2017-06-22 Eric Christopher <echristo@gmail.com>
2392 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2393 abs to fix a truncation warning.
2395 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2397 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2398 local undefined weak symbol to 0.
2399 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2401 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2403 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2404 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2405 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2406 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2407 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2408 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2409 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2410 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2412 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2414 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2415 (elf_i386_lazy_ibt_plt_entry): Likewise.
2416 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2417 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2418 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2419 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2420 (elf_i386_lazy_plt_layout): Likewise.
2421 (elf_i386_non_lazy_plt_layout): Likewise.
2422 (elf_i386_link_hash_entry): Add plt_second.
2423 (elf_i386_link_hash_table): Add plt_second and
2424 plt_second_eh_frame.
2425 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2426 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2427 the second PLT. Check the second PLT.
2428 (elf_i386_relocate_section): Use the second PLT to resolve
2429 PLT reference if needed.
2430 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2432 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2433 second PLT. Generate unwind info for the second PLT.
2434 (elf_i386_plt_type): Add plt_second.
2435 (elf_i386_get_synthetic_symtab): Support the second PLT.
2436 (elf_i386_parse_gnu_properties): Support
2437 GNU_PROPERTY_X86_FEATURE_1_AND.
2438 (elf_i386_merge_gnu_properties): Support
2439 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2440 on GNU_PROPERTY_X86_FEATURE_1_IBT
2441 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2442 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2443 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2444 is set on all relocatable inputs.
2445 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2446 (elf_x32_lazy_ibt_plt_entry): Likewise.
2447 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2448 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2449 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2450 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2451 (elf_x86_64_lazy_ibt_plt): Likewise.
2452 (elf_x32_lazy_ibt_plt): Likewise.
2453 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2454 (elf_x32_non_lazy_ibt_plt): Likewise.
2455 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2456 (elf_x86_64_parse_gnu_properties): Support
2457 GNU_PROPERTY_X86_FEATURE_1_AND.
2458 (elf_x86_64_merge_gnu_properties): Support
2459 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2460 on GNU_PROPERTY_X86_FEATURE_1_IBT
2461 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2462 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2463 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2464 is set on all relocatable inputs.
2466 2017-06-22 Nick Clifton <nickc@redhat.com>
2469 * som.c (setup_sections): NUL terminate the space_strings buffer.
2470 Check that the space.name field does not index beyond the end of
2471 the space_strings buffer.
2473 2017-06-21 Nick Clifton <nickc@redhat.com>
2476 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2478 2017-06-21 Nick Clifton <nickc@redhat.com>
2481 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2482 type of the size parameter.
2483 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2484 length of the counted string.
2485 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2486 (_bfd_vms_save_counted_string): Likewise.
2487 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2488 _bfd_vms_save_counted_string.
2489 (_bfd_vms_slurp_ehdr): Likewise.
2490 (_bfd_vms_slurp_egsd): Likewise.
2491 (Parse_module): Likewise.
2493 2017-06-21 Alan Modra <amodra@gmail.com>
2495 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2496 calls before tocsave calls.
2497 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2500 2017-06-21 Nick Clifton <nickc@redhat.com>
2503 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2504 bfd_get_full_section_contents returns no contents.
2506 2017-06-21 Nick Clifton <nickc@redhat.com>
2509 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2512 2017-06-21 Nick Clifton <nickc@redhat.com>
2515 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2517 (image_set_ptr): Likewise.
2518 (alpha_vms_fix_sec_rel): Likewise.
2519 (alpha_vms_slurp_relocs): Likewise.
2521 2017-06-21 Nick Clifton <nickc@redhat.com>
2524 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2526 (ieee_archive_p): Likewise.
2527 (ieee_object_p): Likewise.
2529 2017-06-21 Nick Clifton <nickc@redhat.com>
2532 * elf.c (setup_group): Zero the group section pointer list after
2533 allocation so that loops can be caught. Check for NULL pointers
2534 when processing a group list.
2536 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2538 * elf-s390.h: New file.
2539 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2541 (elf_s390_additional_program_headers): New function.
2542 (elf_s390_modify_segment_map): New function.
2543 (bfd_elf_s390_set_options): New function.
2544 (elf_backend_additional_program_headers)
2545 (elf_backend_modify_segment_map): Add macro definitions.
2547 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2550 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2551 the DYNAMIC bit instead of bfd_count_sections.
2553 2017-06-19 Nick Clifton <nickc@redhat.com>
2556 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2558 (evax_bfd_print_eeom): Likewise.
2559 (evax_bfd_print_egsd): Check for an overlarge record length.
2560 (evax_bfd_print_etir): Likewise.
2562 2017-06-19 Nick Clifton <nickc@redhat.com>
2565 * libieee.h (struct common_header_type): Add end_p field.
2566 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2568 (read_id): Check for a length that exceeds the remaining bytes in
2570 (ieee_seek): Initialise end_p.
2571 (ieee_archive_p): Likewise.
2572 (ieee_object_p): Likewise.
2574 2017-06-19 Nick Clifton <nickc@redhat.com>
2577 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2578 before reading the EIHS structure entries.
2580 2017-06-19 Nick Clifton <nickc@redhat.com>
2583 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2584 gsd_size. Check that there are enough bytes remaining to read the
2585 type and size of the next egsd. Check that the size of the egsd
2586 does not exceed the size of the record.
2588 2017-06-19 Alan Modra <amodra@gmail.com>
2590 * config.bfd: Correct targ_underscore for cris.
2592 2017-06-18 Alan Modra <amodra@gmail.com>
2594 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2595 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2597 2017-06-16 Nick Clifton <nickc@redhat.com>
2599 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2600 bucketlist is empty because there are no symbols to add to the
2603 2017-06-16 Alan Modra <amodra@gmail.com>
2609 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2610 (BFD_JUMP_TABLE_LINK): Likewise.
2611 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2612 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2613 (bfd_elf_define_start_stop): New function.
2614 * linker.c (bfd_generic_define_start_stop): New function.
2615 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2617 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2618 * aout-target.h (MY_bfd_define_start_stop): Define.
2619 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2620 * binary.c (binary_bfd_define_start_stop): Define.
2621 * bout.c (b_out_bfd_define_start_stop): Define.
2622 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2623 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2624 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2625 * coffcode.h (coff_bfd_define_start_stop): Define.
2626 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2627 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2628 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2629 * ieee.c (ieee_bfd_define_start_stop): Define.
2630 * ihex.c (ihex_bfd_define_start_stop): Define.
2631 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2632 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2633 * mmo.c (mmo_bfd_define_start_stop): Define.
2634 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2635 * oasys.c (oasys_bfd_define_start_stop): Define.
2636 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2637 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2638 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2639 * som.c (som_bfd_define_start_stop): Define.
2640 * srec.c (srec_bfd_define_start_stop): Define.
2641 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2642 * versados.c (versados_bfd_define_start_stop): Define.
2643 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2644 (alpha_vms_bfd_define_start_stop): Define.
2645 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2646 * bfd-in2.h: Regenerate.
2647 * libbfd.h: Regenerate.
2649 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2651 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2652 SYMBOL_REFERENCES_LOCAL.
2654 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2657 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2658 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2659 runtime for if there needs copy relocation elimination.
2660 (need_copy_relocation_p): New function. Return true for symbol with
2661 pc-relative references and if it's against read-only sections.
2662 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2663 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2664 that are related with accessing external objects.
2665 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2666 in elfNN_aarch64_check_relocs.
2668 2017-06-15 Nick Clifton <nickc@redhat.com>
2671 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2674 (ieee_archive_p): Likewise.
2676 2017-06-15 Nick Clifton <nickc@redhat.com>
2679 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2681 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2683 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2684 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2685 keep both windowed and call0 ABI PLT definitions.
2686 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2687 elf_xtensa_*_plt_entry endex.
2688 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2690 2017-06-14 Nick Clifton <nickc@redhat.com>
2693 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2696 2017-06-14 Nick Clifton <nickc@redhat.com>
2699 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2700 maximum value for the ascic pointer. Check that name processing
2701 does not read beyond this value.
2702 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2705 2017-06-14 Nick Clifton <nickc@redhat.com>
2708 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2709 (process_otr): Check for an invalid offset in the otr structure.
2711 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2713 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2715 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2721 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2722 vtable field to a union.
2723 (_bfd_elf_is_start_stop): Removed.
2724 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2725 __start_SECNAME and __stop_SECNAME symbols.
2726 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2727 * elflink.c (_bfd_elf_is_start_stop): Removed.
2728 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2729 _bfd_elf_is_start_stop.
2730 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2731 __stop_SECNAME symbols. Updated.
2732 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2733 (bfd_elf_gc_record_vtinherit): Likewise.
2734 (bfd_elf_gc_record_vtentry): Likewise.
2736 2017-06-13 Nick Clifton <nickc@redhat.com>
2739 * elflink.c (elf_link_adjust_relocs): Generate an error when
2740 encountering a reloc against a symbol removed by garbage
2743 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2745 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2746 to merge_gnu_properties.
2747 * elf-properties.c (elf_merge_gnu_properties): Add struct
2748 bfd_link_info * and pass it to merge_gnu_properties.
2749 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2750 and pass it to elf_merge_gnu_properties.
2751 (_bfd_elf_link_setup_gnu_properties): Pass info to
2752 elf_merge_gnu_property_list.
2753 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2755 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2757 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2760 * binary.c (binary_set_section_contents): Scale lma by octets
2761 per byte to set filepos.
2763 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2765 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2768 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2770 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2773 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2775 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2776 patched section contents for TLS IE reloc.
2777 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2779 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2781 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2782 RELOC_FOR_GLOBAL_SYMBOL macro.
2784 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2786 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2789 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2791 * config/tc-arc.c (md_undefined_symbol): Changed.
2792 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2794 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2796 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2799 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2801 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2802 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2804 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2806 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2809 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2811 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2812 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2813 is non-zero. Add clarifying comments.
2815 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2817 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2818 name. Use local IFUNC symbol name string to report unsupported
2819 non-PIC call to IFUNC function.
2820 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2821 when generating R_386_IRELATIVE relocation.
2822 (elf_i386_finish_dynamic_symbol): Likewise.
2823 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2825 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2826 when generating R_X86_64_IRELATIVE relocation.
2827 (elf_x86_64_finish_dynamic_symbol): Likewise.
2829 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2831 * elf.c (setup_group): Make sure BFD sections are created for all
2832 group sections in the input file when processing SHF_GROUP
2834 (bfd_section_from_shdr): Avoid duplicating logic already
2835 implemented in `setup_group'.
2837 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2840 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2841 if the hint address is zero.
2843 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2846 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2847 ELF_COMMON_DEF_P for common symbols.
2849 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2851 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2852 SEC_GROUP sections as SEC_EXCLUDE.
2853 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2854 (assign_section_numbers): Use resolve_section_groups flag instead
2855 of relocatable link type.
2856 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2857 flag instead of checking the final_link flag for part of the
2858 checks in here. Fix white space as a result.
2859 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2860 instead of relocatable link type.
2861 (bfd_elf_final_link): Likewise.
2863 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2865 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2867 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2868 (s3_bfd_score_elf_check_relocs): Likewise.
2869 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2870 (score_elf_final_link_relocate): Likewise.
2871 (s7_bfd_score_elf_check_relocs): Likewise.
2873 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2875 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2878 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2880 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2881 from `reloc_count' rather than decrementing it.
2882 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2883 `reloc_count' by `int_rels_per_ext_rel'.
2884 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2885 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2886 entry determination.
2887 (s3_bfd_score_elf_check_relocs): Likewise.
2888 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2889 (s7_bfd_score_elf_relocate_section): Likewise.
2890 (s7_bfd_score_elf_check_relocs): Likewise.
2891 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2892 prototype and function.
2893 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2894 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2895 triple rather than once the sum of REL and RELA relocation entry
2897 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2898 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2899 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2900 storage allocation size determination.
2901 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2902 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2903 by `int_rels_per_ext_rel' for last relocation entry
2905 (bfd_elf_final_link): Do not multiply `reloc_count' by
2906 `int_rels_per_ext_rel' for internal relocation storage
2907 allocation size determination.
2908 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2909 `int_rels_per_ext_rel' for last relocation entry determination.
2910 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2911 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2912 (_bfd_mips_elf_relocate_section): Likewise.
2914 2017-06-05 Alan Modra <amodra@gmail.com>
2917 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2919 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2921 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2922 determine structure sizes.
2923 (elfcore_grok_freebsd_prstatus): Likewise.
2925 2017-06-01 Alan Modra <amodra@gmail.com>
2927 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2928 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2930 (is_elfv2_localentry0): New function.
2931 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2932 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2933 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2934 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2935 optimized localentry:0 stubs.
2936 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2937 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2939 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2941 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2943 2017-05-30 Casey Smith <clegg89@gmail.com>
2946 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2947 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2949 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2951 * cpu-arc.c (arc_compatible): New function.
2953 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2955 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2957 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2960 * bfdio.c (bfd_get_file_size): New function.
2961 * bfd-in2.h: Regenerated.
2963 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2965 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2968 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2970 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2971 dynobj instead of htab->elf.dynobj.
2973 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2975 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2977 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2978 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2979 actual number of internal relocations retrieved. Adjust
2980 function description.
2981 (bfd_elf64_canonicalize_reloc): Remove macro.
2982 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2984 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2986 * archures.c (bfd_mach_sparc_v9m8): Define.
2987 (bfd_mach_sparc_v8plusm8): Likewise.
2988 (bfd_mach_sparc_v9_p): Adjust to M8.
2989 (bfd_mach_sparc_64bit_p): Likewise.
2990 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2991 bfd_mach_sparc_v8plusm8.
2992 * bfd-in2.h: Regenerated.
2993 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2995 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2996 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2997 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2999 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3000 bfd_mach_sparc_v8plusm8.
3002 2017-05-19 Alan Modra <amodra@gmail.com>
3004 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3005 debug and special sections when no non-note alloc sections in an
3008 2017-05-18 Alan Modra <amodra@gmail.com>
3010 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3011 * elf-m10300.c: Likewise.
3013 * elf32-arc.c: Likewise.
3014 * elf32-bfin.c: Likewise.
3015 * elf32-m68k.c: Likewise.
3016 * elf32-nds32.c: Likewise.
3017 * elf32-tilepro.c: Likewise.
3018 * elflink.c: Likewise.
3019 * elfnn-aarch64.c: Likewise.
3020 * elfnn-riscv.c: Likewise.
3021 * elfxx-tilegx.c: Likewise.
3022 * mach-o.c: Likewise.
3023 * peXXigen.c: Likewise.
3024 * vms-alpha.c: Likewise.
3025 * vms-lib.c: Likewise.
3027 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3030 * elflink.c (elf_gc_mark_debug_section): New function.
3031 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3032 referenced by kept debug sections.
3034 2017-05-16 Alan Modra <amodra@gmail.com>
3036 * elf-m10300.c: Rename occurrences of non_ir_ref.
3037 * elf32-arm.c: Likewise.
3038 * elf32-bfin.c: Likewise.
3039 * elf32-cr16.c: Likewise.
3040 * elf32-cris.c: Likewise.
3041 * elf32-d10v.c: Likewise.
3042 * elf32-dlx.c: Likewise.
3043 * elf32-fr30.c: Likewise.
3044 * elf32-frv.c: Likewise.
3045 * elf32-hppa.c: Likewise.
3046 * elf32-i370.c: Likewise.
3047 * elf32-i386.c: Likewise.
3048 * elf32-iq2000.c: Likewise.
3049 * elf32-lm32.c: Likewise.
3050 * elf32-m32c.c: Likewise.
3051 * elf32-m32r.c: Likewise.
3052 * elf32-m68hc1x.c: Likewise.
3053 * elf32-m68k.c: Likewise.
3054 * elf32-mcore.c: Likewise.
3055 * elf32-metag.c: Likewise.
3056 * elf32-microblaze.c: Likewise.
3057 * elf32-moxie.c: Likewise.
3058 * elf32-msp430.c: Likewise.
3059 * elf32-mt.c: Likewise.
3060 * elf32-nios2.c: Likewise.
3061 * elf32-or1k.c: Likewise.
3062 * elf32-ppc.c: Likewise.
3063 * elf32-rl78.c: Likewise.
3064 * elf32-s390.c: Likewise.
3065 * elf32-score.c: Likewise.
3066 * elf32-score7.c: Likewise.
3067 * elf32-sh.c: Likewise.
3068 * elf32-tic6x.c: Likewise.
3069 * elf32-tilepro.c: Likewise.
3070 * elf32-v850.c: Likewise.
3071 * elf32-vax.c: Likewise.
3072 * elf32-xstormy16.c: Likewise.
3073 * elf32-xtensa.c: Likewise.
3074 * elf64-alpha.c: Likewise.
3075 * elf64-hppa.c: Likewise.
3076 * elf64-ia64-vms.c: Likewise.
3077 * elf64-mmix.c: Likewise.
3078 * elf64-ppc.c: Likewise.
3079 * elf64-s390.c: Likewise.
3080 * elf64-sh64.c: Likewise.
3081 * elf64-x86-64.c: Likewise.
3082 * elflink.c: Likewise.
3083 * elfnn-aarch64.c: Likewise.
3084 * elfnn-ia64.c: Likewise.
3085 * elfnn-riscv.c: Likewise.
3086 * elfxx-mips.c: Likewise.
3087 * elfxx-sparc.c: Likewise.
3088 * elfxx-tilegx.c: Likewise.
3089 * linker.c: Likewise.
3091 2017-05-16 Alan Modra <amodra@gmail.com>
3093 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3094 * elflink.c (elf_link_add_object_symbols): Update to use
3096 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3098 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3100 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3102 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3104 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3106 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3107 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3109 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3111 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3113 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3115 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3116 to plt_second/plt_second_eh_frame.
3117 (elf_x86_64_link_hash_newfunc): Updated.
3118 (elf_x86_64_allocate_dynrelocs): Likewise.
3119 (elf_x86_64_size_dynamic_sections): Likewise.
3120 (elf_x86_64_relocate_section): Likewise.
3121 (elf_x86_64_finish_dynamic_symbol): Likewise.
3122 (elf_x86_64_finish_dynamic_sections): Likewise.
3123 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3124 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3126 (elf_backend_setup_gnu_properties): Updated. Create the
3127 .plt.sec section instead of the .plt.sec section.
3129 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3131 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3132 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3133 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3135 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3137 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3138 (bfd_elf64_set_reloc): Define.
3139 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3141 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3143 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3144 (struct bfd_target): New field _bfd_set_reloc.
3145 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3146 * reloc.c (_bfd_generic_set_reloc): New function.
3147 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3148 * nlm-target.h (nlm_set_reloc): Likewise.
3149 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3150 * aout-tic30.c (MY_set_reloc): Likewise.
3151 * aout-target.h (MY_set_reloc): Likewise.
3152 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3153 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3154 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3155 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3156 * aout-adobe.c (aout_32_set_reloc): Likewise.
3157 * bout.c (b_out_set_reloc): Likewise.
3158 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3159 * i386os9k.c (aout_32_set_reloc): Likewise.
3160 * ieee.c (ieee_set_reloc): Likewise.
3161 * oasys.c (oasys_set_reloc): Likewise.
3162 * som.c (som_set_reloc): Likewise.
3163 * versados.c (versados_set_reloc): Likewise.
3164 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3165 _bfd_generic_set_reloc.
3166 (rs6000_xcoff64_aix_vec): LIkewise.
3167 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3168 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3169 * i386msdos.c (msdos_set_reloc): Define to
3170 _bfd_norelocs_set_reloc.
3171 * elfcode.h (elf_set_reloc): Define.
3172 * bfd-in2.h: Regenerated.
3174 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3177 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3178 for IFUNC function address.
3180 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3182 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3183 (CONFLICT_LIST): Likewise.
3184 (opcode/arc-attrs.h): Include.
3185 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3186 (arc_extract_features): New file.
3187 (arc_stralloc): Likewise.
3188 (arc_elf_merge_attributes): Likewise.
3189 (arc_elf_merge_private_bfd_data): Use object attributes.
3190 (bfd_arc_get_mach_from_attributes): New function.
3191 (arc_elf_object_p): Use object attributes.
3192 (arc_elf_final_write_processing): Likewise.
3193 (elf32_arc_obj_attrs_arg_type): New function.
3194 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3195 (elf32_arc_section_from_shdr): Likewise.
3196 (elf_backend_obj_attrs_vendor): Define.
3197 (elf_backend_obj_attrs_section): Likewise.
3198 (elf_backend_obj_attrs_arg_type): Likewise.
3199 (elf_backend_obj_attrs_section_type): Likewise.
3200 (elf_backend_obj_attrs_handle_unknown): Likewise.
3201 (elf_backend_section_from_shdr): Likewise.
3203 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3206 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3207 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3208 and the destination is a Thumb symbol.
3210 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3212 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3213 initializer to silence GCC 4.2.
3214 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3216 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3218 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3219 (LAZY_PLT_ENTRY_SIZE): This.
3220 (NON_LAZY_PLT_ENTRY_SIZE): New.
3221 (elf_x86_64_plt0_entry): Renamed to ...
3222 (elf_x86_64_lazy_plt0_entry): This.
3223 (elf_x86_64_plt_entry): Renamed to ...
3224 (elf_x86_64_lazy_plt_entry): This.
3225 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3226 (elf_x86_64_lazy_bnd_plt0_entry): This.
3227 (elf_x86_64_legacy_plt_entry): Removed.
3228 (elf_x86_64_bnd_plt_entry): Renamed to ...
3229 (elf_x86_64_lazy_bnd_plt_entry): This.
3230 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3231 (elf_x86_64_non_lazy_plt_entry): This.
3232 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3233 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3234 (elf_x86_64_eh_frame_plt): Renamed to ...
3235 (elf_x86_64_eh_frame_lazy_plt): This.
3236 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3237 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3238 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3239 (elf_x86_64_eh_frame_non_lazy_plt): This.
3240 (elf_x86_64_lazy_plt_layout): New.
3241 (elf_x86_64_non_lazy_plt_layout): Likewise.
3242 (elf_x86_64_plt_layout): Likewise.
3243 (elf_x86_64_backend_data): Remove PLT layout information. Add
3244 os for target system.
3245 (GET_PLT_ENTRY_SIZE): Removed.
3246 (elf_x86_64_lazy_plt): New.
3247 (elf_x86_64_non_lazy_plt): Likewise.
3248 (elf_x86_64_lazy_bnd_plt): Likewise.
3249 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3250 (elf_x86-64_arch_bed): Updated.
3251 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3252 (elf_x86_64_create_dynamic_sections): Removed.
3253 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3254 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3255 (elf_x86-64_adjust_dynamic_symbol): Updated.
3256 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3257 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3258 size for PLT0 if there is no PLT0. Get plt_entry_size from
3259 non_lazy_plt for non-lazy PLT entries.
3260 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3261 from non_lazy_plt for non-lazy PLT entries.
3262 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3263 if there is no PLT0.
3264 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3265 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3266 entries with non-lazy PLT layout. Don't fill the second and third
3267 slots in the PLT entry if there is no PLT0.
3268 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3269 if there is no PLT0. Set sh_entsize on the .plt.got section.
3270 (compare_relocs): New.
3271 (elf_x86_64_plt_type): Likewise.
3272 (elf_x86_64_plt): Likewise.
3273 (elf_x86_64_nacl_plt): New. Forward declaration.
3274 (elf_x86_64_get_plt_sym_val): Removed.
3275 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3276 against all dynamic relocations.
3277 (elf_x86_64_link_setup_gnu_properties): New function.
3278 (elf_backend_create_dynamic_sections): Updated.
3279 (elf_backend_setup_gnu_properties): New.
3280 (elf_x86_64_nacl_plt): New.
3281 (elf_x86_64_nacl_arch_bed): Updated.
3283 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3285 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3286 (LAZY_PLT_ENTRY_SIZE): This.
3287 (NON_LAZY_PLT_ENTRY_SIZE): New.
3288 (elf_i386_plt0_entry): Renamed to ...
3289 (elf_i386_lazy_plt0_entry): This.
3290 (elf_i386_plt_entry): Renamed to ...
3291 (elf_i386_lazy_plt_entry): This.
3292 (elf_i386_pic_plt0_entry): Renamed to ...
3293 (elf_i386_pic_lazy_plt0_entry): This.
3294 (elf_i386_pic_plt_entry): Renamed to ...
3295 (elf_i386_pic_lazy_plt_entry): This.
3296 (elf_i386_got_plt_entry): Renamed to ...
3297 (elf_i386_non_lazy_plt_entry): This.
3298 (elf_i386_pic_got_plt_entry): Renamed to ...
3299 (elf_i386_pic_non_lazy_plt_entry): This.
3300 (elf_i386_eh_frame_plt): Renamed to ...
3301 (elf_i386_eh_frame_lazy_plt): This.
3302 (elf_i386_eh_frame_plt_got): Renamed to ...
3303 (elf_i386_eh_frame_non_lazy_plt): This.
3304 (elf_i386_plt_layout): Renamed to ...
3305 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3306 eh_frame_plt_got_size.
3307 (elf_i386_non_lazy_plt_layout): New.
3308 (elf_i386_plt_layout): Likewise.
3309 (elf_i386_non_lazy_plt): Likewise.
3310 (GET_PLT_ENTRY_SIZE): Removed.
3311 (elf_i386_plt): Renamed to ...
3312 (elf_i386_lazy_plt): This.
3313 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3314 (elf_i386_arch_bed): Updated.
3315 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3316 (elf_i386_create_dynamic_sections): Removed.
3317 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3318 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3319 (elf_i386_adjust_dynamic_symbol): Updated.
3320 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3321 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3322 size for PLT0 if there is no PLT0.
3323 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3324 output section is discarded only if GOT isn't empty.
3325 (elf_i386_relocate_section): Updated. Properly get PLT index
3326 if there is no PLT0.
3327 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3328 second and third slots in the PLT entry if there is no PLT0.
3329 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3330 if there is no PLT0. Set sh_entsize on the .plt.got section.
3331 (elf_i386_nacl_plt): Forward declaration.
3332 (elf_i386_get_plt_sym_val): Removed.
3333 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3334 against all dynamic relocations.
3335 (elf_i386_link_setup_gnu_properties): New function.
3336 (elf_backend_create_dynamic_sections): Updated.
3337 (elf_backend_setup_gnu_properties): New.
3338 (elf_i386_nacl_plt): Updated.
3339 (elf_i386_nacl_arch_bed): Likewise.
3340 (elf_i386_vxworks_arch_bed): Likewise.
3342 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3344 * elflink.c (elf_output_implib): Remove executable flag from import
3346 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3347 library is a relocatable object file.
3349 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3352 * elf32-avr.c (avr_should_move_sym): New function.
3353 (avr_should_reduce_sym_size): Likewise.
3354 (avr_should_increase_sym_size): Likewise.
3355 (elf32_avr_relax_delete_bytes): Adjust symbol values
3356 and sizes by calling new functions.
3358 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3360 * config.bfd (riscv32-*): Enable rv64.
3362 2017-05-02 Alan Modra <amodra@gmail.com>
3365 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3366 rather than h->root.type == bfd_link_hash_new.
3367 (bfd_elf_record_link_assignment): Similarly, call
3368 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3370 2017-04-29 Alan Modra <amodra@gmail.com>
3373 * reloc.c (reloc_offset_in_range): New function.
3374 (bfd_perform_relocation, bfd_install_relocation): Use it.
3375 (_bfd_final_link_relocate): Likewise.
3377 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3379 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3380 before using .plt.got.
3381 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3383 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3385 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3386 instead of "+=" to update 0.
3388 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3390 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3391 .plt.got section here.
3392 (elf_i386_check_relocs): Don't create the .plt.got section.
3393 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3394 the .plt.got and .plt.bnd sections here.
3395 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3398 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3400 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3402 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3403 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3404 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3405 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3408 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3410 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3412 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3413 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3414 the first relocatable ELF input with GNU properties.
3416 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3418 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3419 VxWorks for non-PIC.
3421 2017-04-27 Alan Modra <amodra@gmail.com>
3423 * elf-bfd.h (struct elf_backend_data): Make asection param of
3424 elf_backend_eh_frame_address_size const.
3425 (_bfd_elf_eh_frame_address_size): Likewise.
3426 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3427 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3428 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3429 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3430 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3431 (next_cie_fde_offset): Constify params.
3432 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3434 2017-04-27 Alan Modra <amodra@gmail.com>
3436 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3437 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3438 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3440 (offset_adjust): New function.
3441 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3442 (adjust_eh_frame_local_symbols): Likewise.
3443 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3444 after changing anything. Return true if anything changed.
3445 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3446 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3448 2017-04-27 Alan Modra <amodra@gmail.com>
3450 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3453 2017-04-27 Alan Modra <amodra@gmail.com>
3455 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3456 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3457 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3458 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3459 for undef and undefweak dyn_relocs.
3460 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3461 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3462 (allocate_got, allocate_dynrelocs): Likewise.
3463 (ppc64_elf_relocate_section): Likewise.
3465 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3467 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3468 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3469 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3470 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3472 2017-04-26 Nick Clifton <nickc@redhat.com>
3475 * reloc.c (bfd_perform_relocation): Check for a negative address
3478 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3481 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3483 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3484 (elf_backend_always_renumber_dynsyms): Define.
3485 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3486 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3487 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3488 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3490 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3492 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3494 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3495 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3496 sections have been created.
3498 2017-04-26 Nick Clifton <nickc@redhat.com>
3501 * compress.c (bfd_init_section_compress_status): Check the return
3502 value from bfd_malloc.
3504 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3506 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3507 no_finish_dynamic_symbol.
3508 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3510 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3511 weak symbol, don't make it dynamic.
3512 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3513 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3514 relocation for GOT reference.
3515 (elf_x86_64_finish_dynamic_symbol): Abort if
3516 no_finish_dynamic_symbol isn't 0.
3518 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3521 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3522 undefined weak symbol, don't make it dynamic.
3523 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3524 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3525 relocation for R_386_GOT32.
3527 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3530 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3532 2017-04-23 Alan Modra <amodra@gmail.com>
3535 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3536 * elf.c (lcomm_sym): New.
3537 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3538 * bfd-in2.h: Regenerate.
3540 2017-04-23 Alan Modra <amodra@gmail.com>
3543 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3544 parameters and comment.
3545 (_bfd_elf_get_reloc_section): Delete.
3546 (_bfd_elf_plt_get_reloc_section): Declare.
3547 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3548 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3550 (_bfd_elf_get_reloc_section): ..here. Delete.
3551 (assign_section_numbers): Call elf_get_reloc_section.
3552 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3553 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3555 2017-04-23 Alan Modra <amodra@gmail.com>
3558 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3561 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3564 * elf32-i386.c (elf_i386_link_hash_entry): Add
3565 no_finish_dynamic_symbol.
3566 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3567 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3568 symbol, don't make it dynamic in PIE.
3569 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3570 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3571 relocation for R_386_GOT32
3572 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3575 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3579 * elflink.c (elf_link_add_object_symbols): Require
3580 --no-dynamic-linker with -E/--dynamic-list when creating
3583 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3585 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3588 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3590 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3591 dynamic symbol sorting.
3593 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3596 * elflink.c (elf_link_add_object_symbols): Preserve
3597 dynamic_ref_after_ir_def when restoring the symbol table for
3598 unneeded dynamic object.
3600 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3603 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3604 on on undefined IFUNC symbol in the second PLT.
3606 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3608 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3610 2017-04-19 Alan Modra <amodra@gmail.com>
3612 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3613 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3614 * elf32-ppc.c:Formatting.
3615 (ensure_undefweak_dynamic): Don't make dynamic when
3616 info->dynamic_undefined_weak is zero.
3617 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3618 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3619 not default visibility. Discard undef and undefweak
3621 (ppc_elf_relocate_section): Adjust to suit.
3622 * elf64-ppc.c: Formatting.
3623 (ensure_undefweak_dynamic): Don't make dynamic when
3624 info->dynamic_undefined_weak is zero.
3625 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3626 info->dynamic_undefined_weak. Discard them earlier.
3628 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3631 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3632 before generating the version definition section.
3634 2017-04-17 Alan Modra <amodra@gmail.com>
3636 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3637 state when a regular object file defines a symbol with
3638 incompatible type to that defined by an earlier shared lib.
3640 2017-04-13 Alan Modra <amodra@gmail.com>
3642 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3644 * elf32-arm.c: Likewise.
3645 * elf32-i386.c: Likewise.
3646 * elf32-mep.c: Likewise.
3647 * elf64-ia64-vms.c: Likewise.
3648 * elf64-x86-64.c: Likewise.
3649 * elflink.c: Likewise.
3650 * elfnn-ia64.c: Likewise.
3651 * elfxx-mips.c: Likewise.
3653 2017-04-13 Alan Modra <amodra@gmail.com>
3655 * aoutx.h: Use %B and %A in error messages throughout file.
3656 * aout-cris.c: Likewise.
3657 * archive.c: Likewise.
3658 * binary.c: Likewise.
3659 * coff-rs6000.c: Likewise.
3660 * coff-tic4x.c: Likewise.
3661 * coffcode.h: Likewise.
3662 * coffgen.c: Likewise.
3663 * cofflink.c: Likewise.
3664 * coffswap.h: Likewise.
3665 * cpu-arm.c: Likewise.
3666 * elf-eh-frame.c: Likewise.
3667 * elf-m10300.c: Likewise.
3669 * elf32-arc.c: Likewise.
3670 * elf32-arm.c: Likewise.
3671 * elf32-bfin.c: Likewise.
3672 * elf32-frv.c: Likewise.
3673 * elf32-iq2000.c: Likewise.
3674 * elf32-m32c.c: Likewise.
3675 * elf32-microblaze.c: Likewise.
3676 * elf32-nds32.c: Likewise.
3677 * elf32-rl78.c: Likewise.
3678 * elf32-rx.c: Likewise.
3679 * elf32-score.c: Likewise.
3680 * elf32-score7.c: Likewise.
3681 * elf32-sh64.c: Likewise.
3682 * elf32-v850.c: Likewise.
3683 * elf32-vax.c: Likewise.
3684 * elf32-visium.c: Likewise.
3685 * elf64-ia64-vms.c: Likewise.
3686 * elf64-mmix.c: Likewise.
3687 * elf64-sh64.c: Likewise.
3688 * elfcode.h: Likewise.
3689 * elfnn-aarch64.c: Likewise.
3690 * elfnn-ia64.c: Likewise.
3691 * elfxx-mips.c: Likewise.
3692 * hpux-core.c: Likewise.
3695 * linker.c: Likewise.
3696 * merge.c: Likewise.
3698 * oasys.c: Likewise.
3699 * pdp11.c: Likewise.
3700 * peXXigen.c: Likewise.
3701 * rs6000-core.c: Likewise.
3702 * vms-alpha.c: Likewise.
3703 * xcofflink.c: Likewise.
3705 2017-04-13 Alan Modra <amodra@gmail.com>
3707 * bfd.c (PRINT_TYPE): Define.
3708 (_doprnt): New function.
3709 (error_handler_internal): Use _doprnt.
3710 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3711 calls in their natural order, throughout file.
3712 * coff-mcore.c: Likewise.
3713 * coff-ppc.c: Likewise.
3714 * coff-tic80.c: Likewise.
3715 * cofflink.c: Likewise.
3716 * elf-s390-common.c: Likewise.
3718 * elf32-arm.c: Likewise.
3719 * elf32-i386.c: Likewise.
3720 * elf32-m32r.c: Likewise.
3721 * elf32-msp430.c: Likewise.
3722 * elf32-spu.c: Likewise.
3723 * elf64-ia64-vms.c: Likewise.
3724 * elf64-sparc.c: Likewise.
3725 * elf64-x86-64.c: Likewise.
3726 * elflink.c: Likewise.
3727 * elfnn-aarch64.c: Likewise.
3728 * elfnn-ia64.c: Likewise.
3729 * elfxx-mips.c: Likewise.
3731 2017-04-13 Alan Modra <amodra@gmail.com>
3733 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3734 branch veneers" error. Fix double space and format message.
3735 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3736 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3738 2017-04-13 Alan Modra <amodra@gmail.com>
3740 * bfd-in2.h: Regenerate.
3742 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3744 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3745 extra `\n' in warning/error messages.
3746 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3747 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3749 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3751 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3752 processor-specific properties with generic ELF target vector.
3754 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3756 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3757 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3758 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3759 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3761 (link_hash_newfunc): Initialize has_got_reloc and
3763 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3765 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3767 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3769 (_bfd_sparc_elf_fixup_symbol): New function.
3770 (allocate_dynrelocs): Don't allocate space for dynamic
3771 relocations and discard relocations against resolved undefined
3772 weak symbols in executable. Don't make resolved undefined weak
3773 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3774 relocation against undefined weak symbols in PIE.
3775 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3776 relocations against resolved undefined weak symbols in PIE
3777 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3778 without ynamic PLT/GOT relocations for resolved undefined weak
3780 Don't generate dynamic relocation against resolved undefined
3781 weak symbol in executable.
3782 (pie_finish_undefweak_symbol): New function.
3783 (_bfd_sparc_elf_finish_dynamic_sections): Call
3784 pie_finish_undefweak_symbol on all symbols in PIE.
3785 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3786 (_bfd_sparc_elf_fixup_symbol): New function.
3788 2017-04-10 Nick Clifton <nickc@redhat.com>
3790 * config.bfd: Remove ns32k from obsolete list.
3792 2017-04-10 Alan Modra <amodra@gmail.com>
3795 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3796 (special_sections_i): Likewise for .init_array.
3797 (special_sections_p): Likewise for .preinit_array.
3799 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3803 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3804 ELF_COMMON_DEF_P for common symbols.
3805 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3806 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3807 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3808 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3809 07492f668d2173da7a2bda3707ff0985e0f460b6.
3811 2017-04-07 Pedro Alves <palves@redhat.com>
3813 * opncls.c (bfd_get_debug_link_info): Rename to...
3814 (bfd_get_debug_link_info_1): ... this. Change type of second
3815 parameter to void pointer. Adjust.
3816 (bfd_get_debug_link_info): Reimplement on top of
3817 bfd_get_debug_link_info_1.
3818 (separate_debug_file_exists, separate_alt_debug_file_exists):
3819 Change type of second parameter to void pointer. Adjust.
3820 (get_func_type, check_func_type): Change type of second parameter
3822 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3823 the callback functions instead of passing the address of a local.
3824 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3825 find_separate_debug_file.
3826 (get_alt_debug_link_info_shim): Change type of second parameter to
3827 void pointer. Adjust.
3828 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3829 find_separate_debug_file.
3830 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3831 of second parameter to void pointer. Adjust.
3832 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3833 pointer local to find_separate_debug_file.
3835 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3837 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3838 external symbols with a definition.
3839 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3841 2017-04-07 Alan Modra <amodra@gmail.com>
3843 * po/SRC-POTFILES.in: Regenerate.
3845 2017-04-05 Alan Modra <amodra@gmail.com>
3847 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3850 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3852 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3853 numbers for DataDirectory entry indicies passed to
3856 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3858 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3859 each GNU_MBIND section and align GNU_MBIND section to page size.
3860 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3861 segment for each GNU_MBIND section.
3862 (_bfd_elf_init_private_section_data): Copy sh_info from input
3863 for GNU_MBIND section.
3865 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3867 * elfnn-riscv.c (GP_NAME): Delete.
3868 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3869 (_bfd_riscv_relax_lui): Likewise.
3871 2017-04-04 Nick Clifton <nickc@redhat.com>
3874 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3876 (bfd_elf_final_link): Only initialize the extended symbol index
3877 section if there are extended symbol tables to list.
3879 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3881 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3882 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3883 * configure.ac (elf): Add elf-properties.lo.
3884 * Makefile.in: Regenerated.
3885 * configure: Likewise.
3886 * elf-bfd.h (elf_property_kind): New.
3887 (elf_property): Likewise.
3888 (elf_property_list): Likewise.
3889 (elf_properties): Likewise.
3890 (_bfd_elf_parse_gnu_properties): Likewise.
3891 (_bfd_elf_get_property): Likewise.
3892 (_bfd_elf_link_setup_gnu_properties): Likewise.
3893 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3894 and setup_gnu_properties.
3895 (elf_obj_tdata): Add properties.
3896 * elf-properties.c: New file.
3897 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3898 (elf_i386_merge_gnu_properties): Likewise.
3899 (elf_backend_parse_gnu_properties): Likewise.
3900 (elf_backend_merge_gnu_properties): Likewise.
3901 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3902 (elf_x86_64_merge_gnu_properties): Likewise.
3903 (elf_backend_parse_gnu_properties): Likewise.
3904 (elf_backend_merge_gnu_properties): Likewise.
3905 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3906 (elf_backend_parse_gnu_properties): Likewise.
3907 (elf_backend_setup_gnu_properties): Likewise.
3908 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3909 elf_backend_merge_gnu_properties and
3910 elf_backend_setup_gnu_properties.
3912 2017-03-30 Pip Cet <pipcet@gmail.com>
3914 * elf32-wasm32.c: Add relocation code, two relocs.
3915 * reloc.c: Add wasm32 relocations.
3916 * libbfd.h: Regenerate.
3917 * bfd-in2.h: Regenerate.
3918 * bfd/po/bfd.pot: Regenerate.
3920 2017-03-29 Nick Clifton <nickc@redhat.com>
3923 * coff-bfd.h (struct coff_section_data): Add new fields:
3924 saved_bias and bias.
3925 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3926 computed for PE binaries.
3927 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3930 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3933 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3934 to handle a local symbol with a hash-symbol-entry; without PLT.
3935 Add BFD_ASSERT for an incidental case with GOT entry present.
3936 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3937 isn't forced-or-set local.
3939 2017-03-27 Pip Cet <pipcet@gmail.com>
3941 * wasm-module.c: New file to support WebAssembly modules.
3942 * wasm-module.h: New file to support WebAssembly modules.
3943 * doc/webassembly.texi: Start documenting wasm-module.c.
3944 * config.bfd: Add wasm_vec.
3945 * targets.c: Likewise.
3946 * configure.ac: Likewise.
3947 * Makefile.am: Add entries for wasm-module.c.
3948 * Makefile.in: Regenerate.
3949 * configure: Regenerate.
3950 * po/SRC-POTFILES.in: Regenerate.
3952 2017-03-27 Pip Cet <pipcet@gmail.com>
3954 * cpu-wasm32.c: New file to support wasm32 architecture.
3955 * elf32-wasm32.c: New file to support wasm32 architecture.
3956 * Makefile.am: Add wasm32 architecture.
3957 * archures.c: Likewise.
3958 * config.bfd: Likewise.
3959 * configure.ac: Likewise.
3960 * targets.c: Likewise.
3961 * Makefile.in: Regenerate.
3962 * bfd-in2.h: Regenerate.
3963 * configure: Regenerate.
3964 * po/SRC-POTFILES.in: Regenerate.
3966 2017-03-20 Alan Modra <amodra@gmail.com>
3969 * elf64-ppc.c (compare_symbols): Stabilize sort.
3971 2017-03-18 Alan Modra <amodra@gmail.com>
3973 * elf64-ppc.c (struct ppc_link_hash_table): Add
3974 local_ifunc_resolver and maybe_local_ifunc_resolver.
3975 (ppc_build_one_stub): Set flags on emitting dynamic
3976 relocation to ifunc.
3977 (ppc64_elf_relocate_section): Likewise.
3978 (ppc64_elf_finish_dynamic_symbol): Likewise.
3979 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3980 local dynamic relocs to ifuncs.
3981 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3982 local_ifunc_resolver and maybe_local_ifunc_resolver.
3983 (ppc_elf_relocate_section): Set flag on emitting dynamic
3984 relocation to ifuncs.
3985 (ppc_elf_finish_dynamic_symbol): Likewise.
3986 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3987 dynamic relocs to ifuncs.
3989 2017-03-13 Nick Clifton <nickc@redhat.com>
3992 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3993 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3994 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3995 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3996 * bfd-in2.h: Regenerate.
3997 * libbfd.h: Regenerate.
3998 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4000 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4001 (elfNN_aarch64_howto_table): Likewise.
4002 (aarch64_tls_transition_without_check): Likewise.
4003 (aarch64_reloc_got_type): Likewise.
4004 (elfNN_aarch64_final_link_relocate): Likewise.
4005 (elfNN_aarch64_tls_relax): Likewise.
4006 (elfNN_aarch64_relocate_section): Likewise.
4007 (elfNN_aarch64_gc_sweep_hook): Likewise.
4008 (elfNN_aarch64_check_relocs): Likewise.
4009 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4010 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4012 2017-03-11 Alan Modra <amodra@gmail.com>
4014 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4015 parameter is in fact used. Whitespace fixes.
4016 * elf64-ppc.c: Likewise.
4018 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4020 * rs6000-core.c (CORE_NEW): Simplify macro when
4021 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4023 2017-03-07 Alan Modra <amodra@gmail.com>
4027 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4030 2017-03-05 Alan Modra <amodra@gmail.com>
4032 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4033 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4034 (next_cie_fde_offset): New function.
4035 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4036 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4037 four bytes. Align CIEs to four or eight bytes depending on
4038 per_encoding_aligned8. Align FDEs according to their encoding.
4039 Pad last FDE to output section alignment.
4040 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4042 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4043 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4044 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4046 2017-03-02 Martin Bickel <binutils@ineranves.de>
4049 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4050 empty segments which have a zero filesz, but a non-zero memsz.
4052 2017-03-02 Alan Modra <amodra@gmail.com>
4054 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4056 2017-02-28 Alan Modra <amodra@gmail.com>
4058 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4059 (ppc64_elf_relocate_section): Likewise.
4061 2017-02-28 Alan Modra <amodra@gmail.com>
4064 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4065 rather than elf32_nios2_hash_table or elf_hash_table.
4066 (create_got_section): Likewise.
4067 (nios2_elf32_finish_dynamic_symbol): Likewise.
4068 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4069 (nios2_elf32_size_dynamic_sections): Likewise.
4070 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4071 vars. Use htab equivalents directly instead. Don't create
4072 all dynamic sections on needing just the GOT. Use a goto
4073 rather than a fall-through with reloc test. Ensure
4074 htab->dynobj is set when making dynamic sreloc section.
4075 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4076 equivalent directly instead. Don't segfault on looking for
4077 .dynamic when dynamic sections have not been created. Don't
4078 segfault on .got.plt being discarded.
4079 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4080 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4081 fixme and another not so relevant comment.
4082 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4083 already set, set hash table dynobj on creating .sbss.
4085 2017-02-28 Alan Modra <amodra@gmail.com>
4087 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4088 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4089 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4090 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4091 (ppc64_elf_relocate_section): Likewise.
4092 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4093 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4094 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4095 * libbfd.h: Regenerate.
4096 * bfd-in2.h: Regenerate.
4098 2017-02-28 Alan Modra <amodra@gmail.com>
4100 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4101 dynamic .data.rel.ro read-only.
4102 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4103 rather than section flags when deciding where copy reloc goes.
4104 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4105 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4106 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4107 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4108 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4109 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4110 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4111 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4112 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4113 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4114 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4115 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4116 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4117 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4118 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4119 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4120 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4121 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4122 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4124 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4126 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4127 `jalr $0, $25' instruction encoding.
4129 2017-02-27 Nick Clifton <nickc@redhat.com>
4132 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4133 generating a seg-fault when encountering a symbol that has been
4134 deleted by garbage collection.
4136 2017-02-25 Alan Modra <amodra@gmail.com>
4138 * elf32-arc.c (struct dynamic_sections): Delete.
4139 (enum dyn_section_types): Delete.
4140 (dyn_section_names): Delete.
4141 (arc_create_dynamic_sections): Delete.
4142 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4143 segfault on discarded .rela.plt section.
4144 (elf_arc_size_dynamic_sections): Formatting. Don't call
4145 arc_create_dynamic_sections. Don't allocate memory for sections
4146 handled by the generic linker. Correct code finding relocs in
4147 read-only sections. Set SEC_EXCLUDE on zero size .got,
4148 .got.plt, and .dynbss sections. Do set .interp for pies.
4150 2017-02-24 Andrew Waterman <andrew@sifive.com>
4152 * elfnn-riscv.c (GP_NAME): New macro.
4153 (riscv_global_pointer_value): Use it.
4154 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4155 output section, consider only that section's alignment.
4157 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4159 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4160 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4161 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4162 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4164 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4166 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4167 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4170 2017-02-23 Alan Modra <amodra@gmail.com>
4173 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4175 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4176 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4179 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4182 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4183 processing ahead of the call to `elf_gc_sweep_symbol'.
4185 2017-02-22 Nick Clifton <nickc@redhat.com>
4188 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4189 created section 4-byte alignment.
4191 2017-02-22 Alan Modra <amodra@gmail.com>
4193 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4194 on .got or .plt output section being discarded by script.
4195 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4198 2017-02-21 Alan Modra <amodra@gmail.com>
4200 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4201 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4203 2017-02-20 Alan Modra <amodra@gmail.com>
4206 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4207 if DT_RELSZ/DT_RELASZ is zero.
4209 2017-02-17 Nick Clifton <nickc@redhat.com>
4211 * compress.c (bfd_get_full_section_contents): Remember to reduce
4212 compressed size by the sizeof the compression header when
4213 decompressing the contents.
4215 2017-02-17 Pedro Alves <palves@redhat.com>
4217 * srec.c (Chunk): Rename to ...
4218 (_bfd_srec_len): ... this.
4219 (S3Forced): Rename to ...
4220 (_bfd_srec_forceS3): ... this.
4221 * objcopy.c: Adjust all references.
4223 2017-02-17 Pedro Alves <palves@redhat.com>
4225 * archive.c (bsd_write_armap): Rename to ...
4226 (_bfd_bsd_write_armap): ... this.
4227 (coff_write_armap): Rename to ...
4228 (_bfd_coff_write_armap): ... this.
4229 * libbfd-in.h (bsd_write_armap): Rename to ...
4230 (_bfd_bsd_write_armap): ... this.
4231 (coff_write_armap): Rename to ...
4232 (_bfd_coff_write_armap): ... this.
4233 * aout-target.h, aout-tic30.c: Adjust all users.
4234 * libbfd.h: Regenerate.
4236 2017-02-17 Pedro Alves <palves@redhat.com>
4238 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4239 (warn_deprecated): Rename to ...
4240 (_bfd_warn_deprecated): ... this.
4241 * libbfd.c (warn_deprecated): Rename to ...
4242 (_bfd_warn_deprecated): ... this.
4243 * bfd-in2.h: Regenerate.
4245 2017-02-17 Pedro Alves <palves@redhat.com>
4247 * bfdio.c (real_ftell): Rename to ...
4248 (_bfd_real_ftell): ... this.
4249 (real_fseek): Rename to ...
4250 (_bfd_real_fseek): ... this.
4251 (real_fopen): Rename to ...
4252 (_bfd_real_fopen): ... this.
4253 * libbfd-in.h (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 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4260 * libbfd.h: Regenerate.
4262 2017-02-17 Pedro Alves <palves@redhat.com>
4264 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4265 * libbfd.c (read_unsigned_leb128): Rename to ...
4266 (_bfd_read_unsigned_leb128): ... this.
4267 (read_signed_leb128): Rename to ...
4268 (_bfd_read_signed_leb128): ... this.
4269 (safe_read_leb128): Rename to ...
4270 (_bfd_safe_read_leb128): ... this.
4271 * libbfd-in.h (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.h: Renegerate.
4279 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4281 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4282 before trying to fine matching file and line information.
4284 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4286 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4287 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4288 not match current bfd, then reload debug information. Record bfd
4289 we're loading debug info for in the stash. If we have debug
4290 informatin in the cache then perform section placement before
4293 2017-02-16 Alan Modra <amodra@gmail.com>
4296 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4297 * elfxx-target.h (elf_backend_no_page_alias): Define.
4298 (elfNN_bed): Init new field.
4299 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4300 ensure PT_LOAD segment starts on a new page.
4301 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4303 2017-02-16 Alan Modra <amodra@gmail.com>
4306 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4309 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4311 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4312 * bfd-in2.h: Regenerated.
4314 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4317 * elf32-i386.c (elf_i386_relocate_section): Allow
4318 "lea foo@GOT, %reg" in PIC.
4320 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4323 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4324 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4325 error against local IFUNC symbol without a base register for
4328 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4330 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4331 `%P: %H:' with `info->callbacks->einfo'.
4332 (ppc_elf_relocate_section): Likewise.
4333 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4334 (ppc64_elf_edit_toc): Likewise.
4335 (ppc64_elf_relocate_section): Likewise.
4337 2017-02-14 Alan Modra <amodra@gmail.com>
4339 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4340 --gc-keep-exported, and test versioned field of sym rather than
4341 looking for @ in name.
4343 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4345 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4348 2017-02-13 Nick Clifton <nickc@redhat.com>
4351 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4354 2017-02-07 Andrew Waterman <andrew@sifive.com>
4356 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4357 entry size if PLT header is written.
4359 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4361 Fix sparc64 dynamic relocation processing to use the dynamic
4363 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4364 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4367 2017-02-03 Nick Clifton <nickc@redhat.com>
4370 * coffcode.h (coff_write_object_contents): Enlarge size of
4371 s_name_buf in order to avoid compile time warning about possible
4373 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4374 32-bits of insn value before printing into buffer.
4376 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4378 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4379 `max_local_dynindx'.
4380 (mips_elf_sort_hash_table): Handle it.
4381 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4382 symbols bump up `max_local_dynindx' rather than
4383 `max_non_got_dynindx'.
4385 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4387 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4388 `min_got_dynindx', `max_unref_got_dynindx' and
4389 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4390 (mips_elf_sort_hash_table): Adjust accordingly.
4392 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4394 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4395 to access the hash table.
4397 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4399 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4400 non-NULL `htab' to the beginning.
4402 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4404 * elflink.c (elf_gc_sweep): Wrap overlong line.
4406 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4408 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4409 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4410 * elfxx-mips.c (mips_elf_link_hash_table): Add
4411 `ignore_branch_isa' member.
4412 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4413 in branch relocation calculation as an error if
4414 `ignore_branch_isa' has been set.
4415 (_bfd_mips_elf_insn32): Rename to...
4416 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4417 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4418 Handle the new parameter.
4420 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4422 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4423 local variable dynobj.
4426 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4427 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4428 executable from read-only sections into sdynrelro.
4429 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4430 dynamic relocs in sdynrelro.
4431 (elf_backend_want_dynrelro): Define.
4433 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4435 * config.bfd (*-*-rtemsaout*): Mark as removed.
4437 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4439 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4440 (arm-*-rtems*): Move to (arm*-*-eabi*).
4441 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4442 (m68-*-rtems*): Move to (m68*-*-elf*).
4444 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4446 * config.bfd (*-*-rtemscoff*): Mark as removed.
4448 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4451 * elflink.c (bfd_elf_record_link_assignment): Revert last
4452 change and don't ever clear `forced_local'. Set `mark'
4454 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4456 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4457 (bfd_elf_size_dynamic_sections): ... here.
4458 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4459 and set `mark' instead in `__tls_get_addr_opt' processing.
4460 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4462 2017-01-24 Alan Modra <amodra@gmail.com>
4464 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4465 where dynamic relocs are preferable. Allow ifunc too.
4466 (ensure_undefweak_dynamic): New function.
4467 (allocate_dynrelocs): Use it here. Move plt handling last and
4468 don't make symbols dynamic, simplifying loop. Only make undef
4469 weak symbols with GOT entries dynamic. Correct condition
4470 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4471 comments. Remove goto.
4472 (ppc_elf_relocate_section): Correct test for using dynamic
4473 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4474 to suit. Set up explicit tls_index entries and implicit GOT
4475 tls_index entries resolvable at link time for
4476 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4477 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4478 (ensure_undefweak_dynamic): New function.
4479 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4480 with GOT entries dynamic. Remove unnecessary test of
4481 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4482 (ppc64_elf_relocate_section): Correct test for using dynamic
4483 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4484 to suit. Set up explicit tls_index entries and implicit GOT
4485 tls_index entries resolvable at link time for __tls_get_addr_opt.
4486 Simplify expression to clear mem for prelink.
4488 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4490 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4492 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4494 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4495 (elf_backend_hash_symbol): Define.
4497 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4500 * elflink.c (bfd_elf_record_link_assignment): Clear any
4501 `forced_local' marking for DSO symbols that are not being
4504 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4506 * elfnn-riscv.c (riscv_elf_object_p): New function.
4508 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4511 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4513 (elf_x86_64_check_relocs): Create .eh_frame section for the
4515 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4516 .eh_frame section for the .plt.bnd section.
4517 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4518 for the .plt.bnd section.
4520 2017-01-12 Nick Clifton <nickc@redhat.com>
4523 * opncls.c (find_separate_debug_file): Add include_dirs
4524 parameter. Only include the directory part of the bfd's filename
4525 in search paths if include_dirs is true. Add a couple of extra
4526 locations for looking for debug files.
4527 ( bfd_follow_gnu_debuglink): Update invocation of
4528 find_separate_debug_file.
4529 (bfd_follow_gnu_debugaltlink): Likewise.
4530 (get_build_id): New function: Finds the build-id of the given bfd.
4531 (get_build_id_name): New function: Computes the name of the
4532 separate debug info file for a bfd, based upon its build-id.
4533 (check_build_id_file): New function: Checks to see if a separate
4534 debug info file exists at the given location, and that its
4535 build-id matches that of the original bfd.
4536 (bfd_follow_build_id_debuglink): New function: Finds a separate
4537 debug info file for a given bfd by using the build-id method.
4538 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4539 method of locating a separate debug info file before using the
4541 * bfd-in2.h: Regenerate.
4543 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4546 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4547 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4548 elf_x86_64_eh_frame_plt_got.
4549 (elf_x86_64_size_dynamic_sections): Get unwind info from
4550 elf_x86_64_bnd_arch_bed for the BND PLT.
4552 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4554 * config.bfd: Add entries for i686-redox and x86_64-redox.
4556 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4558 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4560 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4561 .eh_frame section to 4 bytes for x32.
4562 (elf_x86_64_check_relocs): Likewise.
4564 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4567 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4568 (PLT_GOT_FDE_LENGTH): Likewise.
4569 (elf_i386_plt_layout): Add eh_frame_plt_got and
4570 eh_frame_plt_got_size.
4571 (elf_i386_plt): Updated.
4572 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4573 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4574 (elf_i386_size_dynamic_sections): Allocate and initialize
4575 .eh_frame section for .plt.got.
4576 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4578 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4579 eh_frame_plt_got_size.
4580 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4581 (PLT_GOT_FDE_LENGTH): Likewise.
4582 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4583 eh_frame_plt_got_size.
4584 (elf_x86_64_arch_bed): Updated.
4585 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4586 eh_frame_plt_got_size.
4587 (elf_x86_64_nacl_arch_bed): Likewise.
4588 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4589 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4590 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4591 .eh_frame section for .plt.got.
4592 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4595 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4597 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4598 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4600 2017-01-09 Nick Clifton <nickc@redhat.com>
4602 * dwarf2.c (lookup_address_in_function_table): Return early if
4603 there are no functions in the given comp unit, or if the high
4604 address of the last function in the comp unit is less than the
4607 2017-01-09 Nick Clifton <nickc@redhat.com>
4610 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4611 message if there are too many symbols to load.
4613 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4615 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4616 if relocs are cached.
4618 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4621 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4622 for R_MICROBLAZE_GOTOFF_64.
4624 2017-01-03 Nick Clifton <nickc@redhat.com>
4626 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4627 warning about using a possibly uninitialised variable.
4629 2017-01-02 Alan Modra <amodra@gmail.com>
4631 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4632 (allocate_plt_static, allocate_dynrelocs): Use it.
4634 2017-01-02 Alan Modra <amodra@gmail.com>
4636 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4637 .PARISC.unwind section.
4639 2017-01-02 Alan Modra <amodra@gmail.com>
4642 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4643 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4644 indirect to GOT pointer relative code edit.
4646 2017-01-02 Alan Modra <amodra@gmail.com>
4648 Update year range in copyright notice of all files.
4650 For older changes see ChangeLog-2016
4652 Copyright (C) 2017 Free Software Foundation, Inc.
4654 Copying and distribution of this file, with or without modification,
4655 are permitted in any medium without royalty provided the copyright
4656 notice and this notice are preserved.
4662 version-control: never