1 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
4 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
5 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
7 (allocate_dynrelocs): Discard dynamic relocations if
8 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
10 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
13 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
14 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
15 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
16 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
17 (elf_m68k_relocate_section): Don't generate dynamic relocation
18 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
20 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
23 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
24 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
25 (allocate_dynrelocs): Discard dynamic relocations if
26 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
27 (elf32_hppa_relocate_section): Don't generate dynamic
28 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
30 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
33 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
34 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
35 (allocate_fptr): Don't allocate function pointer if
36 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
37 (allocate_dynrel_entries): Don't allocate dynamic relocation
38 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
39 (set_got_entry): Don't set GOT entry if
40 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
41 (set_pltoff_entry): Don't set PLTOFF entry if
42 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
43 (elfNN_ia64_relocate_section): Don't install dynamic relocation
44 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
46 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
49 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
50 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
51 (allocate_dynrelocs): Don't allocate dynamic relocations if
52 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
54 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
57 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
58 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
59 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
60 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
62 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
65 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
66 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
67 (tilepro_elf_relocate_section): Don't generate dynamic
68 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
69 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
70 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
71 (tilegx_elf_relocate_section): Don't generate dynamic
72 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
74 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
77 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
78 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
80 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
81 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
83 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
85 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
86 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
87 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
89 2017-10-12 James Bowman <james.bowman@ftdichip.com>
91 * bfd-in2.h: Regenerate.
92 * libbfd.h: Regenerate.
93 * elf32-ft32.c: Add HOWTO R_FT32_15.
94 * reloc.c: Add BFD_RELOC_FT32_15.
96 2017-10-12 Nick Clifton <nickc@redhat.com>
98 * reloc.c (enum bfd_reloc_status): Start values at 2.
99 * bfd-in2.h: Regenerate.
100 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
101 that a TRUE return indicates success. Compare the result of
102 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
103 (build_one_stub): Change sense of tests against aarch64_relocate
105 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
106 than FALSE, when an error is detected.
107 (elfNN_aarch64_final_link_relocate): Likewise.
109 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
111 * elf32-i386.c (elf_backend_hide_symbol): New.
112 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
113 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
114 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
116 2017-10-12 Alan Modra <amodra@gmail.com>
118 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
119 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
120 (bfd_elf_define_start_stop): Likewise.
122 2017-10-12 Alan Modra <amodra@gmail.com>
124 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
125 when executable rather than non-PIC.
126 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
127 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
129 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
131 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
133 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
134 (elf_external_linux_prpsinfo64_ugid32): ... this.
135 (swap_linux_prpsinfo32_out): Rename to...
136 (swap_linux_prpsinfo32_ugid32_out): ... this.
137 (elf_external_linux_prpsinfo64_ugid16): New structure.
138 (swap_linux_prpsinfo64_ugid16_out): New function.
139 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
140 (elf_backend_linux_prpsinfo64_ugid16): Define.
141 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
142 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
143 of the 64-bit Linux core PRPSINFO note.
144 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
146 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
148 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
150 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
151 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
152 (elf_external_ppc_linux_prpsinfo32)
153 (swap_ppc_linux_prpsinfo32_out): Move to...
154 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
155 (swap_linux_prpsinfo32_ugid32_out): ... these.
156 (elf_external_linux_prpsinfo32): Rename to...
157 (elf_external_linux_prpsinfo32_ugid16): ... this.
158 (swap_linux_prpsinfo32_out): Rename to...
159 (swap_linux_prpsinfo32_ugid16_out): ... this.
160 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
161 (elf_backend_linux_prpsinfo32_ugid16): Define.
162 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
163 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
164 of the 32-bit Linux core PRPSINFO note.
165 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
166 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
167 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
168 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
169 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
170 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
171 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
172 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
173 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
174 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
176 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
178 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
179 `gap' member ahead of `pr_flag'.
181 2017-10-11 Pedro Alves <palves@redhat.com>
183 * bfd.c (_doprnt): Rename to ...
184 (_bfd_doprnt): ... this.
185 (error_handler_internal): Adjust.
187 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
189 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
190 instead of incrementing it.
191 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
193 2017-10-10 Renlin Li <renlin.li@arm.com>
196 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
197 symbols into dynamic.
199 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
202 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
203 (riscv_elf_link_hash_table_create): Initialize max_alignment to
205 (_bfd_riscv_relax_section): Cache the max alignment of output
206 sections if possible.
208 2017-10-10 Alan Modra <amodra@gmail.com>
210 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
211 .opd whenever .opd is present and non-zero size. Move code
212 setting abiversion to/from output file earlier. Only set
213 u.opd.func_sec when --gc-sections. Read relocs and set up
214 u.opd.func_sec values here..
215 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
217 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
219 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
221 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
224 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
226 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
227 .interp section with "ld --no-dynamic-linker".
229 2017-10-09 Alan Modra <amodra@gmail.com>
232 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
233 funcinfo_hash_table and varinfo_hash_table.
235 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
237 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
238 in read-only section with minfo.
239 (sh_elf_size_dynamic_sections): Likewise.
241 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
243 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
246 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
248 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
249 this_hdr.sh_entsize only if section size > 0.
251 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
253 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
255 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
257 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
258 in read-only section with minfo.
259 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
261 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
263 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
266 2017-10-06 John Baldwin <jhb@FreeBSD.org>
268 * elf-bfd.h (struct elf_backend_data): Add
269 `elf_backend_grok_freebsd_prstatus'.
270 * elf.c (elfcore_grok_freebsd_note): Call
271 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
273 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
275 (elf_backend_grok_freebsd_prstatus): Define.
276 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
277 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
279 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
281 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
282 and has_non_got_reloc with zero_undefweak.
283 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
284 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
286 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
287 has_non_got_reloc with zero_undefweak.
288 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
289 has_got_reloc and has_non_got_reloc with zero_undefweak.
290 (elf_x86_link_hash_entry): Likewise.
292 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
294 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
295 (VERIFY_COPY_RELOC): Likewise.
297 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
299 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
300 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
301 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
303 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
305 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
306 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
307 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
309 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
311 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
312 * elf32-i386.c (elf_i386_relocate_section): Use it.
313 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
315 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
317 * elf32-i386.c (X86_SIZE_TYPE_P): New.
318 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
319 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
320 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
321 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
323 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
325 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
326 (PLT_LOCAL_IFUNC_P): Likewise.
327 * elf32-i386.c (elf_i386_relocate_section): Use them.
328 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
330 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
332 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
333 * elf32-i386.c (elf_i386_relocate_section): Use it.
334 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
336 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
338 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
339 * elf32-i386.c (elf_i386_relocate_section): Use it.
340 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
342 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
344 * elf32-i386.c (X86_PCREL_TYPE_P): New.
345 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
346 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
347 (X86_PCREL_TYPE_P): This.
348 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
349 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
350 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
352 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
354 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
356 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
357 * elf32-i386.c (elf_i386_tls_transition): Use it.
358 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
360 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
362 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
363 Dump dynamic relocation in read-only section with minfo if
365 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
366 (maybe_set_textrel): Likewise.
367 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
368 read-only section with minfo.
370 2017-10-05 John Baldwin <jhb@FreeBSD.org>
372 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
374 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
376 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
377 in read-only section with minfo.
378 (tilepro_elf_size_dynamic_sections): Likewise.
379 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
380 (tilegx_elf_size_dynamic_sections): Likewise.
382 2017-10-05 Pedro Alves <palves@redhat.com>
385 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
386 ellipsis parameter. Split out bfd_error_on_input code to..
387 (bfd_set_input_error): .. New function.
388 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
389 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
390 * bfd-in2.h: Regenerate.
392 2017-10-05 Alan Modra <amodra@gmail.com>
394 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
395 fini_array error value.
397 2017-10-05 Alan Modra <amodra@gmail.com>
400 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
402 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
404 (elf_fake_sections): Adjust calls. Exit immediately on failure.
405 (bfd_elf_set_group_contents): Add associated reloc section indices
408 2017-10-04 Alan Modra <amodra@gmail.com>
410 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
411 classify symbols for ELFv2.
413 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
416 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
417 undergoes default promotion.
418 * bfd-in2.h: Regenerate.
420 2017-10-02 Alan Modra <amodra@gmail.com>
422 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
423 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
425 2017-10-01 Alan Modra <amodra@gmail.com>
428 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
429 (add_line_info): Always put end_sequence last.
431 2017-10-01 Alan Modra <amodra@gmail.com>
434 * dwarf2.c (read_section): Allocate buffer with extra byte for
435 bfd_simple_get_relocated_section_contents rather than copying
438 2017-09-29 Alan Modra <amodra@gmail.com>
440 * merge.c (merge_strings): Return FALSE on malloc failure.
441 (_bfd_merge_sections): Return failures from record_section and
444 2017-09-28 Alan Modra <amodra@gmail.com>
447 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
448 a case where plugin_notice isn't called.
450 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
452 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
455 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
458 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
459 output_bfd to info->callbacks->minfo.
461 2017-09-26 Nick Clifton <nickc@redhat.com>
464 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
465 assertion failure if elf_x86_64_rtype_to_howto has already issued
468 2017-09-26 Alan Modra <amodra@gmail.com>
471 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
474 2017-09-26 Nick Clifton <nickc@redhat.com>
477 * dwarf2.c (read_formatted_entries): Fail early if we know that
478 the loop parsing data entries will overflow the end of the
481 2017-09-26 Alan Modra <amodra@gmail.com>
484 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
485 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
486 to stash->info_ptr_memory, and check die_ref is within that memory.
487 Set info_ptr_end correctly when another CU is refd. Check die_ref
488 for DW_FORM_ref4 etc. is within CU.
490 2017-09-26 Alan Modra <amodra@gmail.com>
493 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
494 (read_formatted_entries): Init "fe".
495 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
497 2017-09-26 Alan Modra <amodra@gmail.com>
500 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
501 bounds in inner loop.
503 2017-09-25 Alan Modra <amodra@gmail.com>
506 * dwarf1.c (parse_die): Sanity check pointer against section limit
507 before dereferencing.
508 (parse_line_table): Likewise.
510 2017-09-25 Alan Modra <amodra@gmail.com>
513 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
515 (parse_comp_unit): Likewise.
517 2017-09-25 Alan Modra <amodra@gmail.com>
520 * dwarf2.c (read_formatted_entries): Error on format_count zero.
522 2017-09-24 Alan Modra <amodra@gmail.com>
525 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
526 within section bounds.
528 2017-09-24 Alan Modra <amodra@gmail.com>
531 * dwarf2.c (decode_line_info): Properly free line sequences on error.
533 2017-09-24 Alan Modra <amodra@gmail.com>
536 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
537 pname param. Return status. Make name const. Don't abort,
538 return an error. Formatting. Exit if current info_ptr matches
539 orig_info_ptr. Update callers.
540 (scan_unit_for_symbols): Start at nesting_level of zero. Make
541 nested_funcs an array of structs for extensibility. Formatting.
543 2017-09-24 Alan Modra <amodra@gmail.com>
546 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
547 rather than dividing by zero.
549 2017-09-24 Alan Modra <amodra@gmail.com>
552 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
554 2017-09-24 Alan Modra <amodra@gmail.com>
557 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
559 2017-09-24 Alan Modra <amodra@gmail.com>
562 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
563 SHT_GNU_verneed section for sanity. Don't zalloc memory for
566 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
569 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
572 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
575 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
576 -1 if bfd_canonicalize_dynamic_reloc returns 0.
578 2017-09-22 Pedro Alves <palves@redhat.com>
579 Alan Modra <amodra@gmail.com>
581 * version.h: Add comment.
583 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
585 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
586 NT_S390_GS_BC, correct the previously swapped invocations of
587 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
589 2017-09-19 Alan Modra <amodra@gmail.com>
592 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
595 2017-09-19 Alan Modra <amodra@gmail.com>
598 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
599 symbols before calculating verrefs. Don't renumber dynsyms
600 after gc. Exclude .gnu.version when zero or one dynsym.
601 Localize some vars and reindent.
603 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
606 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
607 return from bfd_canonicalize_dynamic_reloc.
609 2017-09-15 Alan Modra <amodra@gmail.com>
612 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
613 overflows bfd_size_type.
615 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
618 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
619 to indicate if conversion is performed.
620 (elf_i386_check_relocs): Cache section contents and relocations
621 if conversion is performed.
622 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
623 contents and relocations if conversion is performed.
625 2017-09-14 Nick Clifton <nickc@redhat.com>
628 * peXXigen.c (pe_print_idata): Extend check for HintName vector
631 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
633 * elfxx-x86.h: Fix a typo in comments.
635 2017-09-09 Kamil Rytarowski <n54@gmx.com>
637 * elf32-nds32.c: Rename __BIT() to N32_BIT().
639 2017-09-09 Alan Modra <amodra@gmail.com>
641 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
644 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
646 * elf32-i386.c (elf_i386_relocate_section): Update usage of
647 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
648 (elf_i386_finish_dynamic_symbol): Likewise.
649 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
650 (elf_x86_64_finish_dynamic_symbol): Likewise.
651 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
652 (_bfd_x86_elf_fixup_symbol): Likewise.
654 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
656 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
657 check has_non_got_reloc.
659 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
662 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
663 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
664 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
665 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
666 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
667 and linker_def on __ehdr_start if it is referenced and not
669 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
670 and return TRUE when building executable, if a symbol has
671 non-GOT/non-PLT relocations in text section or there is no
673 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
675 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
677 * elfxx-x86.h: Update comments.
679 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
681 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
682 elf_x86_plt_layout_table with elf_x86_init_table.
683 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
685 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
687 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
688 (elf_x86_init_table): This.
689 (_bfd_x86_elf_link_setup_gnu_properties): Replace
690 elf_x86_plt_layout_table with elf_x86_init_table.
692 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
694 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
695 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
696 * configure: Regenerated.
697 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
698 and r_sym fields of plt_layout.
699 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
701 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
702 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
703 r_info nor r_sym fields.
704 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
706 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
708 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
710 * (_bfd_riscv_relax_align): Call bfd_set_error and
711 print an error message when unable to relax a .align directive.
713 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
715 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
716 (riscv_record_pcrel_hi_reloc): Add absolute argument.
717 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
718 R_RISCV_PCREL_HI20 relocs, and pass the result to
719 riscv_record_pcrel_hi_reloc.
721 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
723 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
724 r_type_p. Remove the converted argument. Replace
725 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
726 the new relocation type via r_type_p.
727 (elf_i386_relocate_section): Likewise.
728 (elf_i386_finish_dynamic_symbol): Likewise.
729 (need_convert_load): Removed.
730 (check_relocs_failed): Updated.
731 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
732 instead of setting need_convert_load.
733 (_bfd_i386_elf_convert_load): Removed.
734 * elf64-x86-64.c (need_convert_load): Removed.
735 (check_relocs_failed): Updated.
736 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
737 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
738 Return the new relocation type via r_type_p.
739 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
740 instead of setting need_convert_load.
741 (elf_x86_64_check_relocs): Don't check PIC if relocation has
743 (_bfd_x86_64_elf_convert_load): Removed.
744 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
745 with SYMBOL_REFERENCES_LOCAL_P.
746 (elf_x86_64_finish_dynamic_symbol): Likewise.
747 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
749 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
750 (_bfd_x86_elf_link_symbol_references_local): New function.
751 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
752 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
753 SYMBOL_REFERENCES_LOCAL_P.
754 (elf_x86_link_hash_entry): Add local_ref.
755 (elf_x86_link_hash_table): Remove convert_load.
756 (_bfd_i386_elf_convert_load): Removed.
757 (_bfd_x86_64_elf_convert_load): Likewise.
758 (_bfd_x86_elf_link_symbol_references_local): New.
760 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
762 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
763 (elf_x86_64_info_to_howto): Get the real relocation type by
764 masking out R_X86_64_converted_reloc_bit.
765 (elf_x86_64_check_tls_transition): Get the real relocation type
766 by masking out R_X86_64_converted_reloc_bit.
767 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
768 instead of setting converted_reloc.
769 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
770 instead of converted_reloc. Get the real relocation type by
771 masking out R_X86_64_converted_reloc_bit.
772 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
773 R_X86_64_converted_reloc_bit is valid.
774 * elfxx-x86.h (converted_reloc): Removed.
776 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
778 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
779 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
780 to get the relocation type again.
781 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
782 r_type when calling elf_x86_64_tls_transition. Don't use
783 ELF32_R_TYPE to get the relocation type again.
785 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
787 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
790 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
792 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
793 argument. Don't check relocation overflow. Avoid relocation
794 overflow if --no-relax is used. Set converted_reloc on symbol
795 if a GOTPCREL relocation is converted.
796 (elf_x86_64_relocate_section): Issue a fatal error and suggest
797 --no-relax if GOTPCREL relocation conversion leads to relocation
799 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
801 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
802 Edmar Wienskoski <edmar.wienskoski@nxp.com
804 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
805 (ppc_elf_check_relocs): Handle it.
806 (ppc_elf_vle_split20): New function.
807 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
809 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
812 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
813 for x86-64 if GOT_TLS_GDESC_P is true.
815 2017-09-03 Alan Modra <amodra@gmail.com>
818 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
820 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
822 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
823 tls_get_addr for x86-64 in one place.
825 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
827 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
828 with elfxx-x86.lo for 64-bit BFD.
829 * configure: Regenerated.
831 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
833 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
834 (_bfd_i386_elf_convert_load): This. Remove static.
835 (elf_i386_size_dynamic_sections): Removed.
836 (elf_backend_size_dynamic_sections): Likewise.
837 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
838 (_bfd_x86_64_elf_convert_load): This. Remove static.
839 (elf_x86_64_size_dynamic_sections): Removed.
840 (elf_backend_size_dynamic_sections): Likewise.
841 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
842 (elf_x86_allocate_dynrelocs): This. Make it static.
843 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
844 (elf_x86_allocate_local_dynreloc): This. Make it static.
845 (elf_i386_is_reloc_section): New function.
846 (elf_x86_64_is_reloc_section): Likewise.
847 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
848 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
849 Rearrange got_entry_size initialization.
850 (_bfd_x86_elf_size_dynamic_sections): New function.
851 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
852 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
853 (_bfd_i386_elf_convert_load): New.
854 (_bfd_x86_64_elf_convert_load): Likewise.
855 (_bfd_x86_elf_size_dynamic_sections): Likewise.
856 (elf_backend_size_dynamic_sections): Likewise.
857 (_bfd_x86_elf_allocate_dynrelocs): Removed.
858 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
860 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
862 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
865 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
867 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
868 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
870 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
872 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
873 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
874 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
875 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
876 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
877 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
879 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
881 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
882 (elf_i386_allocate_local_dynrelocs): Likewise.
883 (elf_i386_size_dynamic_sections): Replace
884 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
885 with _bfd_x86_elf_allocate_dynrelocs and
886 _bfd_x86_elf_allocate_local_dynrelocs.
887 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
888 (elf_x86_64_allocate_local_dynrelocs): Likewise.
889 (elf_x86_64_size_dynamic_sections): Replace
890 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
891 with _bfd_x86_elf_allocate_dynrelocs and
892 _bfd_x86_elf_allocate_local_dynrelocs.
893 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
894 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
895 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
896 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
898 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
900 * elf32-i386.c (is_i386_elf): Removed.
901 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
902 (elf_i386_size_dynamic_sections): Likewise.
903 (elf_i386_relocate_section): Likewise.
904 * elf64-x86-64.c (is_x86_64_elf): Removed.
905 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
907 (elf_x86_64_size_dynamic_sections): Likewise.
908 (elf_x86_64_relocate_section): Likewise.
909 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
911 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
914 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
916 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
917 (elf_i386_allocate_dynrelocs): Replace
918 elf_i386_compute_jump_table_size with
919 elf_x86_compute_jump_table_size.
920 (elf_i386_size_dynamic_sections): Likewise.
921 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
922 (elf_x86_64_allocate_dynrelocs): Replace
923 elf_x86_64_compute_jump_table_size with
924 elf_x86_compute_jump_table_size.
925 (elf_x86_64_size_dynamic_sections): Likewise.
926 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
928 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
929 (elf_x86_compute_jump_table_size): New.
931 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
933 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
935 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
936 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
938 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
940 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
941 with htab->is_vxworks.
942 (elf_i386_size_dynamic_sections): Likewise.
943 (elf_i386_relocate_section): Likewise.
944 (elf_i386_finish_dynamic_symbol): Likewise.
945 (elf_i386_finish_dynamic_sections): Likewise.
947 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
949 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
950 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
951 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
952 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
953 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
954 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
955 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
956 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
958 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
961 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
962 ELF_COMMON_DEF_P for common symbols.
964 2017-09-02 Alan Modra <amodra@gmail.com>
966 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
967 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
968 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
970 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
972 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
973 (elf_backend_gc_mark_hook): Likewise.
974 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
975 (elf_backend_gc_mark_hook): Likewise.
976 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
977 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
978 (elf_backend_gc_mark_hook): Likewise.
980 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
982 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
983 (elf_backend_adjust_dynamic_symbol): Likewise.
984 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
985 (elf_backend_adjust_dynamic_symbol): Likewise.
986 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
987 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
988 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
989 (_bfd_x86_elf_adjust_dynamic_symbol): New.
990 (elf_backend_adjust_dynamic_symbol): Likewise.
992 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
994 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
997 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
999 * elf32-i386.c (elf_i386_mkobject): Removed.
1000 (bfd_elf32_mkobject): Likewise.
1001 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1002 (bfd_elf64_mkobject): Likewise.
1003 (bfd_elf32_mkobject): Likewise.
1004 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1005 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1006 (bfd_elf64_mkobject): Likewise.
1007 (bfd_elf32_mkobject): Likewise.
1009 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1011 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1012 Call _bfd_x86_elf_link_setup_gnu_properties.
1013 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1014 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1016 (elf_x86_64_non_lazy_plt): Likewise.
1017 (elf_x86_64_lazy_bnd_plt): Likewise.
1018 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1019 (elf_x86_64_lazy_ibt_plt): Likewise.
1020 (elf_x32_lazy_ibt_plt): Likewise.
1021 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1022 (elf_x32_non_lazy_ibt_plt): Likewise.
1023 (elf_x86_64_nacl_plt): Likewise.
1024 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1025 _bfd_x86_elf_link_setup_gnu_properties.
1026 * elfxx-x86.c: Include elf-vxworks.h".
1027 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1028 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1029 comments for pic_plt0_entry and pic_plt_entry.
1030 (elf_x86_non_lazy_plt_layout): Likewise.
1031 (elf_x86_plt_layout_table): New.
1032 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1034 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1037 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1038 .eh_frame section for the second PLT.
1039 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1040 alignment of .eh_frame section for the second PLT.
1042 2017-09-01 Nick Clifton <nickc@redhat.com>
1045 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1048 2017-09-01 Nick Clifton <nickc@redhat.com>
1051 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1052 attribute buffer is NUL terminated.
1054 2017-08-31 Nick Clifton <nickc@redhat.com>
1057 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1058 to dwarf string sections.
1060 2017-08-31 Alan Modra <amodra@gmail.com>
1062 * po/SRC-POTFILES.in: Regenerate.
1064 2017-08-31 Alan Modra <amodra@gmail.com>
1066 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1067 for a section containing just a terminator. Allow multiple
1068 terminators at end of section.
1069 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1070 sections when not adding alignment. Assert on terminator in
1073 2017-08-31 Alan Modra <amodra@gmail.com>
1077 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1080 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1082 * configure.ac (bfd_backends): Add elf64.lo together with
1083 elfxx-x86.lo for 64-bit BFD.
1084 * configure: Regenerated.
1086 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1088 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1091 2017-08-31 Alan Modra <amodra@gmail.com>
1094 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1095 before _close_and_cleanup. Call iovec->bclose after.
1096 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1098 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1100 * elf32-i386.c (elf_i386_plt_type): Removed.
1101 (elf_i386_plt): Likewise.
1102 (elf_i386_get_synthetic_symtab): Updated. Call
1103 _bfd_x86_elf_get_synthetic_symtab.
1104 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1105 (elf_x86_64_plt): Likewise.
1106 (elf_x86_64_get_synthetic_symtab): Updated. Call
1107 _bfd_x86_elf_get_synthetic_symtab.
1108 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1109 (elf_x86_64_get_plt_got_vma): Likewise.
1110 (elf_i386_valid_plt_reloc_p): Likewise.
1111 (elf_x86_64_valid_plt_reloc_p): Likewise.
1112 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1113 * elfxx-x86.h (elf_x86_plt_type): New.
1114 (elf_x86_plt): Likewise.
1115 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1117 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1119 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1120 target_id instead of elf_machine_code.
1122 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1124 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1125 (elf_i386_lazy_plt_layout): Likewise.
1126 (elf_i386_non_lazy_plt_layout): Likewise.
1127 (elf_i386_plt_layout): Likewise.
1128 (elf_i386_link_hash_table): Likewise.
1129 (elf_i386_next_tls_desc_index): Likewise.
1130 (elf_i386_srelplt2): Likewise.
1131 (elf_i386_plt): Likewise.
1132 (elf_i386_lazy_plt): Likewise.
1133 (elf_i386_non_lazy_plt): Likewise.
1134 (elf_i386_link_hash_table_create): Likewise.
1135 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1136 (elf_i386_lazy_plt): Updated.
1137 (elf_i386_non_lazy_plt): Likewise.
1138 (elf_i386_lazy_ibt_plt): Likewise.
1139 (elf_i386_non_lazy_ibt_plt): Likewise.
1140 (elf_i386_allocate_dynrelocs): Likewise.
1141 (elf_i386_size_dynamic_sections): Likewise.
1142 (elf_i386_relocate_section): Likewise.
1143 (elf_i386_finish_dynamic_symbol): Likewise.
1144 (elf_i386_finish_dynamic_sections): Likewise.
1145 (elf_i386_get_synthetic_symtab): Likewise.
1146 (elf_i386_link_setup_gnu_properties): Likewise.
1147 (elf_i386_nacl_plt): Likewise.
1148 * elf64-x86-64.c (ABI_64_P): Removed.
1149 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1150 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1151 (elf_x86_64_lazy_plt_layout): Likewise.
1152 (elf_x86_64_non_lazy_plt_layout): Likewise.
1153 (elf_x86_64_plt_layout): Likewise.
1154 (elf_x86_64_link_hash_table): Likewise.
1155 (elf_x86_64_plt): Likewise.
1156 (elf_x86_64_lazy_plt): Likewise.
1157 (elf_x86_64_non_lazy_plt): Likewise.
1158 (elf_x86_64_link_hash_table_create): Likewise.
1159 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1160 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1161 (elf_x86_64_lazy_plt): Updated.
1162 (elf_x86_64_non_lazy_plt): Likewise.
1163 (elf_x86_64_lazy_bnd_plt): Likewise.
1164 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1165 (elf_x86_64_lazy_ibt_plt): Likewise.
1166 (elf_x32_lazy_ibt_plt): Likewise.
1167 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1168 (elf_x32_non_lazy_ibt_plt): Likewise.
1169 (elf_x86_64_allocate_dynrelocs): Likewise.
1170 (elf_x86_64_size_dynamic_sections): Likewise.
1171 (elf_x86_64_relocate_section): Likewise.
1172 (elf_x86_64_finish_dynamic_symbol): Likewise.
1173 (elf_x86_64_finish_dynamic_sections): Likewise.
1174 (elf_x86_64_get_synthetic_symtab): Likewise.
1175 (elf_x86_64_link_setup_gnu_properties): Likewise.
1176 (elf_x86_64_nacl_plt): Likewise.
1177 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1179 (ELF32_DYNAMIC_INTERPRETER): New.
1180 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1181 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1182 (_bfd_x86_elf_link_hash_table_create): Likewise.
1183 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1184 (elf_x86_link_hash_table_free): This. Make it static.
1185 * elfxx-x86.h: Don't include "objalloc.h".
1187 (elf_x86_lazy_plt_layout): Likewise.
1188 (elf_x86_non_lazy_plt_layout): Likewise.
1189 (elf_x86_plt_layout): Likewise.
1190 (_bfd_x86_elf_link_hash_table_create): Likewise.
1191 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1192 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1193 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1194 srelplt2 and next_tls_desc_index.
1195 (_bfd_x86_elf_link_hash_table_free): Removed.
1197 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1199 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1200 branch offset interpretation.
1202 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1205 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1207 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1209 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1210 (elf_x86_64_srelplt2): Likewise.
1212 2017-08-30 Alan Modra <amodra@gmail.com>
1214 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1215 (ppc64_elf_tls_optimize): Set it.
1216 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1217 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1218 addis would add zero.
1219 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1220 (ppc_elf_tls_optimize): Set it.
1221 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1222 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1224 2017-08-30 Alan Modra <amodra@gmail.com>
1226 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1227 __tls_get_addr call sequences to LE, don't move the addi down
1228 to the nop. Replace the bl with addi and leave the nop alone.
1230 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1232 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1234 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1236 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1238 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1240 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1241 (BFD64_BACKENDS): Likewise.
1242 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1243 (BFD64_BACKENDS_CFILES): Likewise.
1244 * Makefile.in: Regenerated.
1245 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1246 elf32-i386.lo and elf64-x86-64.lo.
1247 * configure: Regenerated.
1248 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1249 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1250 "objalloc.h" and "hashtab.h".
1251 (ELIMINATE_COPY_RELOCS): Removed.
1252 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1253 (SYMBOL_NO_COPYRELOC): Likewise.
1254 (elf_i386_link_hash_entry): Likewise.
1255 (GOT_UNKNOWN): Likewise.
1256 (GOT_NORMAL): Likewise.
1257 (GOT_TLS_GD): Likewise.
1258 (elf_i386_hash_entry): Likewise.
1259 (elf_i386_obj_tdata): Likewise.
1260 (elf_i386_tdata): Likewise.
1261 (elf_i386_local_got_tls_type): Likewise.
1262 (elf_i386_local_tlsdesc_gotent): Likewise.
1263 (elf_i386_hash_table): Likewise.
1264 (elf_i386_link_hash_newfunc): Likewise.
1265 (elf_i386_local_htab_hash): Likewise.
1266 (elf_i386_local_htab_eq): Likewise.
1267 (elf_i386_get_local_sym_hash): Likewise.
1268 (elf_i386_link_hash_table_free): Likewise.
1269 (elf_i386_copy_indirect_symbol): Likewise.
1270 (elf_i386_fixup_symbol): Likewise.
1271 (elf_i386_readonly_dynrelocs): Likewise.
1272 (elf_i386_always_size_sections): Likewise.
1273 (elf_i386_set_tls_module_base): Likewise.
1274 (elf_i386_dtpoff_base): Likewise.
1275 (compare_relocs): Likewise.
1276 (elf_i386_hash_symbol): Likewise.
1277 (elf_i386_parse_gnu_properties): Likewise.
1278 (elf_i386_merge_gnu_properties): Likewise.
1279 (elf_i386_link_check_relocs): Likewise.
1280 (elf_i386_merge_symbol_attribute): Likewise.
1281 (bfd_elf32_bfd_link_check_relocs): Likewise.
1282 (elf_backend_copy_indirect_symbol): Likewise.
1283 (elf_backend_always_size_sections): Likewise.
1284 (elf_backend_omit_section_dynsym): Likewise.
1285 (elf_backend_hash_symbol): Likewise.
1286 (elf_backend_fixup_symbol): Likewise.
1287 (elf_backend_parse_gnu_properties): Likewise.
1288 (elf_backend_merge_gnu_properties): Likewise.
1289 (elf_backend_merge_symbol_attribute): Likewise.
1290 (elf_i386_mkobject): Updated.
1291 (elf_i386_link_hash_table_create): Likewise.
1292 (elf_i386_check_tls_transition): Likewise.
1293 (elf_i386_tls_transition): Likewise.
1294 (elf_i386_convert_load_reloc): Likewise.
1295 (elf_i386_check_relocs): Likewise.
1296 (elf_i386_adjust_dynamic_symbol): Likewise.
1297 (elf_i386_allocate_dynrelocs): Likewise.
1298 (elf_i386_convert_load): Likewise.
1299 (elf_i386_size_dynamic_sections): Likewise.
1300 (elf_i386_relocate_section): Likewise.
1301 (elf_i386_finish_dynamic_symbol ): Likewise.
1302 (elf_i386_finish_dynamic_sections): Likewise.
1303 (elf_i386_output_arch_local_syms): Likewise.
1304 (elf_i386_get_synthetic_symtab): Likewise.
1305 (elf_i386_link_setup_gnu_properties): Likewise.
1306 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1307 of elf_link_hash_table, as base.
1308 (elf_i386_next_tls_desc_index): New.
1309 (elf_i386_srelplt2): Likewise.
1310 (elf_i386_plt): Likewise.
1311 (elf_i386_lazy_plt): Likewise.
1312 (elf_i386_non_lazy_plt): Likewise.
1313 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1314 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1315 "objalloc.h" and "hashtab.h".
1316 (ELIMINATE_COPY_RELOCS): Removed.
1317 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1318 (SYMBOL_NO_COPYRELOC): Likewise.
1319 (elf_x86_64_link_hash_entry): Likewise.
1320 (GOT_UNKNOWN): Likewise.
1321 (GOT_NORMAL): Likewise.
1322 (GOT_TLS_GD): Likewise.
1323 (elf_x86_64_hash_entry): Likewise.
1324 (elf_x86_64_obj_tdata): Likewise.
1325 (elf_x86_64_tdata): Likewise.
1326 (elf_x86_64_local_got_tls_type): Likewise.
1327 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1328 (elf_x86_64_hash_table): Likewise.
1329 (elf_x86_64_link_hash_newfunc): Likewise.
1330 (elf_x86_64_local_htab_hash): Likewise.
1331 (elf_x86_64_local_htab_eq): Likewise.
1332 (elf_x86_64_get_local_sym_hash): Likewise.
1333 (elf_x86_64_link_hash_table_free): Likewise.
1334 (elf_x86_64_copy_indirect_symbol): Likewise.
1335 (elf_x86_64_fixup_symbol): Likewise.
1336 (elf_x86_64_readonly_dynrelocs): Likewise.
1337 (elf_x86_64_always_size_sections): Likewise.
1338 (elf_x86_64_set_tls_module_base): Likewise.
1339 (elf_x86_64_dtpoff_base): Likewise.
1340 (compare_relocs): Likewise.
1341 (elf_x86_64_merge_symbol_attribute): Likewise.
1342 (elf_x86_64_hash_symbol): Likewise.
1343 (elf_x86_64_parse_gnu_properties): Likewise.
1344 (elf_x86_64_merge_gnu_properties): Likewise.
1345 (elf_x86_64_link_check_relocs): Likewise.
1346 (elf_backend_copy_indirect_symbol): Likewise.
1347 (elf_backend_always_size_sections): Likewise.
1348 (bfd_elf64_bfd_link_check_relocs): Likewise.
1349 (elf_backend_merge_symbol_attribute): Likewise.
1350 (elf_backend_hash_symbol): Likewise.
1351 (elf_backend_omit_section_dynsym): Likewise.
1352 (elf_backend_fixup_symbol): Likewise.
1353 (elf_backend_parse_gnu_properties): Likewise.
1354 (elf_backend_merge_gnu_properties): Likewise.
1355 (bfd_elf32_bfd_link_check_relocs): Likewise.
1356 (elf_x86_64_mkobject): Updated.
1357 (elf_x86_64_link_hash_table_create): Likewise.
1358 (elf_x86_64_check_tls_transition): Likewise.
1359 (elf_x86_64_tls_transition): Likewise.
1360 (elf_x86_64_convert_load_reloc): Likewise.
1361 (elf_x86_64_check_relocs): Likewise.
1362 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1363 (elf_x86_64_allocate_dynrelocs): Likewise.
1364 (elf_x86_64_convert_load): Likewise.
1365 (elf_x86_64_size_dynamic_sections): Likewise.
1366 (elf_x86_64_relocate_section): Likewise.
1367 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1368 (elf_x86_64_finish_dynamic_sections): Likewise.
1369 (elf_x86_64_output_arch_local_syms): Likewise.
1370 (elf_x86_64_get_synthetic_symtab): Likewise.
1371 (elf_x86_64_link_setup_gnu_properties): Likewise.
1372 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1373 instead of elf_link_hash_table, as base.
1374 (elf_x86_64_next_tls_desc_index): New.
1375 (elf_x86_64_srelplt2): Likewise.
1376 (elf_x86_64_plt): Likewise.
1377 (elf_x86_64_lazy_plt): Likewise.
1378 (elf_x86_64_non_lazy_plt): Likewise.
1379 * elfxx-x86.c: New file.
1380 * elfxx-x86.h: Likewise.
1382 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1384 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1386 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1388 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1390 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1391 sections before checking dynamic relocations and free invalid
1392 PLT section contents.
1393 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1395 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1397 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1398 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1400 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1403 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1405 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1407 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1409 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1411 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1413 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1416 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1417 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1418 Add a has_no_copy_on_protected bitfield.
1419 (elf_has_no_copy_on_protected): New.
1420 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1421 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1422 (elf_merge_gnu_property_list): Likewise.
1423 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1424 to FALSE for elf_has_no_copy_on_protected.
1425 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1426 (elf_i386_link_hash_entry): Add def_protected.
1427 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1428 when checking info->nocopyreloc.
1429 (elf_i386_link_setup_gnu_properties): Don't set
1430 extern_protected_data here.
1431 (elf_i386_merge_symbol_attribute): New function.
1432 (elf_backend_merge_symbol_attribute): New.
1433 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1434 (elf_x86_64_link_hash_entry): Add def_protected.
1435 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1436 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1437 when checking info->nocopyreloc.
1438 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1439 relocation run-time overflow and unresolvable R_X86_64_32S
1440 relocation against protected data symbol defined in shared object
1441 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1442 (elf_x86_64_link_setup_gnu_properties): Don't set
1443 extern_protected_data here.
1444 (elf_x86_64_merge_symbol_attribute): New function.
1445 (elf_backend_merge_symbol_attribute): New.
1447 2017-08-26 Alan Modra <amodra@gmail.com>
1449 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1450 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1451 (ppc_elf_relocate_section): Comment fix.
1452 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1453 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1454 Support dynamic relocs for TPREL16 when non-pic too.
1455 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1456 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1459 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1461 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1462 "symbol" in comments.
1463 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1465 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1468 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1469 R_X86_64_PC32 relocation run-time overflow and unresolvable
1470 R_X86_64_32S relocation with -z nocopyreloc.
1472 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1474 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1475 Undefined symbols may not have a type.
1476 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1478 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1480 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1481 bfd_link_info. Report shared, PIE or PDE object based on
1483 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1484 (elf_x86_64_relocate_section): Likewise.
1486 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1488 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1489 for function symbols.
1490 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1492 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1494 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1495 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1496 is set on any input relocatable file.
1497 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1499 2017-08-23 Alan Modra <amodra@gmail.com>
1502 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1503 ensure_undefweak_dynamic. Handle undefined too.
1504 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1505 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1506 (allocate_dynrelocs): Discard undefined non-default visibility
1507 relocs first. Make undefined syms dynamic. Tidy goto.
1509 2017-08-21 Alan Modra <amodra@gmail.com>
1510 H.J. Lu <hongjiu.lu@intel.com>
1513 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1514 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1516 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1519 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1520 undefined weak symbols.
1522 2017-08-18 Nick Clifton <nickc@redhat.com>
1525 * tekhex.c (getsym): Fix check for source pointer walking off the
1526 end of the input buffer.
1528 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1531 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1532 relocations in debug sections, change abort to _bfd_error_handler.
1534 2017-08-14 Nick Clifton <nickc@redhat.com>
1537 * elf.c (setup_group): Check for an empty or very small group
1539 * po/bfd.pot: Regenerate.
1541 2017-08-14 Alan Modra <amodra@gmail.com>
1544 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1545 alignment padding here.
1546 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1547 in a reverse pass over sections.
1549 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1552 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1553 for @plt suffixes first.
1554 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1556 2017-08-08 Nick Clifton <nickc@redhat.com>
1559 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1560 small section lengths.
1561 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1563 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1564 there is enough data present in the note.
1566 2017-08-08 Alan Modra <amodra@gmail.com>
1569 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1570 got.refcount for GOTOFF relocs, just create .got section.
1572 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1574 * elflink.c (elf_link_add_object_symbols): Move common symbol
1575 check after bed->common_definition.
1577 2017-08-07 Alan Modra <amodra@gmail.com>
1580 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1581 needed to define various dynamic tags have been discarded.
1583 2017-08-07 Nick Clifton <nickc@redhat.com>
1586 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1587 has not been set then use the bfd returned by
1588 _bfd_elf_link_setup_gnu_properties. If that is null then search
1589 through all the input bfds selecting the first normal, ELF format
1591 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1593 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1595 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1597 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1598 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1599 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1600 (elf_i386_link_check_relocs): New function.
1601 (bfd_elf32_bfd_link_check_relocs): New.
1602 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1604 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1605 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1606 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1607 (elf_x86_64_link_check_relocs): New function.
1608 (bfd_elf64_bfd_link_check_relocs): New.
1609 (bfd_elf32_bfd_link_check_relocs): Likewise.
1611 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1614 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1615 as undefined for --no-define-common.
1617 2017-08-05 Alan Modra <amodra@gmail.com>
1619 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1620 hppa_link_hash_table.
1622 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1624 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1625 entries for sysregs with negative indices.
1627 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1629 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1630 isn't the S/390 specific elf data.
1631 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1633 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1635 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1636 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1637 [R_RISCV_ADD16]: Likewise.
1638 [R_RISCV_ADD32]: Likewise.
1639 [R_RISCV_ADD64]: Likewise.
1640 [R_RISCV_SUB6]: Likewise.
1641 [R_RISCV_SUB8]: Likewise.
1642 [R_RISCV_SUB16]: Likewise.
1643 [R_RISCV_SUB32]: Likewise.
1644 [R_RISCV_SUB64]: Likewise.
1646 2017-07-31 Alan Modra <amodra@gmail.com>
1648 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1649 without ld.so checks.
1651 2017-07-29 Alan Modra <amodra@gmail.com>
1654 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1655 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1656 (is_elfv2_localentry0): Test non_zero_localentry.
1657 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1659 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1661 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1662 pointer check for htab->elf.irelplt.
1663 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1665 2017-07-27 Nick Clifton <nickc@redhat.com>
1668 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1670 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1672 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1674 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1676 (evax_bfd_print_emh): Check for invalid string lengths.
1678 2017-07-25 Nick Clifton <nickc@redhat.com>
1680 * po/fr.po: Updated French translation.
1682 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1685 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1686 16-bit absolute branches into 10-bit pc-relative branches on the
1687 MSP430 as well as the MSP430X.
1689 2017-07-25 Alan Modra <amodra@gmail.com>
1691 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1692 (stub_eh_frame_size): New function.
1693 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1694 (group_sections): Init group tls_get_addr_opt_bctrl.
1695 (ppc64_elf_size_stubs): Update sizing and initialization of
1696 .eh_frame. Iteration over stubs via group list.
1697 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1698 (ppc64_elf_finish_dynamic_sections): Update finalization of
1701 2017-07-24 Nick Clifton <nickc@redhat.com>
1704 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1705 of the relocs to the canonicalize_one_reloc routine.
1706 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1707 for the _bfd_mach_o_canonicalize_one_reloc field.
1708 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1709 res_base parameter. Use to check for corrupt pair relocs.
1710 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1712 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1714 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1717 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1718 enough data in the record before attempting to parse it.
1719 (_bfd_vms_slurp_eeom): Likewise.
1721 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1722 (image_set_ptr): Likewise.
1723 (alpha_vms_slurp_relocs): Likewise.
1725 (alpha_vms_object_p): Check for a truncated record.
1727 2017-07-24 Nick Clifton <nickc@redhat.com>
1730 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1731 an unrecognized reloc and sets the bfd_error value.
1732 * libbfd.h: Regenerate.
1733 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1735 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1736 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1737 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1738 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1739 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1741 2017-07-23 Alan Modra <amodra@gmail.com>
1743 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1746 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1749 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1750 reloc_class_ifunc for ifunc symbols.
1752 2017-07-19 Nick Clifton <nickc@redhat.com>
1755 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1756 correct magic bytes at the start, set the error to wrong format
1757 and clear the format selector before returning NULL.
1759 2017-07-19 Nick Clifton <nickc@redhat.com>
1762 * coff-rs6000.c (_bfd_strntol): New function.
1763 (_bfd_strntoll): New function.
1764 (GET_VALUE_IN_FIELD): New macro.
1765 (EQ_VALUE_IN_FIELD): new macro.
1766 (_bfd_xcoff_slurp_armap): Use new macros.
1767 (_bfd_xcoff_archive_p): Likewise.
1768 (_bfd_xcoff_read_ar_hdr): Likewise.
1769 (_bfd_xcoff_openr_next_archived_file): Likewise.
1770 (_bfd_xcoff_stat_arch_elt): Likewise.
1771 * coff64-rs6000.c (_bfd_strntol): New function.
1772 (_bfd_strntoll): New function.
1773 (GET_VALUE_IN_FIELD): New macro.
1774 (xcoff64_slurp_armap): Use new macros.
1776 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1777 John Eric Martin <John.Martin@emmicro-us.com>
1779 * bfd-in2.h: Regenerate.
1780 * libbfd.h: Regenerate.
1781 * elf32-arc.c (JLI): Define.
1782 * reloc.c: Add JLI relocations.
1784 2017-07-18 Nick Clifton <nickc@redhat.com>
1787 * coff-sh.c: Fix spelling typos.
1788 * compress.c: Likewise.
1789 * cpu-pdp11.c: Likewise.
1790 * ecofflink.c: Likewise.
1791 * elf-m10300.c: Likewise.
1793 * elf32-arm.c: Likewise.
1794 * elf32-m68k.c: Likewise.
1795 * elf32-nds32.c: Likewise.
1796 * elf32-ppc.c: Likewise.
1797 * elf32-sh.c: Likewise.
1798 * elf32-v850.c: Likewise.
1799 * elf64-ppc.c: Likewise.
1800 * elf64-x86-64.c: Likewise.
1801 * elflink.c: Likewise.
1802 * elfnn-aarch64.c: Likewise.
1803 * elfxx-mips.c: Likewise.
1805 * sunos.c: Likewise.
1806 * vms-alpha.c: Likewise.
1807 * xcofflink.c: Likewise.
1809 2017-07-18 Nick Clifton <nickc@redhat.com>
1812 * coffcode.h (handle_COMDAT): Replace abort with an error message
1815 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1818 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1821 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1823 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1825 2017-07-16 Alan Modra <amodra@gmail.com>
1827 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1828 __tls_index GOT entries when using __tls_get_addr_opt stub.
1829 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1831 2017-07-12 Alan Modra <amodra@gmail.com>
1833 * po/es.po: Update from translationproject.org/latest/bfd/.
1834 * po/fi.po: Likewise.
1835 * po/fr.po: Likewise.
1836 * po/id.po: Likewise.
1837 * po/ja.po: Likewise.
1838 * po/ro.po: Likewise.
1839 * po/ru.po: Likewise.
1840 * po/sr.po: Likewise.
1841 * po/sv.po: Likewise.
1842 * po/tr.po: Likewise.
1843 * po/uk.po: Likewise.
1844 * po/vi.po: Likewise.
1845 * po/zh_CN.po: Likewise.
1846 * po/hr.po: New file from translationproject.org.
1847 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1848 * configure: Regenerate.
1850 2017-07-12 Nick Clifton <nickc@redhat.com>
1852 Fix compile time warnings using gcc 7.1.1.
1853 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1855 (elf_xtensa_get_gotplt_section): Increase length of got_name
1857 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1858 default return of FALSE.
1859 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1860 default return of FALSE.
1862 2017-07-12 Alan Modra <amodra@gmail.com>
1864 * binary.c (binary_set_section_contents): Don't print filepos in
1866 (coff_write_object_contents): Cast size_t for error message.
1867 (coff_slurp_line_table): Don't use bfd_vma symndx.
1868 (coff_slurp_reloc_table): Remove unneeded cast.
1869 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1871 (find_abstract_instance_name): Likewise.
1872 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1873 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1874 (elf32_arm_check_relocs): Make r_symndx an int.
1875 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1877 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1879 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1881 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1882 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1883 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1884 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1885 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1886 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1887 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1888 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1889 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1890 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1891 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1892 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1893 and use %lu for error message.
1894 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1895 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1898 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1900 (elf32_arm_final_link_relocate): Likewise.
1901 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1902 * coffcode.h (styp_to_sec_flags): Likewise.
1903 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1904 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1905 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1906 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1907 (elf32_bfin_merge_private_bfd_data): Likewise.
1908 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1909 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1910 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1911 (i370_elf_relocate_section): Likewise.
1912 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1913 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1914 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1915 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1916 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1917 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1918 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1919 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1920 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1921 * ieee.c (ieee_write_id, read_id): Likewise.
1922 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1923 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1924 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1925 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1926 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1927 * stabs.c (_bfd_link_section_stabs): Likewise.
1929 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1931 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1932 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1933 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1934 * coff-sh.c (sh_relax_section): Likewise.
1935 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1936 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1937 * coffcode.h (coff_slurp_reloc_table): Likewise.
1938 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1939 (_bfd_coff_read_string_table): Likewise.
1940 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1941 * compress.c (bfd_get_full_section_contents): Likewise.
1942 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1943 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1944 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1945 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1946 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1947 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1948 (elf32_arm_write_section): Likewise.
1949 * elf32-bfin.c (bfin_relocate_section): Likewise.
1950 (bfinfdpic_relocate_section): Likewise.
1951 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1952 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1953 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1954 (elf_i386_relocate_section): Likewise.
1955 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1956 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1957 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1958 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1959 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1960 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1961 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1962 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1963 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1964 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1965 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1966 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1967 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1968 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1969 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1970 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1971 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1972 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1973 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1974 * elf32-sh.c (sh_elf_relax_section): Likewise.
1975 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1976 (sh_elf_relocate_section): Likewise.
1977 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1978 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1979 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1980 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1981 * elf32-v850.c (v850_elf_relax_section): Likewise.
1982 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1983 (elf_vax_relocate_section): Likewise.
1984 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1985 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1986 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1987 (do_fix_for_relocatable_link): Likewise.
1988 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1989 (elf64_alpha_relax_with_lituse): Likewise.
1990 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1991 (elf_hppa_final_link_relocate): Likewise.
1992 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1993 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1994 (elf64_vms_link_add_object_symbols): Likewise.
1995 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1996 (mmix_final_link_relocate): Likewise.
1997 * elf64-s390.c (invalid_tls_insn): Likewise.
1998 (elf_s390_relocate_section): Likewise.
1999 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2000 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2001 (elf_x86_64_relocate_section): Likewise.
2002 * elfcode.h (elf_slurp_symbol_table): Likewise.
2003 * elfcore.h (elf_core_file_p): Likewise.
2004 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2005 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2006 (elfNN_aarch64_relocate_section): Likewise.
2007 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2008 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2009 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2010 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2011 (_bfd_mips_elf_relocate_section): Likewise.
2012 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2013 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2014 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2015 * ieee.c (ieee_slurp_external_symbols): Likewise.
2016 * ihex.c (ihex_write_object_content): Likewise.
2017 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2018 * merge.c (_bfd_merged_section_offset): Likewise.
2019 * mmo.c (mmo_write_loc_chunk): Likewise.
2020 (mmo_write_object_contents): Likewise.
2021 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2022 * stabs.c (_bfd_link_section_stabs): Likewise.
2023 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2025 2017-07-11 Alan Modra <amodra@gmail.com>
2027 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2029 2017-07-11 Alan Modra <amodra@gmail.com>
2031 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2032 instruction" error using _bfd_error_handler, not einfo.
2034 2017-07-10 Nick Clifton <nickc@redhat.com>
2036 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2037 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2039 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2041 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2043 2017-07-07 Alan Modra <amodra@gmail.com>
2045 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2047 2017-07-07 Alan Modra <amodra@gmail.com>
2049 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2050 as long long. Move code replacing "ll" with "I64", and simplify.
2052 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2054 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2057 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2059 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2061 (line_info_add_file_name): Likewise.
2062 (decode_line_info): Likewise.
2064 2017-07-04 Tristan Gingold <gingold@adacore.com>
2066 * version.m4: Bump version to 2.29.51
2067 * configure: Regenerate.
2069 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2071 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2072 sanity check at the head of this function.
2074 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2076 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2077 dwarf_line_str_size.
2078 (struct attr_abbrev): Add field implicit_const.
2079 (dwarf_debug_sections): Add .debug_line_str.
2080 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2081 (dwarf_debug_section_assert): Add static assertion.
2082 (read_indirect_line_string): New.
2083 (read_abbrevs): Support DW_FORM_implicit_const.
2084 (is_str_attr): Support DW_FORM_line_strp.
2085 (read_attribute_value): Support DW_FORM_line_strp and
2086 DW_FORM_implicit_const.
2087 (read_attribute): Support DW_FORM_implicit_const.
2088 (line_info_add_include_dir, line_info_add_include_dir_stub):
2089 (line_info_add_file_name, read_formatted_entries): New.
2090 (decode_line_info, parse_comp_unit): Support DWARF 5.
2091 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2093 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2095 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2096 abort statement that was put for symbols that are not dynamic.
2098 2017-07-03 Tristan Gingold <gingold@adacore.com>
2100 * po/bfd.pot: Regenerate
2102 2017-07-03 Alan Modra <amodra@gmail.com>
2104 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2105 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2106 * elf.c (setup_group): Use "Lx" to print sh_size.
2107 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2108 unknown section type in hex.
2109 (copy_special_section_fields): Style fix.
2110 (bfd_section_from_shdr): Correct format for sh_link. Use a
2111 common error message for all the variants of unrecognized
2113 (assign_file_positions_for_load_sections): Use "Lx" for lma
2114 adjust error message.
2115 (assign_file_positions_for_non_load_sections): Formatting.
2116 (rewrite_elf_program_header): Formatting. Use "Lx" for
2117 bfd_vma values in error messages.
2118 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2119 ELF_R_SYM value to type expected by format.
2120 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2122 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2123 (elf_link_input_bfd): Use "Lx" for r_info.
2124 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2126 2017-07-03 Alan Modra <amodra@gmail.com>
2128 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2129 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2130 Microsoft C library variant of long long format specifier.
2131 (PRINT20): Cast value to bfd_uint64_t not long long.
2132 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2133 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2134 long long. Don't cast to bfd_vma.
2135 * elf32-score.c (score3_bfd_getl48): Likewise.
2136 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2138 2017-07-03 Alan Modra <amodra@gmail.com>
2140 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2142 (bfd_elf_print_symbol): Don't cast symbol->flags.
2143 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2144 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2145 _bfd_error_handler argument order.
2146 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2148 2017-07-03 Alan Modra <amodra@gmail.com>
2150 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2151 AC_TYPE_LONG_DOUBLE.
2152 * configure: Regenerate.
2153 * config.in: Regenerate.
2155 2017-06-29 Andrew Waterman <andrew@sifive.com>
2157 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2160 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2162 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2163 unless it is undefined weak.
2164 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2165 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2167 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2168 is not dynamic in PIC, abort.
2170 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2173 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2174 undefined weak symbols into dynamic.
2175 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2176 relocation for non-dynamic symbols.
2177 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2179 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2181 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2182 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2183 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2184 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2185 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2188 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2190 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2191 (elfcore_write_s390_gs_bc): Likewise.
2192 * elf.c (elfcore_grok_s390_gs_cb): New function.
2193 (elfcore_grok_s390_gs_bc): New function.
2194 (elfcore_grok_note): Call them.
2195 (elfcore_write_s390_gs_cb): New function.
2196 (elfcore_write_s390_gs_bc): New function.
2197 (elfcore_write_register_note): Call them.
2199 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2201 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2202 bfd_get_file_size. Check archive element size.
2203 (_bfd_generic_get_section_contents_in_window): Likewise.
2205 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2207 * bfd-in2.h: Regenerated.
2208 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2209 (bfd_get_file_size): Likewise.
2211 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2212 Matthew Fortune <matthew.fortune@imgtec.com>
2214 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2215 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2216 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2217 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2219 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2220 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2221 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2222 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2223 `bfd_mach_mips_interaptiv_mr2' entries.
2224 * bfd-in2.h: Regenerate.
2226 2017-06-27 Nick Clifton <nickc@redhat.com>
2228 * tekhex.c (pass_over): Revert accidental conversion of a local
2229 array to a static array.
2231 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2234 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2235 reloc addend if necessary. Adjust diff only if
2236 shrinked_insn_address < end_address.
2238 2017-06-27 Alan Modra <amodra@gmail.com>
2241 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2242 (_bfd_generic_get_section_contents_in_window): Likewise.
2244 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2246 * elfnn-riscv.c (perform_relocation): Support the new
2247 R_RISCV_32_PCREL relocation.
2248 (riscv_elf_relocate_section): Likewise.
2249 * elfxx-riscv.c (howto_table): Likewise.
2250 (riscv_reloc_map): Likewise.
2251 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2252 * libbfd.h: Regenerate.
2254 2017-06-27 Alan Modra <amodra@gmail.com>
2257 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2258 Use unsigned file pointer type, and remove cast.
2259 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2260 Add "count", not "sz".
2262 2017-06-26 Pedro Alves <palves@redhat.com>
2265 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2268 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2271 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2274 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2276 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2277 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2278 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2279 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2280 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2282 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2285 * compress.c (bfd_get_full_section_contents): Don't check the
2287 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2288 reject a section whose size + offset is greater than the size
2290 (_bfd_generic_get_section_contents_in_window): Likewise.
2292 2017-06-26 Nick Clifton <nickc@redhat.com>
2295 * tekhex.c (getvalue): Check for the source pointer exceeding the
2296 end pointer before the first byte is read.
2298 2017-06-26 Nick Clifton <nickc@redhat.com>
2301 * opncls.c (get_build_id): Check that the section is big enough
2302 to contain the whole note.
2303 * compress.c (bfd_get_full_section_contents): Check for and reject
2304 a section whose size is greater than the size of the entire file.
2305 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2306 contain a notes section.
2308 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2310 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2312 (elf_s390_modify_segment_map): Likewise.
2313 (bfd_elf_s390_set_options): Lisewise.
2315 2017-06-26 Alan Modra <amodra@gmail.com>
2317 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2319 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2320 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2321 .preinit_array on --just-syms bfds.
2322 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2323 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2324 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2326 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2328 * elf.c (find_link): Bounds check "hint".
2330 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2332 * elf32-arm.c (using_thumb_only): Update list of architectures in
2333 BFD_ASSERT for which the logic is valid.
2334 (using_thumb2_bl): Likewise.
2335 (using_thumb2): Likewise and return true for ARMv8-R.
2336 (arch_has_arm_nop): Likewise.
2337 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2338 merging logic. Update commentis for value 15 of v8m_baseline,
2339 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2340 merging of value 15 of Tag_CPU_arch.
2342 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2344 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2345 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2346 * bfd-in2.h: Regenerate.
2348 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2350 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2351 the error_alignment label forward. Properly align program
2352 property note section.
2354 2017-06-22 Eric Christopher <echristo@gmail.com>
2356 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2357 abs to fix a truncation warning.
2359 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2361 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2362 local undefined weak symbol to 0.
2363 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2365 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2367 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2368 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2369 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2370 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2371 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2372 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2373 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2374 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2376 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2378 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2379 (elf_i386_lazy_ibt_plt_entry): Likewise.
2380 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2381 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2382 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2383 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2384 (elf_i386_lazy_plt_layout): Likewise.
2385 (elf_i386_non_lazy_plt_layout): Likewise.
2386 (elf_i386_link_hash_entry): Add plt_second.
2387 (elf_i386_link_hash_table): Add plt_second and
2388 plt_second_eh_frame.
2389 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2390 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2391 the second PLT. Check the second PLT.
2392 (elf_i386_relocate_section): Use the second PLT to resolve
2393 PLT reference if needed.
2394 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2396 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2397 second PLT. Generate unwind info for the second PLT.
2398 (elf_i386_plt_type): Add plt_second.
2399 (elf_i386_get_synthetic_symtab): Support the second PLT.
2400 (elf_i386_parse_gnu_properties): Support
2401 GNU_PROPERTY_X86_FEATURE_1_AND.
2402 (elf_i386_merge_gnu_properties): Support
2403 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2404 on GNU_PROPERTY_X86_FEATURE_1_IBT
2405 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2406 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2407 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2408 is set on all relocatable inputs.
2409 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2410 (elf_x32_lazy_ibt_plt_entry): Likewise.
2411 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2412 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2413 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2414 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2415 (elf_x86_64_lazy_ibt_plt): Likewise.
2416 (elf_x32_lazy_ibt_plt): Likewise.
2417 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2418 (elf_x32_non_lazy_ibt_plt): Likewise.
2419 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2420 (elf_x86_64_parse_gnu_properties): Support
2421 GNU_PROPERTY_X86_FEATURE_1_AND.
2422 (elf_x86_64_merge_gnu_properties): Support
2423 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2424 on GNU_PROPERTY_X86_FEATURE_1_IBT
2425 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2426 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2427 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2428 is set on all relocatable inputs.
2430 2017-06-22 Nick Clifton <nickc@redhat.com>
2433 * som.c (setup_sections): NUL terminate the space_strings buffer.
2434 Check that the space.name field does not index beyond the end of
2435 the space_strings buffer.
2437 2017-06-21 Nick Clifton <nickc@redhat.com>
2440 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2442 2017-06-21 Nick Clifton <nickc@redhat.com>
2445 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2446 type of the size parameter.
2447 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2448 length of the counted string.
2449 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2450 (_bfd_vms_save_counted_string): Likewise.
2451 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2452 _bfd_vms_save_counted_string.
2453 (_bfd_vms_slurp_ehdr): Likewise.
2454 (_bfd_vms_slurp_egsd): Likewise.
2455 (Parse_module): Likewise.
2457 2017-06-21 Alan Modra <amodra@gmail.com>
2459 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2460 calls before tocsave calls.
2461 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2464 2017-06-21 Nick Clifton <nickc@redhat.com>
2467 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2468 bfd_get_full_section_contents returns no contents.
2470 2017-06-21 Nick Clifton <nickc@redhat.com>
2473 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2476 2017-06-21 Nick Clifton <nickc@redhat.com>
2479 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2481 (image_set_ptr): Likewise.
2482 (alpha_vms_fix_sec_rel): Likewise.
2483 (alpha_vms_slurp_relocs): Likewise.
2485 2017-06-21 Nick Clifton <nickc@redhat.com>
2488 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2490 (ieee_archive_p): Likewise.
2491 (ieee_object_p): Likewise.
2493 2017-06-21 Nick Clifton <nickc@redhat.com>
2496 * elf.c (setup_group): Zero the group section pointer list after
2497 allocation so that loops can be caught. Check for NULL pointers
2498 when processing a group list.
2500 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2502 * elf-s390.h: New file.
2503 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2505 (elf_s390_additional_program_headers): New function.
2506 (elf_s390_modify_segment_map): New function.
2507 (bfd_elf_s390_set_options): New function.
2508 (elf_backend_additional_program_headers)
2509 (elf_backend_modify_segment_map): Add macro definitions.
2511 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2514 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2515 the DYNAMIC bit instead of bfd_count_sections.
2517 2017-06-19 Nick Clifton <nickc@redhat.com>
2520 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2522 (evax_bfd_print_eeom): Likewise.
2523 (evax_bfd_print_egsd): Check for an overlarge record length.
2524 (evax_bfd_print_etir): Likewise.
2526 2017-06-19 Nick Clifton <nickc@redhat.com>
2529 * libieee.h (struct common_header_type): Add end_p field.
2530 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2532 (read_id): Check for a length that exceeds the remaining bytes in
2534 (ieee_seek): Initialise end_p.
2535 (ieee_archive_p): Likewise.
2536 (ieee_object_p): Likewise.
2538 2017-06-19 Nick Clifton <nickc@redhat.com>
2541 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2542 before reading the EIHS structure entries.
2544 2017-06-19 Nick Clifton <nickc@redhat.com>
2547 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2548 gsd_size. Check that there are enough bytes remaining to read the
2549 type and size of the next egsd. Check that the size of the egsd
2550 does not exceed the size of the record.
2552 2017-06-19 Alan Modra <amodra@gmail.com>
2554 * config.bfd: Correct targ_underscore for cris.
2556 2017-06-18 Alan Modra <amodra@gmail.com>
2558 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2559 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2561 2017-06-16 Nick Clifton <nickc@redhat.com>
2563 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2564 bucketlist is empty because there are no symbols to add to the
2567 2017-06-16 Alan Modra <amodra@gmail.com>
2573 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2574 (BFD_JUMP_TABLE_LINK): Likewise.
2575 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2576 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2577 (bfd_elf_define_start_stop): New function.
2578 * linker.c (bfd_generic_define_start_stop): New function.
2579 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2581 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2582 * aout-target.h (MY_bfd_define_start_stop): Define.
2583 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2584 * binary.c (binary_bfd_define_start_stop): Define.
2585 * bout.c (b_out_bfd_define_start_stop): Define.
2586 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2587 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2588 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2589 * coffcode.h (coff_bfd_define_start_stop): Define.
2590 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2591 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2592 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2593 * ieee.c (ieee_bfd_define_start_stop): Define.
2594 * ihex.c (ihex_bfd_define_start_stop): Define.
2595 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2596 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2597 * mmo.c (mmo_bfd_define_start_stop): Define.
2598 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2599 * oasys.c (oasys_bfd_define_start_stop): Define.
2600 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2601 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2602 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2603 * som.c (som_bfd_define_start_stop): Define.
2604 * srec.c (srec_bfd_define_start_stop): Define.
2605 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2606 * versados.c (versados_bfd_define_start_stop): Define.
2607 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2608 (alpha_vms_bfd_define_start_stop): Define.
2609 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2610 * bfd-in2.h: Regenerate.
2611 * libbfd.h: Regenerate.
2613 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2615 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2616 SYMBOL_REFERENCES_LOCAL.
2618 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2621 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2622 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2623 runtime for if there needs copy relocation elimination.
2624 (need_copy_relocation_p): New function. Return true for symbol with
2625 pc-relative references and if it's against read-only sections.
2626 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2627 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2628 that are related with accessing external objects.
2629 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2630 in elfNN_aarch64_check_relocs.
2632 2017-06-15 Nick Clifton <nickc@redhat.com>
2635 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2638 (ieee_archive_p): Likewise.
2640 2017-06-15 Nick Clifton <nickc@redhat.com>
2643 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2645 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2647 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2648 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2649 keep both windowed and call0 ABI PLT definitions.
2650 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2651 elf_xtensa_*_plt_entry endex.
2652 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2654 2017-06-14 Nick Clifton <nickc@redhat.com>
2657 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2660 2017-06-14 Nick Clifton <nickc@redhat.com>
2663 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2664 maximum value for the ascic pointer. Check that name processing
2665 does not read beyond this value.
2666 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2669 2017-06-14 Nick Clifton <nickc@redhat.com>
2672 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2673 (process_otr): Check for an invalid offset in the otr structure.
2675 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2677 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2679 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2685 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2686 vtable field to a union.
2687 (_bfd_elf_is_start_stop): Removed.
2688 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2689 __start_SECNAME and __stop_SECNAME symbols.
2690 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2691 * elflink.c (_bfd_elf_is_start_stop): Removed.
2692 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2693 _bfd_elf_is_start_stop.
2694 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2695 __stop_SECNAME symbols. Updated.
2696 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2697 (bfd_elf_gc_record_vtinherit): Likewise.
2698 (bfd_elf_gc_record_vtentry): Likewise.
2700 2017-06-13 Nick Clifton <nickc@redhat.com>
2703 * elflink.c (elf_link_adjust_relocs): Generate an error when
2704 encountering a reloc against a symbol removed by garbage
2707 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2709 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2710 to merge_gnu_properties.
2711 * elf-properties.c (elf_merge_gnu_properties): Add struct
2712 bfd_link_info * and pass it to merge_gnu_properties.
2713 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2714 and pass it to elf_merge_gnu_properties.
2715 (_bfd_elf_link_setup_gnu_properties): Pass info to
2716 elf_merge_gnu_property_list.
2717 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2719 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2721 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2724 * binary.c (binary_set_section_contents): Scale lma by octets
2725 per byte to set filepos.
2727 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2729 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2732 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2734 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2737 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2739 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2740 patched section contents for TLS IE reloc.
2741 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2743 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2745 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2746 RELOC_FOR_GLOBAL_SYMBOL macro.
2748 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2750 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2753 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2755 * config/tc-arc.c (md_undefined_symbol): Changed.
2756 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2758 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2760 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2763 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2765 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2766 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2768 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2770 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2773 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2775 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2776 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2777 is non-zero. Add clarifying comments.
2779 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2781 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2782 name. Use local IFUNC symbol name string to report unsupported
2783 non-PIC call to IFUNC function.
2784 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2785 when generating R_386_IRELATIVE relocation.
2786 (elf_i386_finish_dynamic_symbol): Likewise.
2787 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2789 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2790 when generating R_X86_64_IRELATIVE relocation.
2791 (elf_x86_64_finish_dynamic_symbol): Likewise.
2793 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2795 * elf.c (setup_group): Make sure BFD sections are created for all
2796 group sections in the input file when processing SHF_GROUP
2798 (bfd_section_from_shdr): Avoid duplicating logic already
2799 implemented in `setup_group'.
2801 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2804 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2805 if the hint address is zero.
2807 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2810 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2811 ELF_COMMON_DEF_P for common symbols.
2813 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2815 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2816 SEC_GROUP sections as SEC_EXCLUDE.
2817 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2818 (assign_section_numbers): Use resolve_section_groups flag instead
2819 of relocatable link type.
2820 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2821 flag instead of checking the final_link flag for part of the
2822 checks in here. Fix white space as a result.
2823 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2824 instead of relocatable link type.
2825 (bfd_elf_final_link): Likewise.
2827 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2829 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2831 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2832 (s3_bfd_score_elf_check_relocs): Likewise.
2833 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2834 (score_elf_final_link_relocate): Likewise.
2835 (s7_bfd_score_elf_check_relocs): Likewise.
2837 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2839 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2842 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2844 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2845 from `reloc_count' rather than decrementing it.
2846 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2847 `reloc_count' by `int_rels_per_ext_rel'.
2848 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2849 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2850 entry determination.
2851 (s3_bfd_score_elf_check_relocs): Likewise.
2852 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2853 (s7_bfd_score_elf_relocate_section): Likewise.
2854 (s7_bfd_score_elf_check_relocs): Likewise.
2855 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2856 prototype and function.
2857 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2858 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2859 triple rather than once the sum of REL and RELA relocation entry
2861 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2862 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2863 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2864 storage allocation size determination.
2865 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2866 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2867 by `int_rels_per_ext_rel' for last relocation entry
2869 (bfd_elf_final_link): Do not multiply `reloc_count' by
2870 `int_rels_per_ext_rel' for internal relocation storage
2871 allocation size determination.
2872 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2873 `int_rels_per_ext_rel' for last relocation entry determination.
2874 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2875 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2876 (_bfd_mips_elf_relocate_section): Likewise.
2878 2017-06-05 Alan Modra <amodra@gmail.com>
2881 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2883 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2885 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2886 determine structure sizes.
2887 (elfcore_grok_freebsd_prstatus): Likewise.
2889 2017-06-01 Alan Modra <amodra@gmail.com>
2891 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2892 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2894 (is_elfv2_localentry0): New function.
2895 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2896 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2897 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2898 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2899 optimized localentry:0 stubs.
2900 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2901 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2903 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2905 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2907 2017-05-30 Casey Smith <clegg89@gmail.com>
2910 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2911 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2913 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2915 * cpu-arc.c (arc_compatible): New function.
2917 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2919 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2921 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2924 * bfdio.c (bfd_get_file_size): New function.
2925 * bfd-in2.h: Regenerated.
2927 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2929 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2932 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2934 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2935 dynobj instead of htab->elf.dynobj.
2937 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2939 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2941 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2942 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2943 actual number of internal relocations retrieved. Adjust
2944 function description.
2945 (bfd_elf64_canonicalize_reloc): Remove macro.
2946 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2948 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2950 * archures.c (bfd_mach_sparc_v9m8): Define.
2951 (bfd_mach_sparc_v8plusm8): Likewise.
2952 (bfd_mach_sparc_v9_p): Adjust to M8.
2953 (bfd_mach_sparc_64bit_p): Likewise.
2954 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2955 bfd_mach_sparc_v8plusm8.
2956 * bfd-in2.h: Regenerated.
2957 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2959 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2960 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2961 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2963 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2964 bfd_mach_sparc_v8plusm8.
2966 2017-05-19 Alan Modra <amodra@gmail.com>
2968 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2969 debug and special sections when no non-note alloc sections in an
2972 2017-05-18 Alan Modra <amodra@gmail.com>
2974 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2975 * elf-m10300.c: Likewise.
2977 * elf32-arc.c: Likewise.
2978 * elf32-bfin.c: Likewise.
2979 * elf32-m68k.c: Likewise.
2980 * elf32-nds32.c: Likewise.
2981 * elf32-tilepro.c: Likewise.
2982 * elflink.c: Likewise.
2983 * elfnn-aarch64.c: Likewise.
2984 * elfnn-riscv.c: Likewise.
2985 * elfxx-tilegx.c: Likewise.
2986 * mach-o.c: Likewise.
2987 * peXXigen.c: Likewise.
2988 * vms-alpha.c: Likewise.
2989 * vms-lib.c: Likewise.
2991 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2994 * elflink.c (elf_gc_mark_debug_section): New function.
2995 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2996 referenced by kept debug sections.
2998 2017-05-16 Alan Modra <amodra@gmail.com>
3000 * elf-m10300.c: Rename occurrences of non_ir_ref.
3001 * elf32-arm.c: Likewise.
3002 * elf32-bfin.c: Likewise.
3003 * elf32-cr16.c: Likewise.
3004 * elf32-cris.c: Likewise.
3005 * elf32-d10v.c: Likewise.
3006 * elf32-dlx.c: Likewise.
3007 * elf32-fr30.c: Likewise.
3008 * elf32-frv.c: Likewise.
3009 * elf32-hppa.c: Likewise.
3010 * elf32-i370.c: Likewise.
3011 * elf32-i386.c: Likewise.
3012 * elf32-iq2000.c: Likewise.
3013 * elf32-lm32.c: Likewise.
3014 * elf32-m32c.c: Likewise.
3015 * elf32-m32r.c: Likewise.
3016 * elf32-m68hc1x.c: Likewise.
3017 * elf32-m68k.c: Likewise.
3018 * elf32-mcore.c: Likewise.
3019 * elf32-metag.c: Likewise.
3020 * elf32-microblaze.c: Likewise.
3021 * elf32-moxie.c: Likewise.
3022 * elf32-msp430.c: Likewise.
3023 * elf32-mt.c: Likewise.
3024 * elf32-nios2.c: Likewise.
3025 * elf32-or1k.c: Likewise.
3026 * elf32-ppc.c: Likewise.
3027 * elf32-rl78.c: Likewise.
3028 * elf32-s390.c: Likewise.
3029 * elf32-score.c: Likewise.
3030 * elf32-score7.c: Likewise.
3031 * elf32-sh.c: Likewise.
3032 * elf32-tic6x.c: Likewise.
3033 * elf32-tilepro.c: Likewise.
3034 * elf32-v850.c: Likewise.
3035 * elf32-vax.c: Likewise.
3036 * elf32-xstormy16.c: Likewise.
3037 * elf32-xtensa.c: Likewise.
3038 * elf64-alpha.c: Likewise.
3039 * elf64-hppa.c: Likewise.
3040 * elf64-ia64-vms.c: Likewise.
3041 * elf64-mmix.c: Likewise.
3042 * elf64-ppc.c: Likewise.
3043 * elf64-s390.c: Likewise.
3044 * elf64-sh64.c: Likewise.
3045 * elf64-x86-64.c: Likewise.
3046 * elflink.c: Likewise.
3047 * elfnn-aarch64.c: Likewise.
3048 * elfnn-ia64.c: Likewise.
3049 * elfnn-riscv.c: Likewise.
3050 * elfxx-mips.c: Likewise.
3051 * elfxx-sparc.c: Likewise.
3052 * elfxx-tilegx.c: Likewise.
3053 * linker.c: Likewise.
3055 2017-05-16 Alan Modra <amodra@gmail.com>
3057 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3058 * elflink.c (elf_link_add_object_symbols): Update to use
3060 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3062 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3064 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3066 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3068 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3070 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3071 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3073 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3075 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3077 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3079 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3080 to plt_second/plt_second_eh_frame.
3081 (elf_x86_64_link_hash_newfunc): Updated.
3082 (elf_x86_64_allocate_dynrelocs): Likewise.
3083 (elf_x86_64_size_dynamic_sections): Likewise.
3084 (elf_x86_64_relocate_section): Likewise.
3085 (elf_x86_64_finish_dynamic_symbol): Likewise.
3086 (elf_x86_64_finish_dynamic_sections): Likewise.
3087 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3088 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3090 (elf_backend_setup_gnu_properties): Updated. Create the
3091 .plt.sec section instead of the .plt.sec section.
3093 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3095 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3096 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3097 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3099 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3101 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3102 (bfd_elf64_set_reloc): Define.
3103 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3105 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3107 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3108 (struct bfd_target): New field _bfd_set_reloc.
3109 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3110 * reloc.c (_bfd_generic_set_reloc): New function.
3111 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3112 * nlm-target.h (nlm_set_reloc): Likewise.
3113 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3114 * aout-tic30.c (MY_set_reloc): Likewise.
3115 * aout-target.h (MY_set_reloc): Likewise.
3116 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3117 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3118 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3119 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3120 * aout-adobe.c (aout_32_set_reloc): Likewise.
3121 * bout.c (b_out_set_reloc): Likewise.
3122 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3123 * i386os9k.c (aout_32_set_reloc): Likewise.
3124 * ieee.c (ieee_set_reloc): Likewise.
3125 * oasys.c (oasys_set_reloc): Likewise.
3126 * som.c (som_set_reloc): Likewise.
3127 * versados.c (versados_set_reloc): Likewise.
3128 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3129 _bfd_generic_set_reloc.
3130 (rs6000_xcoff64_aix_vec): LIkewise.
3131 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3132 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3133 * i386msdos.c (msdos_set_reloc): Define to
3134 _bfd_norelocs_set_reloc.
3135 * elfcode.h (elf_set_reloc): Define.
3136 * bfd-in2.h: Regenerated.
3138 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3141 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3142 for IFUNC function address.
3144 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3146 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3147 (CONFLICT_LIST): Likewise.
3148 (opcode/arc-attrs.h): Include.
3149 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3150 (arc_extract_features): New file.
3151 (arc_stralloc): Likewise.
3152 (arc_elf_merge_attributes): Likewise.
3153 (arc_elf_merge_private_bfd_data): Use object attributes.
3154 (bfd_arc_get_mach_from_attributes): New function.
3155 (arc_elf_object_p): Use object attributes.
3156 (arc_elf_final_write_processing): Likewise.
3157 (elf32_arc_obj_attrs_arg_type): New function.
3158 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3159 (elf32_arc_section_from_shdr): Likewise.
3160 (elf_backend_obj_attrs_vendor): Define.
3161 (elf_backend_obj_attrs_section): Likewise.
3162 (elf_backend_obj_attrs_arg_type): Likewise.
3163 (elf_backend_obj_attrs_section_type): Likewise.
3164 (elf_backend_obj_attrs_handle_unknown): Likewise.
3165 (elf_backend_section_from_shdr): Likewise.
3167 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3170 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3171 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3172 and the destination is a Thumb symbol.
3174 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3176 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3177 initializer to silence GCC 4.2.
3178 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3180 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3182 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3183 (LAZY_PLT_ENTRY_SIZE): This.
3184 (NON_LAZY_PLT_ENTRY_SIZE): New.
3185 (elf_x86_64_plt0_entry): Renamed to ...
3186 (elf_x86_64_lazy_plt0_entry): This.
3187 (elf_x86_64_plt_entry): Renamed to ...
3188 (elf_x86_64_lazy_plt_entry): This.
3189 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3190 (elf_x86_64_lazy_bnd_plt0_entry): This.
3191 (elf_x86_64_legacy_plt_entry): Removed.
3192 (elf_x86_64_bnd_plt_entry): Renamed to ...
3193 (elf_x86_64_lazy_bnd_plt_entry): This.
3194 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3195 (elf_x86_64_non_lazy_plt_entry): This.
3196 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3197 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3198 (elf_x86_64_eh_frame_plt): Renamed to ...
3199 (elf_x86_64_eh_frame_lazy_plt): This.
3200 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3201 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3202 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3203 (elf_x86_64_eh_frame_non_lazy_plt): This.
3204 (elf_x86_64_lazy_plt_layout): New.
3205 (elf_x86_64_non_lazy_plt_layout): Likewise.
3206 (elf_x86_64_plt_layout): Likewise.
3207 (elf_x86_64_backend_data): Remove PLT layout information. Add
3208 os for target system.
3209 (GET_PLT_ENTRY_SIZE): Removed.
3210 (elf_x86_64_lazy_plt): New.
3211 (elf_x86_64_non_lazy_plt): Likewise.
3212 (elf_x86_64_lazy_bnd_plt): Likewise.
3213 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3214 (elf_x86-64_arch_bed): Updated.
3215 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3216 (elf_x86_64_create_dynamic_sections): Removed.
3217 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3218 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3219 (elf_x86-64_adjust_dynamic_symbol): Updated.
3220 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3221 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3222 size for PLT0 if there is no PLT0. Get plt_entry_size from
3223 non_lazy_plt for non-lazy PLT entries.
3224 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3225 from non_lazy_plt for non-lazy PLT entries.
3226 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3227 if there is no PLT0.
3228 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3229 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3230 entries with non-lazy PLT layout. Don't fill the second and third
3231 slots in the PLT entry if there is no PLT0.
3232 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3233 if there is no PLT0. Set sh_entsize on the .plt.got section.
3234 (compare_relocs): New.
3235 (elf_x86_64_plt_type): Likewise.
3236 (elf_x86_64_plt): Likewise.
3237 (elf_x86_64_nacl_plt): New. Forward declaration.
3238 (elf_x86_64_get_plt_sym_val): Removed.
3239 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3240 against all dynamic relocations.
3241 (elf_x86_64_link_setup_gnu_properties): New function.
3242 (elf_backend_create_dynamic_sections): Updated.
3243 (elf_backend_setup_gnu_properties): New.
3244 (elf_x86_64_nacl_plt): New.
3245 (elf_x86_64_nacl_arch_bed): Updated.
3247 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3249 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3250 (LAZY_PLT_ENTRY_SIZE): This.
3251 (NON_LAZY_PLT_ENTRY_SIZE): New.
3252 (elf_i386_plt0_entry): Renamed to ...
3253 (elf_i386_lazy_plt0_entry): This.
3254 (elf_i386_plt_entry): Renamed to ...
3255 (elf_i386_lazy_plt_entry): This.
3256 (elf_i386_pic_plt0_entry): Renamed to ...
3257 (elf_i386_pic_lazy_plt0_entry): This.
3258 (elf_i386_pic_plt_entry): Renamed to ...
3259 (elf_i386_pic_lazy_plt_entry): This.
3260 (elf_i386_got_plt_entry): Renamed to ...
3261 (elf_i386_non_lazy_plt_entry): This.
3262 (elf_i386_pic_got_plt_entry): Renamed to ...
3263 (elf_i386_pic_non_lazy_plt_entry): This.
3264 (elf_i386_eh_frame_plt): Renamed to ...
3265 (elf_i386_eh_frame_lazy_plt): This.
3266 (elf_i386_eh_frame_plt_got): Renamed to ...
3267 (elf_i386_eh_frame_non_lazy_plt): This.
3268 (elf_i386_plt_layout): Renamed to ...
3269 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3270 eh_frame_plt_got_size.
3271 (elf_i386_non_lazy_plt_layout): New.
3272 (elf_i386_plt_layout): Likewise.
3273 (elf_i386_non_lazy_plt): Likewise.
3274 (GET_PLT_ENTRY_SIZE): Removed.
3275 (elf_i386_plt): Renamed to ...
3276 (elf_i386_lazy_plt): This.
3277 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3278 (elf_i386_arch_bed): Updated.
3279 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3280 (elf_i386_create_dynamic_sections): Removed.
3281 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3282 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3283 (elf_i386_adjust_dynamic_symbol): Updated.
3284 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3285 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3286 size for PLT0 if there is no PLT0.
3287 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3288 output section is discarded only if GOT isn't empty.
3289 (elf_i386_relocate_section): Updated. Properly get PLT index
3290 if there is no PLT0.
3291 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3292 second and third slots in the PLT entry if there is no PLT0.
3293 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3294 if there is no PLT0. Set sh_entsize on the .plt.got section.
3295 (elf_i386_nacl_plt): Forward declaration.
3296 (elf_i386_get_plt_sym_val): Removed.
3297 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3298 against all dynamic relocations.
3299 (elf_i386_link_setup_gnu_properties): New function.
3300 (elf_backend_create_dynamic_sections): Updated.
3301 (elf_backend_setup_gnu_properties): New.
3302 (elf_i386_nacl_plt): Updated.
3303 (elf_i386_nacl_arch_bed): Likewise.
3304 (elf_i386_vxworks_arch_bed): Likewise.
3306 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3308 * elflink.c (elf_output_implib): Remove executable flag from import
3310 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3311 library is a relocatable object file.
3313 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3316 * elf32-avr.c (avr_should_move_sym): New function.
3317 (avr_should_reduce_sym_size): Likewise.
3318 (avr_should_increase_sym_size): Likewise.
3319 (elf32_avr_relax_delete_bytes): Adjust symbol values
3320 and sizes by calling new functions.
3322 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3324 * config.bfd (riscv32-*): Enable rv64.
3326 2017-05-02 Alan Modra <amodra@gmail.com>
3329 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3330 rather than h->root.type == bfd_link_hash_new.
3331 (bfd_elf_record_link_assignment): Similarly, call
3332 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3334 2017-04-29 Alan Modra <amodra@gmail.com>
3337 * reloc.c (reloc_offset_in_range): New function.
3338 (bfd_perform_relocation, bfd_install_relocation): Use it.
3339 (_bfd_final_link_relocate): Likewise.
3341 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3343 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3344 before using .plt.got.
3345 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3347 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3349 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3350 instead of "+=" to update 0.
3352 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3354 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3355 .plt.got section here.
3356 (elf_i386_check_relocs): Don't create the .plt.got section.
3357 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3358 the .plt.got and .plt.bnd sections here.
3359 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3362 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3364 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3366 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3367 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3368 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3369 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3372 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3374 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3376 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3377 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3378 the first relocatable ELF input with GNU properties.
3380 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3382 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3383 VxWorks for non-PIC.
3385 2017-04-27 Alan Modra <amodra@gmail.com>
3387 * elf-bfd.h (struct elf_backend_data): Make asection param of
3388 elf_backend_eh_frame_address_size const.
3389 (_bfd_elf_eh_frame_address_size): Likewise.
3390 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3391 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3392 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3393 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3394 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3395 (next_cie_fde_offset): Constify params.
3396 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3398 2017-04-27 Alan Modra <amodra@gmail.com>
3400 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3401 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3402 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3404 (offset_adjust): New function.
3405 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3406 (adjust_eh_frame_local_symbols): Likewise.
3407 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3408 after changing anything. Return true if anything changed.
3409 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3410 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3412 2017-04-27 Alan Modra <amodra@gmail.com>
3414 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3417 2017-04-27 Alan Modra <amodra@gmail.com>
3419 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3420 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3421 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3422 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3423 for undef and undefweak dyn_relocs.
3424 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3425 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3426 (allocate_got, allocate_dynrelocs): Likewise.
3427 (ppc64_elf_relocate_section): Likewise.
3429 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3431 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3432 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3433 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3434 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3436 2017-04-26 Nick Clifton <nickc@redhat.com>
3439 * reloc.c (bfd_perform_relocation): Check for a negative address
3442 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3445 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3447 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3448 (elf_backend_always_renumber_dynsyms): Define.
3449 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3450 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3451 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3452 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3454 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3456 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3458 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3459 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3460 sections have been created.
3462 2017-04-26 Nick Clifton <nickc@redhat.com>
3465 * compress.c (bfd_init_section_compress_status): Check the return
3466 value from bfd_malloc.
3468 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3470 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3471 no_finish_dynamic_symbol.
3472 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3474 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3475 weak symbol, don't make it dynamic.
3476 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3477 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3478 relocation for GOT reference.
3479 (elf_x86_64_finish_dynamic_symbol): Abort if
3480 no_finish_dynamic_symbol isn't 0.
3482 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3485 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3486 undefined weak symbol, don't make it dynamic.
3487 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3488 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3489 relocation for R_386_GOT32.
3491 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3494 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3496 2017-04-23 Alan Modra <amodra@gmail.com>
3499 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3500 * elf.c (lcomm_sym): New.
3501 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3502 * bfd-in2.h: Regenerate.
3504 2017-04-23 Alan Modra <amodra@gmail.com>
3507 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3508 parameters and comment.
3509 (_bfd_elf_get_reloc_section): Delete.
3510 (_bfd_elf_plt_get_reloc_section): Declare.
3511 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3512 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3514 (_bfd_elf_get_reloc_section): ..here. Delete.
3515 (assign_section_numbers): Call elf_get_reloc_section.
3516 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3517 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3519 2017-04-23 Alan Modra <amodra@gmail.com>
3522 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3525 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3528 * elf32-i386.c (elf_i386_link_hash_entry): Add
3529 no_finish_dynamic_symbol.
3530 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3531 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3532 symbol, don't make it dynamic in PIE.
3533 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3534 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3535 relocation for R_386_GOT32
3536 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3539 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3543 * elflink.c (elf_link_add_object_symbols): Require
3544 --no-dynamic-linker with -E/--dynamic-list when creating
3547 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3549 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3552 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3554 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3555 dynamic symbol sorting.
3557 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3560 * elflink.c (elf_link_add_object_symbols): Preserve
3561 dynamic_ref_after_ir_def when restoring the symbol table for
3562 unneeded dynamic object.
3564 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3567 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3568 on on undefined IFUNC symbol in the second PLT.
3570 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3572 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3574 2017-04-19 Alan Modra <amodra@gmail.com>
3576 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3577 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3578 * elf32-ppc.c:Formatting.
3579 (ensure_undefweak_dynamic): Don't make dynamic when
3580 info->dynamic_undefined_weak is zero.
3581 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3582 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3583 not default visibility. Discard undef and undefweak
3585 (ppc_elf_relocate_section): Adjust to suit.
3586 * elf64-ppc.c: Formatting.
3587 (ensure_undefweak_dynamic): Don't make dynamic when
3588 info->dynamic_undefined_weak is zero.
3589 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3590 info->dynamic_undefined_weak. Discard them earlier.
3592 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3595 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3596 before generating the version definition section.
3598 2017-04-17 Alan Modra <amodra@gmail.com>
3600 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3601 state when a regular object file defines a symbol with
3602 incompatible type to that defined by an earlier shared lib.
3604 2017-04-13 Alan Modra <amodra@gmail.com>
3606 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3608 * elf32-arm.c: Likewise.
3609 * elf32-i386.c: Likewise.
3610 * elf32-mep.c: Likewise.
3611 * elf64-ia64-vms.c: Likewise.
3612 * elf64-x86-64.c: Likewise.
3613 * elflink.c: Likewise.
3614 * elfnn-ia64.c: Likewise.
3615 * elfxx-mips.c: Likewise.
3617 2017-04-13 Alan Modra <amodra@gmail.com>
3619 * aoutx.h: Use %B and %A in error messages throughout file.
3620 * aout-cris.c: Likewise.
3621 * archive.c: Likewise.
3622 * binary.c: Likewise.
3623 * coff-rs6000.c: Likewise.
3624 * coff-tic4x.c: Likewise.
3625 * coffcode.h: Likewise.
3626 * coffgen.c: Likewise.
3627 * cofflink.c: Likewise.
3628 * coffswap.h: Likewise.
3629 * cpu-arm.c: Likewise.
3630 * elf-eh-frame.c: Likewise.
3631 * elf-m10300.c: Likewise.
3633 * elf32-arc.c: Likewise.
3634 * elf32-arm.c: Likewise.
3635 * elf32-bfin.c: Likewise.
3636 * elf32-frv.c: Likewise.
3637 * elf32-iq2000.c: Likewise.
3638 * elf32-m32c.c: Likewise.
3639 * elf32-microblaze.c: Likewise.
3640 * elf32-nds32.c: Likewise.
3641 * elf32-rl78.c: Likewise.
3642 * elf32-rx.c: Likewise.
3643 * elf32-score.c: Likewise.
3644 * elf32-score7.c: Likewise.
3645 * elf32-sh64.c: Likewise.
3646 * elf32-v850.c: Likewise.
3647 * elf32-vax.c: Likewise.
3648 * elf32-visium.c: Likewise.
3649 * elf64-ia64-vms.c: Likewise.
3650 * elf64-mmix.c: Likewise.
3651 * elf64-sh64.c: Likewise.
3652 * elfcode.h: Likewise.
3653 * elfnn-aarch64.c: Likewise.
3654 * elfnn-ia64.c: Likewise.
3655 * elfxx-mips.c: Likewise.
3656 * hpux-core.c: Likewise.
3659 * linker.c: Likewise.
3660 * merge.c: Likewise.
3662 * oasys.c: Likewise.
3663 * pdp11.c: Likewise.
3664 * peXXigen.c: Likewise.
3665 * rs6000-core.c: Likewise.
3666 * vms-alpha.c: Likewise.
3667 * xcofflink.c: Likewise.
3669 2017-04-13 Alan Modra <amodra@gmail.com>
3671 * bfd.c (PRINT_TYPE): Define.
3672 (_doprnt): New function.
3673 (error_handler_internal): Use _doprnt.
3674 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3675 calls in their natural order, throughout file.
3676 * coff-mcore.c: Likewise.
3677 * coff-ppc.c: Likewise.
3678 * coff-tic80.c: Likewise.
3679 * cofflink.c: Likewise.
3680 * elf-s390-common.c: Likewise.
3682 * elf32-arm.c: Likewise.
3683 * elf32-i386.c: Likewise.
3684 * elf32-m32r.c: Likewise.
3685 * elf32-msp430.c: Likewise.
3686 * elf32-spu.c: Likewise.
3687 * elf64-ia64-vms.c: Likewise.
3688 * elf64-sparc.c: Likewise.
3689 * elf64-x86-64.c: Likewise.
3690 * elflink.c: Likewise.
3691 * elfnn-aarch64.c: Likewise.
3692 * elfnn-ia64.c: Likewise.
3693 * elfxx-mips.c: Likewise.
3695 2017-04-13 Alan Modra <amodra@gmail.com>
3697 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3698 branch veneers" error. Fix double space and format message.
3699 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3700 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3702 2017-04-13 Alan Modra <amodra@gmail.com>
3704 * bfd-in2.h: Regenerate.
3706 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3708 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3709 extra `\n' in warning/error messages.
3710 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3711 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3713 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3715 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3716 processor-specific properties with generic ELF target vector.
3718 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3720 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3721 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3722 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3723 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3725 (link_hash_newfunc): Initialize has_got_reloc and
3727 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3729 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3731 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3733 (_bfd_sparc_elf_fixup_symbol): New function.
3734 (allocate_dynrelocs): Don't allocate space for dynamic
3735 relocations and discard relocations against resolved undefined
3736 weak symbols in executable. Don't make resolved undefined weak
3737 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3738 relocation against undefined weak symbols in PIE.
3739 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3740 relocations against resolved undefined weak symbols in PIE
3741 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3742 without ynamic PLT/GOT relocations for resolved undefined weak
3744 Don't generate dynamic relocation against resolved undefined
3745 weak symbol in executable.
3746 (pie_finish_undefweak_symbol): New function.
3747 (_bfd_sparc_elf_finish_dynamic_sections): Call
3748 pie_finish_undefweak_symbol on all symbols in PIE.
3749 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3750 (_bfd_sparc_elf_fixup_symbol): New function.
3752 2017-04-10 Nick Clifton <nickc@redhat.com>
3754 * config.bfd: Remove ns32k from obsolete list.
3756 2017-04-10 Alan Modra <amodra@gmail.com>
3759 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3760 (special_sections_i): Likewise for .init_array.
3761 (special_sections_p): Likewise for .preinit_array.
3763 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3767 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3768 ELF_COMMON_DEF_P for common symbols.
3769 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3770 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3771 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3772 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3773 07492f668d2173da7a2bda3707ff0985e0f460b6.
3775 2017-04-07 Pedro Alves <palves@redhat.com>
3777 * opncls.c (bfd_get_debug_link_info): Rename to...
3778 (bfd_get_debug_link_info_1): ... this. Change type of second
3779 parameter to void pointer. Adjust.
3780 (bfd_get_debug_link_info): Reimplement on top of
3781 bfd_get_debug_link_info_1.
3782 (separate_debug_file_exists, separate_alt_debug_file_exists):
3783 Change type of second parameter to void pointer. Adjust.
3784 (get_func_type, check_func_type): Change type of second parameter
3786 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3787 the callback functions instead of passing the address of a local.
3788 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3789 find_separate_debug_file.
3790 (get_alt_debug_link_info_shim): Change type of second parameter to
3791 void pointer. Adjust.
3792 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3793 find_separate_debug_file.
3794 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3795 of second parameter to void pointer. Adjust.
3796 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3797 pointer local to find_separate_debug_file.
3799 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3801 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3802 external symbols with a definition.
3803 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3805 2017-04-07 Alan Modra <amodra@gmail.com>
3807 * po/SRC-POTFILES.in: Regenerate.
3809 2017-04-05 Alan Modra <amodra@gmail.com>
3811 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3814 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3816 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3817 numbers for DataDirectory entry indicies passed to
3820 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3822 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3823 each GNU_MBIND section and align GNU_MBIND section to page size.
3824 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3825 segment for each GNU_MBIND section.
3826 (_bfd_elf_init_private_section_data): Copy sh_info from input
3827 for GNU_MBIND section.
3829 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3831 * elfnn-riscv.c (GP_NAME): Delete.
3832 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3833 (_bfd_riscv_relax_lui): Likewise.
3835 2017-04-04 Nick Clifton <nickc@redhat.com>
3838 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3840 (bfd_elf_final_link): Only initialize the extended symbol index
3841 section if there are extended symbol tables to list.
3843 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3845 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3846 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3847 * configure.ac (elf): Add elf-properties.lo.
3848 * Makefile.in: Regenerated.
3849 * configure: Likewise.
3850 * elf-bfd.h (elf_property_kind): New.
3851 (elf_property): Likewise.
3852 (elf_property_list): Likewise.
3853 (elf_properties): Likewise.
3854 (_bfd_elf_parse_gnu_properties): Likewise.
3855 (_bfd_elf_get_property): Likewise.
3856 (_bfd_elf_link_setup_gnu_properties): Likewise.
3857 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3858 and setup_gnu_properties.
3859 (elf_obj_tdata): Add properties.
3860 * elf-properties.c: New file.
3861 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3862 (elf_i386_merge_gnu_properties): Likewise.
3863 (elf_backend_parse_gnu_properties): Likewise.
3864 (elf_backend_merge_gnu_properties): Likewise.
3865 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3866 (elf_x86_64_merge_gnu_properties): Likewise.
3867 (elf_backend_parse_gnu_properties): Likewise.
3868 (elf_backend_merge_gnu_properties): Likewise.
3869 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3870 (elf_backend_parse_gnu_properties): Likewise.
3871 (elf_backend_setup_gnu_properties): Likewise.
3872 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3873 elf_backend_merge_gnu_properties and
3874 elf_backend_setup_gnu_properties.
3876 2017-03-30 Pip Cet <pipcet@gmail.com>
3878 * elf32-wasm32.c: Add relocation code, two relocs.
3879 * reloc.c: Add wasm32 relocations.
3880 * libbfd.h: Regenerate.
3881 * bfd-in2.h: Regenerate.
3882 * bfd/po/bfd.pot: Regenerate.
3884 2017-03-29 Nick Clifton <nickc@redhat.com>
3887 * coff-bfd.h (struct coff_section_data): Add new fields:
3888 saved_bias and bias.
3889 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3890 computed for PE binaries.
3891 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3894 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3897 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3898 to handle a local symbol with a hash-symbol-entry; without PLT.
3899 Add BFD_ASSERT for an incidental case with GOT entry present.
3900 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3901 isn't forced-or-set local.
3903 2017-03-27 Pip Cet <pipcet@gmail.com>
3905 * wasm-module.c: New file to support WebAssembly modules.
3906 * wasm-module.h: New file to support WebAssembly modules.
3907 * doc/webassembly.texi: Start documenting wasm-module.c.
3908 * config.bfd: Add wasm_vec.
3909 * targets.c: Likewise.
3910 * configure.ac: Likewise.
3911 * Makefile.am: Add entries for wasm-module.c.
3912 * Makefile.in: Regenerate.
3913 * configure: Regenerate.
3914 * po/SRC-POTFILES.in: Regenerate.
3916 2017-03-27 Pip Cet <pipcet@gmail.com>
3918 * cpu-wasm32.c: New file to support wasm32 architecture.
3919 * elf32-wasm32.c: New file to support wasm32 architecture.
3920 * Makefile.am: Add wasm32 architecture.
3921 * archures.c: Likewise.
3922 * config.bfd: Likewise.
3923 * configure.ac: Likewise.
3924 * targets.c: Likewise.
3925 * Makefile.in: Regenerate.
3926 * bfd-in2.h: Regenerate.
3927 * configure: Regenerate.
3928 * po/SRC-POTFILES.in: Regenerate.
3930 2017-03-20 Alan Modra <amodra@gmail.com>
3933 * elf64-ppc.c (compare_symbols): Stabilize sort.
3935 2017-03-18 Alan Modra <amodra@gmail.com>
3937 * elf64-ppc.c (struct ppc_link_hash_table): Add
3938 local_ifunc_resolver and maybe_local_ifunc_resolver.
3939 (ppc_build_one_stub): Set flags on emitting dynamic
3940 relocation to ifunc.
3941 (ppc64_elf_relocate_section): Likewise.
3942 (ppc64_elf_finish_dynamic_symbol): Likewise.
3943 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3944 local dynamic relocs to ifuncs.
3945 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3946 local_ifunc_resolver and maybe_local_ifunc_resolver.
3947 (ppc_elf_relocate_section): Set flag on emitting dynamic
3948 relocation to ifuncs.
3949 (ppc_elf_finish_dynamic_symbol): Likewise.
3950 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3951 dynamic relocs to ifuncs.
3953 2017-03-13 Nick Clifton <nickc@redhat.com>
3956 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3957 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3958 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3959 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3960 * bfd-in2.h: Regenerate.
3961 * libbfd.h: Regenerate.
3962 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3964 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3965 (elfNN_aarch64_howto_table): Likewise.
3966 (aarch64_tls_transition_without_check): Likewise.
3967 (aarch64_reloc_got_type): Likewise.
3968 (elfNN_aarch64_final_link_relocate): Likewise.
3969 (elfNN_aarch64_tls_relax): Likewise.
3970 (elfNN_aarch64_relocate_section): Likewise.
3971 (elfNN_aarch64_gc_sweep_hook): Likewise.
3972 (elfNN_aarch64_check_relocs): Likewise.
3973 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3974 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3976 2017-03-11 Alan Modra <amodra@gmail.com>
3978 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3979 parameter is in fact used. Whitespace fixes.
3980 * elf64-ppc.c: Likewise.
3982 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3984 * rs6000-core.c (CORE_NEW): Simplify macro when
3985 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3987 2017-03-07 Alan Modra <amodra@gmail.com>
3991 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3994 2017-03-05 Alan Modra <amodra@gmail.com>
3996 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3997 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3998 (next_cie_fde_offset): New function.
3999 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4000 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4001 four bytes. Align CIEs to four or eight bytes depending on
4002 per_encoding_aligned8. Align FDEs according to their encoding.
4003 Pad last FDE to output section alignment.
4004 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4006 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4007 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4008 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4010 2017-03-02 Martin Bickel <binutils@ineranves.de>
4013 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4014 empty segments which have a zero filesz, but a non-zero memsz.
4016 2017-03-02 Alan Modra <amodra@gmail.com>
4018 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4020 2017-02-28 Alan Modra <amodra@gmail.com>
4022 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4023 (ppc64_elf_relocate_section): Likewise.
4025 2017-02-28 Alan Modra <amodra@gmail.com>
4028 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4029 rather than elf32_nios2_hash_table or elf_hash_table.
4030 (create_got_section): Likewise.
4031 (nios2_elf32_finish_dynamic_symbol): Likewise.
4032 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4033 (nios2_elf32_size_dynamic_sections): Likewise.
4034 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4035 vars. Use htab equivalents directly instead. Don't create
4036 all dynamic sections on needing just the GOT. Use a goto
4037 rather than a fall-through with reloc test. Ensure
4038 htab->dynobj is set when making dynamic sreloc section.
4039 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4040 equivalent directly instead. Don't segfault on looking for
4041 .dynamic when dynamic sections have not been created. Don't
4042 segfault on .got.plt being discarded.
4043 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4044 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4045 fixme and another not so relevant comment.
4046 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4047 already set, set hash table dynobj on creating .sbss.
4049 2017-02-28 Alan Modra <amodra@gmail.com>
4051 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4052 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4053 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4054 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4055 (ppc64_elf_relocate_section): Likewise.
4056 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4057 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4058 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4059 * libbfd.h: Regenerate.
4060 * bfd-in2.h: Regenerate.
4062 2017-02-28 Alan Modra <amodra@gmail.com>
4064 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4065 dynamic .data.rel.ro read-only.
4066 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4067 rather than section flags when deciding where copy reloc goes.
4068 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4069 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4070 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4071 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4072 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4073 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4074 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4075 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4076 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4077 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4078 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4079 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4080 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4081 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4082 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4083 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4084 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4085 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4086 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4088 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4090 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4091 `jalr $0, $25' instruction encoding.
4093 2017-02-27 Nick Clifton <nickc@redhat.com>
4096 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4097 generating a seg-fault when encountering a symbol that has been
4098 deleted by garbage collection.
4100 2017-02-25 Alan Modra <amodra@gmail.com>
4102 * elf32-arc.c (struct dynamic_sections): Delete.
4103 (enum dyn_section_types): Delete.
4104 (dyn_section_names): Delete.
4105 (arc_create_dynamic_sections): Delete.
4106 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4107 segfault on discarded .rela.plt section.
4108 (elf_arc_size_dynamic_sections): Formatting. Don't call
4109 arc_create_dynamic_sections. Don't allocate memory for sections
4110 handled by the generic linker. Correct code finding relocs in
4111 read-only sections. Set SEC_EXCLUDE on zero size .got,
4112 .got.plt, and .dynbss sections. Do set .interp for pies.
4114 2017-02-24 Andrew Waterman <andrew@sifive.com>
4116 * elfnn-riscv.c (GP_NAME): New macro.
4117 (riscv_global_pointer_value): Use it.
4118 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4119 output section, consider only that section's alignment.
4121 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4123 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4124 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4125 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4126 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4128 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4130 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4131 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4134 2017-02-23 Alan Modra <amodra@gmail.com>
4137 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4139 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4140 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4143 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4146 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4147 processing ahead of the call to `elf_gc_sweep_symbol'.
4149 2017-02-22 Nick Clifton <nickc@redhat.com>
4152 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4153 created section 4-byte alignment.
4155 2017-02-22 Alan Modra <amodra@gmail.com>
4157 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4158 on .got or .plt output section being discarded by script.
4159 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4162 2017-02-21 Alan Modra <amodra@gmail.com>
4164 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4165 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4167 2017-02-20 Alan Modra <amodra@gmail.com>
4170 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4171 if DT_RELSZ/DT_RELASZ is zero.
4173 2017-02-17 Nick Clifton <nickc@redhat.com>
4175 * compress.c (bfd_get_full_section_contents): Remember to reduce
4176 compressed size by the sizeof the compression header when
4177 decompressing the contents.
4179 2017-02-17 Pedro Alves <palves@redhat.com>
4181 * srec.c (Chunk): Rename to ...
4182 (_bfd_srec_len): ... this.
4183 (S3Forced): Rename to ...
4184 (_bfd_srec_forceS3): ... this.
4185 * objcopy.c: Adjust all references.
4187 2017-02-17 Pedro Alves <palves@redhat.com>
4189 * archive.c (bsd_write_armap): Rename to ...
4190 (_bfd_bsd_write_armap): ... this.
4191 (coff_write_armap): Rename to ...
4192 (_bfd_coff_write_armap): ... this.
4193 * libbfd-in.h (bsd_write_armap): Rename to ...
4194 (_bfd_bsd_write_armap): ... this.
4195 (coff_write_armap): Rename to ...
4196 (_bfd_coff_write_armap): ... this.
4197 * aout-target.h, aout-tic30.c: Adjust all users.
4198 * libbfd.h: Regenerate.
4200 2017-02-17 Pedro Alves <palves@redhat.com>
4202 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4203 (warn_deprecated): Rename to ...
4204 (_bfd_warn_deprecated): ... this.
4205 * libbfd.c (warn_deprecated): Rename to ...
4206 (_bfd_warn_deprecated): ... this.
4207 * bfd-in2.h: Regenerate.
4209 2017-02-17 Pedro Alves <palves@redhat.com>
4211 * bfdio.c (real_ftell): Rename to ...
4212 (_bfd_real_ftell): ... this.
4213 (real_fseek): Rename to ...
4214 (_bfd_real_fseek): ... this.
4215 (real_fopen): Rename to ...
4216 (_bfd_real_fopen): ... this.
4217 * libbfd-in.h (real_ftell): Rename to ...
4218 (_bfd_real_ftell): ... this.
4219 (real_fseek): Rename to ...
4220 (_bfd_real_fseek): ... this.
4221 (real_fopen): Rename to ...
4222 (_bfd_real_fopen): ... this.
4223 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4224 * libbfd.h: Regenerate.
4226 2017-02-17 Pedro Alves <palves@redhat.com>
4228 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4229 * libbfd.c (read_unsigned_leb128): Rename to ...
4230 (_bfd_read_unsigned_leb128): ... this.
4231 (read_signed_leb128): Rename to ...
4232 (_bfd_read_signed_leb128): ... this.
4233 (safe_read_leb128): Rename to ...
4234 (_bfd_safe_read_leb128): ... this.
4235 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4236 (_bfd_read_unsigned_leb128): ... this.
4237 (read_signed_leb128): Rename to ...
4238 (_bfd_read_signed_leb128): ... this.
4239 (safe_read_leb128): Rename to ...
4240 (_bfd_safe_read_leb128): ... this.
4241 * libbfd.h: Renegerate.
4243 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4245 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4246 before trying to fine matching file and line information.
4248 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4250 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4251 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4252 not match current bfd, then reload debug information. Record bfd
4253 we're loading debug info for in the stash. If we have debug
4254 informatin in the cache then perform section placement before
4257 2017-02-16 Alan Modra <amodra@gmail.com>
4260 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4261 * elfxx-target.h (elf_backend_no_page_alias): Define.
4262 (elfNN_bed): Init new field.
4263 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4264 ensure PT_LOAD segment starts on a new page.
4265 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4267 2017-02-16 Alan Modra <amodra@gmail.com>
4270 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4273 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4275 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4276 * bfd-in2.h: Regenerated.
4278 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4281 * elf32-i386.c (elf_i386_relocate_section): Allow
4282 "lea foo@GOT, %reg" in PIC.
4284 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4287 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4288 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4289 error against local IFUNC symbol without a base register for
4292 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4294 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4295 `%P: %H:' with `info->callbacks->einfo'.
4296 (ppc_elf_relocate_section): Likewise.
4297 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4298 (ppc64_elf_edit_toc): Likewise.
4299 (ppc64_elf_relocate_section): Likewise.
4301 2017-02-14 Alan Modra <amodra@gmail.com>
4303 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4304 --gc-keep-exported, and test versioned field of sym rather than
4305 looking for @ in name.
4307 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4309 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4312 2017-02-13 Nick Clifton <nickc@redhat.com>
4315 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4318 2017-02-07 Andrew Waterman <andrew@sifive.com>
4320 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4321 entry size if PLT header is written.
4323 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4325 Fix sparc64 dynamic relocation processing to use the dynamic
4327 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4328 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4331 2017-02-03 Nick Clifton <nickc@redhat.com>
4334 * coffcode.h (coff_write_object_contents): Enlarge size of
4335 s_name_buf in order to avoid compile time warning about possible
4337 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4338 32-bits of insn value before printing into buffer.
4340 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4342 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4343 `max_local_dynindx'.
4344 (mips_elf_sort_hash_table): Handle it.
4345 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4346 symbols bump up `max_local_dynindx' rather than
4347 `max_non_got_dynindx'.
4349 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4351 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4352 `min_got_dynindx', `max_unref_got_dynindx' and
4353 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4354 (mips_elf_sort_hash_table): Adjust accordingly.
4356 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4358 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4359 to access the hash table.
4361 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4363 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4364 non-NULL `htab' to the beginning.
4366 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4368 * elflink.c (elf_gc_sweep): Wrap overlong line.
4370 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4372 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4373 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4374 * elfxx-mips.c (mips_elf_link_hash_table): Add
4375 `ignore_branch_isa' member.
4376 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4377 in branch relocation calculation as an error if
4378 `ignore_branch_isa' has been set.
4379 (_bfd_mips_elf_insn32): Rename to...
4380 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4381 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4382 Handle the new parameter.
4384 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4386 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4387 local variable dynobj.
4390 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4391 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4392 executable from read-only sections into sdynrelro.
4393 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4394 dynamic relocs in sdynrelro.
4395 (elf_backend_want_dynrelro): Define.
4397 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4399 * config.bfd (*-*-rtemsaout*): Mark as removed.
4401 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4403 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4404 (arm-*-rtems*): Move to (arm*-*-eabi*).
4405 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4406 (m68-*-rtems*): Move to (m68*-*-elf*).
4408 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4410 * config.bfd (*-*-rtemscoff*): Mark as removed.
4412 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4415 * elflink.c (bfd_elf_record_link_assignment): Revert last
4416 change and don't ever clear `forced_local'. Set `mark'
4418 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4420 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4421 (bfd_elf_size_dynamic_sections): ... here.
4422 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4423 and set `mark' instead in `__tls_get_addr_opt' processing.
4424 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4426 2017-01-24 Alan Modra <amodra@gmail.com>
4428 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4429 where dynamic relocs are preferable. Allow ifunc too.
4430 (ensure_undefweak_dynamic): New function.
4431 (allocate_dynrelocs): Use it here. Move plt handling last and
4432 don't make symbols dynamic, simplifying loop. Only make undef
4433 weak symbols with GOT entries dynamic. Correct condition
4434 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4435 comments. Remove goto.
4436 (ppc_elf_relocate_section): Correct test for using dynamic
4437 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4438 to suit. Set up explicit tls_index entries and implicit GOT
4439 tls_index entries resolvable at link time for
4440 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4441 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4442 (ensure_undefweak_dynamic): New function.
4443 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4444 with GOT entries dynamic. Remove unnecessary test of
4445 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4446 (ppc64_elf_relocate_section): Correct test for using dynamic
4447 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4448 to suit. Set up explicit tls_index entries and implicit GOT
4449 tls_index entries resolvable at link time for __tls_get_addr_opt.
4450 Simplify expression to clear mem for prelink.
4452 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4454 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4456 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4458 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4459 (elf_backend_hash_symbol): Define.
4461 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4464 * elflink.c (bfd_elf_record_link_assignment): Clear any
4465 `forced_local' marking for DSO symbols that are not being
4468 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4470 * elfnn-riscv.c (riscv_elf_object_p): New function.
4472 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4475 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4477 (elf_x86_64_check_relocs): Create .eh_frame section for the
4479 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4480 .eh_frame section for the .plt.bnd section.
4481 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4482 for the .plt.bnd section.
4484 2017-01-12 Nick Clifton <nickc@redhat.com>
4487 * opncls.c (find_separate_debug_file): Add include_dirs
4488 parameter. Only include the directory part of the bfd's filename
4489 in search paths if include_dirs is true. Add a couple of extra
4490 locations for looking for debug files.
4491 ( bfd_follow_gnu_debuglink): Update invocation of
4492 find_separate_debug_file.
4493 (bfd_follow_gnu_debugaltlink): Likewise.
4494 (get_build_id): New function: Finds the build-id of the given bfd.
4495 (get_build_id_name): New function: Computes the name of the
4496 separate debug info file for a bfd, based upon its build-id.
4497 (check_build_id_file): New function: Checks to see if a separate
4498 debug info file exists at the given location, and that its
4499 build-id matches that of the original bfd.
4500 (bfd_follow_build_id_debuglink): New function: Finds a separate
4501 debug info file for a given bfd by using the build-id method.
4502 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4503 method of locating a separate debug info file before using the
4505 * bfd-in2.h: Regenerate.
4507 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4510 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4511 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4512 elf_x86_64_eh_frame_plt_got.
4513 (elf_x86_64_size_dynamic_sections): Get unwind info from
4514 elf_x86_64_bnd_arch_bed for the BND PLT.
4516 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4518 * config.bfd: Add entries for i686-redox and x86_64-redox.
4520 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4522 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4524 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4525 .eh_frame section to 4 bytes for x32.
4526 (elf_x86_64_check_relocs): Likewise.
4528 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4531 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4532 (PLT_GOT_FDE_LENGTH): Likewise.
4533 (elf_i386_plt_layout): Add eh_frame_plt_got and
4534 eh_frame_plt_got_size.
4535 (elf_i386_plt): Updated.
4536 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4537 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4538 (elf_i386_size_dynamic_sections): Allocate and initialize
4539 .eh_frame section for .plt.got.
4540 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4542 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4543 eh_frame_plt_got_size.
4544 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4545 (PLT_GOT_FDE_LENGTH): Likewise.
4546 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4547 eh_frame_plt_got_size.
4548 (elf_x86_64_arch_bed): Updated.
4549 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4550 eh_frame_plt_got_size.
4551 (elf_x86_64_nacl_arch_bed): Likewise.
4552 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4553 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4554 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4555 .eh_frame section for .plt.got.
4556 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4559 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4561 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4562 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4564 2017-01-09 Nick Clifton <nickc@redhat.com>
4566 * dwarf2.c (lookup_address_in_function_table): Return early if
4567 there are no functions in the given comp unit, or if the high
4568 address of the last function in the comp unit is less than the
4571 2017-01-09 Nick Clifton <nickc@redhat.com>
4574 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4575 message if there are too many symbols to load.
4577 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4579 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4580 if relocs are cached.
4582 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4585 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4586 for R_MICROBLAZE_GOTOFF_64.
4588 2017-01-03 Nick Clifton <nickc@redhat.com>
4590 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4591 warning about using a possibly uninitialised variable.
4593 2017-01-02 Alan Modra <amodra@gmail.com>
4595 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4596 (allocate_plt_static, allocate_dynrelocs): Use it.
4598 2017-01-02 Alan Modra <amodra@gmail.com>
4600 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4601 .PARISC.unwind section.
4603 2017-01-02 Alan Modra <amodra@gmail.com>
4606 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4607 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4608 indirect to GOT pointer relative code edit.
4610 2017-01-02 Alan Modra <amodra@gmail.com>
4612 Update year range in copyright notice of all files.
4614 For older changes see ChangeLog-2016
4616 Copyright (C) 2017 Free Software Foundation, Inc.
4618 Copying and distribution of this file, with or without modification,
4619 are permitted in any medium without royalty provided the copyright
4620 notice and this notice are preserved.
4626 version-control: never