1 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
4 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
5 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
6 (sh_elf_relocate_section): Don't generate dynamic relocation if
7 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
9 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
12 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
13 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
14 (elf_s390_relocate_section): Don't generate dynamic relocation
15 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
16 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
17 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
18 (elf_s390_relocate_section): Don't generate dynamic relocation
19 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
21 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
24 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
25 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
26 (allocate_dynrelocs): Discard dynamic relocations if
27 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
29 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
32 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
33 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
35 (allocate_dynrelocs): Discard dynamic relocations if
36 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
38 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
41 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
42 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
43 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
44 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
45 (elf_m68k_relocate_section): Don't generate dynamic relocation
46 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
48 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
51 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
52 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
53 (allocate_dynrelocs): Discard dynamic relocations if
54 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
55 (elf32_hppa_relocate_section): Don't generate dynamic
56 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
58 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
61 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
62 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
63 (allocate_fptr): Don't allocate function pointer if
64 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
65 (allocate_dynrel_entries): Don't allocate dynamic relocation
66 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
67 (set_got_entry): Don't set GOT entry if
68 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
69 (set_pltoff_entry): Don't set PLTOFF entry if
70 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
71 (elfNN_ia64_relocate_section): Don't install dynamic relocation
72 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
74 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
77 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
78 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
79 (allocate_dynrelocs): Don't allocate dynamic relocations if
80 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
82 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
85 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
86 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
87 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
88 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
90 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
93 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
94 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
95 (tilepro_elf_relocate_section): Don't generate dynamic
96 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
97 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
98 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
99 (tilegx_elf_relocate_section): Don't generate dynamic
100 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
102 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
105 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
106 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
108 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
109 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
111 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
113 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
114 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
115 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
117 2017-10-12 James Bowman <james.bowman@ftdichip.com>
119 * bfd-in2.h: Regenerate.
120 * libbfd.h: Regenerate.
121 * elf32-ft32.c: Add HOWTO R_FT32_15.
122 * reloc.c: Add BFD_RELOC_FT32_15.
124 2017-10-12 Nick Clifton <nickc@redhat.com>
126 * reloc.c (enum bfd_reloc_status): Start values at 2.
127 * bfd-in2.h: Regenerate.
128 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
129 that a TRUE return indicates success. Compare the result of
130 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
131 (build_one_stub): Change sense of tests against aarch64_relocate
133 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
134 than FALSE, when an error is detected.
135 (elfNN_aarch64_final_link_relocate): Likewise.
137 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
139 * elf32-i386.c (elf_backend_hide_symbol): New.
140 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
141 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
142 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
144 2017-10-12 Alan Modra <amodra@gmail.com>
146 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
147 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
148 (bfd_elf_define_start_stop): Likewise.
150 2017-10-12 Alan Modra <amodra@gmail.com>
152 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
153 when executable rather than non-PIC.
154 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
155 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
157 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
159 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
161 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
162 (elf_external_linux_prpsinfo64_ugid32): ... this.
163 (swap_linux_prpsinfo32_out): Rename to...
164 (swap_linux_prpsinfo32_ugid32_out): ... this.
165 (elf_external_linux_prpsinfo64_ugid16): New structure.
166 (swap_linux_prpsinfo64_ugid16_out): New function.
167 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
168 (elf_backend_linux_prpsinfo64_ugid16): Define.
169 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
170 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
171 of the 64-bit Linux core PRPSINFO note.
172 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
174 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
176 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
178 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
179 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
180 (elf_external_ppc_linux_prpsinfo32)
181 (swap_ppc_linux_prpsinfo32_out): Move to...
182 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
183 (swap_linux_prpsinfo32_ugid32_out): ... these.
184 (elf_external_linux_prpsinfo32): Rename to...
185 (elf_external_linux_prpsinfo32_ugid16): ... this.
186 (swap_linux_prpsinfo32_out): Rename to...
187 (swap_linux_prpsinfo32_ugid16_out): ... this.
188 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
189 (elf_backend_linux_prpsinfo32_ugid16): Define.
190 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
191 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
192 of the 32-bit Linux core PRPSINFO note.
193 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
194 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
195 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
196 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
197 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
198 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
199 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
200 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
201 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
202 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
204 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
206 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
207 `gap' member ahead of `pr_flag'.
209 2017-10-11 Pedro Alves <palves@redhat.com>
211 * bfd.c (_doprnt): Rename to ...
212 (_bfd_doprnt): ... this.
213 (error_handler_internal): Adjust.
215 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
217 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
218 instead of incrementing it.
219 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
221 2017-10-10 Renlin Li <renlin.li@arm.com>
224 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
225 symbols into dynamic.
227 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
230 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
231 (riscv_elf_link_hash_table_create): Initialize max_alignment to
233 (_bfd_riscv_relax_section): Cache the max alignment of output
234 sections if possible.
236 2017-10-10 Alan Modra <amodra@gmail.com>
238 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
239 .opd whenever .opd is present and non-zero size. Move code
240 setting abiversion to/from output file earlier. Only set
241 u.opd.func_sec when --gc-sections. Read relocs and set up
242 u.opd.func_sec values here..
243 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
245 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
247 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
249 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
252 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
254 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
255 .interp section with "ld --no-dynamic-linker".
257 2017-10-09 Alan Modra <amodra@gmail.com>
260 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
261 funcinfo_hash_table and varinfo_hash_table.
263 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
265 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
266 in read-only section with minfo.
267 (sh_elf_size_dynamic_sections): Likewise.
269 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
271 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
274 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
276 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
277 this_hdr.sh_entsize only if section size > 0.
279 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
281 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
283 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
285 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
286 in read-only section with minfo.
287 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
289 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
291 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
294 2017-10-06 John Baldwin <jhb@FreeBSD.org>
296 * elf-bfd.h (struct elf_backend_data): Add
297 `elf_backend_grok_freebsd_prstatus'.
298 * elf.c (elfcore_grok_freebsd_note): Call
299 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
301 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
303 (elf_backend_grok_freebsd_prstatus): Define.
304 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
305 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
307 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
309 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
310 and has_non_got_reloc with zero_undefweak.
311 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
312 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
314 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
315 has_non_got_reloc with zero_undefweak.
316 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
317 has_got_reloc and has_non_got_reloc with zero_undefweak.
318 (elf_x86_link_hash_entry): Likewise.
320 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
322 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
323 (VERIFY_COPY_RELOC): Likewise.
325 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
327 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
328 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
329 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
331 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
333 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
334 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
335 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
337 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
339 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
340 * elf32-i386.c (elf_i386_relocate_section): Use it.
341 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
343 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
345 * elf32-i386.c (X86_SIZE_TYPE_P): New.
346 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
347 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
348 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
349 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
351 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
353 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
354 (PLT_LOCAL_IFUNC_P): Likewise.
355 * elf32-i386.c (elf_i386_relocate_section): Use them.
356 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
358 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
360 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
361 * elf32-i386.c (elf_i386_relocate_section): Use it.
362 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
364 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
366 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
367 * elf32-i386.c (elf_i386_relocate_section): Use it.
368 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
370 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
372 * elf32-i386.c (X86_PCREL_TYPE_P): New.
373 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
374 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
375 (X86_PCREL_TYPE_P): This.
376 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
377 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
378 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
380 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
382 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
384 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
385 * elf32-i386.c (elf_i386_tls_transition): Use it.
386 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
388 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
390 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
391 Dump dynamic relocation in read-only section with minfo if
393 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
394 (maybe_set_textrel): Likewise.
395 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
396 read-only section with minfo.
398 2017-10-05 John Baldwin <jhb@FreeBSD.org>
400 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
402 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
404 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
405 in read-only section with minfo.
406 (tilepro_elf_size_dynamic_sections): Likewise.
407 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
408 (tilegx_elf_size_dynamic_sections): Likewise.
410 2017-10-05 Pedro Alves <palves@redhat.com>
413 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
414 ellipsis parameter. Split out bfd_error_on_input code to..
415 (bfd_set_input_error): .. New function.
416 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
417 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
418 * bfd-in2.h: Regenerate.
420 2017-10-05 Alan Modra <amodra@gmail.com>
422 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
423 fini_array error value.
425 2017-10-05 Alan Modra <amodra@gmail.com>
428 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
430 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
432 (elf_fake_sections): Adjust calls. Exit immediately on failure.
433 (bfd_elf_set_group_contents): Add associated reloc section indices
436 2017-10-04 Alan Modra <amodra@gmail.com>
438 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
439 classify symbols for ELFv2.
441 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
444 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
445 undergoes default promotion.
446 * bfd-in2.h: Regenerate.
448 2017-10-02 Alan Modra <amodra@gmail.com>
450 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
451 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
453 2017-10-01 Alan Modra <amodra@gmail.com>
456 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
457 (add_line_info): Always put end_sequence last.
459 2017-10-01 Alan Modra <amodra@gmail.com>
462 * dwarf2.c (read_section): Allocate buffer with extra byte for
463 bfd_simple_get_relocated_section_contents rather than copying
466 2017-09-29 Alan Modra <amodra@gmail.com>
468 * merge.c (merge_strings): Return FALSE on malloc failure.
469 (_bfd_merge_sections): Return failures from record_section and
472 2017-09-28 Alan Modra <amodra@gmail.com>
475 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
476 a case where plugin_notice isn't called.
478 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
480 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
483 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
486 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
487 output_bfd to info->callbacks->minfo.
489 2017-09-26 Nick Clifton <nickc@redhat.com>
492 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
493 assertion failure if elf_x86_64_rtype_to_howto has already issued
496 2017-09-26 Alan Modra <amodra@gmail.com>
499 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
502 2017-09-26 Nick Clifton <nickc@redhat.com>
505 * dwarf2.c (read_formatted_entries): Fail early if we know that
506 the loop parsing data entries will overflow the end of the
509 2017-09-26 Alan Modra <amodra@gmail.com>
512 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
513 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
514 to stash->info_ptr_memory, and check die_ref is within that memory.
515 Set info_ptr_end correctly when another CU is refd. Check die_ref
516 for DW_FORM_ref4 etc. is within CU.
518 2017-09-26 Alan Modra <amodra@gmail.com>
521 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
522 (read_formatted_entries): Init "fe".
523 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
525 2017-09-26 Alan Modra <amodra@gmail.com>
528 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
529 bounds in inner loop.
531 2017-09-25 Alan Modra <amodra@gmail.com>
534 * dwarf1.c (parse_die): Sanity check pointer against section limit
535 before dereferencing.
536 (parse_line_table): Likewise.
538 2017-09-25 Alan Modra <amodra@gmail.com>
541 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
543 (parse_comp_unit): Likewise.
545 2017-09-25 Alan Modra <amodra@gmail.com>
548 * dwarf2.c (read_formatted_entries): Error on format_count zero.
550 2017-09-24 Alan Modra <amodra@gmail.com>
553 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
554 within section bounds.
556 2017-09-24 Alan Modra <amodra@gmail.com>
559 * dwarf2.c (decode_line_info): Properly free line sequences on error.
561 2017-09-24 Alan Modra <amodra@gmail.com>
564 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
565 pname param. Return status. Make name const. Don't abort,
566 return an error. Formatting. Exit if current info_ptr matches
567 orig_info_ptr. Update callers.
568 (scan_unit_for_symbols): Start at nesting_level of zero. Make
569 nested_funcs an array of structs for extensibility. Formatting.
571 2017-09-24 Alan Modra <amodra@gmail.com>
574 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
575 rather than dividing by zero.
577 2017-09-24 Alan Modra <amodra@gmail.com>
580 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
582 2017-09-24 Alan Modra <amodra@gmail.com>
585 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
587 2017-09-24 Alan Modra <amodra@gmail.com>
590 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
591 SHT_GNU_verneed section for sanity. Don't zalloc memory for
594 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
597 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
600 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
603 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
604 -1 if bfd_canonicalize_dynamic_reloc returns 0.
606 2017-09-22 Pedro Alves <palves@redhat.com>
607 Alan Modra <amodra@gmail.com>
609 * version.h: Add comment.
611 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
613 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
614 NT_S390_GS_BC, correct the previously swapped invocations of
615 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
617 2017-09-19 Alan Modra <amodra@gmail.com>
620 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
623 2017-09-19 Alan Modra <amodra@gmail.com>
626 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
627 symbols before calculating verrefs. Don't renumber dynsyms
628 after gc. Exclude .gnu.version when zero or one dynsym.
629 Localize some vars and reindent.
631 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
634 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
635 return from bfd_canonicalize_dynamic_reloc.
637 2017-09-15 Alan Modra <amodra@gmail.com>
640 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
641 overflows bfd_size_type.
643 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
646 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
647 to indicate if conversion is performed.
648 (elf_i386_check_relocs): Cache section contents and relocations
649 if conversion is performed.
650 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
651 contents and relocations if conversion is performed.
653 2017-09-14 Nick Clifton <nickc@redhat.com>
656 * peXXigen.c (pe_print_idata): Extend check for HintName vector
659 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
661 * elfxx-x86.h: Fix a typo in comments.
663 2017-09-09 Kamil Rytarowski <n54@gmx.com>
665 * elf32-nds32.c: Rename __BIT() to N32_BIT().
667 2017-09-09 Alan Modra <amodra@gmail.com>
669 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
672 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
674 * elf32-i386.c (elf_i386_relocate_section): Update usage of
675 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
676 (elf_i386_finish_dynamic_symbol): Likewise.
677 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
678 (elf_x86_64_finish_dynamic_symbol): Likewise.
679 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
680 (_bfd_x86_elf_fixup_symbol): Likewise.
682 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
684 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
685 check has_non_got_reloc.
687 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
690 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
691 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
692 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
693 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
694 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
695 and linker_def on __ehdr_start if it is referenced and not
697 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
698 and return TRUE when building executable, if a symbol has
699 non-GOT/non-PLT relocations in text section or there is no
701 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
703 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
705 * elfxx-x86.h: Update comments.
707 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
709 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
710 elf_x86_plt_layout_table with elf_x86_init_table.
711 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
713 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
715 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
716 (elf_x86_init_table): This.
717 (_bfd_x86_elf_link_setup_gnu_properties): Replace
718 elf_x86_plt_layout_table with elf_x86_init_table.
720 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
722 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
723 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
724 * configure: Regenerated.
725 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
726 and r_sym fields of plt_layout.
727 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
729 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
730 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
731 r_info nor r_sym fields.
732 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
734 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
736 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
738 * (_bfd_riscv_relax_align): Call bfd_set_error and
739 print an error message when unable to relax a .align directive.
741 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
743 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
744 (riscv_record_pcrel_hi_reloc): Add absolute argument.
745 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
746 R_RISCV_PCREL_HI20 relocs, and pass the result to
747 riscv_record_pcrel_hi_reloc.
749 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
751 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
752 r_type_p. Remove the converted argument. Replace
753 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
754 the new relocation type via r_type_p.
755 (elf_i386_relocate_section): Likewise.
756 (elf_i386_finish_dynamic_symbol): Likewise.
757 (need_convert_load): Removed.
758 (check_relocs_failed): Updated.
759 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
760 instead of setting need_convert_load.
761 (_bfd_i386_elf_convert_load): Removed.
762 * elf64-x86-64.c (need_convert_load): Removed.
763 (check_relocs_failed): Updated.
764 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
765 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
766 Return the new relocation type via r_type_p.
767 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
768 instead of setting need_convert_load.
769 (elf_x86_64_check_relocs): Don't check PIC if relocation has
771 (_bfd_x86_64_elf_convert_load): Removed.
772 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
773 with SYMBOL_REFERENCES_LOCAL_P.
774 (elf_x86_64_finish_dynamic_symbol): Likewise.
775 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
777 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
778 (_bfd_x86_elf_link_symbol_references_local): New function.
779 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
780 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
781 SYMBOL_REFERENCES_LOCAL_P.
782 (elf_x86_link_hash_entry): Add local_ref.
783 (elf_x86_link_hash_table): Remove convert_load.
784 (_bfd_i386_elf_convert_load): Removed.
785 (_bfd_x86_64_elf_convert_load): Likewise.
786 (_bfd_x86_elf_link_symbol_references_local): New.
788 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
790 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
791 (elf_x86_64_info_to_howto): Get the real relocation type by
792 masking out R_X86_64_converted_reloc_bit.
793 (elf_x86_64_check_tls_transition): Get the real relocation type
794 by masking out R_X86_64_converted_reloc_bit.
795 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
796 instead of setting converted_reloc.
797 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
798 instead of converted_reloc. Get the real relocation type by
799 masking out R_X86_64_converted_reloc_bit.
800 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
801 R_X86_64_converted_reloc_bit is valid.
802 * elfxx-x86.h (converted_reloc): Removed.
804 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
806 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
807 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
808 to get the relocation type again.
809 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
810 r_type when calling elf_x86_64_tls_transition. Don't use
811 ELF32_R_TYPE to get the relocation type again.
813 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
815 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
818 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
820 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
821 argument. Don't check relocation overflow. Avoid relocation
822 overflow if --no-relax is used. Set converted_reloc on symbol
823 if a GOTPCREL relocation is converted.
824 (elf_x86_64_relocate_section): Issue a fatal error and suggest
825 --no-relax if GOTPCREL relocation conversion leads to relocation
827 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
829 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
830 Edmar Wienskoski <edmar.wienskoski@nxp.com
832 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
833 (ppc_elf_check_relocs): Handle it.
834 (ppc_elf_vle_split20): New function.
835 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
837 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
840 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
841 for x86-64 if GOT_TLS_GDESC_P is true.
843 2017-09-03 Alan Modra <amodra@gmail.com>
846 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
848 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
850 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
851 tls_get_addr for x86-64 in one place.
853 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
855 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
856 with elfxx-x86.lo for 64-bit BFD.
857 * configure: Regenerated.
859 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
861 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
862 (_bfd_i386_elf_convert_load): This. Remove static.
863 (elf_i386_size_dynamic_sections): Removed.
864 (elf_backend_size_dynamic_sections): Likewise.
865 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
866 (_bfd_x86_64_elf_convert_load): This. Remove static.
867 (elf_x86_64_size_dynamic_sections): Removed.
868 (elf_backend_size_dynamic_sections): Likewise.
869 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
870 (elf_x86_allocate_dynrelocs): This. Make it static.
871 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
872 (elf_x86_allocate_local_dynreloc): This. Make it static.
873 (elf_i386_is_reloc_section): New function.
874 (elf_x86_64_is_reloc_section): Likewise.
875 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
876 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
877 Rearrange got_entry_size initialization.
878 (_bfd_x86_elf_size_dynamic_sections): New function.
879 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
880 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
881 (_bfd_i386_elf_convert_load): New.
882 (_bfd_x86_64_elf_convert_load): Likewise.
883 (_bfd_x86_elf_size_dynamic_sections): Likewise.
884 (elf_backend_size_dynamic_sections): Likewise.
885 (_bfd_x86_elf_allocate_dynrelocs): Removed.
886 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
888 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
890 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
893 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
895 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
896 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
898 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
900 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
901 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
902 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
903 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
904 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
905 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
907 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
909 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
910 (elf_i386_allocate_local_dynrelocs): Likewise.
911 (elf_i386_size_dynamic_sections): Replace
912 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
913 with _bfd_x86_elf_allocate_dynrelocs and
914 _bfd_x86_elf_allocate_local_dynrelocs.
915 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
916 (elf_x86_64_allocate_local_dynrelocs): Likewise.
917 (elf_x86_64_size_dynamic_sections): Replace
918 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
919 with _bfd_x86_elf_allocate_dynrelocs and
920 _bfd_x86_elf_allocate_local_dynrelocs.
921 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
922 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
923 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
924 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
926 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
928 * elf32-i386.c (is_i386_elf): Removed.
929 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
930 (elf_i386_size_dynamic_sections): Likewise.
931 (elf_i386_relocate_section): Likewise.
932 * elf64-x86-64.c (is_x86_64_elf): Removed.
933 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
935 (elf_x86_64_size_dynamic_sections): Likewise.
936 (elf_x86_64_relocate_section): Likewise.
937 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
939 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
942 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
944 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
945 (elf_i386_allocate_dynrelocs): Replace
946 elf_i386_compute_jump_table_size with
947 elf_x86_compute_jump_table_size.
948 (elf_i386_size_dynamic_sections): Likewise.
949 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
950 (elf_x86_64_allocate_dynrelocs): Replace
951 elf_x86_64_compute_jump_table_size with
952 elf_x86_compute_jump_table_size.
953 (elf_x86_64_size_dynamic_sections): Likewise.
954 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
956 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
957 (elf_x86_compute_jump_table_size): New.
959 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
961 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
963 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
964 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
966 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
968 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
969 with htab->is_vxworks.
970 (elf_i386_size_dynamic_sections): Likewise.
971 (elf_i386_relocate_section): Likewise.
972 (elf_i386_finish_dynamic_symbol): Likewise.
973 (elf_i386_finish_dynamic_sections): Likewise.
975 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
977 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
978 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
979 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
980 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
981 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
982 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
983 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
984 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
986 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
989 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
990 ELF_COMMON_DEF_P for common symbols.
992 2017-09-02 Alan Modra <amodra@gmail.com>
994 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
995 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
996 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
998 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1000 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1001 (elf_backend_gc_mark_hook): Likewise.
1002 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1003 (elf_backend_gc_mark_hook): Likewise.
1004 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1005 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1006 (elf_backend_gc_mark_hook): Likewise.
1008 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1010 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1011 (elf_backend_adjust_dynamic_symbol): Likewise.
1012 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1013 (elf_backend_adjust_dynamic_symbol): Likewise.
1014 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1015 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1016 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1017 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1018 (elf_backend_adjust_dynamic_symbol): Likewise.
1020 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1022 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1025 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1027 * elf32-i386.c (elf_i386_mkobject): Removed.
1028 (bfd_elf32_mkobject): Likewise.
1029 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1030 (bfd_elf64_mkobject): Likewise.
1031 (bfd_elf32_mkobject): Likewise.
1032 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1033 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1034 (bfd_elf64_mkobject): Likewise.
1035 (bfd_elf32_mkobject): Likewise.
1037 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1039 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1040 Call _bfd_x86_elf_link_setup_gnu_properties.
1041 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1042 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1044 (elf_x86_64_non_lazy_plt): Likewise.
1045 (elf_x86_64_lazy_bnd_plt): Likewise.
1046 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1047 (elf_x86_64_lazy_ibt_plt): Likewise.
1048 (elf_x32_lazy_ibt_plt): Likewise.
1049 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1050 (elf_x32_non_lazy_ibt_plt): Likewise.
1051 (elf_x86_64_nacl_plt): Likewise.
1052 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1053 _bfd_x86_elf_link_setup_gnu_properties.
1054 * elfxx-x86.c: Include elf-vxworks.h".
1055 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1056 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1057 comments for pic_plt0_entry and pic_plt_entry.
1058 (elf_x86_non_lazy_plt_layout): Likewise.
1059 (elf_x86_plt_layout_table): New.
1060 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1062 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1065 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1066 .eh_frame section for the second PLT.
1067 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1068 alignment of .eh_frame section for the second PLT.
1070 2017-09-01 Nick Clifton <nickc@redhat.com>
1073 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1076 2017-09-01 Nick Clifton <nickc@redhat.com>
1079 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1080 attribute buffer is NUL terminated.
1082 2017-08-31 Nick Clifton <nickc@redhat.com>
1085 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1086 to dwarf string sections.
1088 2017-08-31 Alan Modra <amodra@gmail.com>
1090 * po/SRC-POTFILES.in: Regenerate.
1092 2017-08-31 Alan Modra <amodra@gmail.com>
1094 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1095 for a section containing just a terminator. Allow multiple
1096 terminators at end of section.
1097 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1098 sections when not adding alignment. Assert on terminator in
1101 2017-08-31 Alan Modra <amodra@gmail.com>
1105 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1108 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1110 * configure.ac (bfd_backends): Add elf64.lo together with
1111 elfxx-x86.lo for 64-bit BFD.
1112 * configure: Regenerated.
1114 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1116 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1119 2017-08-31 Alan Modra <amodra@gmail.com>
1122 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1123 before _close_and_cleanup. Call iovec->bclose after.
1124 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1126 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1128 * elf32-i386.c (elf_i386_plt_type): Removed.
1129 (elf_i386_plt): Likewise.
1130 (elf_i386_get_synthetic_symtab): Updated. Call
1131 _bfd_x86_elf_get_synthetic_symtab.
1132 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1133 (elf_x86_64_plt): Likewise.
1134 (elf_x86_64_get_synthetic_symtab): Updated. Call
1135 _bfd_x86_elf_get_synthetic_symtab.
1136 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1137 (elf_x86_64_get_plt_got_vma): Likewise.
1138 (elf_i386_valid_plt_reloc_p): Likewise.
1139 (elf_x86_64_valid_plt_reloc_p): Likewise.
1140 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1141 * elfxx-x86.h (elf_x86_plt_type): New.
1142 (elf_x86_plt): Likewise.
1143 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1145 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1147 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1148 target_id instead of elf_machine_code.
1150 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1152 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1153 (elf_i386_lazy_plt_layout): Likewise.
1154 (elf_i386_non_lazy_plt_layout): Likewise.
1155 (elf_i386_plt_layout): Likewise.
1156 (elf_i386_link_hash_table): Likewise.
1157 (elf_i386_next_tls_desc_index): Likewise.
1158 (elf_i386_srelplt2): Likewise.
1159 (elf_i386_plt): Likewise.
1160 (elf_i386_lazy_plt): Likewise.
1161 (elf_i386_non_lazy_plt): Likewise.
1162 (elf_i386_link_hash_table_create): Likewise.
1163 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1164 (elf_i386_lazy_plt): Updated.
1165 (elf_i386_non_lazy_plt): Likewise.
1166 (elf_i386_lazy_ibt_plt): Likewise.
1167 (elf_i386_non_lazy_ibt_plt): Likewise.
1168 (elf_i386_allocate_dynrelocs): Likewise.
1169 (elf_i386_size_dynamic_sections): Likewise.
1170 (elf_i386_relocate_section): Likewise.
1171 (elf_i386_finish_dynamic_symbol): Likewise.
1172 (elf_i386_finish_dynamic_sections): Likewise.
1173 (elf_i386_get_synthetic_symtab): Likewise.
1174 (elf_i386_link_setup_gnu_properties): Likewise.
1175 (elf_i386_nacl_plt): Likewise.
1176 * elf64-x86-64.c (ABI_64_P): Removed.
1177 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1178 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1179 (elf_x86_64_lazy_plt_layout): Likewise.
1180 (elf_x86_64_non_lazy_plt_layout): Likewise.
1181 (elf_x86_64_plt_layout): Likewise.
1182 (elf_x86_64_link_hash_table): Likewise.
1183 (elf_x86_64_plt): Likewise.
1184 (elf_x86_64_lazy_plt): Likewise.
1185 (elf_x86_64_non_lazy_plt): Likewise.
1186 (elf_x86_64_link_hash_table_create): Likewise.
1187 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1188 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1189 (elf_x86_64_lazy_plt): Updated.
1190 (elf_x86_64_non_lazy_plt): Likewise.
1191 (elf_x86_64_lazy_bnd_plt): Likewise.
1192 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1193 (elf_x86_64_lazy_ibt_plt): Likewise.
1194 (elf_x32_lazy_ibt_plt): Likewise.
1195 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1196 (elf_x32_non_lazy_ibt_plt): Likewise.
1197 (elf_x86_64_allocate_dynrelocs): Likewise.
1198 (elf_x86_64_size_dynamic_sections): Likewise.
1199 (elf_x86_64_relocate_section): Likewise.
1200 (elf_x86_64_finish_dynamic_symbol): Likewise.
1201 (elf_x86_64_finish_dynamic_sections): Likewise.
1202 (elf_x86_64_get_synthetic_symtab): Likewise.
1203 (elf_x86_64_link_setup_gnu_properties): Likewise.
1204 (elf_x86_64_nacl_plt): Likewise.
1205 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1207 (ELF32_DYNAMIC_INTERPRETER): New.
1208 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1209 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1210 (_bfd_x86_elf_link_hash_table_create): Likewise.
1211 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1212 (elf_x86_link_hash_table_free): This. Make it static.
1213 * elfxx-x86.h: Don't include "objalloc.h".
1215 (elf_x86_lazy_plt_layout): Likewise.
1216 (elf_x86_non_lazy_plt_layout): Likewise.
1217 (elf_x86_plt_layout): Likewise.
1218 (_bfd_x86_elf_link_hash_table_create): Likewise.
1219 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1220 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1221 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1222 srelplt2 and next_tls_desc_index.
1223 (_bfd_x86_elf_link_hash_table_free): Removed.
1225 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1227 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1228 branch offset interpretation.
1230 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1233 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1235 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1237 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1238 (elf_x86_64_srelplt2): Likewise.
1240 2017-08-30 Alan Modra <amodra@gmail.com>
1242 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1243 (ppc64_elf_tls_optimize): Set it.
1244 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1245 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1246 addis would add zero.
1247 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1248 (ppc_elf_tls_optimize): Set it.
1249 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1250 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1252 2017-08-30 Alan Modra <amodra@gmail.com>
1254 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1255 __tls_get_addr call sequences to LE, don't move the addi down
1256 to the nop. Replace the bl with addi and leave the nop alone.
1258 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1260 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1262 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1264 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1266 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1268 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1269 (BFD64_BACKENDS): Likewise.
1270 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1271 (BFD64_BACKENDS_CFILES): Likewise.
1272 * Makefile.in: Regenerated.
1273 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1274 elf32-i386.lo and elf64-x86-64.lo.
1275 * configure: Regenerated.
1276 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1277 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1278 "objalloc.h" and "hashtab.h".
1279 (ELIMINATE_COPY_RELOCS): Removed.
1280 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1281 (SYMBOL_NO_COPYRELOC): Likewise.
1282 (elf_i386_link_hash_entry): Likewise.
1283 (GOT_UNKNOWN): Likewise.
1284 (GOT_NORMAL): Likewise.
1285 (GOT_TLS_GD): Likewise.
1286 (elf_i386_hash_entry): Likewise.
1287 (elf_i386_obj_tdata): Likewise.
1288 (elf_i386_tdata): Likewise.
1289 (elf_i386_local_got_tls_type): Likewise.
1290 (elf_i386_local_tlsdesc_gotent): Likewise.
1291 (elf_i386_hash_table): Likewise.
1292 (elf_i386_link_hash_newfunc): Likewise.
1293 (elf_i386_local_htab_hash): Likewise.
1294 (elf_i386_local_htab_eq): Likewise.
1295 (elf_i386_get_local_sym_hash): Likewise.
1296 (elf_i386_link_hash_table_free): Likewise.
1297 (elf_i386_copy_indirect_symbol): Likewise.
1298 (elf_i386_fixup_symbol): Likewise.
1299 (elf_i386_readonly_dynrelocs): Likewise.
1300 (elf_i386_always_size_sections): Likewise.
1301 (elf_i386_set_tls_module_base): Likewise.
1302 (elf_i386_dtpoff_base): Likewise.
1303 (compare_relocs): Likewise.
1304 (elf_i386_hash_symbol): Likewise.
1305 (elf_i386_parse_gnu_properties): Likewise.
1306 (elf_i386_merge_gnu_properties): Likewise.
1307 (elf_i386_link_check_relocs): Likewise.
1308 (elf_i386_merge_symbol_attribute): Likewise.
1309 (bfd_elf32_bfd_link_check_relocs): Likewise.
1310 (elf_backend_copy_indirect_symbol): Likewise.
1311 (elf_backend_always_size_sections): Likewise.
1312 (elf_backend_omit_section_dynsym): Likewise.
1313 (elf_backend_hash_symbol): Likewise.
1314 (elf_backend_fixup_symbol): Likewise.
1315 (elf_backend_parse_gnu_properties): Likewise.
1316 (elf_backend_merge_gnu_properties): Likewise.
1317 (elf_backend_merge_symbol_attribute): Likewise.
1318 (elf_i386_mkobject): Updated.
1319 (elf_i386_link_hash_table_create): Likewise.
1320 (elf_i386_check_tls_transition): Likewise.
1321 (elf_i386_tls_transition): Likewise.
1322 (elf_i386_convert_load_reloc): Likewise.
1323 (elf_i386_check_relocs): Likewise.
1324 (elf_i386_adjust_dynamic_symbol): Likewise.
1325 (elf_i386_allocate_dynrelocs): Likewise.
1326 (elf_i386_convert_load): Likewise.
1327 (elf_i386_size_dynamic_sections): Likewise.
1328 (elf_i386_relocate_section): Likewise.
1329 (elf_i386_finish_dynamic_symbol ): Likewise.
1330 (elf_i386_finish_dynamic_sections): Likewise.
1331 (elf_i386_output_arch_local_syms): Likewise.
1332 (elf_i386_get_synthetic_symtab): Likewise.
1333 (elf_i386_link_setup_gnu_properties): Likewise.
1334 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1335 of elf_link_hash_table, as base.
1336 (elf_i386_next_tls_desc_index): New.
1337 (elf_i386_srelplt2): Likewise.
1338 (elf_i386_plt): Likewise.
1339 (elf_i386_lazy_plt): Likewise.
1340 (elf_i386_non_lazy_plt): Likewise.
1341 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1342 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1343 "objalloc.h" and "hashtab.h".
1344 (ELIMINATE_COPY_RELOCS): Removed.
1345 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1346 (SYMBOL_NO_COPYRELOC): Likewise.
1347 (elf_x86_64_link_hash_entry): Likewise.
1348 (GOT_UNKNOWN): Likewise.
1349 (GOT_NORMAL): Likewise.
1350 (GOT_TLS_GD): Likewise.
1351 (elf_x86_64_hash_entry): Likewise.
1352 (elf_x86_64_obj_tdata): Likewise.
1353 (elf_x86_64_tdata): Likewise.
1354 (elf_x86_64_local_got_tls_type): Likewise.
1355 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1356 (elf_x86_64_hash_table): Likewise.
1357 (elf_x86_64_link_hash_newfunc): Likewise.
1358 (elf_x86_64_local_htab_hash): Likewise.
1359 (elf_x86_64_local_htab_eq): Likewise.
1360 (elf_x86_64_get_local_sym_hash): Likewise.
1361 (elf_x86_64_link_hash_table_free): Likewise.
1362 (elf_x86_64_copy_indirect_symbol): Likewise.
1363 (elf_x86_64_fixup_symbol): Likewise.
1364 (elf_x86_64_readonly_dynrelocs): Likewise.
1365 (elf_x86_64_always_size_sections): Likewise.
1366 (elf_x86_64_set_tls_module_base): Likewise.
1367 (elf_x86_64_dtpoff_base): Likewise.
1368 (compare_relocs): Likewise.
1369 (elf_x86_64_merge_symbol_attribute): Likewise.
1370 (elf_x86_64_hash_symbol): Likewise.
1371 (elf_x86_64_parse_gnu_properties): Likewise.
1372 (elf_x86_64_merge_gnu_properties): Likewise.
1373 (elf_x86_64_link_check_relocs): Likewise.
1374 (elf_backend_copy_indirect_symbol): Likewise.
1375 (elf_backend_always_size_sections): Likewise.
1376 (bfd_elf64_bfd_link_check_relocs): Likewise.
1377 (elf_backend_merge_symbol_attribute): Likewise.
1378 (elf_backend_hash_symbol): Likewise.
1379 (elf_backend_omit_section_dynsym): Likewise.
1380 (elf_backend_fixup_symbol): Likewise.
1381 (elf_backend_parse_gnu_properties): Likewise.
1382 (elf_backend_merge_gnu_properties): Likewise.
1383 (bfd_elf32_bfd_link_check_relocs): Likewise.
1384 (elf_x86_64_mkobject): Updated.
1385 (elf_x86_64_link_hash_table_create): Likewise.
1386 (elf_x86_64_check_tls_transition): Likewise.
1387 (elf_x86_64_tls_transition): Likewise.
1388 (elf_x86_64_convert_load_reloc): Likewise.
1389 (elf_x86_64_check_relocs): Likewise.
1390 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1391 (elf_x86_64_allocate_dynrelocs): Likewise.
1392 (elf_x86_64_convert_load): Likewise.
1393 (elf_x86_64_size_dynamic_sections): Likewise.
1394 (elf_x86_64_relocate_section): Likewise.
1395 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1396 (elf_x86_64_finish_dynamic_sections): Likewise.
1397 (elf_x86_64_output_arch_local_syms): Likewise.
1398 (elf_x86_64_get_synthetic_symtab): Likewise.
1399 (elf_x86_64_link_setup_gnu_properties): Likewise.
1400 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1401 instead of elf_link_hash_table, as base.
1402 (elf_x86_64_next_tls_desc_index): New.
1403 (elf_x86_64_srelplt2): Likewise.
1404 (elf_x86_64_plt): Likewise.
1405 (elf_x86_64_lazy_plt): Likewise.
1406 (elf_x86_64_non_lazy_plt): Likewise.
1407 * elfxx-x86.c: New file.
1408 * elfxx-x86.h: Likewise.
1410 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1412 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1414 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1416 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1418 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1419 sections before checking dynamic relocations and free invalid
1420 PLT section contents.
1421 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1423 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1425 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1426 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1428 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1431 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1433 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1435 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1437 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1439 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1441 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1444 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1445 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1446 Add a has_no_copy_on_protected bitfield.
1447 (elf_has_no_copy_on_protected): New.
1448 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1449 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1450 (elf_merge_gnu_property_list): Likewise.
1451 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1452 to FALSE for elf_has_no_copy_on_protected.
1453 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1454 (elf_i386_link_hash_entry): Add def_protected.
1455 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1456 when checking info->nocopyreloc.
1457 (elf_i386_link_setup_gnu_properties): Don't set
1458 extern_protected_data here.
1459 (elf_i386_merge_symbol_attribute): New function.
1460 (elf_backend_merge_symbol_attribute): New.
1461 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1462 (elf_x86_64_link_hash_entry): Add def_protected.
1463 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1464 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1465 when checking info->nocopyreloc.
1466 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1467 relocation run-time overflow and unresolvable R_X86_64_32S
1468 relocation against protected data symbol defined in shared object
1469 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1470 (elf_x86_64_link_setup_gnu_properties): Don't set
1471 extern_protected_data here.
1472 (elf_x86_64_merge_symbol_attribute): New function.
1473 (elf_backend_merge_symbol_attribute): New.
1475 2017-08-26 Alan Modra <amodra@gmail.com>
1477 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1478 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1479 (ppc_elf_relocate_section): Comment fix.
1480 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1481 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1482 Support dynamic relocs for TPREL16 when non-pic too.
1483 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1484 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1487 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1489 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1490 "symbol" in comments.
1491 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1493 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1496 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1497 R_X86_64_PC32 relocation run-time overflow and unresolvable
1498 R_X86_64_32S relocation with -z nocopyreloc.
1500 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1502 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1503 Undefined symbols may not have a type.
1504 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1506 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1508 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1509 bfd_link_info. Report shared, PIE or PDE object based on
1511 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1512 (elf_x86_64_relocate_section): Likewise.
1514 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1516 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1517 for function symbols.
1518 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1520 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1522 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1523 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1524 is set on any input relocatable file.
1525 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1527 2017-08-23 Alan Modra <amodra@gmail.com>
1530 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1531 ensure_undefweak_dynamic. Handle undefined too.
1532 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1533 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1534 (allocate_dynrelocs): Discard undefined non-default visibility
1535 relocs first. Make undefined syms dynamic. Tidy goto.
1537 2017-08-21 Alan Modra <amodra@gmail.com>
1538 H.J. Lu <hongjiu.lu@intel.com>
1541 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1542 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1544 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1547 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1548 undefined weak symbols.
1550 2017-08-18 Nick Clifton <nickc@redhat.com>
1553 * tekhex.c (getsym): Fix check for source pointer walking off the
1554 end of the input buffer.
1556 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1559 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1560 relocations in debug sections, change abort to _bfd_error_handler.
1562 2017-08-14 Nick Clifton <nickc@redhat.com>
1565 * elf.c (setup_group): Check for an empty or very small group
1567 * po/bfd.pot: Regenerate.
1569 2017-08-14 Alan Modra <amodra@gmail.com>
1572 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1573 alignment padding here.
1574 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1575 in a reverse pass over sections.
1577 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1580 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1581 for @plt suffixes first.
1582 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1584 2017-08-08 Nick Clifton <nickc@redhat.com>
1587 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1588 small section lengths.
1589 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1591 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1592 there is enough data present in the note.
1594 2017-08-08 Alan Modra <amodra@gmail.com>
1597 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1598 got.refcount for GOTOFF relocs, just create .got section.
1600 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1602 * elflink.c (elf_link_add_object_symbols): Move common symbol
1603 check after bed->common_definition.
1605 2017-08-07 Alan Modra <amodra@gmail.com>
1608 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1609 needed to define various dynamic tags have been discarded.
1611 2017-08-07 Nick Clifton <nickc@redhat.com>
1614 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1615 has not been set then use the bfd returned by
1616 _bfd_elf_link_setup_gnu_properties. If that is null then search
1617 through all the input bfds selecting the first normal, ELF format
1619 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1621 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1623 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1625 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1626 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1627 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1628 (elf_i386_link_check_relocs): New function.
1629 (bfd_elf32_bfd_link_check_relocs): New.
1630 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1632 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1633 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1634 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1635 (elf_x86_64_link_check_relocs): New function.
1636 (bfd_elf64_bfd_link_check_relocs): New.
1637 (bfd_elf32_bfd_link_check_relocs): Likewise.
1639 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1642 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1643 as undefined for --no-define-common.
1645 2017-08-05 Alan Modra <amodra@gmail.com>
1647 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1648 hppa_link_hash_table.
1650 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1652 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1653 entries for sysregs with negative indices.
1655 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1657 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1658 isn't the S/390 specific elf data.
1659 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1661 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1663 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1664 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1665 [R_RISCV_ADD16]: Likewise.
1666 [R_RISCV_ADD32]: Likewise.
1667 [R_RISCV_ADD64]: Likewise.
1668 [R_RISCV_SUB6]: Likewise.
1669 [R_RISCV_SUB8]: Likewise.
1670 [R_RISCV_SUB16]: Likewise.
1671 [R_RISCV_SUB32]: Likewise.
1672 [R_RISCV_SUB64]: Likewise.
1674 2017-07-31 Alan Modra <amodra@gmail.com>
1676 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1677 without ld.so checks.
1679 2017-07-29 Alan Modra <amodra@gmail.com>
1682 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1683 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1684 (is_elfv2_localentry0): Test non_zero_localentry.
1685 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1687 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1689 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1690 pointer check for htab->elf.irelplt.
1691 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1693 2017-07-27 Nick Clifton <nickc@redhat.com>
1696 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1698 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1700 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1702 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1704 (evax_bfd_print_emh): Check for invalid string lengths.
1706 2017-07-25 Nick Clifton <nickc@redhat.com>
1708 * po/fr.po: Updated French translation.
1710 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1713 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1714 16-bit absolute branches into 10-bit pc-relative branches on the
1715 MSP430 as well as the MSP430X.
1717 2017-07-25 Alan Modra <amodra@gmail.com>
1719 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1720 (stub_eh_frame_size): New function.
1721 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1722 (group_sections): Init group tls_get_addr_opt_bctrl.
1723 (ppc64_elf_size_stubs): Update sizing and initialization of
1724 .eh_frame. Iteration over stubs via group list.
1725 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1726 (ppc64_elf_finish_dynamic_sections): Update finalization of
1729 2017-07-24 Nick Clifton <nickc@redhat.com>
1732 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1733 of the relocs to the canonicalize_one_reloc routine.
1734 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1735 for the _bfd_mach_o_canonicalize_one_reloc field.
1736 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1737 res_base parameter. Use to check for corrupt pair relocs.
1738 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1740 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1742 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1745 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1746 enough data in the record before attempting to parse it.
1747 (_bfd_vms_slurp_eeom): Likewise.
1749 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1750 (image_set_ptr): Likewise.
1751 (alpha_vms_slurp_relocs): Likewise.
1753 (alpha_vms_object_p): Check for a truncated record.
1755 2017-07-24 Nick Clifton <nickc@redhat.com>
1758 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1759 an unrecognized reloc and sets the bfd_error value.
1760 * libbfd.h: Regenerate.
1761 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1763 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1764 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1765 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1766 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1767 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1769 2017-07-23 Alan Modra <amodra@gmail.com>
1771 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1774 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1777 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1778 reloc_class_ifunc for ifunc symbols.
1780 2017-07-19 Nick Clifton <nickc@redhat.com>
1783 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1784 correct magic bytes at the start, set the error to wrong format
1785 and clear the format selector before returning NULL.
1787 2017-07-19 Nick Clifton <nickc@redhat.com>
1790 * coff-rs6000.c (_bfd_strntol): New function.
1791 (_bfd_strntoll): New function.
1792 (GET_VALUE_IN_FIELD): New macro.
1793 (EQ_VALUE_IN_FIELD): new macro.
1794 (_bfd_xcoff_slurp_armap): Use new macros.
1795 (_bfd_xcoff_archive_p): Likewise.
1796 (_bfd_xcoff_read_ar_hdr): Likewise.
1797 (_bfd_xcoff_openr_next_archived_file): Likewise.
1798 (_bfd_xcoff_stat_arch_elt): Likewise.
1799 * coff64-rs6000.c (_bfd_strntol): New function.
1800 (_bfd_strntoll): New function.
1801 (GET_VALUE_IN_FIELD): New macro.
1802 (xcoff64_slurp_armap): Use new macros.
1804 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1805 John Eric Martin <John.Martin@emmicro-us.com>
1807 * bfd-in2.h: Regenerate.
1808 * libbfd.h: Regenerate.
1809 * elf32-arc.c (JLI): Define.
1810 * reloc.c: Add JLI relocations.
1812 2017-07-18 Nick Clifton <nickc@redhat.com>
1815 * coff-sh.c: Fix spelling typos.
1816 * compress.c: Likewise.
1817 * cpu-pdp11.c: Likewise.
1818 * ecofflink.c: Likewise.
1819 * elf-m10300.c: Likewise.
1821 * elf32-arm.c: Likewise.
1822 * elf32-m68k.c: Likewise.
1823 * elf32-nds32.c: Likewise.
1824 * elf32-ppc.c: Likewise.
1825 * elf32-sh.c: Likewise.
1826 * elf32-v850.c: Likewise.
1827 * elf64-ppc.c: Likewise.
1828 * elf64-x86-64.c: Likewise.
1829 * elflink.c: Likewise.
1830 * elfnn-aarch64.c: Likewise.
1831 * elfxx-mips.c: Likewise.
1833 * sunos.c: Likewise.
1834 * vms-alpha.c: Likewise.
1835 * xcofflink.c: Likewise.
1837 2017-07-18 Nick Clifton <nickc@redhat.com>
1840 * coffcode.h (handle_COMDAT): Replace abort with an error message
1843 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1846 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1849 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1851 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1853 2017-07-16 Alan Modra <amodra@gmail.com>
1855 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1856 __tls_index GOT entries when using __tls_get_addr_opt stub.
1857 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1859 2017-07-12 Alan Modra <amodra@gmail.com>
1861 * po/es.po: Update from translationproject.org/latest/bfd/.
1862 * po/fi.po: Likewise.
1863 * po/fr.po: Likewise.
1864 * po/id.po: Likewise.
1865 * po/ja.po: Likewise.
1866 * po/ro.po: Likewise.
1867 * po/ru.po: Likewise.
1868 * po/sr.po: Likewise.
1869 * po/sv.po: Likewise.
1870 * po/tr.po: Likewise.
1871 * po/uk.po: Likewise.
1872 * po/vi.po: Likewise.
1873 * po/zh_CN.po: Likewise.
1874 * po/hr.po: New file from translationproject.org.
1875 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1876 * configure: Regenerate.
1878 2017-07-12 Nick Clifton <nickc@redhat.com>
1880 Fix compile time warnings using gcc 7.1.1.
1881 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1883 (elf_xtensa_get_gotplt_section): Increase length of got_name
1885 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1886 default return of FALSE.
1887 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1888 default return of FALSE.
1890 2017-07-12 Alan Modra <amodra@gmail.com>
1892 * binary.c (binary_set_section_contents): Don't print filepos in
1894 (coff_write_object_contents): Cast size_t for error message.
1895 (coff_slurp_line_table): Don't use bfd_vma symndx.
1896 (coff_slurp_reloc_table): Remove unneeded cast.
1897 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1899 (find_abstract_instance_name): Likewise.
1900 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1901 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1902 (elf32_arm_check_relocs): Make r_symndx an int.
1903 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1905 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1907 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1909 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1910 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1911 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1912 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1913 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1914 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1915 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1916 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1917 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1918 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1919 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1920 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1921 and use %lu for error message.
1922 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1923 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1926 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1928 (elf32_arm_final_link_relocate): Likewise.
1929 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1930 * coffcode.h (styp_to_sec_flags): Likewise.
1931 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1932 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1933 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1934 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1935 (elf32_bfin_merge_private_bfd_data): Likewise.
1936 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1937 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1938 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1939 (i370_elf_relocate_section): Likewise.
1940 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1941 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1942 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1943 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1944 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1945 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1946 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1947 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1948 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1949 * ieee.c (ieee_write_id, read_id): Likewise.
1950 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1951 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1952 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1953 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1954 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1955 * stabs.c (_bfd_link_section_stabs): Likewise.
1957 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1959 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1960 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1961 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1962 * coff-sh.c (sh_relax_section): Likewise.
1963 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1964 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1965 * coffcode.h (coff_slurp_reloc_table): Likewise.
1966 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1967 (_bfd_coff_read_string_table): Likewise.
1968 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1969 * compress.c (bfd_get_full_section_contents): Likewise.
1970 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1971 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1972 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1973 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1974 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1975 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1976 (elf32_arm_write_section): Likewise.
1977 * elf32-bfin.c (bfin_relocate_section): Likewise.
1978 (bfinfdpic_relocate_section): Likewise.
1979 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1980 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1981 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1982 (elf_i386_relocate_section): Likewise.
1983 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1984 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1985 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1986 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1987 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1988 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1989 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1990 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1991 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1992 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1993 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1994 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1995 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1996 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1997 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1998 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1999 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2000 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2001 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2002 * elf32-sh.c (sh_elf_relax_section): Likewise.
2003 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2004 (sh_elf_relocate_section): Likewise.
2005 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2006 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2007 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2008 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2009 * elf32-v850.c (v850_elf_relax_section): Likewise.
2010 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2011 (elf_vax_relocate_section): Likewise.
2012 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2013 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2014 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2015 (do_fix_for_relocatable_link): Likewise.
2016 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2017 (elf64_alpha_relax_with_lituse): Likewise.
2018 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2019 (elf_hppa_final_link_relocate): Likewise.
2020 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2021 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2022 (elf64_vms_link_add_object_symbols): Likewise.
2023 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2024 (mmix_final_link_relocate): Likewise.
2025 * elf64-s390.c (invalid_tls_insn): Likewise.
2026 (elf_s390_relocate_section): Likewise.
2027 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2028 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2029 (elf_x86_64_relocate_section): Likewise.
2030 * elfcode.h (elf_slurp_symbol_table): Likewise.
2031 * elfcore.h (elf_core_file_p): Likewise.
2032 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2033 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2034 (elfNN_aarch64_relocate_section): Likewise.
2035 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2036 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2037 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2038 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2039 (_bfd_mips_elf_relocate_section): Likewise.
2040 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2041 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2042 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2043 * ieee.c (ieee_slurp_external_symbols): Likewise.
2044 * ihex.c (ihex_write_object_content): Likewise.
2045 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2046 * merge.c (_bfd_merged_section_offset): Likewise.
2047 * mmo.c (mmo_write_loc_chunk): Likewise.
2048 (mmo_write_object_contents): Likewise.
2049 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2050 * stabs.c (_bfd_link_section_stabs): Likewise.
2051 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2053 2017-07-11 Alan Modra <amodra@gmail.com>
2055 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2057 2017-07-11 Alan Modra <amodra@gmail.com>
2059 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2060 instruction" error using _bfd_error_handler, not einfo.
2062 2017-07-10 Nick Clifton <nickc@redhat.com>
2064 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2065 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2067 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2069 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2071 2017-07-07 Alan Modra <amodra@gmail.com>
2073 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2075 2017-07-07 Alan Modra <amodra@gmail.com>
2077 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2078 as long long. Move code replacing "ll" with "I64", and simplify.
2080 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2082 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2085 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2087 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2089 (line_info_add_file_name): Likewise.
2090 (decode_line_info): Likewise.
2092 2017-07-04 Tristan Gingold <gingold@adacore.com>
2094 * version.m4: Bump version to 2.29.51
2095 * configure: Regenerate.
2097 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2099 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2100 sanity check at the head of this function.
2102 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2104 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2105 dwarf_line_str_size.
2106 (struct attr_abbrev): Add field implicit_const.
2107 (dwarf_debug_sections): Add .debug_line_str.
2108 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2109 (dwarf_debug_section_assert): Add static assertion.
2110 (read_indirect_line_string): New.
2111 (read_abbrevs): Support DW_FORM_implicit_const.
2112 (is_str_attr): Support DW_FORM_line_strp.
2113 (read_attribute_value): Support DW_FORM_line_strp and
2114 DW_FORM_implicit_const.
2115 (read_attribute): Support DW_FORM_implicit_const.
2116 (line_info_add_include_dir, line_info_add_include_dir_stub):
2117 (line_info_add_file_name, read_formatted_entries): New.
2118 (decode_line_info, parse_comp_unit): Support DWARF 5.
2119 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2121 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2123 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2124 abort statement that was put for symbols that are not dynamic.
2126 2017-07-03 Tristan Gingold <gingold@adacore.com>
2128 * po/bfd.pot: Regenerate
2130 2017-07-03 Alan Modra <amodra@gmail.com>
2132 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2133 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2134 * elf.c (setup_group): Use "Lx" to print sh_size.
2135 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2136 unknown section type in hex.
2137 (copy_special_section_fields): Style fix.
2138 (bfd_section_from_shdr): Correct format for sh_link. Use a
2139 common error message for all the variants of unrecognized
2141 (assign_file_positions_for_load_sections): Use "Lx" for lma
2142 adjust error message.
2143 (assign_file_positions_for_non_load_sections): Formatting.
2144 (rewrite_elf_program_header): Formatting. Use "Lx" for
2145 bfd_vma values in error messages.
2146 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2147 ELF_R_SYM value to type expected by format.
2148 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2150 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2151 (elf_link_input_bfd): Use "Lx" for r_info.
2152 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2154 2017-07-03 Alan Modra <amodra@gmail.com>
2156 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2157 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2158 Microsoft C library variant of long long format specifier.
2159 (PRINT20): Cast value to bfd_uint64_t not long long.
2160 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2161 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2162 long long. Don't cast to bfd_vma.
2163 * elf32-score.c (score3_bfd_getl48): Likewise.
2164 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2166 2017-07-03 Alan Modra <amodra@gmail.com>
2168 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2170 (bfd_elf_print_symbol): Don't cast symbol->flags.
2171 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2172 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2173 _bfd_error_handler argument order.
2174 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2176 2017-07-03 Alan Modra <amodra@gmail.com>
2178 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2179 AC_TYPE_LONG_DOUBLE.
2180 * configure: Regenerate.
2181 * config.in: Regenerate.
2183 2017-06-29 Andrew Waterman <andrew@sifive.com>
2185 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2188 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2190 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2191 unless it is undefined weak.
2192 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2193 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2195 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2196 is not dynamic in PIC, abort.
2198 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2201 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2202 undefined weak symbols into dynamic.
2203 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2204 relocation for non-dynamic symbols.
2205 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2207 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2209 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2210 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2211 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2212 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2213 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2216 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2218 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2219 (elfcore_write_s390_gs_bc): Likewise.
2220 * elf.c (elfcore_grok_s390_gs_cb): New function.
2221 (elfcore_grok_s390_gs_bc): New function.
2222 (elfcore_grok_note): Call them.
2223 (elfcore_write_s390_gs_cb): New function.
2224 (elfcore_write_s390_gs_bc): New function.
2225 (elfcore_write_register_note): Call them.
2227 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2229 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2230 bfd_get_file_size. Check archive element size.
2231 (_bfd_generic_get_section_contents_in_window): Likewise.
2233 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2235 * bfd-in2.h: Regenerated.
2236 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2237 (bfd_get_file_size): Likewise.
2239 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2240 Matthew Fortune <matthew.fortune@imgtec.com>
2242 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2243 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2244 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2245 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2247 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2248 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2249 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2250 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2251 `bfd_mach_mips_interaptiv_mr2' entries.
2252 * bfd-in2.h: Regenerate.
2254 2017-06-27 Nick Clifton <nickc@redhat.com>
2256 * tekhex.c (pass_over): Revert accidental conversion of a local
2257 array to a static array.
2259 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2262 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2263 reloc addend if necessary. Adjust diff only if
2264 shrinked_insn_address < end_address.
2266 2017-06-27 Alan Modra <amodra@gmail.com>
2269 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2270 (_bfd_generic_get_section_contents_in_window): Likewise.
2272 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2274 * elfnn-riscv.c (perform_relocation): Support the new
2275 R_RISCV_32_PCREL relocation.
2276 (riscv_elf_relocate_section): Likewise.
2277 * elfxx-riscv.c (howto_table): Likewise.
2278 (riscv_reloc_map): Likewise.
2279 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2280 * libbfd.h: Regenerate.
2282 2017-06-27 Alan Modra <amodra@gmail.com>
2285 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2286 Use unsigned file pointer type, and remove cast.
2287 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2288 Add "count", not "sz".
2290 2017-06-26 Pedro Alves <palves@redhat.com>
2293 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2296 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2299 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2302 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2304 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2305 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2306 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2307 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2308 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2310 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2313 * compress.c (bfd_get_full_section_contents): Don't check the
2315 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2316 reject a section whose size + offset is greater than the size
2318 (_bfd_generic_get_section_contents_in_window): Likewise.
2320 2017-06-26 Nick Clifton <nickc@redhat.com>
2323 * tekhex.c (getvalue): Check for the source pointer exceeding the
2324 end pointer before the first byte is read.
2326 2017-06-26 Nick Clifton <nickc@redhat.com>
2329 * opncls.c (get_build_id): Check that the section is big enough
2330 to contain the whole note.
2331 * compress.c (bfd_get_full_section_contents): Check for and reject
2332 a section whose size is greater than the size of the entire file.
2333 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2334 contain a notes section.
2336 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2338 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2340 (elf_s390_modify_segment_map): Likewise.
2341 (bfd_elf_s390_set_options): Lisewise.
2343 2017-06-26 Alan Modra <amodra@gmail.com>
2345 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2347 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2348 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2349 .preinit_array on --just-syms bfds.
2350 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2351 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2352 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2354 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2356 * elf.c (find_link): Bounds check "hint".
2358 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2360 * elf32-arm.c (using_thumb_only): Update list of architectures in
2361 BFD_ASSERT for which the logic is valid.
2362 (using_thumb2_bl): Likewise.
2363 (using_thumb2): Likewise and return true for ARMv8-R.
2364 (arch_has_arm_nop): Likewise.
2365 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2366 merging logic. Update commentis for value 15 of v8m_baseline,
2367 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2368 merging of value 15 of Tag_CPU_arch.
2370 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2372 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2373 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2374 * bfd-in2.h: Regenerate.
2376 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2378 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2379 the error_alignment label forward. Properly align program
2380 property note section.
2382 2017-06-22 Eric Christopher <echristo@gmail.com>
2384 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2385 abs to fix a truncation warning.
2387 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2389 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2390 local undefined weak symbol to 0.
2391 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2393 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2395 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2396 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2397 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2398 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2399 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2400 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2401 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2402 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2404 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2406 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2407 (elf_i386_lazy_ibt_plt_entry): Likewise.
2408 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2409 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2410 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2411 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2412 (elf_i386_lazy_plt_layout): Likewise.
2413 (elf_i386_non_lazy_plt_layout): Likewise.
2414 (elf_i386_link_hash_entry): Add plt_second.
2415 (elf_i386_link_hash_table): Add plt_second and
2416 plt_second_eh_frame.
2417 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2418 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2419 the second PLT. Check the second PLT.
2420 (elf_i386_relocate_section): Use the second PLT to resolve
2421 PLT reference if needed.
2422 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2424 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2425 second PLT. Generate unwind info for the second PLT.
2426 (elf_i386_plt_type): Add plt_second.
2427 (elf_i386_get_synthetic_symtab): Support the second PLT.
2428 (elf_i386_parse_gnu_properties): Support
2429 GNU_PROPERTY_X86_FEATURE_1_AND.
2430 (elf_i386_merge_gnu_properties): Support
2431 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2432 on GNU_PROPERTY_X86_FEATURE_1_IBT
2433 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2434 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2435 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2436 is set on all relocatable inputs.
2437 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2438 (elf_x32_lazy_ibt_plt_entry): Likewise.
2439 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2440 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2441 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2442 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2443 (elf_x86_64_lazy_ibt_plt): Likewise.
2444 (elf_x32_lazy_ibt_plt): Likewise.
2445 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2446 (elf_x32_non_lazy_ibt_plt): Likewise.
2447 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2448 (elf_x86_64_parse_gnu_properties): Support
2449 GNU_PROPERTY_X86_FEATURE_1_AND.
2450 (elf_x86_64_merge_gnu_properties): Support
2451 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2452 on GNU_PROPERTY_X86_FEATURE_1_IBT
2453 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2454 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2455 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2456 is set on all relocatable inputs.
2458 2017-06-22 Nick Clifton <nickc@redhat.com>
2461 * som.c (setup_sections): NUL terminate the space_strings buffer.
2462 Check that the space.name field does not index beyond the end of
2463 the space_strings buffer.
2465 2017-06-21 Nick Clifton <nickc@redhat.com>
2468 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2470 2017-06-21 Nick Clifton <nickc@redhat.com>
2473 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2474 type of the size parameter.
2475 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2476 length of the counted string.
2477 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2478 (_bfd_vms_save_counted_string): Likewise.
2479 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2480 _bfd_vms_save_counted_string.
2481 (_bfd_vms_slurp_ehdr): Likewise.
2482 (_bfd_vms_slurp_egsd): Likewise.
2483 (Parse_module): Likewise.
2485 2017-06-21 Alan Modra <amodra@gmail.com>
2487 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2488 calls before tocsave calls.
2489 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2492 2017-06-21 Nick Clifton <nickc@redhat.com>
2495 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2496 bfd_get_full_section_contents returns no contents.
2498 2017-06-21 Nick Clifton <nickc@redhat.com>
2501 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2504 2017-06-21 Nick Clifton <nickc@redhat.com>
2507 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2509 (image_set_ptr): Likewise.
2510 (alpha_vms_fix_sec_rel): Likewise.
2511 (alpha_vms_slurp_relocs): Likewise.
2513 2017-06-21 Nick Clifton <nickc@redhat.com>
2516 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2518 (ieee_archive_p): Likewise.
2519 (ieee_object_p): Likewise.
2521 2017-06-21 Nick Clifton <nickc@redhat.com>
2524 * elf.c (setup_group): Zero the group section pointer list after
2525 allocation so that loops can be caught. Check for NULL pointers
2526 when processing a group list.
2528 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2530 * elf-s390.h: New file.
2531 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2533 (elf_s390_additional_program_headers): New function.
2534 (elf_s390_modify_segment_map): New function.
2535 (bfd_elf_s390_set_options): New function.
2536 (elf_backend_additional_program_headers)
2537 (elf_backend_modify_segment_map): Add macro definitions.
2539 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2542 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2543 the DYNAMIC bit instead of bfd_count_sections.
2545 2017-06-19 Nick Clifton <nickc@redhat.com>
2548 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2550 (evax_bfd_print_eeom): Likewise.
2551 (evax_bfd_print_egsd): Check for an overlarge record length.
2552 (evax_bfd_print_etir): Likewise.
2554 2017-06-19 Nick Clifton <nickc@redhat.com>
2557 * libieee.h (struct common_header_type): Add end_p field.
2558 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2560 (read_id): Check for a length that exceeds the remaining bytes in
2562 (ieee_seek): Initialise end_p.
2563 (ieee_archive_p): Likewise.
2564 (ieee_object_p): Likewise.
2566 2017-06-19 Nick Clifton <nickc@redhat.com>
2569 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2570 before reading the EIHS structure entries.
2572 2017-06-19 Nick Clifton <nickc@redhat.com>
2575 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2576 gsd_size. Check that there are enough bytes remaining to read the
2577 type and size of the next egsd. Check that the size of the egsd
2578 does not exceed the size of the record.
2580 2017-06-19 Alan Modra <amodra@gmail.com>
2582 * config.bfd: Correct targ_underscore for cris.
2584 2017-06-18 Alan Modra <amodra@gmail.com>
2586 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2587 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2589 2017-06-16 Nick Clifton <nickc@redhat.com>
2591 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2592 bucketlist is empty because there are no symbols to add to the
2595 2017-06-16 Alan Modra <amodra@gmail.com>
2601 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2602 (BFD_JUMP_TABLE_LINK): Likewise.
2603 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2604 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2605 (bfd_elf_define_start_stop): New function.
2606 * linker.c (bfd_generic_define_start_stop): New function.
2607 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2609 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2610 * aout-target.h (MY_bfd_define_start_stop): Define.
2611 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2612 * binary.c (binary_bfd_define_start_stop): Define.
2613 * bout.c (b_out_bfd_define_start_stop): Define.
2614 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2615 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2616 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2617 * coffcode.h (coff_bfd_define_start_stop): Define.
2618 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2619 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2620 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2621 * ieee.c (ieee_bfd_define_start_stop): Define.
2622 * ihex.c (ihex_bfd_define_start_stop): Define.
2623 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2624 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2625 * mmo.c (mmo_bfd_define_start_stop): Define.
2626 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2627 * oasys.c (oasys_bfd_define_start_stop): Define.
2628 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2629 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2630 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2631 * som.c (som_bfd_define_start_stop): Define.
2632 * srec.c (srec_bfd_define_start_stop): Define.
2633 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2634 * versados.c (versados_bfd_define_start_stop): Define.
2635 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2636 (alpha_vms_bfd_define_start_stop): Define.
2637 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2638 * bfd-in2.h: Regenerate.
2639 * libbfd.h: Regenerate.
2641 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2643 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2644 SYMBOL_REFERENCES_LOCAL.
2646 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2649 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2650 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2651 runtime for if there needs copy relocation elimination.
2652 (need_copy_relocation_p): New function. Return true for symbol with
2653 pc-relative references and if it's against read-only sections.
2654 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2655 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2656 that are related with accessing external objects.
2657 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2658 in elfNN_aarch64_check_relocs.
2660 2017-06-15 Nick Clifton <nickc@redhat.com>
2663 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2666 (ieee_archive_p): Likewise.
2668 2017-06-15 Nick Clifton <nickc@redhat.com>
2671 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2673 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2675 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2676 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2677 keep both windowed and call0 ABI PLT definitions.
2678 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2679 elf_xtensa_*_plt_entry endex.
2680 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2682 2017-06-14 Nick Clifton <nickc@redhat.com>
2685 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2688 2017-06-14 Nick Clifton <nickc@redhat.com>
2691 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2692 maximum value for the ascic pointer. Check that name processing
2693 does not read beyond this value.
2694 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2697 2017-06-14 Nick Clifton <nickc@redhat.com>
2700 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2701 (process_otr): Check for an invalid offset in the otr structure.
2703 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2705 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2707 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2713 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2714 vtable field to a union.
2715 (_bfd_elf_is_start_stop): Removed.
2716 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2717 __start_SECNAME and __stop_SECNAME symbols.
2718 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2719 * elflink.c (_bfd_elf_is_start_stop): Removed.
2720 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2721 _bfd_elf_is_start_stop.
2722 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2723 __stop_SECNAME symbols. Updated.
2724 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2725 (bfd_elf_gc_record_vtinherit): Likewise.
2726 (bfd_elf_gc_record_vtentry): Likewise.
2728 2017-06-13 Nick Clifton <nickc@redhat.com>
2731 * elflink.c (elf_link_adjust_relocs): Generate an error when
2732 encountering a reloc against a symbol removed by garbage
2735 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2737 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2738 to merge_gnu_properties.
2739 * elf-properties.c (elf_merge_gnu_properties): Add struct
2740 bfd_link_info * and pass it to merge_gnu_properties.
2741 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2742 and pass it to elf_merge_gnu_properties.
2743 (_bfd_elf_link_setup_gnu_properties): Pass info to
2744 elf_merge_gnu_property_list.
2745 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2747 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2749 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2752 * binary.c (binary_set_section_contents): Scale lma by octets
2753 per byte to set filepos.
2755 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2757 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2760 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2762 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2765 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2767 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2768 patched section contents for TLS IE reloc.
2769 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2771 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2773 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2774 RELOC_FOR_GLOBAL_SYMBOL macro.
2776 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2778 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2781 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2783 * config/tc-arc.c (md_undefined_symbol): Changed.
2784 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2786 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2788 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2791 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2793 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2794 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2796 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2798 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2801 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2803 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2804 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2805 is non-zero. Add clarifying comments.
2807 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2809 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2810 name. Use local IFUNC symbol name string to report unsupported
2811 non-PIC call to IFUNC function.
2812 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2813 when generating R_386_IRELATIVE relocation.
2814 (elf_i386_finish_dynamic_symbol): Likewise.
2815 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2817 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2818 when generating R_X86_64_IRELATIVE relocation.
2819 (elf_x86_64_finish_dynamic_symbol): Likewise.
2821 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2823 * elf.c (setup_group): Make sure BFD sections are created for all
2824 group sections in the input file when processing SHF_GROUP
2826 (bfd_section_from_shdr): Avoid duplicating logic already
2827 implemented in `setup_group'.
2829 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2832 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2833 if the hint address is zero.
2835 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2838 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2839 ELF_COMMON_DEF_P for common symbols.
2841 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2843 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2844 SEC_GROUP sections as SEC_EXCLUDE.
2845 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2846 (assign_section_numbers): Use resolve_section_groups flag instead
2847 of relocatable link type.
2848 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2849 flag instead of checking the final_link flag for part of the
2850 checks in here. Fix white space as a result.
2851 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2852 instead of relocatable link type.
2853 (bfd_elf_final_link): Likewise.
2855 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2857 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2859 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2860 (s3_bfd_score_elf_check_relocs): Likewise.
2861 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2862 (score_elf_final_link_relocate): Likewise.
2863 (s7_bfd_score_elf_check_relocs): Likewise.
2865 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2867 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2870 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2872 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2873 from `reloc_count' rather than decrementing it.
2874 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2875 `reloc_count' by `int_rels_per_ext_rel'.
2876 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2877 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2878 entry determination.
2879 (s3_bfd_score_elf_check_relocs): Likewise.
2880 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2881 (s7_bfd_score_elf_relocate_section): Likewise.
2882 (s7_bfd_score_elf_check_relocs): Likewise.
2883 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2884 prototype and function.
2885 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2886 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2887 triple rather than once the sum of REL and RELA relocation entry
2889 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2890 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2891 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2892 storage allocation size determination.
2893 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2894 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2895 by `int_rels_per_ext_rel' for last relocation entry
2897 (bfd_elf_final_link): Do not multiply `reloc_count' by
2898 `int_rels_per_ext_rel' for internal relocation storage
2899 allocation size determination.
2900 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2901 `int_rels_per_ext_rel' for last relocation entry determination.
2902 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2903 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2904 (_bfd_mips_elf_relocate_section): Likewise.
2906 2017-06-05 Alan Modra <amodra@gmail.com>
2909 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2911 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2913 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2914 determine structure sizes.
2915 (elfcore_grok_freebsd_prstatus): Likewise.
2917 2017-06-01 Alan Modra <amodra@gmail.com>
2919 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2920 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2922 (is_elfv2_localentry0): New function.
2923 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2924 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2925 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2926 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2927 optimized localentry:0 stubs.
2928 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2929 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2931 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2933 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2935 2017-05-30 Casey Smith <clegg89@gmail.com>
2938 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2939 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2941 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2943 * cpu-arc.c (arc_compatible): New function.
2945 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2947 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2949 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2952 * bfdio.c (bfd_get_file_size): New function.
2953 * bfd-in2.h: Regenerated.
2955 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2957 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2960 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2962 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2963 dynobj instead of htab->elf.dynobj.
2965 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2967 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2969 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2970 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2971 actual number of internal relocations retrieved. Adjust
2972 function description.
2973 (bfd_elf64_canonicalize_reloc): Remove macro.
2974 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2976 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2978 * archures.c (bfd_mach_sparc_v9m8): Define.
2979 (bfd_mach_sparc_v8plusm8): Likewise.
2980 (bfd_mach_sparc_v9_p): Adjust to M8.
2981 (bfd_mach_sparc_64bit_p): Likewise.
2982 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2983 bfd_mach_sparc_v8plusm8.
2984 * bfd-in2.h: Regenerated.
2985 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2987 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2988 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2989 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2991 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2992 bfd_mach_sparc_v8plusm8.
2994 2017-05-19 Alan Modra <amodra@gmail.com>
2996 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2997 debug and special sections when no non-note alloc sections in an
3000 2017-05-18 Alan Modra <amodra@gmail.com>
3002 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3003 * elf-m10300.c: Likewise.
3005 * elf32-arc.c: Likewise.
3006 * elf32-bfin.c: Likewise.
3007 * elf32-m68k.c: Likewise.
3008 * elf32-nds32.c: Likewise.
3009 * elf32-tilepro.c: Likewise.
3010 * elflink.c: Likewise.
3011 * elfnn-aarch64.c: Likewise.
3012 * elfnn-riscv.c: Likewise.
3013 * elfxx-tilegx.c: Likewise.
3014 * mach-o.c: Likewise.
3015 * peXXigen.c: Likewise.
3016 * vms-alpha.c: Likewise.
3017 * vms-lib.c: Likewise.
3019 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3022 * elflink.c (elf_gc_mark_debug_section): New function.
3023 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3024 referenced by kept debug sections.
3026 2017-05-16 Alan Modra <amodra@gmail.com>
3028 * elf-m10300.c: Rename occurrences of non_ir_ref.
3029 * elf32-arm.c: Likewise.
3030 * elf32-bfin.c: Likewise.
3031 * elf32-cr16.c: Likewise.
3032 * elf32-cris.c: Likewise.
3033 * elf32-d10v.c: Likewise.
3034 * elf32-dlx.c: Likewise.
3035 * elf32-fr30.c: Likewise.
3036 * elf32-frv.c: Likewise.
3037 * elf32-hppa.c: Likewise.
3038 * elf32-i370.c: Likewise.
3039 * elf32-i386.c: Likewise.
3040 * elf32-iq2000.c: Likewise.
3041 * elf32-lm32.c: Likewise.
3042 * elf32-m32c.c: Likewise.
3043 * elf32-m32r.c: Likewise.
3044 * elf32-m68hc1x.c: Likewise.
3045 * elf32-m68k.c: Likewise.
3046 * elf32-mcore.c: Likewise.
3047 * elf32-metag.c: Likewise.
3048 * elf32-microblaze.c: Likewise.
3049 * elf32-moxie.c: Likewise.
3050 * elf32-msp430.c: Likewise.
3051 * elf32-mt.c: Likewise.
3052 * elf32-nios2.c: Likewise.
3053 * elf32-or1k.c: Likewise.
3054 * elf32-ppc.c: Likewise.
3055 * elf32-rl78.c: Likewise.
3056 * elf32-s390.c: Likewise.
3057 * elf32-score.c: Likewise.
3058 * elf32-score7.c: Likewise.
3059 * elf32-sh.c: Likewise.
3060 * elf32-tic6x.c: Likewise.
3061 * elf32-tilepro.c: Likewise.
3062 * elf32-v850.c: Likewise.
3063 * elf32-vax.c: Likewise.
3064 * elf32-xstormy16.c: Likewise.
3065 * elf32-xtensa.c: Likewise.
3066 * elf64-alpha.c: Likewise.
3067 * elf64-hppa.c: Likewise.
3068 * elf64-ia64-vms.c: Likewise.
3069 * elf64-mmix.c: Likewise.
3070 * elf64-ppc.c: Likewise.
3071 * elf64-s390.c: Likewise.
3072 * elf64-sh64.c: Likewise.
3073 * elf64-x86-64.c: Likewise.
3074 * elflink.c: Likewise.
3075 * elfnn-aarch64.c: Likewise.
3076 * elfnn-ia64.c: Likewise.
3077 * elfnn-riscv.c: Likewise.
3078 * elfxx-mips.c: Likewise.
3079 * elfxx-sparc.c: Likewise.
3080 * elfxx-tilegx.c: Likewise.
3081 * linker.c: Likewise.
3083 2017-05-16 Alan Modra <amodra@gmail.com>
3085 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3086 * elflink.c (elf_link_add_object_symbols): Update to use
3088 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3090 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3092 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3094 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3096 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3098 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3099 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3101 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3103 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3105 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3107 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3108 to plt_second/plt_second_eh_frame.
3109 (elf_x86_64_link_hash_newfunc): Updated.
3110 (elf_x86_64_allocate_dynrelocs): Likewise.
3111 (elf_x86_64_size_dynamic_sections): Likewise.
3112 (elf_x86_64_relocate_section): Likewise.
3113 (elf_x86_64_finish_dynamic_symbol): Likewise.
3114 (elf_x86_64_finish_dynamic_sections): Likewise.
3115 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3116 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3118 (elf_backend_setup_gnu_properties): Updated. Create the
3119 .plt.sec section instead of the .plt.sec section.
3121 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3123 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3124 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3125 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3127 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3129 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3130 (bfd_elf64_set_reloc): Define.
3131 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3133 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3135 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3136 (struct bfd_target): New field _bfd_set_reloc.
3137 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3138 * reloc.c (_bfd_generic_set_reloc): New function.
3139 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3140 * nlm-target.h (nlm_set_reloc): Likewise.
3141 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3142 * aout-tic30.c (MY_set_reloc): Likewise.
3143 * aout-target.h (MY_set_reloc): Likewise.
3144 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3145 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3146 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3147 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3148 * aout-adobe.c (aout_32_set_reloc): Likewise.
3149 * bout.c (b_out_set_reloc): Likewise.
3150 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3151 * i386os9k.c (aout_32_set_reloc): Likewise.
3152 * ieee.c (ieee_set_reloc): Likewise.
3153 * oasys.c (oasys_set_reloc): Likewise.
3154 * som.c (som_set_reloc): Likewise.
3155 * versados.c (versados_set_reloc): Likewise.
3156 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3157 _bfd_generic_set_reloc.
3158 (rs6000_xcoff64_aix_vec): LIkewise.
3159 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3160 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3161 * i386msdos.c (msdos_set_reloc): Define to
3162 _bfd_norelocs_set_reloc.
3163 * elfcode.h (elf_set_reloc): Define.
3164 * bfd-in2.h: Regenerated.
3166 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3169 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3170 for IFUNC function address.
3172 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3174 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3175 (CONFLICT_LIST): Likewise.
3176 (opcode/arc-attrs.h): Include.
3177 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3178 (arc_extract_features): New file.
3179 (arc_stralloc): Likewise.
3180 (arc_elf_merge_attributes): Likewise.
3181 (arc_elf_merge_private_bfd_data): Use object attributes.
3182 (bfd_arc_get_mach_from_attributes): New function.
3183 (arc_elf_object_p): Use object attributes.
3184 (arc_elf_final_write_processing): Likewise.
3185 (elf32_arc_obj_attrs_arg_type): New function.
3186 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3187 (elf32_arc_section_from_shdr): Likewise.
3188 (elf_backend_obj_attrs_vendor): Define.
3189 (elf_backend_obj_attrs_section): Likewise.
3190 (elf_backend_obj_attrs_arg_type): Likewise.
3191 (elf_backend_obj_attrs_section_type): Likewise.
3192 (elf_backend_obj_attrs_handle_unknown): Likewise.
3193 (elf_backend_section_from_shdr): Likewise.
3195 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3198 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3199 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3200 and the destination is a Thumb symbol.
3202 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3204 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3205 initializer to silence GCC 4.2.
3206 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3208 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3210 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3211 (LAZY_PLT_ENTRY_SIZE): This.
3212 (NON_LAZY_PLT_ENTRY_SIZE): New.
3213 (elf_x86_64_plt0_entry): Renamed to ...
3214 (elf_x86_64_lazy_plt0_entry): This.
3215 (elf_x86_64_plt_entry): Renamed to ...
3216 (elf_x86_64_lazy_plt_entry): This.
3217 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3218 (elf_x86_64_lazy_bnd_plt0_entry): This.
3219 (elf_x86_64_legacy_plt_entry): Removed.
3220 (elf_x86_64_bnd_plt_entry): Renamed to ...
3221 (elf_x86_64_lazy_bnd_plt_entry): This.
3222 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3223 (elf_x86_64_non_lazy_plt_entry): This.
3224 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3225 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3226 (elf_x86_64_eh_frame_plt): Renamed to ...
3227 (elf_x86_64_eh_frame_lazy_plt): This.
3228 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3229 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3230 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3231 (elf_x86_64_eh_frame_non_lazy_plt): This.
3232 (elf_x86_64_lazy_plt_layout): New.
3233 (elf_x86_64_non_lazy_plt_layout): Likewise.
3234 (elf_x86_64_plt_layout): Likewise.
3235 (elf_x86_64_backend_data): Remove PLT layout information. Add
3236 os for target system.
3237 (GET_PLT_ENTRY_SIZE): Removed.
3238 (elf_x86_64_lazy_plt): New.
3239 (elf_x86_64_non_lazy_plt): Likewise.
3240 (elf_x86_64_lazy_bnd_plt): Likewise.
3241 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3242 (elf_x86-64_arch_bed): Updated.
3243 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3244 (elf_x86_64_create_dynamic_sections): Removed.
3245 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3246 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3247 (elf_x86-64_adjust_dynamic_symbol): Updated.
3248 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3249 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3250 size for PLT0 if there is no PLT0. Get plt_entry_size from
3251 non_lazy_plt for non-lazy PLT entries.
3252 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3253 from non_lazy_plt for non-lazy PLT entries.
3254 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3255 if there is no PLT0.
3256 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3257 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3258 entries with non-lazy PLT layout. Don't fill the second and third
3259 slots in the PLT entry if there is no PLT0.
3260 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3261 if there is no PLT0. Set sh_entsize on the .plt.got section.
3262 (compare_relocs): New.
3263 (elf_x86_64_plt_type): Likewise.
3264 (elf_x86_64_plt): Likewise.
3265 (elf_x86_64_nacl_plt): New. Forward declaration.
3266 (elf_x86_64_get_plt_sym_val): Removed.
3267 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3268 against all dynamic relocations.
3269 (elf_x86_64_link_setup_gnu_properties): New function.
3270 (elf_backend_create_dynamic_sections): Updated.
3271 (elf_backend_setup_gnu_properties): New.
3272 (elf_x86_64_nacl_plt): New.
3273 (elf_x86_64_nacl_arch_bed): Updated.
3275 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3277 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3278 (LAZY_PLT_ENTRY_SIZE): This.
3279 (NON_LAZY_PLT_ENTRY_SIZE): New.
3280 (elf_i386_plt0_entry): Renamed to ...
3281 (elf_i386_lazy_plt0_entry): This.
3282 (elf_i386_plt_entry): Renamed to ...
3283 (elf_i386_lazy_plt_entry): This.
3284 (elf_i386_pic_plt0_entry): Renamed to ...
3285 (elf_i386_pic_lazy_plt0_entry): This.
3286 (elf_i386_pic_plt_entry): Renamed to ...
3287 (elf_i386_pic_lazy_plt_entry): This.
3288 (elf_i386_got_plt_entry): Renamed to ...
3289 (elf_i386_non_lazy_plt_entry): This.
3290 (elf_i386_pic_got_plt_entry): Renamed to ...
3291 (elf_i386_pic_non_lazy_plt_entry): This.
3292 (elf_i386_eh_frame_plt): Renamed to ...
3293 (elf_i386_eh_frame_lazy_plt): This.
3294 (elf_i386_eh_frame_plt_got): Renamed to ...
3295 (elf_i386_eh_frame_non_lazy_plt): This.
3296 (elf_i386_plt_layout): Renamed to ...
3297 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3298 eh_frame_plt_got_size.
3299 (elf_i386_non_lazy_plt_layout): New.
3300 (elf_i386_plt_layout): Likewise.
3301 (elf_i386_non_lazy_plt): Likewise.
3302 (GET_PLT_ENTRY_SIZE): Removed.
3303 (elf_i386_plt): Renamed to ...
3304 (elf_i386_lazy_plt): This.
3305 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3306 (elf_i386_arch_bed): Updated.
3307 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3308 (elf_i386_create_dynamic_sections): Removed.
3309 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3310 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3311 (elf_i386_adjust_dynamic_symbol): Updated.
3312 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3313 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3314 size for PLT0 if there is no PLT0.
3315 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3316 output section is discarded only if GOT isn't empty.
3317 (elf_i386_relocate_section): Updated. Properly get PLT index
3318 if there is no PLT0.
3319 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3320 second and third slots in the PLT entry if there is no PLT0.
3321 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3322 if there is no PLT0. Set sh_entsize on the .plt.got section.
3323 (elf_i386_nacl_plt): Forward declaration.
3324 (elf_i386_get_plt_sym_val): Removed.
3325 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3326 against all dynamic relocations.
3327 (elf_i386_link_setup_gnu_properties): New function.
3328 (elf_backend_create_dynamic_sections): Updated.
3329 (elf_backend_setup_gnu_properties): New.
3330 (elf_i386_nacl_plt): Updated.
3331 (elf_i386_nacl_arch_bed): Likewise.
3332 (elf_i386_vxworks_arch_bed): Likewise.
3334 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3336 * elflink.c (elf_output_implib): Remove executable flag from import
3338 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3339 library is a relocatable object file.
3341 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3344 * elf32-avr.c (avr_should_move_sym): New function.
3345 (avr_should_reduce_sym_size): Likewise.
3346 (avr_should_increase_sym_size): Likewise.
3347 (elf32_avr_relax_delete_bytes): Adjust symbol values
3348 and sizes by calling new functions.
3350 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3352 * config.bfd (riscv32-*): Enable rv64.
3354 2017-05-02 Alan Modra <amodra@gmail.com>
3357 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3358 rather than h->root.type == bfd_link_hash_new.
3359 (bfd_elf_record_link_assignment): Similarly, call
3360 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3362 2017-04-29 Alan Modra <amodra@gmail.com>
3365 * reloc.c (reloc_offset_in_range): New function.
3366 (bfd_perform_relocation, bfd_install_relocation): Use it.
3367 (_bfd_final_link_relocate): Likewise.
3369 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3371 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3372 before using .plt.got.
3373 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3375 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3377 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3378 instead of "+=" to update 0.
3380 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3382 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3383 .plt.got section here.
3384 (elf_i386_check_relocs): Don't create the .plt.got section.
3385 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3386 the .plt.got and .plt.bnd sections here.
3387 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3390 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3392 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3394 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3395 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3396 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3397 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3400 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3402 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3404 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3405 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3406 the first relocatable ELF input with GNU properties.
3408 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3410 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3411 VxWorks for non-PIC.
3413 2017-04-27 Alan Modra <amodra@gmail.com>
3415 * elf-bfd.h (struct elf_backend_data): Make asection param of
3416 elf_backend_eh_frame_address_size const.
3417 (_bfd_elf_eh_frame_address_size): Likewise.
3418 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3419 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3420 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3421 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3422 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3423 (next_cie_fde_offset): Constify params.
3424 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3426 2017-04-27 Alan Modra <amodra@gmail.com>
3428 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3429 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3430 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3432 (offset_adjust): New function.
3433 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3434 (adjust_eh_frame_local_symbols): Likewise.
3435 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3436 after changing anything. Return true if anything changed.
3437 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3438 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3440 2017-04-27 Alan Modra <amodra@gmail.com>
3442 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3445 2017-04-27 Alan Modra <amodra@gmail.com>
3447 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3448 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3449 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3450 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3451 for undef and undefweak dyn_relocs.
3452 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3453 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3454 (allocate_got, allocate_dynrelocs): Likewise.
3455 (ppc64_elf_relocate_section): Likewise.
3457 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3459 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3460 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3461 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3462 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3464 2017-04-26 Nick Clifton <nickc@redhat.com>
3467 * reloc.c (bfd_perform_relocation): Check for a negative address
3470 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3473 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3475 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3476 (elf_backend_always_renumber_dynsyms): Define.
3477 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3478 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3479 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3480 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3482 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3484 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3486 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3487 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3488 sections have been created.
3490 2017-04-26 Nick Clifton <nickc@redhat.com>
3493 * compress.c (bfd_init_section_compress_status): Check the return
3494 value from bfd_malloc.
3496 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3498 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3499 no_finish_dynamic_symbol.
3500 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3502 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3503 weak symbol, don't make it dynamic.
3504 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3505 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3506 relocation for GOT reference.
3507 (elf_x86_64_finish_dynamic_symbol): Abort if
3508 no_finish_dynamic_symbol isn't 0.
3510 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3513 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3514 undefined weak symbol, don't make it dynamic.
3515 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3516 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3517 relocation for R_386_GOT32.
3519 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3522 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3524 2017-04-23 Alan Modra <amodra@gmail.com>
3527 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3528 * elf.c (lcomm_sym): New.
3529 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3530 * bfd-in2.h: Regenerate.
3532 2017-04-23 Alan Modra <amodra@gmail.com>
3535 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3536 parameters and comment.
3537 (_bfd_elf_get_reloc_section): Delete.
3538 (_bfd_elf_plt_get_reloc_section): Declare.
3539 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3540 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3542 (_bfd_elf_get_reloc_section): ..here. Delete.
3543 (assign_section_numbers): Call elf_get_reloc_section.
3544 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3545 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3547 2017-04-23 Alan Modra <amodra@gmail.com>
3550 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3553 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3556 * elf32-i386.c (elf_i386_link_hash_entry): Add
3557 no_finish_dynamic_symbol.
3558 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3559 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3560 symbol, don't make it dynamic in PIE.
3561 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3562 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3563 relocation for R_386_GOT32
3564 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3567 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3571 * elflink.c (elf_link_add_object_symbols): Require
3572 --no-dynamic-linker with -E/--dynamic-list when creating
3575 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3577 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3580 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3582 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3583 dynamic symbol sorting.
3585 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3588 * elflink.c (elf_link_add_object_symbols): Preserve
3589 dynamic_ref_after_ir_def when restoring the symbol table for
3590 unneeded dynamic object.
3592 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3595 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3596 on on undefined IFUNC symbol in the second PLT.
3598 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3600 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3602 2017-04-19 Alan Modra <amodra@gmail.com>
3604 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3605 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3606 * elf32-ppc.c:Formatting.
3607 (ensure_undefweak_dynamic): Don't make dynamic when
3608 info->dynamic_undefined_weak is zero.
3609 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3610 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3611 not default visibility. Discard undef and undefweak
3613 (ppc_elf_relocate_section): Adjust to suit.
3614 * elf64-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 them earlier.
3620 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3623 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3624 before generating the version definition section.
3626 2017-04-17 Alan Modra <amodra@gmail.com>
3628 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3629 state when a regular object file defines a symbol with
3630 incompatible type to that defined by an earlier shared lib.
3632 2017-04-13 Alan Modra <amodra@gmail.com>
3634 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3636 * elf32-arm.c: Likewise.
3637 * elf32-i386.c: Likewise.
3638 * elf32-mep.c: Likewise.
3639 * elf64-ia64-vms.c: Likewise.
3640 * elf64-x86-64.c: Likewise.
3641 * elflink.c: Likewise.
3642 * elfnn-ia64.c: Likewise.
3643 * elfxx-mips.c: Likewise.
3645 2017-04-13 Alan Modra <amodra@gmail.com>
3647 * aoutx.h: Use %B and %A in error messages throughout file.
3648 * aout-cris.c: Likewise.
3649 * archive.c: Likewise.
3650 * binary.c: Likewise.
3651 * coff-rs6000.c: Likewise.
3652 * coff-tic4x.c: Likewise.
3653 * coffcode.h: Likewise.
3654 * coffgen.c: Likewise.
3655 * cofflink.c: Likewise.
3656 * coffswap.h: Likewise.
3657 * cpu-arm.c: Likewise.
3658 * elf-eh-frame.c: Likewise.
3659 * elf-m10300.c: Likewise.
3661 * elf32-arc.c: Likewise.
3662 * elf32-arm.c: Likewise.
3663 * elf32-bfin.c: Likewise.
3664 * elf32-frv.c: Likewise.
3665 * elf32-iq2000.c: Likewise.
3666 * elf32-m32c.c: Likewise.
3667 * elf32-microblaze.c: Likewise.
3668 * elf32-nds32.c: Likewise.
3669 * elf32-rl78.c: Likewise.
3670 * elf32-rx.c: Likewise.
3671 * elf32-score.c: Likewise.
3672 * elf32-score7.c: Likewise.
3673 * elf32-sh64.c: Likewise.
3674 * elf32-v850.c: Likewise.
3675 * elf32-vax.c: Likewise.
3676 * elf32-visium.c: Likewise.
3677 * elf64-ia64-vms.c: Likewise.
3678 * elf64-mmix.c: Likewise.
3679 * elf64-sh64.c: Likewise.
3680 * elfcode.h: Likewise.
3681 * elfnn-aarch64.c: Likewise.
3682 * elfnn-ia64.c: Likewise.
3683 * elfxx-mips.c: Likewise.
3684 * hpux-core.c: Likewise.
3687 * linker.c: Likewise.
3688 * merge.c: Likewise.
3690 * oasys.c: Likewise.
3691 * pdp11.c: Likewise.
3692 * peXXigen.c: Likewise.
3693 * rs6000-core.c: Likewise.
3694 * vms-alpha.c: Likewise.
3695 * xcofflink.c: Likewise.
3697 2017-04-13 Alan Modra <amodra@gmail.com>
3699 * bfd.c (PRINT_TYPE): Define.
3700 (_doprnt): New function.
3701 (error_handler_internal): Use _doprnt.
3702 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3703 calls in their natural order, throughout file.
3704 * coff-mcore.c: Likewise.
3705 * coff-ppc.c: Likewise.
3706 * coff-tic80.c: Likewise.
3707 * cofflink.c: Likewise.
3708 * elf-s390-common.c: Likewise.
3710 * elf32-arm.c: Likewise.
3711 * elf32-i386.c: Likewise.
3712 * elf32-m32r.c: Likewise.
3713 * elf32-msp430.c: Likewise.
3714 * elf32-spu.c: Likewise.
3715 * elf64-ia64-vms.c: Likewise.
3716 * elf64-sparc.c: Likewise.
3717 * elf64-x86-64.c: Likewise.
3718 * elflink.c: Likewise.
3719 * elfnn-aarch64.c: Likewise.
3720 * elfnn-ia64.c: Likewise.
3721 * elfxx-mips.c: Likewise.
3723 2017-04-13 Alan Modra <amodra@gmail.com>
3725 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3726 branch veneers" error. Fix double space and format message.
3727 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3728 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3730 2017-04-13 Alan Modra <amodra@gmail.com>
3732 * bfd-in2.h: Regenerate.
3734 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3736 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3737 extra `\n' in warning/error messages.
3738 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3739 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3741 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3743 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3744 processor-specific properties with generic ELF target vector.
3746 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3748 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3749 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3750 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3751 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3753 (link_hash_newfunc): Initialize has_got_reloc and
3755 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3757 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3759 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3761 (_bfd_sparc_elf_fixup_symbol): New function.
3762 (allocate_dynrelocs): Don't allocate space for dynamic
3763 relocations and discard relocations against resolved undefined
3764 weak symbols in executable. Don't make resolved undefined weak
3765 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3766 relocation against undefined weak symbols in PIE.
3767 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3768 relocations against resolved undefined weak symbols in PIE
3769 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3770 without ynamic PLT/GOT relocations for resolved undefined weak
3772 Don't generate dynamic relocation against resolved undefined
3773 weak symbol in executable.
3774 (pie_finish_undefweak_symbol): New function.
3775 (_bfd_sparc_elf_finish_dynamic_sections): Call
3776 pie_finish_undefweak_symbol on all symbols in PIE.
3777 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3778 (_bfd_sparc_elf_fixup_symbol): New function.
3780 2017-04-10 Nick Clifton <nickc@redhat.com>
3782 * config.bfd: Remove ns32k from obsolete list.
3784 2017-04-10 Alan Modra <amodra@gmail.com>
3787 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3788 (special_sections_i): Likewise for .init_array.
3789 (special_sections_p): Likewise for .preinit_array.
3791 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3795 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3796 ELF_COMMON_DEF_P for common symbols.
3797 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3798 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3799 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3800 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3801 07492f668d2173da7a2bda3707ff0985e0f460b6.
3803 2017-04-07 Pedro Alves <palves@redhat.com>
3805 * opncls.c (bfd_get_debug_link_info): Rename to...
3806 (bfd_get_debug_link_info_1): ... this. Change type of second
3807 parameter to void pointer. Adjust.
3808 (bfd_get_debug_link_info): Reimplement on top of
3809 bfd_get_debug_link_info_1.
3810 (separate_debug_file_exists, separate_alt_debug_file_exists):
3811 Change type of second parameter to void pointer. Adjust.
3812 (get_func_type, check_func_type): Change type of second parameter
3814 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3815 the callback functions instead of passing the address of a local.
3816 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3817 find_separate_debug_file.
3818 (get_alt_debug_link_info_shim): Change type of second parameter to
3819 void pointer. Adjust.
3820 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3821 find_separate_debug_file.
3822 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3823 of second parameter to void pointer. Adjust.
3824 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3825 pointer local to find_separate_debug_file.
3827 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3829 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3830 external symbols with a definition.
3831 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3833 2017-04-07 Alan Modra <amodra@gmail.com>
3835 * po/SRC-POTFILES.in: Regenerate.
3837 2017-04-05 Alan Modra <amodra@gmail.com>
3839 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3842 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3844 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3845 numbers for DataDirectory entry indicies passed to
3848 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3850 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3851 each GNU_MBIND section and align GNU_MBIND section to page size.
3852 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3853 segment for each GNU_MBIND section.
3854 (_bfd_elf_init_private_section_data): Copy sh_info from input
3855 for GNU_MBIND section.
3857 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3859 * elfnn-riscv.c (GP_NAME): Delete.
3860 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3861 (_bfd_riscv_relax_lui): Likewise.
3863 2017-04-04 Nick Clifton <nickc@redhat.com>
3866 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3868 (bfd_elf_final_link): Only initialize the extended symbol index
3869 section if there are extended symbol tables to list.
3871 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3873 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3874 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3875 * configure.ac (elf): Add elf-properties.lo.
3876 * Makefile.in: Regenerated.
3877 * configure: Likewise.
3878 * elf-bfd.h (elf_property_kind): New.
3879 (elf_property): Likewise.
3880 (elf_property_list): Likewise.
3881 (elf_properties): Likewise.
3882 (_bfd_elf_parse_gnu_properties): Likewise.
3883 (_bfd_elf_get_property): Likewise.
3884 (_bfd_elf_link_setup_gnu_properties): Likewise.
3885 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3886 and setup_gnu_properties.
3887 (elf_obj_tdata): Add properties.
3888 * elf-properties.c: New file.
3889 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3890 (elf_i386_merge_gnu_properties): Likewise.
3891 (elf_backend_parse_gnu_properties): Likewise.
3892 (elf_backend_merge_gnu_properties): Likewise.
3893 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3894 (elf_x86_64_merge_gnu_properties): Likewise.
3895 (elf_backend_parse_gnu_properties): Likewise.
3896 (elf_backend_merge_gnu_properties): Likewise.
3897 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3898 (elf_backend_parse_gnu_properties): Likewise.
3899 (elf_backend_setup_gnu_properties): Likewise.
3900 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3901 elf_backend_merge_gnu_properties and
3902 elf_backend_setup_gnu_properties.
3904 2017-03-30 Pip Cet <pipcet@gmail.com>
3906 * elf32-wasm32.c: Add relocation code, two relocs.
3907 * reloc.c: Add wasm32 relocations.
3908 * libbfd.h: Regenerate.
3909 * bfd-in2.h: Regenerate.
3910 * bfd/po/bfd.pot: Regenerate.
3912 2017-03-29 Nick Clifton <nickc@redhat.com>
3915 * coff-bfd.h (struct coff_section_data): Add new fields:
3916 saved_bias and bias.
3917 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3918 computed for PE binaries.
3919 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3922 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3925 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3926 to handle a local symbol with a hash-symbol-entry; without PLT.
3927 Add BFD_ASSERT for an incidental case with GOT entry present.
3928 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3929 isn't forced-or-set local.
3931 2017-03-27 Pip Cet <pipcet@gmail.com>
3933 * wasm-module.c: New file to support WebAssembly modules.
3934 * wasm-module.h: New file to support WebAssembly modules.
3935 * doc/webassembly.texi: Start documenting wasm-module.c.
3936 * config.bfd: Add wasm_vec.
3937 * targets.c: Likewise.
3938 * configure.ac: Likewise.
3939 * Makefile.am: Add entries for wasm-module.c.
3940 * Makefile.in: Regenerate.
3941 * configure: Regenerate.
3942 * po/SRC-POTFILES.in: Regenerate.
3944 2017-03-27 Pip Cet <pipcet@gmail.com>
3946 * cpu-wasm32.c: New file to support wasm32 architecture.
3947 * elf32-wasm32.c: New file to support wasm32 architecture.
3948 * Makefile.am: Add wasm32 architecture.
3949 * archures.c: Likewise.
3950 * config.bfd: Likewise.
3951 * configure.ac: Likewise.
3952 * targets.c: Likewise.
3953 * Makefile.in: Regenerate.
3954 * bfd-in2.h: Regenerate.
3955 * configure: Regenerate.
3956 * po/SRC-POTFILES.in: Regenerate.
3958 2017-03-20 Alan Modra <amodra@gmail.com>
3961 * elf64-ppc.c (compare_symbols): Stabilize sort.
3963 2017-03-18 Alan Modra <amodra@gmail.com>
3965 * elf64-ppc.c (struct ppc_link_hash_table): Add
3966 local_ifunc_resolver and maybe_local_ifunc_resolver.
3967 (ppc_build_one_stub): Set flags on emitting dynamic
3968 relocation to ifunc.
3969 (ppc64_elf_relocate_section): Likewise.
3970 (ppc64_elf_finish_dynamic_symbol): Likewise.
3971 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3972 local dynamic relocs to ifuncs.
3973 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3974 local_ifunc_resolver and maybe_local_ifunc_resolver.
3975 (ppc_elf_relocate_section): Set flag on emitting dynamic
3976 relocation to ifuncs.
3977 (ppc_elf_finish_dynamic_symbol): Likewise.
3978 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3979 dynamic relocs to ifuncs.
3981 2017-03-13 Nick Clifton <nickc@redhat.com>
3984 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3985 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3986 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3987 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3988 * bfd-in2.h: Regenerate.
3989 * libbfd.h: Regenerate.
3990 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3992 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3993 (elfNN_aarch64_howto_table): Likewise.
3994 (aarch64_tls_transition_without_check): Likewise.
3995 (aarch64_reloc_got_type): Likewise.
3996 (elfNN_aarch64_final_link_relocate): Likewise.
3997 (elfNN_aarch64_tls_relax): Likewise.
3998 (elfNN_aarch64_relocate_section): Likewise.
3999 (elfNN_aarch64_gc_sweep_hook): Likewise.
4000 (elfNN_aarch64_check_relocs): Likewise.
4001 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4002 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4004 2017-03-11 Alan Modra <amodra@gmail.com>
4006 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4007 parameter is in fact used. Whitespace fixes.
4008 * elf64-ppc.c: Likewise.
4010 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4012 * rs6000-core.c (CORE_NEW): Simplify macro when
4013 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4015 2017-03-07 Alan Modra <amodra@gmail.com>
4019 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4022 2017-03-05 Alan Modra <amodra@gmail.com>
4024 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4025 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4026 (next_cie_fde_offset): New function.
4027 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4028 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4029 four bytes. Align CIEs to four or eight bytes depending on
4030 per_encoding_aligned8. Align FDEs according to their encoding.
4031 Pad last FDE to output section alignment.
4032 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4034 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4035 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4036 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4038 2017-03-02 Martin Bickel <binutils@ineranves.de>
4041 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4042 empty segments which have a zero filesz, but a non-zero memsz.
4044 2017-03-02 Alan Modra <amodra@gmail.com>
4046 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4048 2017-02-28 Alan Modra <amodra@gmail.com>
4050 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4051 (ppc64_elf_relocate_section): Likewise.
4053 2017-02-28 Alan Modra <amodra@gmail.com>
4056 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4057 rather than elf32_nios2_hash_table or elf_hash_table.
4058 (create_got_section): Likewise.
4059 (nios2_elf32_finish_dynamic_symbol): Likewise.
4060 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4061 (nios2_elf32_size_dynamic_sections): Likewise.
4062 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4063 vars. Use htab equivalents directly instead. Don't create
4064 all dynamic sections on needing just the GOT. Use a goto
4065 rather than a fall-through with reloc test. Ensure
4066 htab->dynobj is set when making dynamic sreloc section.
4067 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4068 equivalent directly instead. Don't segfault on looking for
4069 .dynamic when dynamic sections have not been created. Don't
4070 segfault on .got.plt being discarded.
4071 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4072 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4073 fixme and another not so relevant comment.
4074 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4075 already set, set hash table dynobj on creating .sbss.
4077 2017-02-28 Alan Modra <amodra@gmail.com>
4079 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4080 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4081 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4082 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4083 (ppc64_elf_relocate_section): Likewise.
4084 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4085 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4086 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4087 * libbfd.h: Regenerate.
4088 * bfd-in2.h: Regenerate.
4090 2017-02-28 Alan Modra <amodra@gmail.com>
4092 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4093 dynamic .data.rel.ro read-only.
4094 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4095 rather than section flags when deciding where copy reloc goes.
4096 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4097 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4098 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4099 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4100 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4101 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4102 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4103 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4104 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4105 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4106 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4107 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4108 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4109 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4110 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4111 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4112 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4113 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4114 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4116 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4118 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4119 `jalr $0, $25' instruction encoding.
4121 2017-02-27 Nick Clifton <nickc@redhat.com>
4124 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4125 generating a seg-fault when encountering a symbol that has been
4126 deleted by garbage collection.
4128 2017-02-25 Alan Modra <amodra@gmail.com>
4130 * elf32-arc.c (struct dynamic_sections): Delete.
4131 (enum dyn_section_types): Delete.
4132 (dyn_section_names): Delete.
4133 (arc_create_dynamic_sections): Delete.
4134 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4135 segfault on discarded .rela.plt section.
4136 (elf_arc_size_dynamic_sections): Formatting. Don't call
4137 arc_create_dynamic_sections. Don't allocate memory for sections
4138 handled by the generic linker. Correct code finding relocs in
4139 read-only sections. Set SEC_EXCLUDE on zero size .got,
4140 .got.plt, and .dynbss sections. Do set .interp for pies.
4142 2017-02-24 Andrew Waterman <andrew@sifive.com>
4144 * elfnn-riscv.c (GP_NAME): New macro.
4145 (riscv_global_pointer_value): Use it.
4146 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4147 output section, consider only that section's alignment.
4149 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4151 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4152 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4153 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4154 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4156 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4158 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4159 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4162 2017-02-23 Alan Modra <amodra@gmail.com>
4165 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4167 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4168 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4171 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4174 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4175 processing ahead of the call to `elf_gc_sweep_symbol'.
4177 2017-02-22 Nick Clifton <nickc@redhat.com>
4180 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4181 created section 4-byte alignment.
4183 2017-02-22 Alan Modra <amodra@gmail.com>
4185 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4186 on .got or .plt output section being discarded by script.
4187 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4190 2017-02-21 Alan Modra <amodra@gmail.com>
4192 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4193 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4195 2017-02-20 Alan Modra <amodra@gmail.com>
4198 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4199 if DT_RELSZ/DT_RELASZ is zero.
4201 2017-02-17 Nick Clifton <nickc@redhat.com>
4203 * compress.c (bfd_get_full_section_contents): Remember to reduce
4204 compressed size by the sizeof the compression header when
4205 decompressing the contents.
4207 2017-02-17 Pedro Alves <palves@redhat.com>
4209 * srec.c (Chunk): Rename to ...
4210 (_bfd_srec_len): ... this.
4211 (S3Forced): Rename to ...
4212 (_bfd_srec_forceS3): ... this.
4213 * objcopy.c: Adjust all references.
4215 2017-02-17 Pedro Alves <palves@redhat.com>
4217 * archive.c (bsd_write_armap): Rename to ...
4218 (_bfd_bsd_write_armap): ... this.
4219 (coff_write_armap): Rename to ...
4220 (_bfd_coff_write_armap): ... this.
4221 * libbfd-in.h (bsd_write_armap): Rename to ...
4222 (_bfd_bsd_write_armap): ... this.
4223 (coff_write_armap): Rename to ...
4224 (_bfd_coff_write_armap): ... this.
4225 * aout-target.h, aout-tic30.c: Adjust all users.
4226 * libbfd.h: Regenerate.
4228 2017-02-17 Pedro Alves <palves@redhat.com>
4230 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4231 (warn_deprecated): Rename to ...
4232 (_bfd_warn_deprecated): ... this.
4233 * libbfd.c (warn_deprecated): Rename to ...
4234 (_bfd_warn_deprecated): ... this.
4235 * bfd-in2.h: Regenerate.
4237 2017-02-17 Pedro Alves <palves@redhat.com>
4239 * bfdio.c (real_ftell): Rename to ...
4240 (_bfd_real_ftell): ... this.
4241 (real_fseek): Rename to ...
4242 (_bfd_real_fseek): ... this.
4243 (real_fopen): Rename to ...
4244 (_bfd_real_fopen): ... this.
4245 * libbfd-in.h (real_ftell): Rename to ...
4246 (_bfd_real_ftell): ... this.
4247 (real_fseek): Rename to ...
4248 (_bfd_real_fseek): ... this.
4249 (real_fopen): Rename to ...
4250 (_bfd_real_fopen): ... this.
4251 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4252 * libbfd.h: Regenerate.
4254 2017-02-17 Pedro Alves <palves@redhat.com>
4256 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4257 * libbfd.c (read_unsigned_leb128): Rename to ...
4258 (_bfd_read_unsigned_leb128): ... this.
4259 (read_signed_leb128): Rename to ...
4260 (_bfd_read_signed_leb128): ... this.
4261 (safe_read_leb128): Rename to ...
4262 (_bfd_safe_read_leb128): ... this.
4263 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4264 (_bfd_read_unsigned_leb128): ... this.
4265 (read_signed_leb128): Rename to ...
4266 (_bfd_read_signed_leb128): ... this.
4267 (safe_read_leb128): Rename to ...
4268 (_bfd_safe_read_leb128): ... this.
4269 * libbfd.h: Renegerate.
4271 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4273 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4274 before trying to fine matching file and line information.
4276 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4278 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4279 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4280 not match current bfd, then reload debug information. Record bfd
4281 we're loading debug info for in the stash. If we have debug
4282 informatin in the cache then perform section placement before
4285 2017-02-16 Alan Modra <amodra@gmail.com>
4288 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4289 * elfxx-target.h (elf_backend_no_page_alias): Define.
4290 (elfNN_bed): Init new field.
4291 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4292 ensure PT_LOAD segment starts on a new page.
4293 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4295 2017-02-16 Alan Modra <amodra@gmail.com>
4298 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4301 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4303 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4304 * bfd-in2.h: Regenerated.
4306 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4309 * elf32-i386.c (elf_i386_relocate_section): Allow
4310 "lea foo@GOT, %reg" in PIC.
4312 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4315 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4316 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4317 error against local IFUNC symbol without a base register for
4320 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4322 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4323 `%P: %H:' with `info->callbacks->einfo'.
4324 (ppc_elf_relocate_section): Likewise.
4325 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4326 (ppc64_elf_edit_toc): Likewise.
4327 (ppc64_elf_relocate_section): Likewise.
4329 2017-02-14 Alan Modra <amodra@gmail.com>
4331 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4332 --gc-keep-exported, and test versioned field of sym rather than
4333 looking for @ in name.
4335 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4337 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4340 2017-02-13 Nick Clifton <nickc@redhat.com>
4343 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4346 2017-02-07 Andrew Waterman <andrew@sifive.com>
4348 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4349 entry size if PLT header is written.
4351 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4353 Fix sparc64 dynamic relocation processing to use the dynamic
4355 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4356 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4359 2017-02-03 Nick Clifton <nickc@redhat.com>
4362 * coffcode.h (coff_write_object_contents): Enlarge size of
4363 s_name_buf in order to avoid compile time warning about possible
4365 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4366 32-bits of insn value before printing into buffer.
4368 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4370 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4371 `max_local_dynindx'.
4372 (mips_elf_sort_hash_table): Handle it.
4373 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4374 symbols bump up `max_local_dynindx' rather than
4375 `max_non_got_dynindx'.
4377 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4379 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4380 `min_got_dynindx', `max_unref_got_dynindx' and
4381 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4382 (mips_elf_sort_hash_table): Adjust accordingly.
4384 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4386 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4387 to access the hash table.
4389 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4391 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4392 non-NULL `htab' to the beginning.
4394 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4396 * elflink.c (elf_gc_sweep): Wrap overlong line.
4398 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4400 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4401 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4402 * elfxx-mips.c (mips_elf_link_hash_table): Add
4403 `ignore_branch_isa' member.
4404 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4405 in branch relocation calculation as an error if
4406 `ignore_branch_isa' has been set.
4407 (_bfd_mips_elf_insn32): Rename to...
4408 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4409 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4410 Handle the new parameter.
4412 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4414 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4415 local variable dynobj.
4418 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4419 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4420 executable from read-only sections into sdynrelro.
4421 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4422 dynamic relocs in sdynrelro.
4423 (elf_backend_want_dynrelro): Define.
4425 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4427 * config.bfd (*-*-rtemsaout*): Mark as removed.
4429 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4431 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4432 (arm-*-rtems*): Move to (arm*-*-eabi*).
4433 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4434 (m68-*-rtems*): Move to (m68*-*-elf*).
4436 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4438 * config.bfd (*-*-rtemscoff*): Mark as removed.
4440 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4443 * elflink.c (bfd_elf_record_link_assignment): Revert last
4444 change and don't ever clear `forced_local'. Set `mark'
4446 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4448 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4449 (bfd_elf_size_dynamic_sections): ... here.
4450 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4451 and set `mark' instead in `__tls_get_addr_opt' processing.
4452 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4454 2017-01-24 Alan Modra <amodra@gmail.com>
4456 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4457 where dynamic relocs are preferable. Allow ifunc too.
4458 (ensure_undefweak_dynamic): New function.
4459 (allocate_dynrelocs): Use it here. Move plt handling last and
4460 don't make symbols dynamic, simplifying loop. Only make undef
4461 weak symbols with GOT entries dynamic. Correct condition
4462 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4463 comments. Remove goto.
4464 (ppc_elf_relocate_section): Correct test for using dynamic
4465 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4466 to suit. Set up explicit tls_index entries and implicit GOT
4467 tls_index entries resolvable at link time for
4468 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4469 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4470 (ensure_undefweak_dynamic): New function.
4471 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4472 with GOT entries dynamic. Remove unnecessary test of
4473 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4474 (ppc64_elf_relocate_section): Correct test for using dynamic
4475 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4476 to suit. Set up explicit tls_index entries and implicit GOT
4477 tls_index entries resolvable at link time for __tls_get_addr_opt.
4478 Simplify expression to clear mem for prelink.
4480 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4482 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4484 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4486 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4487 (elf_backend_hash_symbol): Define.
4489 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4492 * elflink.c (bfd_elf_record_link_assignment): Clear any
4493 `forced_local' marking for DSO symbols that are not being
4496 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4498 * elfnn-riscv.c (riscv_elf_object_p): New function.
4500 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4503 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4505 (elf_x86_64_check_relocs): Create .eh_frame section for the
4507 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4508 .eh_frame section for the .plt.bnd section.
4509 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4510 for the .plt.bnd section.
4512 2017-01-12 Nick Clifton <nickc@redhat.com>
4515 * opncls.c (find_separate_debug_file): Add include_dirs
4516 parameter. Only include the directory part of the bfd's filename
4517 in search paths if include_dirs is true. Add a couple of extra
4518 locations for looking for debug files.
4519 ( bfd_follow_gnu_debuglink): Update invocation of
4520 find_separate_debug_file.
4521 (bfd_follow_gnu_debugaltlink): Likewise.
4522 (get_build_id): New function: Finds the build-id of the given bfd.
4523 (get_build_id_name): New function: Computes the name of the
4524 separate debug info file for a bfd, based upon its build-id.
4525 (check_build_id_file): New function: Checks to see if a separate
4526 debug info file exists at the given location, and that its
4527 build-id matches that of the original bfd.
4528 (bfd_follow_build_id_debuglink): New function: Finds a separate
4529 debug info file for a given bfd by using the build-id method.
4530 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4531 method of locating a separate debug info file before using the
4533 * bfd-in2.h: Regenerate.
4535 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4538 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4539 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4540 elf_x86_64_eh_frame_plt_got.
4541 (elf_x86_64_size_dynamic_sections): Get unwind info from
4542 elf_x86_64_bnd_arch_bed for the BND PLT.
4544 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4546 * config.bfd: Add entries for i686-redox and x86_64-redox.
4548 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4550 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4552 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4553 .eh_frame section to 4 bytes for x32.
4554 (elf_x86_64_check_relocs): Likewise.
4556 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4559 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4560 (PLT_GOT_FDE_LENGTH): Likewise.
4561 (elf_i386_plt_layout): Add eh_frame_plt_got and
4562 eh_frame_plt_got_size.
4563 (elf_i386_plt): Updated.
4564 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4565 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4566 (elf_i386_size_dynamic_sections): Allocate and initialize
4567 .eh_frame section for .plt.got.
4568 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4570 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4571 eh_frame_plt_got_size.
4572 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4573 (PLT_GOT_FDE_LENGTH): Likewise.
4574 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4575 eh_frame_plt_got_size.
4576 (elf_x86_64_arch_bed): Updated.
4577 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4578 eh_frame_plt_got_size.
4579 (elf_x86_64_nacl_arch_bed): Likewise.
4580 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4581 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4582 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4583 .eh_frame section for .plt.got.
4584 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4587 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4589 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4590 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4592 2017-01-09 Nick Clifton <nickc@redhat.com>
4594 * dwarf2.c (lookup_address_in_function_table): Return early if
4595 there are no functions in the given comp unit, or if the high
4596 address of the last function in the comp unit is less than the
4599 2017-01-09 Nick Clifton <nickc@redhat.com>
4602 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4603 message if there are too many symbols to load.
4605 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4607 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4608 if relocs are cached.
4610 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4613 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4614 for R_MICROBLAZE_GOTOFF_64.
4616 2017-01-03 Nick Clifton <nickc@redhat.com>
4618 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4619 warning about using a possibly uninitialised variable.
4621 2017-01-02 Alan Modra <amodra@gmail.com>
4623 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4624 (allocate_plt_static, allocate_dynrelocs): Use it.
4626 2017-01-02 Alan Modra <amodra@gmail.com>
4628 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4629 .PARISC.unwind section.
4631 2017-01-02 Alan Modra <amodra@gmail.com>
4634 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4635 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4636 indirect to GOT pointer relative code edit.
4638 2017-01-02 Alan Modra <amodra@gmail.com>
4640 Update year range in copyright notice of all files.
4642 For older changes see ChangeLog-2016
4644 Copyright (C) 2017 Free Software Foundation, Inc.
4646 Copying and distribution of this file, with or without modification,
4647 are permitted in any medium without royalty provided the copyright
4648 notice and this notice are preserved.
4654 version-control: never