1 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
4 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
5 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
6 (allocate_fptr): Don't allocate function pointer if
7 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
8 (allocate_dynrel_entries): Don't allocate dynamic relocation
9 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
10 (set_got_entry): Don't set GOT entry if
11 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
12 (set_pltoff_entry): Don't set PLTOFF entry if
13 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
14 (elfNN_ia64_relocate_section): Don't install dynamic relocation
15 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
17 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
20 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
21 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
22 (allocate_dynrelocs): Don't allocate dynamic relocations if
23 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
25 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
28 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
29 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
30 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
31 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
33 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
36 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
37 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
38 (tilepro_elf_relocate_section): Don't generate dynamic
39 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
40 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
41 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
42 (tilegx_elf_relocate_section): Don't generate dynamic
43 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
45 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
48 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
49 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
51 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
52 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
54 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
56 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
57 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
58 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
60 2017-10-12 James Bowman <james.bowman@ftdichip.com>
62 * bfd-in2.h: Regenerate.
63 * libbfd.h: Regenerate.
64 * elf32-ft32.c: Add HOWTO R_FT32_15.
65 * reloc.c: Add BFD_RELOC_FT32_15.
67 2017-10-12 Nick Clifton <nickc@redhat.com>
69 * reloc.c (enum bfd_reloc_status): Start values at 2.
70 * bfd-in2.h: Regenerate.
71 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
72 that a TRUE return indicates success. Compare the result of
73 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
74 (build_one_stub): Change sense of tests against aarch64_relocate
76 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
77 than FALSE, when an error is detected.
78 (elfNN_aarch64_final_link_relocate): Likewise.
80 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
82 * elf32-i386.c (elf_backend_hide_symbol): New.
83 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
84 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
85 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
87 2017-10-12 Alan Modra <amodra@gmail.com>
89 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
90 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
91 (bfd_elf_define_start_stop): Likewise.
93 2017-10-12 Alan Modra <amodra@gmail.com>
95 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
96 when executable rather than non-PIC.
97 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
98 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
100 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
102 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
104 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
105 (elf_external_linux_prpsinfo64_ugid32): ... this.
106 (swap_linux_prpsinfo32_out): Rename to...
107 (swap_linux_prpsinfo32_ugid32_out): ... this.
108 (elf_external_linux_prpsinfo64_ugid16): New structure.
109 (swap_linux_prpsinfo64_ugid16_out): New function.
110 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
111 (elf_backend_linux_prpsinfo64_ugid16): Define.
112 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
113 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
114 of the 64-bit Linux core PRPSINFO note.
115 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
117 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
119 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
121 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
122 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
123 (elf_external_ppc_linux_prpsinfo32)
124 (swap_ppc_linux_prpsinfo32_out): Move to...
125 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
126 (swap_linux_prpsinfo32_ugid32_out): ... these.
127 (elf_external_linux_prpsinfo32): Rename to...
128 (elf_external_linux_prpsinfo32_ugid16): ... this.
129 (swap_linux_prpsinfo32_out): Rename to...
130 (swap_linux_prpsinfo32_ugid16_out): ... this.
131 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
132 (elf_backend_linux_prpsinfo32_ugid16): Define.
133 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
134 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
135 of the 32-bit Linux core PRPSINFO note.
136 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
137 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
138 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
139 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
140 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
141 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
142 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
143 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
144 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
145 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
147 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
149 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
150 `gap' member ahead of `pr_flag'.
152 2017-10-11 Pedro Alves <palves@redhat.com>
154 * bfd.c (_doprnt): Rename to ...
155 (_bfd_doprnt): ... this.
156 (error_handler_internal): Adjust.
158 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
160 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
161 instead of incrementing it.
162 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
164 2017-10-10 Renlin Li <renlin.li@arm.com>
167 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
168 symbols into dynamic.
170 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
173 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
174 (riscv_elf_link_hash_table_create): Initialize max_alignment to
176 (_bfd_riscv_relax_section): Cache the max alignment of output
177 sections if possible.
179 2017-10-10 Alan Modra <amodra@gmail.com>
181 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
182 .opd whenever .opd is present and non-zero size. Move code
183 setting abiversion to/from output file earlier. Only set
184 u.opd.func_sec when --gc-sections. Read relocs and set up
185 u.opd.func_sec values here..
186 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
188 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
190 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
192 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
195 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
197 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
198 .interp section with "ld --no-dynamic-linker".
200 2017-10-09 Alan Modra <amodra@gmail.com>
203 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
204 funcinfo_hash_table and varinfo_hash_table.
206 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
208 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
209 in read-only section with minfo.
210 (sh_elf_size_dynamic_sections): Likewise.
212 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
214 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
217 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
219 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
220 this_hdr.sh_entsize only if section size > 0.
222 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
224 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
226 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
228 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
229 in read-only section with minfo.
230 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
232 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
234 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
237 2017-10-06 John Baldwin <jhb@FreeBSD.org>
239 * elf-bfd.h (struct elf_backend_data): Add
240 `elf_backend_grok_freebsd_prstatus'.
241 * elf.c (elfcore_grok_freebsd_note): Call
242 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
244 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
246 (elf_backend_grok_freebsd_prstatus): Define.
247 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
248 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
250 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
252 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
253 and has_non_got_reloc with zero_undefweak.
254 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
255 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
257 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
258 has_non_got_reloc with zero_undefweak.
259 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
260 has_got_reloc and has_non_got_reloc with zero_undefweak.
261 (elf_x86_link_hash_entry): Likewise.
263 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
265 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
266 (VERIFY_COPY_RELOC): Likewise.
268 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
270 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
271 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
272 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
274 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
276 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
277 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
278 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
280 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
282 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
283 * elf32-i386.c (elf_i386_relocate_section): Use it.
284 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
286 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
288 * elf32-i386.c (X86_SIZE_TYPE_P): New.
289 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
290 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
291 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
292 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
294 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
296 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
297 (PLT_LOCAL_IFUNC_P): Likewise.
298 * elf32-i386.c (elf_i386_relocate_section): Use them.
299 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
301 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
303 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
304 * elf32-i386.c (elf_i386_relocate_section): Use it.
305 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
307 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
309 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
310 * elf32-i386.c (elf_i386_relocate_section): Use it.
311 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
313 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
315 * elf32-i386.c (X86_PCREL_TYPE_P): New.
316 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
317 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
318 (X86_PCREL_TYPE_P): This.
319 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
320 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
321 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
323 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
325 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
327 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
328 * elf32-i386.c (elf_i386_tls_transition): Use it.
329 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
331 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
333 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
334 Dump dynamic relocation in read-only section with minfo if
336 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
337 (maybe_set_textrel): Likewise.
338 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
339 read-only section with minfo.
341 2017-10-05 John Baldwin <jhb@FreeBSD.org>
343 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
345 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
347 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
348 in read-only section with minfo.
349 (tilepro_elf_size_dynamic_sections): Likewise.
350 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
351 (tilegx_elf_size_dynamic_sections): Likewise.
353 2017-10-05 Pedro Alves <palves@redhat.com>
356 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
357 ellipsis parameter. Split out bfd_error_on_input code to..
358 (bfd_set_input_error): .. New function.
359 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
360 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
361 * bfd-in2.h: Regenerate.
363 2017-10-05 Alan Modra <amodra@gmail.com>
365 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
366 fini_array error value.
368 2017-10-05 Alan Modra <amodra@gmail.com>
371 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
373 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
375 (elf_fake_sections): Adjust calls. Exit immediately on failure.
376 (bfd_elf_set_group_contents): Add associated reloc section indices
379 2017-10-04 Alan Modra <amodra@gmail.com>
381 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
382 classify symbols for ELFv2.
384 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
387 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
388 undergoes default promotion.
389 * bfd-in2.h: Regenerate.
391 2017-10-02 Alan Modra <amodra@gmail.com>
393 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
394 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
396 2017-10-01 Alan Modra <amodra@gmail.com>
399 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
400 (add_line_info): Always put end_sequence last.
402 2017-10-01 Alan Modra <amodra@gmail.com>
405 * dwarf2.c (read_section): Allocate buffer with extra byte for
406 bfd_simple_get_relocated_section_contents rather than copying
409 2017-09-29 Alan Modra <amodra@gmail.com>
411 * merge.c (merge_strings): Return FALSE on malloc failure.
412 (_bfd_merge_sections): Return failures from record_section and
415 2017-09-28 Alan Modra <amodra@gmail.com>
418 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
419 a case where plugin_notice isn't called.
421 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
423 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
426 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
429 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
430 output_bfd to info->callbacks->minfo.
432 2017-09-26 Nick Clifton <nickc@redhat.com>
435 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
436 assertion failure if elf_x86_64_rtype_to_howto has already issued
439 2017-09-26 Alan Modra <amodra@gmail.com>
442 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
445 2017-09-26 Nick Clifton <nickc@redhat.com>
448 * dwarf2.c (read_formatted_entries): Fail early if we know that
449 the loop parsing data entries will overflow the end of the
452 2017-09-26 Alan Modra <amodra@gmail.com>
455 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
456 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
457 to stash->info_ptr_memory, and check die_ref is within that memory.
458 Set info_ptr_end correctly when another CU is refd. Check die_ref
459 for DW_FORM_ref4 etc. is within CU.
461 2017-09-26 Alan Modra <amodra@gmail.com>
464 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
465 (read_formatted_entries): Init "fe".
466 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
468 2017-09-26 Alan Modra <amodra@gmail.com>
471 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
472 bounds in inner loop.
474 2017-09-25 Alan Modra <amodra@gmail.com>
477 * dwarf1.c (parse_die): Sanity check pointer against section limit
478 before dereferencing.
479 (parse_line_table): Likewise.
481 2017-09-25 Alan Modra <amodra@gmail.com>
484 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
486 (parse_comp_unit): Likewise.
488 2017-09-25 Alan Modra <amodra@gmail.com>
491 * dwarf2.c (read_formatted_entries): Error on format_count zero.
493 2017-09-24 Alan Modra <amodra@gmail.com>
496 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
497 within section bounds.
499 2017-09-24 Alan Modra <amodra@gmail.com>
502 * dwarf2.c (decode_line_info): Properly free line sequences on error.
504 2017-09-24 Alan Modra <amodra@gmail.com>
507 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
508 pname param. Return status. Make name const. Don't abort,
509 return an error. Formatting. Exit if current info_ptr matches
510 orig_info_ptr. Update callers.
511 (scan_unit_for_symbols): Start at nesting_level of zero. Make
512 nested_funcs an array of structs for extensibility. Formatting.
514 2017-09-24 Alan Modra <amodra@gmail.com>
517 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
518 rather than dividing by zero.
520 2017-09-24 Alan Modra <amodra@gmail.com>
523 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
525 2017-09-24 Alan Modra <amodra@gmail.com>
528 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
530 2017-09-24 Alan Modra <amodra@gmail.com>
533 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
534 SHT_GNU_verneed section for sanity. Don't zalloc memory for
537 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
540 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
543 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
546 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
547 -1 if bfd_canonicalize_dynamic_reloc returns 0.
549 2017-09-22 Pedro Alves <palves@redhat.com>
550 Alan Modra <amodra@gmail.com>
552 * version.h: Add comment.
554 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
556 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
557 NT_S390_GS_BC, correct the previously swapped invocations of
558 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
560 2017-09-19 Alan Modra <amodra@gmail.com>
563 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
566 2017-09-19 Alan Modra <amodra@gmail.com>
569 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
570 symbols before calculating verrefs. Don't renumber dynsyms
571 after gc. Exclude .gnu.version when zero or one dynsym.
572 Localize some vars and reindent.
574 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
577 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
578 return from bfd_canonicalize_dynamic_reloc.
580 2017-09-15 Alan Modra <amodra@gmail.com>
583 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
584 overflows bfd_size_type.
586 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
589 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
590 to indicate if conversion is performed.
591 (elf_i386_check_relocs): Cache section contents and relocations
592 if conversion is performed.
593 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
594 contents and relocations if conversion is performed.
596 2017-09-14 Nick Clifton <nickc@redhat.com>
599 * peXXigen.c (pe_print_idata): Extend check for HintName vector
602 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
604 * elfxx-x86.h: Fix a typo in comments.
606 2017-09-09 Kamil Rytarowski <n54@gmx.com>
608 * elf32-nds32.c: Rename __BIT() to N32_BIT().
610 2017-09-09 Alan Modra <amodra@gmail.com>
612 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
615 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
617 * elf32-i386.c (elf_i386_relocate_section): Update usage of
618 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
619 (elf_i386_finish_dynamic_symbol): Likewise.
620 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
621 (elf_x86_64_finish_dynamic_symbol): Likewise.
622 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
623 (_bfd_x86_elf_fixup_symbol): Likewise.
625 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
627 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
628 check has_non_got_reloc.
630 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
633 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
634 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
635 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
636 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
637 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
638 and linker_def on __ehdr_start if it is referenced and not
640 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
641 and return TRUE when building executable, if a symbol has
642 non-GOT/non-PLT relocations in text section or there is no
644 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
646 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
648 * elfxx-x86.h: Update comments.
650 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
652 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
653 elf_x86_plt_layout_table with elf_x86_init_table.
654 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
656 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
658 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
659 (elf_x86_init_table): This.
660 (_bfd_x86_elf_link_setup_gnu_properties): Replace
661 elf_x86_plt_layout_table with elf_x86_init_table.
663 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
665 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
666 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
667 * configure: Regenerated.
668 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
669 and r_sym fields of plt_layout.
670 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
672 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
673 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
674 r_info nor r_sym fields.
675 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
677 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
679 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
681 * (_bfd_riscv_relax_align): Call bfd_set_error and
682 print an error message when unable to relax a .align directive.
684 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
686 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
687 (riscv_record_pcrel_hi_reloc): Add absolute argument.
688 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
689 R_RISCV_PCREL_HI20 relocs, and pass the result to
690 riscv_record_pcrel_hi_reloc.
692 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
694 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
695 r_type_p. Remove the converted argument. Replace
696 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
697 the new relocation type via r_type_p.
698 (elf_i386_relocate_section): Likewise.
699 (elf_i386_finish_dynamic_symbol): Likewise.
700 (need_convert_load): Removed.
701 (check_relocs_failed): Updated.
702 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
703 instead of setting need_convert_load.
704 (_bfd_i386_elf_convert_load): Removed.
705 * elf64-x86-64.c (need_convert_load): Removed.
706 (check_relocs_failed): Updated.
707 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
708 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
709 Return the new relocation type via r_type_p.
710 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
711 instead of setting need_convert_load.
712 (elf_x86_64_check_relocs): Don't check PIC if relocation has
714 (_bfd_x86_64_elf_convert_load): Removed.
715 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
716 with SYMBOL_REFERENCES_LOCAL_P.
717 (elf_x86_64_finish_dynamic_symbol): Likewise.
718 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
720 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
721 (_bfd_x86_elf_link_symbol_references_local): New function.
722 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
723 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
724 SYMBOL_REFERENCES_LOCAL_P.
725 (elf_x86_link_hash_entry): Add local_ref.
726 (elf_x86_link_hash_table): Remove convert_load.
727 (_bfd_i386_elf_convert_load): Removed.
728 (_bfd_x86_64_elf_convert_load): Likewise.
729 (_bfd_x86_elf_link_symbol_references_local): New.
731 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
733 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
734 (elf_x86_64_info_to_howto): Get the real relocation type by
735 masking out R_X86_64_converted_reloc_bit.
736 (elf_x86_64_check_tls_transition): Get the real relocation type
737 by masking out R_X86_64_converted_reloc_bit.
738 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
739 instead of setting converted_reloc.
740 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
741 instead of converted_reloc. Get the real relocation type by
742 masking out R_X86_64_converted_reloc_bit.
743 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
744 R_X86_64_converted_reloc_bit is valid.
745 * elfxx-x86.h (converted_reloc): Removed.
747 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
749 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
750 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
751 to get the relocation type again.
752 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
753 r_type when calling elf_x86_64_tls_transition. Don't use
754 ELF32_R_TYPE to get the relocation type again.
756 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
758 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
761 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
763 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
764 argument. Don't check relocation overflow. Avoid relocation
765 overflow if --no-relax is used. Set converted_reloc on symbol
766 if a GOTPCREL relocation is converted.
767 (elf_x86_64_relocate_section): Issue a fatal error and suggest
768 --no-relax if GOTPCREL relocation conversion leads to relocation
770 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
772 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
773 Edmar Wienskoski <edmar.wienskoski@nxp.com
775 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
776 (ppc_elf_check_relocs): Handle it.
777 (ppc_elf_vle_split20): New function.
778 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
780 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
783 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
784 for x86-64 if GOT_TLS_GDESC_P is true.
786 2017-09-03 Alan Modra <amodra@gmail.com>
789 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
791 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
793 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
794 tls_get_addr for x86-64 in one place.
796 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
798 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
799 with elfxx-x86.lo for 64-bit BFD.
800 * configure: Regenerated.
802 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
804 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
805 (_bfd_i386_elf_convert_load): This. Remove static.
806 (elf_i386_size_dynamic_sections): Removed.
807 (elf_backend_size_dynamic_sections): Likewise.
808 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
809 (_bfd_x86_64_elf_convert_load): This. Remove static.
810 (elf_x86_64_size_dynamic_sections): Removed.
811 (elf_backend_size_dynamic_sections): Likewise.
812 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
813 (elf_x86_allocate_dynrelocs): This. Make it static.
814 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
815 (elf_x86_allocate_local_dynreloc): This. Make it static.
816 (elf_i386_is_reloc_section): New function.
817 (elf_x86_64_is_reloc_section): Likewise.
818 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
819 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
820 Rearrange got_entry_size initialization.
821 (_bfd_x86_elf_size_dynamic_sections): New function.
822 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
823 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
824 (_bfd_i386_elf_convert_load): New.
825 (_bfd_x86_64_elf_convert_load): Likewise.
826 (_bfd_x86_elf_size_dynamic_sections): Likewise.
827 (elf_backend_size_dynamic_sections): Likewise.
828 (_bfd_x86_elf_allocate_dynrelocs): Removed.
829 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
831 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
833 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
836 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
838 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
839 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
841 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
843 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
844 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
845 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
846 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
847 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
848 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
850 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
852 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
853 (elf_i386_allocate_local_dynrelocs): Likewise.
854 (elf_i386_size_dynamic_sections): Replace
855 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
856 with _bfd_x86_elf_allocate_dynrelocs and
857 _bfd_x86_elf_allocate_local_dynrelocs.
858 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
859 (elf_x86_64_allocate_local_dynrelocs): Likewise.
860 (elf_x86_64_size_dynamic_sections): Replace
861 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
862 with _bfd_x86_elf_allocate_dynrelocs and
863 _bfd_x86_elf_allocate_local_dynrelocs.
864 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
865 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
866 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
867 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
869 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
871 * elf32-i386.c (is_i386_elf): Removed.
872 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
873 (elf_i386_size_dynamic_sections): Likewise.
874 (elf_i386_relocate_section): Likewise.
875 * elf64-x86-64.c (is_x86_64_elf): Removed.
876 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
878 (elf_x86_64_size_dynamic_sections): Likewise.
879 (elf_x86_64_relocate_section): Likewise.
880 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
882 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
885 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
887 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
888 (elf_i386_allocate_dynrelocs): Replace
889 elf_i386_compute_jump_table_size with
890 elf_x86_compute_jump_table_size.
891 (elf_i386_size_dynamic_sections): Likewise.
892 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
893 (elf_x86_64_allocate_dynrelocs): Replace
894 elf_x86_64_compute_jump_table_size with
895 elf_x86_compute_jump_table_size.
896 (elf_x86_64_size_dynamic_sections): Likewise.
897 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
899 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
900 (elf_x86_compute_jump_table_size): New.
902 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
904 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
906 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
907 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
909 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
911 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
912 with htab->is_vxworks.
913 (elf_i386_size_dynamic_sections): Likewise.
914 (elf_i386_relocate_section): Likewise.
915 (elf_i386_finish_dynamic_symbol): Likewise.
916 (elf_i386_finish_dynamic_sections): Likewise.
918 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
920 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
921 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
922 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
923 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
924 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
925 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
926 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
927 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
929 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
932 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
933 ELF_COMMON_DEF_P for common symbols.
935 2017-09-02 Alan Modra <amodra@gmail.com>
937 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
938 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
939 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
941 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
943 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
944 (elf_backend_gc_mark_hook): Likewise.
945 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
946 (elf_backend_gc_mark_hook): Likewise.
947 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
948 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
949 (elf_backend_gc_mark_hook): Likewise.
951 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
953 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
954 (elf_backend_adjust_dynamic_symbol): Likewise.
955 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
956 (elf_backend_adjust_dynamic_symbol): Likewise.
957 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
958 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
959 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
960 (_bfd_x86_elf_adjust_dynamic_symbol): New.
961 (elf_backend_adjust_dynamic_symbol): Likewise.
963 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
965 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
968 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
970 * elf32-i386.c (elf_i386_mkobject): Removed.
971 (bfd_elf32_mkobject): Likewise.
972 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
973 (bfd_elf64_mkobject): Likewise.
974 (bfd_elf32_mkobject): Likewise.
975 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
976 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
977 (bfd_elf64_mkobject): Likewise.
978 (bfd_elf32_mkobject): Likewise.
980 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
982 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
983 Call _bfd_x86_elf_link_setup_gnu_properties.
984 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
985 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
987 (elf_x86_64_non_lazy_plt): Likewise.
988 (elf_x86_64_lazy_bnd_plt): Likewise.
989 (elf_x86_64_non_lazy_bnd_plt): Likewise.
990 (elf_x86_64_lazy_ibt_plt): Likewise.
991 (elf_x32_lazy_ibt_plt): Likewise.
992 (elf_x86_64_non_lazy_ibt_plt): Likewise.
993 (elf_x32_non_lazy_ibt_plt): Likewise.
994 (elf_x86_64_nacl_plt): Likewise.
995 (elf_x86_64_link_setup_gnu_properties): Updated. Call
996 _bfd_x86_elf_link_setup_gnu_properties.
997 * elfxx-x86.c: Include elf-vxworks.h".
998 (_bfd_x86_elf_link_setup_gnu_properties): New function.
999 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1000 comments for pic_plt0_entry and pic_plt_entry.
1001 (elf_x86_non_lazy_plt_layout): Likewise.
1002 (elf_x86_plt_layout_table): New.
1003 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1005 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1008 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1009 .eh_frame section for the second PLT.
1010 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1011 alignment of .eh_frame section for the second PLT.
1013 2017-09-01 Nick Clifton <nickc@redhat.com>
1016 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1019 2017-09-01 Nick Clifton <nickc@redhat.com>
1022 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1023 attribute buffer is NUL terminated.
1025 2017-08-31 Nick Clifton <nickc@redhat.com>
1028 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1029 to dwarf string sections.
1031 2017-08-31 Alan Modra <amodra@gmail.com>
1033 * po/SRC-POTFILES.in: Regenerate.
1035 2017-08-31 Alan Modra <amodra@gmail.com>
1037 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1038 for a section containing just a terminator. Allow multiple
1039 terminators at end of section.
1040 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1041 sections when not adding alignment. Assert on terminator in
1044 2017-08-31 Alan Modra <amodra@gmail.com>
1048 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1051 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1053 * configure.ac (bfd_backends): Add elf64.lo together with
1054 elfxx-x86.lo for 64-bit BFD.
1055 * configure: Regenerated.
1057 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1059 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1062 2017-08-31 Alan Modra <amodra@gmail.com>
1065 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1066 before _close_and_cleanup. Call iovec->bclose after.
1067 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1069 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1071 * elf32-i386.c (elf_i386_plt_type): Removed.
1072 (elf_i386_plt): Likewise.
1073 (elf_i386_get_synthetic_symtab): Updated. Call
1074 _bfd_x86_elf_get_synthetic_symtab.
1075 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1076 (elf_x86_64_plt): Likewise.
1077 (elf_x86_64_get_synthetic_symtab): Updated. Call
1078 _bfd_x86_elf_get_synthetic_symtab.
1079 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1080 (elf_x86_64_get_plt_got_vma): Likewise.
1081 (elf_i386_valid_plt_reloc_p): Likewise.
1082 (elf_x86_64_valid_plt_reloc_p): Likewise.
1083 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1084 * elfxx-x86.h (elf_x86_plt_type): New.
1085 (elf_x86_plt): Likewise.
1086 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1088 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1090 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1091 target_id instead of elf_machine_code.
1093 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1095 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1096 (elf_i386_lazy_plt_layout): Likewise.
1097 (elf_i386_non_lazy_plt_layout): Likewise.
1098 (elf_i386_plt_layout): Likewise.
1099 (elf_i386_link_hash_table): Likewise.
1100 (elf_i386_next_tls_desc_index): Likewise.
1101 (elf_i386_srelplt2): Likewise.
1102 (elf_i386_plt): Likewise.
1103 (elf_i386_lazy_plt): Likewise.
1104 (elf_i386_non_lazy_plt): Likewise.
1105 (elf_i386_link_hash_table_create): Likewise.
1106 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1107 (elf_i386_lazy_plt): Updated.
1108 (elf_i386_non_lazy_plt): Likewise.
1109 (elf_i386_lazy_ibt_plt): Likewise.
1110 (elf_i386_non_lazy_ibt_plt): Likewise.
1111 (elf_i386_allocate_dynrelocs): Likewise.
1112 (elf_i386_size_dynamic_sections): Likewise.
1113 (elf_i386_relocate_section): Likewise.
1114 (elf_i386_finish_dynamic_symbol): Likewise.
1115 (elf_i386_finish_dynamic_sections): Likewise.
1116 (elf_i386_get_synthetic_symtab): Likewise.
1117 (elf_i386_link_setup_gnu_properties): Likewise.
1118 (elf_i386_nacl_plt): Likewise.
1119 * elf64-x86-64.c (ABI_64_P): Removed.
1120 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1121 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1122 (elf_x86_64_lazy_plt_layout): Likewise.
1123 (elf_x86_64_non_lazy_plt_layout): Likewise.
1124 (elf_x86_64_plt_layout): Likewise.
1125 (elf_x86_64_link_hash_table): Likewise.
1126 (elf_x86_64_plt): Likewise.
1127 (elf_x86_64_lazy_plt): Likewise.
1128 (elf_x86_64_non_lazy_plt): Likewise.
1129 (elf_x86_64_link_hash_table_create): Likewise.
1130 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1131 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1132 (elf_x86_64_lazy_plt): Updated.
1133 (elf_x86_64_non_lazy_plt): Likewise.
1134 (elf_x86_64_lazy_bnd_plt): Likewise.
1135 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1136 (elf_x86_64_lazy_ibt_plt): Likewise.
1137 (elf_x32_lazy_ibt_plt): Likewise.
1138 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1139 (elf_x32_non_lazy_ibt_plt): Likewise.
1140 (elf_x86_64_allocate_dynrelocs): Likewise.
1141 (elf_x86_64_size_dynamic_sections): Likewise.
1142 (elf_x86_64_relocate_section): Likewise.
1143 (elf_x86_64_finish_dynamic_symbol): Likewise.
1144 (elf_x86_64_finish_dynamic_sections): Likewise.
1145 (elf_x86_64_get_synthetic_symtab): Likewise.
1146 (elf_x86_64_link_setup_gnu_properties): Likewise.
1147 (elf_x86_64_nacl_plt): Likewise.
1148 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1150 (ELF32_DYNAMIC_INTERPRETER): New.
1151 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1152 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1153 (_bfd_x86_elf_link_hash_table_create): Likewise.
1154 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1155 (elf_x86_link_hash_table_free): This. Make it static.
1156 * elfxx-x86.h: Don't include "objalloc.h".
1158 (elf_x86_lazy_plt_layout): Likewise.
1159 (elf_x86_non_lazy_plt_layout): Likewise.
1160 (elf_x86_plt_layout): Likewise.
1161 (_bfd_x86_elf_link_hash_table_create): Likewise.
1162 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1163 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1164 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1165 srelplt2 and next_tls_desc_index.
1166 (_bfd_x86_elf_link_hash_table_free): Removed.
1168 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1170 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1171 branch offset interpretation.
1173 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1176 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1178 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1180 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1181 (elf_x86_64_srelplt2): Likewise.
1183 2017-08-30 Alan Modra <amodra@gmail.com>
1185 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1186 (ppc64_elf_tls_optimize): Set it.
1187 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1188 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1189 addis would add zero.
1190 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1191 (ppc_elf_tls_optimize): Set it.
1192 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1193 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1195 2017-08-30 Alan Modra <amodra@gmail.com>
1197 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1198 __tls_get_addr call sequences to LE, don't move the addi down
1199 to the nop. Replace the bl with addi and leave the nop alone.
1201 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1203 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1205 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1207 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1209 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1211 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1212 (BFD64_BACKENDS): Likewise.
1213 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1214 (BFD64_BACKENDS_CFILES): Likewise.
1215 * Makefile.in: Regenerated.
1216 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1217 elf32-i386.lo and elf64-x86-64.lo.
1218 * configure: Regenerated.
1219 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1220 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1221 "objalloc.h" and "hashtab.h".
1222 (ELIMINATE_COPY_RELOCS): Removed.
1223 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1224 (SYMBOL_NO_COPYRELOC): Likewise.
1225 (elf_i386_link_hash_entry): Likewise.
1226 (GOT_UNKNOWN): Likewise.
1227 (GOT_NORMAL): Likewise.
1228 (GOT_TLS_GD): Likewise.
1229 (elf_i386_hash_entry): Likewise.
1230 (elf_i386_obj_tdata): Likewise.
1231 (elf_i386_tdata): Likewise.
1232 (elf_i386_local_got_tls_type): Likewise.
1233 (elf_i386_local_tlsdesc_gotent): Likewise.
1234 (elf_i386_hash_table): Likewise.
1235 (elf_i386_link_hash_newfunc): Likewise.
1236 (elf_i386_local_htab_hash): Likewise.
1237 (elf_i386_local_htab_eq): Likewise.
1238 (elf_i386_get_local_sym_hash): Likewise.
1239 (elf_i386_link_hash_table_free): Likewise.
1240 (elf_i386_copy_indirect_symbol): Likewise.
1241 (elf_i386_fixup_symbol): Likewise.
1242 (elf_i386_readonly_dynrelocs): Likewise.
1243 (elf_i386_always_size_sections): Likewise.
1244 (elf_i386_set_tls_module_base): Likewise.
1245 (elf_i386_dtpoff_base): Likewise.
1246 (compare_relocs): Likewise.
1247 (elf_i386_hash_symbol): Likewise.
1248 (elf_i386_parse_gnu_properties): Likewise.
1249 (elf_i386_merge_gnu_properties): Likewise.
1250 (elf_i386_link_check_relocs): Likewise.
1251 (elf_i386_merge_symbol_attribute): Likewise.
1252 (bfd_elf32_bfd_link_check_relocs): Likewise.
1253 (elf_backend_copy_indirect_symbol): Likewise.
1254 (elf_backend_always_size_sections): Likewise.
1255 (elf_backend_omit_section_dynsym): Likewise.
1256 (elf_backend_hash_symbol): Likewise.
1257 (elf_backend_fixup_symbol): Likewise.
1258 (elf_backend_parse_gnu_properties): Likewise.
1259 (elf_backend_merge_gnu_properties): Likewise.
1260 (elf_backend_merge_symbol_attribute): Likewise.
1261 (elf_i386_mkobject): Updated.
1262 (elf_i386_link_hash_table_create): Likewise.
1263 (elf_i386_check_tls_transition): Likewise.
1264 (elf_i386_tls_transition): Likewise.
1265 (elf_i386_convert_load_reloc): Likewise.
1266 (elf_i386_check_relocs): Likewise.
1267 (elf_i386_adjust_dynamic_symbol): Likewise.
1268 (elf_i386_allocate_dynrelocs): Likewise.
1269 (elf_i386_convert_load): Likewise.
1270 (elf_i386_size_dynamic_sections): Likewise.
1271 (elf_i386_relocate_section): Likewise.
1272 (elf_i386_finish_dynamic_symbol ): Likewise.
1273 (elf_i386_finish_dynamic_sections): Likewise.
1274 (elf_i386_output_arch_local_syms): Likewise.
1275 (elf_i386_get_synthetic_symtab): Likewise.
1276 (elf_i386_link_setup_gnu_properties): Likewise.
1277 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1278 of elf_link_hash_table, as base.
1279 (elf_i386_next_tls_desc_index): New.
1280 (elf_i386_srelplt2): Likewise.
1281 (elf_i386_plt): Likewise.
1282 (elf_i386_lazy_plt): Likewise.
1283 (elf_i386_non_lazy_plt): Likewise.
1284 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1285 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1286 "objalloc.h" and "hashtab.h".
1287 (ELIMINATE_COPY_RELOCS): Removed.
1288 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1289 (SYMBOL_NO_COPYRELOC): Likewise.
1290 (elf_x86_64_link_hash_entry): Likewise.
1291 (GOT_UNKNOWN): Likewise.
1292 (GOT_NORMAL): Likewise.
1293 (GOT_TLS_GD): Likewise.
1294 (elf_x86_64_hash_entry): Likewise.
1295 (elf_x86_64_obj_tdata): Likewise.
1296 (elf_x86_64_tdata): Likewise.
1297 (elf_x86_64_local_got_tls_type): Likewise.
1298 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1299 (elf_x86_64_hash_table): Likewise.
1300 (elf_x86_64_link_hash_newfunc): Likewise.
1301 (elf_x86_64_local_htab_hash): Likewise.
1302 (elf_x86_64_local_htab_eq): Likewise.
1303 (elf_x86_64_get_local_sym_hash): Likewise.
1304 (elf_x86_64_link_hash_table_free): Likewise.
1305 (elf_x86_64_copy_indirect_symbol): Likewise.
1306 (elf_x86_64_fixup_symbol): Likewise.
1307 (elf_x86_64_readonly_dynrelocs): Likewise.
1308 (elf_x86_64_always_size_sections): Likewise.
1309 (elf_x86_64_set_tls_module_base): Likewise.
1310 (elf_x86_64_dtpoff_base): Likewise.
1311 (compare_relocs): Likewise.
1312 (elf_x86_64_merge_symbol_attribute): Likewise.
1313 (elf_x86_64_hash_symbol): Likewise.
1314 (elf_x86_64_parse_gnu_properties): Likewise.
1315 (elf_x86_64_merge_gnu_properties): Likewise.
1316 (elf_x86_64_link_check_relocs): Likewise.
1317 (elf_backend_copy_indirect_symbol): Likewise.
1318 (elf_backend_always_size_sections): Likewise.
1319 (bfd_elf64_bfd_link_check_relocs): Likewise.
1320 (elf_backend_merge_symbol_attribute): Likewise.
1321 (elf_backend_hash_symbol): Likewise.
1322 (elf_backend_omit_section_dynsym): Likewise.
1323 (elf_backend_fixup_symbol): Likewise.
1324 (elf_backend_parse_gnu_properties): Likewise.
1325 (elf_backend_merge_gnu_properties): Likewise.
1326 (bfd_elf32_bfd_link_check_relocs): Likewise.
1327 (elf_x86_64_mkobject): Updated.
1328 (elf_x86_64_link_hash_table_create): Likewise.
1329 (elf_x86_64_check_tls_transition): Likewise.
1330 (elf_x86_64_tls_transition): Likewise.
1331 (elf_x86_64_convert_load_reloc): Likewise.
1332 (elf_x86_64_check_relocs): Likewise.
1333 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1334 (elf_x86_64_allocate_dynrelocs): Likewise.
1335 (elf_x86_64_convert_load): Likewise.
1336 (elf_x86_64_size_dynamic_sections): Likewise.
1337 (elf_x86_64_relocate_section): Likewise.
1338 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1339 (elf_x86_64_finish_dynamic_sections): Likewise.
1340 (elf_x86_64_output_arch_local_syms): Likewise.
1341 (elf_x86_64_get_synthetic_symtab): Likewise.
1342 (elf_x86_64_link_setup_gnu_properties): Likewise.
1343 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1344 instead of elf_link_hash_table, as base.
1345 (elf_x86_64_next_tls_desc_index): New.
1346 (elf_x86_64_srelplt2): Likewise.
1347 (elf_x86_64_plt): Likewise.
1348 (elf_x86_64_lazy_plt): Likewise.
1349 (elf_x86_64_non_lazy_plt): Likewise.
1350 * elfxx-x86.c: New file.
1351 * elfxx-x86.h: Likewise.
1353 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1355 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1357 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1359 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1361 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1362 sections before checking dynamic relocations and free invalid
1363 PLT section contents.
1364 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1366 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1368 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1369 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1371 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1374 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1376 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1378 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1380 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1382 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1384 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1387 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1388 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1389 Add a has_no_copy_on_protected bitfield.
1390 (elf_has_no_copy_on_protected): New.
1391 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1392 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1393 (elf_merge_gnu_property_list): Likewise.
1394 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1395 to FALSE for elf_has_no_copy_on_protected.
1396 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1397 (elf_i386_link_hash_entry): Add def_protected.
1398 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1399 when checking info->nocopyreloc.
1400 (elf_i386_link_setup_gnu_properties): Don't set
1401 extern_protected_data here.
1402 (elf_i386_merge_symbol_attribute): New function.
1403 (elf_backend_merge_symbol_attribute): New.
1404 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1405 (elf_x86_64_link_hash_entry): Add def_protected.
1406 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1407 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1408 when checking info->nocopyreloc.
1409 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1410 relocation run-time overflow and unresolvable R_X86_64_32S
1411 relocation against protected data symbol defined in shared object
1412 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1413 (elf_x86_64_link_setup_gnu_properties): Don't set
1414 extern_protected_data here.
1415 (elf_x86_64_merge_symbol_attribute): New function.
1416 (elf_backend_merge_symbol_attribute): New.
1418 2017-08-26 Alan Modra <amodra@gmail.com>
1420 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1421 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1422 (ppc_elf_relocate_section): Comment fix.
1423 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1424 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1425 Support dynamic relocs for TPREL16 when non-pic too.
1426 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1427 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1430 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1432 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1433 "symbol" in comments.
1434 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1436 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1439 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1440 R_X86_64_PC32 relocation run-time overflow and unresolvable
1441 R_X86_64_32S relocation with -z nocopyreloc.
1443 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1445 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1446 Undefined symbols may not have a type.
1447 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1449 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1451 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1452 bfd_link_info. Report shared, PIE or PDE object based on
1454 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1455 (elf_x86_64_relocate_section): Likewise.
1457 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1459 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1460 for function symbols.
1461 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1463 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1465 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1466 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1467 is set on any input relocatable file.
1468 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1470 2017-08-23 Alan Modra <amodra@gmail.com>
1473 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1474 ensure_undefweak_dynamic. Handle undefined too.
1475 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1476 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1477 (allocate_dynrelocs): Discard undefined non-default visibility
1478 relocs first. Make undefined syms dynamic. Tidy goto.
1480 2017-08-21 Alan Modra <amodra@gmail.com>
1481 H.J. Lu <hongjiu.lu@intel.com>
1484 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1485 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1487 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1490 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1491 undefined weak symbols.
1493 2017-08-18 Nick Clifton <nickc@redhat.com>
1496 * tekhex.c (getsym): Fix check for source pointer walking off the
1497 end of the input buffer.
1499 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1502 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1503 relocations in debug sections, change abort to _bfd_error_handler.
1505 2017-08-14 Nick Clifton <nickc@redhat.com>
1508 * elf.c (setup_group): Check for an empty or very small group
1510 * po/bfd.pot: Regenerate.
1512 2017-08-14 Alan Modra <amodra@gmail.com>
1515 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1516 alignment padding here.
1517 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1518 in a reverse pass over sections.
1520 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1523 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1524 for @plt suffixes first.
1525 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1527 2017-08-08 Nick Clifton <nickc@redhat.com>
1530 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1531 small section lengths.
1532 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1534 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1535 there is enough data present in the note.
1537 2017-08-08 Alan Modra <amodra@gmail.com>
1540 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1541 got.refcount for GOTOFF relocs, just create .got section.
1543 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1545 * elflink.c (elf_link_add_object_symbols): Move common symbol
1546 check after bed->common_definition.
1548 2017-08-07 Alan Modra <amodra@gmail.com>
1551 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1552 needed to define various dynamic tags have been discarded.
1554 2017-08-07 Nick Clifton <nickc@redhat.com>
1557 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1558 has not been set then use the bfd returned by
1559 _bfd_elf_link_setup_gnu_properties. If that is null then search
1560 through all the input bfds selecting the first normal, ELF format
1562 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1564 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1566 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1568 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1569 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1570 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1571 (elf_i386_link_check_relocs): New function.
1572 (bfd_elf32_bfd_link_check_relocs): New.
1573 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1575 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1576 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1577 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1578 (elf_x86_64_link_check_relocs): New function.
1579 (bfd_elf64_bfd_link_check_relocs): New.
1580 (bfd_elf32_bfd_link_check_relocs): Likewise.
1582 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1585 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1586 as undefined for --no-define-common.
1588 2017-08-05 Alan Modra <amodra@gmail.com>
1590 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1591 hppa_link_hash_table.
1593 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1595 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1596 entries for sysregs with negative indices.
1598 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1600 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1601 isn't the S/390 specific elf data.
1602 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1604 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1606 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1607 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1608 [R_RISCV_ADD16]: Likewise.
1609 [R_RISCV_ADD32]: Likewise.
1610 [R_RISCV_ADD64]: Likewise.
1611 [R_RISCV_SUB6]: Likewise.
1612 [R_RISCV_SUB8]: Likewise.
1613 [R_RISCV_SUB16]: Likewise.
1614 [R_RISCV_SUB32]: Likewise.
1615 [R_RISCV_SUB64]: Likewise.
1617 2017-07-31 Alan Modra <amodra@gmail.com>
1619 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1620 without ld.so checks.
1622 2017-07-29 Alan Modra <amodra@gmail.com>
1625 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1626 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1627 (is_elfv2_localentry0): Test non_zero_localentry.
1628 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1630 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1632 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1633 pointer check for htab->elf.irelplt.
1634 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1636 2017-07-27 Nick Clifton <nickc@redhat.com>
1639 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1641 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1643 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1645 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1647 (evax_bfd_print_emh): Check for invalid string lengths.
1649 2017-07-25 Nick Clifton <nickc@redhat.com>
1651 * po/fr.po: Updated French translation.
1653 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1656 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1657 16-bit absolute branches into 10-bit pc-relative branches on the
1658 MSP430 as well as the MSP430X.
1660 2017-07-25 Alan Modra <amodra@gmail.com>
1662 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1663 (stub_eh_frame_size): New function.
1664 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1665 (group_sections): Init group tls_get_addr_opt_bctrl.
1666 (ppc64_elf_size_stubs): Update sizing and initialization of
1667 .eh_frame. Iteration over stubs via group list.
1668 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1669 (ppc64_elf_finish_dynamic_sections): Update finalization of
1672 2017-07-24 Nick Clifton <nickc@redhat.com>
1675 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1676 of the relocs to the canonicalize_one_reloc routine.
1677 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1678 for the _bfd_mach_o_canonicalize_one_reloc field.
1679 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1680 res_base parameter. Use to check for corrupt pair relocs.
1681 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1683 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1685 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1688 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1689 enough data in the record before attempting to parse it.
1690 (_bfd_vms_slurp_eeom): Likewise.
1692 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1693 (image_set_ptr): Likewise.
1694 (alpha_vms_slurp_relocs): Likewise.
1696 (alpha_vms_object_p): Check for a truncated record.
1698 2017-07-24 Nick Clifton <nickc@redhat.com>
1701 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1702 an unrecognized reloc and sets the bfd_error value.
1703 * libbfd.h: Regenerate.
1704 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1706 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1707 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1708 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1709 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1710 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1712 2017-07-23 Alan Modra <amodra@gmail.com>
1714 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1717 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1720 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1721 reloc_class_ifunc for ifunc symbols.
1723 2017-07-19 Nick Clifton <nickc@redhat.com>
1726 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1727 correct magic bytes at the start, set the error to wrong format
1728 and clear the format selector before returning NULL.
1730 2017-07-19 Nick Clifton <nickc@redhat.com>
1733 * coff-rs6000.c (_bfd_strntol): New function.
1734 (_bfd_strntoll): New function.
1735 (GET_VALUE_IN_FIELD): New macro.
1736 (EQ_VALUE_IN_FIELD): new macro.
1737 (_bfd_xcoff_slurp_armap): Use new macros.
1738 (_bfd_xcoff_archive_p): Likewise.
1739 (_bfd_xcoff_read_ar_hdr): Likewise.
1740 (_bfd_xcoff_openr_next_archived_file): Likewise.
1741 (_bfd_xcoff_stat_arch_elt): Likewise.
1742 * coff64-rs6000.c (_bfd_strntol): New function.
1743 (_bfd_strntoll): New function.
1744 (GET_VALUE_IN_FIELD): New macro.
1745 (xcoff64_slurp_armap): Use new macros.
1747 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1748 John Eric Martin <John.Martin@emmicro-us.com>
1750 * bfd-in2.h: Regenerate.
1751 * libbfd.h: Regenerate.
1752 * elf32-arc.c (JLI): Define.
1753 * reloc.c: Add JLI relocations.
1755 2017-07-18 Nick Clifton <nickc@redhat.com>
1758 * coff-sh.c: Fix spelling typos.
1759 * compress.c: Likewise.
1760 * cpu-pdp11.c: Likewise.
1761 * ecofflink.c: Likewise.
1762 * elf-m10300.c: Likewise.
1764 * elf32-arm.c: Likewise.
1765 * elf32-m68k.c: Likewise.
1766 * elf32-nds32.c: Likewise.
1767 * elf32-ppc.c: Likewise.
1768 * elf32-sh.c: Likewise.
1769 * elf32-v850.c: Likewise.
1770 * elf64-ppc.c: Likewise.
1771 * elf64-x86-64.c: Likewise.
1772 * elflink.c: Likewise.
1773 * elfnn-aarch64.c: Likewise.
1774 * elfxx-mips.c: Likewise.
1776 * sunos.c: Likewise.
1777 * vms-alpha.c: Likewise.
1778 * xcofflink.c: Likewise.
1780 2017-07-18 Nick Clifton <nickc@redhat.com>
1783 * coffcode.h (handle_COMDAT): Replace abort with an error message
1786 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1789 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1792 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1794 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1796 2017-07-16 Alan Modra <amodra@gmail.com>
1798 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1799 __tls_index GOT entries when using __tls_get_addr_opt stub.
1800 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1802 2017-07-12 Alan Modra <amodra@gmail.com>
1804 * po/es.po: Update from translationproject.org/latest/bfd/.
1805 * po/fi.po: Likewise.
1806 * po/fr.po: Likewise.
1807 * po/id.po: Likewise.
1808 * po/ja.po: Likewise.
1809 * po/ro.po: Likewise.
1810 * po/ru.po: Likewise.
1811 * po/sr.po: Likewise.
1812 * po/sv.po: Likewise.
1813 * po/tr.po: Likewise.
1814 * po/uk.po: Likewise.
1815 * po/vi.po: Likewise.
1816 * po/zh_CN.po: Likewise.
1817 * po/hr.po: New file from translationproject.org.
1818 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1819 * configure: Regenerate.
1821 2017-07-12 Nick Clifton <nickc@redhat.com>
1823 Fix compile time warnings using gcc 7.1.1.
1824 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1826 (elf_xtensa_get_gotplt_section): Increase length of got_name
1828 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1829 default return of FALSE.
1830 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1831 default return of FALSE.
1833 2017-07-12 Alan Modra <amodra@gmail.com>
1835 * binary.c (binary_set_section_contents): Don't print filepos in
1837 (coff_write_object_contents): Cast size_t for error message.
1838 (coff_slurp_line_table): Don't use bfd_vma symndx.
1839 (coff_slurp_reloc_table): Remove unneeded cast.
1840 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1842 (find_abstract_instance_name): Likewise.
1843 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1844 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1845 (elf32_arm_check_relocs): Make r_symndx an int.
1846 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1848 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1850 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1852 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1853 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1854 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1855 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1856 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1857 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1858 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1859 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1860 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1861 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1862 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1863 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1864 and use %lu for error message.
1865 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1866 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1869 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1871 (elf32_arm_final_link_relocate): Likewise.
1872 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1873 * coffcode.h (styp_to_sec_flags): Likewise.
1874 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1875 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1876 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1877 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1878 (elf32_bfin_merge_private_bfd_data): Likewise.
1879 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1880 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1881 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1882 (i370_elf_relocate_section): Likewise.
1883 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1884 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1885 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1886 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1887 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1888 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1889 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1890 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1891 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1892 * ieee.c (ieee_write_id, read_id): Likewise.
1893 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1894 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1895 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1896 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1897 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1898 * stabs.c (_bfd_link_section_stabs): Likewise.
1900 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1902 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1903 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1904 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1905 * coff-sh.c (sh_relax_section): Likewise.
1906 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1907 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1908 * coffcode.h (coff_slurp_reloc_table): Likewise.
1909 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1910 (_bfd_coff_read_string_table): Likewise.
1911 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1912 * compress.c (bfd_get_full_section_contents): Likewise.
1913 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1914 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1915 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1916 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1917 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1918 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1919 (elf32_arm_write_section): Likewise.
1920 * elf32-bfin.c (bfin_relocate_section): Likewise.
1921 (bfinfdpic_relocate_section): Likewise.
1922 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1923 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1924 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1925 (elf_i386_relocate_section): Likewise.
1926 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1927 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1928 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1929 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1930 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1931 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1932 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1933 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1934 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1935 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1936 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1937 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1938 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1939 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1940 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1941 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1942 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1943 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1944 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1945 * elf32-sh.c (sh_elf_relax_section): Likewise.
1946 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1947 (sh_elf_relocate_section): Likewise.
1948 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1949 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1950 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1951 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1952 * elf32-v850.c (v850_elf_relax_section): Likewise.
1953 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1954 (elf_vax_relocate_section): Likewise.
1955 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1956 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1957 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1958 (do_fix_for_relocatable_link): Likewise.
1959 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1960 (elf64_alpha_relax_with_lituse): Likewise.
1961 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1962 (elf_hppa_final_link_relocate): Likewise.
1963 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1964 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1965 (elf64_vms_link_add_object_symbols): Likewise.
1966 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1967 (mmix_final_link_relocate): Likewise.
1968 * elf64-s390.c (invalid_tls_insn): Likewise.
1969 (elf_s390_relocate_section): Likewise.
1970 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1971 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1972 (elf_x86_64_relocate_section): Likewise.
1973 * elfcode.h (elf_slurp_symbol_table): Likewise.
1974 * elfcore.h (elf_core_file_p): Likewise.
1975 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1976 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1977 (elfNN_aarch64_relocate_section): Likewise.
1978 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1979 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1980 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1981 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1982 (_bfd_mips_elf_relocate_section): Likewise.
1983 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1984 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1985 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1986 * ieee.c (ieee_slurp_external_symbols): Likewise.
1987 * ihex.c (ihex_write_object_content): Likewise.
1988 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1989 * merge.c (_bfd_merged_section_offset): Likewise.
1990 * mmo.c (mmo_write_loc_chunk): Likewise.
1991 (mmo_write_object_contents): Likewise.
1992 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1993 * stabs.c (_bfd_link_section_stabs): Likewise.
1994 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1996 2017-07-11 Alan Modra <amodra@gmail.com>
1998 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2000 2017-07-11 Alan Modra <amodra@gmail.com>
2002 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2003 instruction" error using _bfd_error_handler, not einfo.
2005 2017-07-10 Nick Clifton <nickc@redhat.com>
2007 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2008 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2010 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2012 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2014 2017-07-07 Alan Modra <amodra@gmail.com>
2016 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2018 2017-07-07 Alan Modra <amodra@gmail.com>
2020 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2021 as long long. Move code replacing "ll" with "I64", and simplify.
2023 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2025 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2028 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2030 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2032 (line_info_add_file_name): Likewise.
2033 (decode_line_info): Likewise.
2035 2017-07-04 Tristan Gingold <gingold@adacore.com>
2037 * version.m4: Bump version to 2.29.51
2038 * configure: Regenerate.
2040 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2042 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2043 sanity check at the head of this function.
2045 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2047 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2048 dwarf_line_str_size.
2049 (struct attr_abbrev): Add field implicit_const.
2050 (dwarf_debug_sections): Add .debug_line_str.
2051 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2052 (dwarf_debug_section_assert): Add static assertion.
2053 (read_indirect_line_string): New.
2054 (read_abbrevs): Support DW_FORM_implicit_const.
2055 (is_str_attr): Support DW_FORM_line_strp.
2056 (read_attribute_value): Support DW_FORM_line_strp and
2057 DW_FORM_implicit_const.
2058 (read_attribute): Support DW_FORM_implicit_const.
2059 (line_info_add_include_dir, line_info_add_include_dir_stub):
2060 (line_info_add_file_name, read_formatted_entries): New.
2061 (decode_line_info, parse_comp_unit): Support DWARF 5.
2062 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2064 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2066 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2067 abort statement that was put for symbols that are not dynamic.
2069 2017-07-03 Tristan Gingold <gingold@adacore.com>
2071 * po/bfd.pot: Regenerate
2073 2017-07-03 Alan Modra <amodra@gmail.com>
2075 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2076 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2077 * elf.c (setup_group): Use "Lx" to print sh_size.
2078 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2079 unknown section type in hex.
2080 (copy_special_section_fields): Style fix.
2081 (bfd_section_from_shdr): Correct format for sh_link. Use a
2082 common error message for all the variants of unrecognized
2084 (assign_file_positions_for_load_sections): Use "Lx" for lma
2085 adjust error message.
2086 (assign_file_positions_for_non_load_sections): Formatting.
2087 (rewrite_elf_program_header): Formatting. Use "Lx" for
2088 bfd_vma values in error messages.
2089 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2090 ELF_R_SYM value to type expected by format.
2091 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2093 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2094 (elf_link_input_bfd): Use "Lx" for r_info.
2095 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2097 2017-07-03 Alan Modra <amodra@gmail.com>
2099 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2100 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2101 Microsoft C library variant of long long format specifier.
2102 (PRINT20): Cast value to bfd_uint64_t not long long.
2103 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2104 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2105 long long. Don't cast to bfd_vma.
2106 * elf32-score.c (score3_bfd_getl48): Likewise.
2107 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2109 2017-07-03 Alan Modra <amodra@gmail.com>
2111 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2113 (bfd_elf_print_symbol): Don't cast symbol->flags.
2114 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2115 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2116 _bfd_error_handler argument order.
2117 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2119 2017-07-03 Alan Modra <amodra@gmail.com>
2121 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2122 AC_TYPE_LONG_DOUBLE.
2123 * configure: Regenerate.
2124 * config.in: Regenerate.
2126 2017-06-29 Andrew Waterman <andrew@sifive.com>
2128 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2131 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2133 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2134 unless it is undefined weak.
2135 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2136 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2138 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2139 is not dynamic in PIC, abort.
2141 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2144 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2145 undefined weak symbols into dynamic.
2146 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2147 relocation for non-dynamic symbols.
2148 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2150 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2152 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2153 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2154 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2155 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2156 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2159 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2161 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2162 (elfcore_write_s390_gs_bc): Likewise.
2163 * elf.c (elfcore_grok_s390_gs_cb): New function.
2164 (elfcore_grok_s390_gs_bc): New function.
2165 (elfcore_grok_note): Call them.
2166 (elfcore_write_s390_gs_cb): New function.
2167 (elfcore_write_s390_gs_bc): New function.
2168 (elfcore_write_register_note): Call them.
2170 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2172 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2173 bfd_get_file_size. Check archive element size.
2174 (_bfd_generic_get_section_contents_in_window): Likewise.
2176 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2178 * bfd-in2.h: Regenerated.
2179 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2180 (bfd_get_file_size): Likewise.
2182 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2183 Matthew Fortune <matthew.fortune@imgtec.com>
2185 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2186 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2187 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2188 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2190 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2191 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2192 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2193 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2194 `bfd_mach_mips_interaptiv_mr2' entries.
2195 * bfd-in2.h: Regenerate.
2197 2017-06-27 Nick Clifton <nickc@redhat.com>
2199 * tekhex.c (pass_over): Revert accidental conversion of a local
2200 array to a static array.
2202 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2205 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2206 reloc addend if necessary. Adjust diff only if
2207 shrinked_insn_address < end_address.
2209 2017-06-27 Alan Modra <amodra@gmail.com>
2212 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2213 (_bfd_generic_get_section_contents_in_window): Likewise.
2215 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2217 * elfnn-riscv.c (perform_relocation): Support the new
2218 R_RISCV_32_PCREL relocation.
2219 (riscv_elf_relocate_section): Likewise.
2220 * elfxx-riscv.c (howto_table): Likewise.
2221 (riscv_reloc_map): Likewise.
2222 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2223 * libbfd.h: Regenerate.
2225 2017-06-27 Alan Modra <amodra@gmail.com>
2228 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2229 Use unsigned file pointer type, and remove cast.
2230 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2231 Add "count", not "sz".
2233 2017-06-26 Pedro Alves <palves@redhat.com>
2236 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2239 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2242 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2245 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2247 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2248 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2249 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2250 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2251 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2253 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2256 * compress.c (bfd_get_full_section_contents): Don't check the
2258 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2259 reject a section whose size + offset is greater than the size
2261 (_bfd_generic_get_section_contents_in_window): Likewise.
2263 2017-06-26 Nick Clifton <nickc@redhat.com>
2266 * tekhex.c (getvalue): Check for the source pointer exceeding the
2267 end pointer before the first byte is read.
2269 2017-06-26 Nick Clifton <nickc@redhat.com>
2272 * opncls.c (get_build_id): Check that the section is big enough
2273 to contain the whole note.
2274 * compress.c (bfd_get_full_section_contents): Check for and reject
2275 a section whose size is greater than the size of the entire file.
2276 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2277 contain a notes section.
2279 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2281 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2283 (elf_s390_modify_segment_map): Likewise.
2284 (bfd_elf_s390_set_options): Lisewise.
2286 2017-06-26 Alan Modra <amodra@gmail.com>
2288 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2290 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2291 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2292 .preinit_array on --just-syms bfds.
2293 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2294 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2295 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2297 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2299 * elf.c (find_link): Bounds check "hint".
2301 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2303 * elf32-arm.c (using_thumb_only): Update list of architectures in
2304 BFD_ASSERT for which the logic is valid.
2305 (using_thumb2_bl): Likewise.
2306 (using_thumb2): Likewise and return true for ARMv8-R.
2307 (arch_has_arm_nop): Likewise.
2308 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2309 merging logic. Update commentis for value 15 of v8m_baseline,
2310 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2311 merging of value 15 of Tag_CPU_arch.
2313 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2315 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2316 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2317 * bfd-in2.h: Regenerate.
2319 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2321 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2322 the error_alignment label forward. Properly align program
2323 property note section.
2325 2017-06-22 Eric Christopher <echristo@gmail.com>
2327 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2328 abs to fix a truncation warning.
2330 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2332 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2333 local undefined weak symbol to 0.
2334 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2336 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2338 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2339 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2340 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2341 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2342 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2343 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2344 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2345 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2347 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2349 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2350 (elf_i386_lazy_ibt_plt_entry): Likewise.
2351 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2352 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2353 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2354 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2355 (elf_i386_lazy_plt_layout): Likewise.
2356 (elf_i386_non_lazy_plt_layout): Likewise.
2357 (elf_i386_link_hash_entry): Add plt_second.
2358 (elf_i386_link_hash_table): Add plt_second and
2359 plt_second_eh_frame.
2360 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2361 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2362 the second PLT. Check the second PLT.
2363 (elf_i386_relocate_section): Use the second PLT to resolve
2364 PLT reference if needed.
2365 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2367 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2368 second PLT. Generate unwind info for the second PLT.
2369 (elf_i386_plt_type): Add plt_second.
2370 (elf_i386_get_synthetic_symtab): Support the second PLT.
2371 (elf_i386_parse_gnu_properties): Support
2372 GNU_PROPERTY_X86_FEATURE_1_AND.
2373 (elf_i386_merge_gnu_properties): Support
2374 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2375 on GNU_PROPERTY_X86_FEATURE_1_IBT
2376 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2377 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2378 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2379 is set on all relocatable inputs.
2380 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2381 (elf_x32_lazy_ibt_plt_entry): Likewise.
2382 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2383 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2384 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2385 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2386 (elf_x86_64_lazy_ibt_plt): Likewise.
2387 (elf_x32_lazy_ibt_plt): Likewise.
2388 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2389 (elf_x32_non_lazy_ibt_plt): Likewise.
2390 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2391 (elf_x86_64_parse_gnu_properties): Support
2392 GNU_PROPERTY_X86_FEATURE_1_AND.
2393 (elf_x86_64_merge_gnu_properties): Support
2394 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2395 on GNU_PROPERTY_X86_FEATURE_1_IBT
2396 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2397 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2398 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2399 is set on all relocatable inputs.
2401 2017-06-22 Nick Clifton <nickc@redhat.com>
2404 * som.c (setup_sections): NUL terminate the space_strings buffer.
2405 Check that the space.name field does not index beyond the end of
2406 the space_strings buffer.
2408 2017-06-21 Nick Clifton <nickc@redhat.com>
2411 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2413 2017-06-21 Nick Clifton <nickc@redhat.com>
2416 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2417 type of the size parameter.
2418 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2419 length of the counted string.
2420 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2421 (_bfd_vms_save_counted_string): Likewise.
2422 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2423 _bfd_vms_save_counted_string.
2424 (_bfd_vms_slurp_ehdr): Likewise.
2425 (_bfd_vms_slurp_egsd): Likewise.
2426 (Parse_module): Likewise.
2428 2017-06-21 Alan Modra <amodra@gmail.com>
2430 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2431 calls before tocsave calls.
2432 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2435 2017-06-21 Nick Clifton <nickc@redhat.com>
2438 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2439 bfd_get_full_section_contents returns no contents.
2441 2017-06-21 Nick Clifton <nickc@redhat.com>
2444 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2447 2017-06-21 Nick Clifton <nickc@redhat.com>
2450 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2452 (image_set_ptr): Likewise.
2453 (alpha_vms_fix_sec_rel): Likewise.
2454 (alpha_vms_slurp_relocs): Likewise.
2456 2017-06-21 Nick Clifton <nickc@redhat.com>
2459 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2461 (ieee_archive_p): Likewise.
2462 (ieee_object_p): Likewise.
2464 2017-06-21 Nick Clifton <nickc@redhat.com>
2467 * elf.c (setup_group): Zero the group section pointer list after
2468 allocation so that loops can be caught. Check for NULL pointers
2469 when processing a group list.
2471 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2473 * elf-s390.h: New file.
2474 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2476 (elf_s390_additional_program_headers): New function.
2477 (elf_s390_modify_segment_map): New function.
2478 (bfd_elf_s390_set_options): New function.
2479 (elf_backend_additional_program_headers)
2480 (elf_backend_modify_segment_map): Add macro definitions.
2482 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2485 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2486 the DYNAMIC bit instead of bfd_count_sections.
2488 2017-06-19 Nick Clifton <nickc@redhat.com>
2491 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2493 (evax_bfd_print_eeom): Likewise.
2494 (evax_bfd_print_egsd): Check for an overlarge record length.
2495 (evax_bfd_print_etir): Likewise.
2497 2017-06-19 Nick Clifton <nickc@redhat.com>
2500 * libieee.h (struct common_header_type): Add end_p field.
2501 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2503 (read_id): Check for a length that exceeds the remaining bytes in
2505 (ieee_seek): Initialise end_p.
2506 (ieee_archive_p): Likewise.
2507 (ieee_object_p): Likewise.
2509 2017-06-19 Nick Clifton <nickc@redhat.com>
2512 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2513 before reading the EIHS structure entries.
2515 2017-06-19 Nick Clifton <nickc@redhat.com>
2518 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2519 gsd_size. Check that there are enough bytes remaining to read the
2520 type and size of the next egsd. Check that the size of the egsd
2521 does not exceed the size of the record.
2523 2017-06-19 Alan Modra <amodra@gmail.com>
2525 * config.bfd: Correct targ_underscore for cris.
2527 2017-06-18 Alan Modra <amodra@gmail.com>
2529 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2530 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2532 2017-06-16 Nick Clifton <nickc@redhat.com>
2534 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2535 bucketlist is empty because there are no symbols to add to the
2538 2017-06-16 Alan Modra <amodra@gmail.com>
2544 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2545 (BFD_JUMP_TABLE_LINK): Likewise.
2546 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2547 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2548 (bfd_elf_define_start_stop): New function.
2549 * linker.c (bfd_generic_define_start_stop): New function.
2550 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2552 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2553 * aout-target.h (MY_bfd_define_start_stop): Define.
2554 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2555 * binary.c (binary_bfd_define_start_stop): Define.
2556 * bout.c (b_out_bfd_define_start_stop): Define.
2557 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2558 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2559 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2560 * coffcode.h (coff_bfd_define_start_stop): Define.
2561 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2562 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2563 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2564 * ieee.c (ieee_bfd_define_start_stop): Define.
2565 * ihex.c (ihex_bfd_define_start_stop): Define.
2566 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2567 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2568 * mmo.c (mmo_bfd_define_start_stop): Define.
2569 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2570 * oasys.c (oasys_bfd_define_start_stop): Define.
2571 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2572 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2573 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2574 * som.c (som_bfd_define_start_stop): Define.
2575 * srec.c (srec_bfd_define_start_stop): Define.
2576 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2577 * versados.c (versados_bfd_define_start_stop): Define.
2578 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2579 (alpha_vms_bfd_define_start_stop): Define.
2580 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2581 * bfd-in2.h: Regenerate.
2582 * libbfd.h: Regenerate.
2584 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2586 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2587 SYMBOL_REFERENCES_LOCAL.
2589 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2592 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2593 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2594 runtime for if there needs copy relocation elimination.
2595 (need_copy_relocation_p): New function. Return true for symbol with
2596 pc-relative references and if it's against read-only sections.
2597 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2598 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2599 that are related with accessing external objects.
2600 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2601 in elfNN_aarch64_check_relocs.
2603 2017-06-15 Nick Clifton <nickc@redhat.com>
2606 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2609 (ieee_archive_p): Likewise.
2611 2017-06-15 Nick Clifton <nickc@redhat.com>
2614 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2616 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2618 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2619 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2620 keep both windowed and call0 ABI PLT definitions.
2621 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2622 elf_xtensa_*_plt_entry endex.
2623 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2625 2017-06-14 Nick Clifton <nickc@redhat.com>
2628 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2631 2017-06-14 Nick Clifton <nickc@redhat.com>
2634 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2635 maximum value for the ascic pointer. Check that name processing
2636 does not read beyond this value.
2637 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2640 2017-06-14 Nick Clifton <nickc@redhat.com>
2643 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2644 (process_otr): Check for an invalid offset in the otr structure.
2646 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2648 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2650 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2656 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2657 vtable field to a union.
2658 (_bfd_elf_is_start_stop): Removed.
2659 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2660 __start_SECNAME and __stop_SECNAME symbols.
2661 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2662 * elflink.c (_bfd_elf_is_start_stop): Removed.
2663 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2664 _bfd_elf_is_start_stop.
2665 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2666 __stop_SECNAME symbols. Updated.
2667 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2668 (bfd_elf_gc_record_vtinherit): Likewise.
2669 (bfd_elf_gc_record_vtentry): Likewise.
2671 2017-06-13 Nick Clifton <nickc@redhat.com>
2674 * elflink.c (elf_link_adjust_relocs): Generate an error when
2675 encountering a reloc against a symbol removed by garbage
2678 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2680 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2681 to merge_gnu_properties.
2682 * elf-properties.c (elf_merge_gnu_properties): Add struct
2683 bfd_link_info * and pass it to merge_gnu_properties.
2684 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2685 and pass it to elf_merge_gnu_properties.
2686 (_bfd_elf_link_setup_gnu_properties): Pass info to
2687 elf_merge_gnu_property_list.
2688 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2690 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2692 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2695 * binary.c (binary_set_section_contents): Scale lma by octets
2696 per byte to set filepos.
2698 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2700 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2703 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2705 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2708 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2710 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2711 patched section contents for TLS IE reloc.
2712 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2714 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2716 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2717 RELOC_FOR_GLOBAL_SYMBOL macro.
2719 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2721 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2724 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2726 * config/tc-arc.c (md_undefined_symbol): Changed.
2727 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2729 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2731 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2734 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2736 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2737 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2739 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2741 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2744 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2746 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2747 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2748 is non-zero. Add clarifying comments.
2750 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2752 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2753 name. Use local IFUNC symbol name string to report unsupported
2754 non-PIC call to IFUNC function.
2755 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2756 when generating R_386_IRELATIVE relocation.
2757 (elf_i386_finish_dynamic_symbol): Likewise.
2758 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2760 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2761 when generating R_X86_64_IRELATIVE relocation.
2762 (elf_x86_64_finish_dynamic_symbol): Likewise.
2764 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2766 * elf.c (setup_group): Make sure BFD sections are created for all
2767 group sections in the input file when processing SHF_GROUP
2769 (bfd_section_from_shdr): Avoid duplicating logic already
2770 implemented in `setup_group'.
2772 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2775 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2776 if the hint address is zero.
2778 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2781 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2782 ELF_COMMON_DEF_P for common symbols.
2784 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2786 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2787 SEC_GROUP sections as SEC_EXCLUDE.
2788 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2789 (assign_section_numbers): Use resolve_section_groups flag instead
2790 of relocatable link type.
2791 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2792 flag instead of checking the final_link flag for part of the
2793 checks in here. Fix white space as a result.
2794 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2795 instead of relocatable link type.
2796 (bfd_elf_final_link): Likewise.
2798 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2800 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2802 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2803 (s3_bfd_score_elf_check_relocs): Likewise.
2804 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2805 (score_elf_final_link_relocate): Likewise.
2806 (s7_bfd_score_elf_check_relocs): Likewise.
2808 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2810 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2813 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2815 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2816 from `reloc_count' rather than decrementing it.
2817 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2818 `reloc_count' by `int_rels_per_ext_rel'.
2819 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2820 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2821 entry determination.
2822 (s3_bfd_score_elf_check_relocs): Likewise.
2823 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2824 (s7_bfd_score_elf_relocate_section): Likewise.
2825 (s7_bfd_score_elf_check_relocs): Likewise.
2826 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2827 prototype and function.
2828 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2829 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2830 triple rather than once the sum of REL and RELA relocation entry
2832 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2833 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2834 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2835 storage allocation size determination.
2836 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2837 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2838 by `int_rels_per_ext_rel' for last relocation entry
2840 (bfd_elf_final_link): Do not multiply `reloc_count' by
2841 `int_rels_per_ext_rel' for internal relocation storage
2842 allocation size determination.
2843 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2844 `int_rels_per_ext_rel' for last relocation entry determination.
2845 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2846 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2847 (_bfd_mips_elf_relocate_section): Likewise.
2849 2017-06-05 Alan Modra <amodra@gmail.com>
2852 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2854 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2856 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2857 determine structure sizes.
2858 (elfcore_grok_freebsd_prstatus): Likewise.
2860 2017-06-01 Alan Modra <amodra@gmail.com>
2862 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2863 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2865 (is_elfv2_localentry0): New function.
2866 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2867 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2868 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2869 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2870 optimized localentry:0 stubs.
2871 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2872 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2874 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2876 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2878 2017-05-30 Casey Smith <clegg89@gmail.com>
2881 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2882 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2884 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2886 * cpu-arc.c (arc_compatible): New function.
2888 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2890 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2892 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2895 * bfdio.c (bfd_get_file_size): New function.
2896 * bfd-in2.h: Regenerated.
2898 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2900 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2903 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2905 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2906 dynobj instead of htab->elf.dynobj.
2908 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2910 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2912 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2913 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2914 actual number of internal relocations retrieved. Adjust
2915 function description.
2916 (bfd_elf64_canonicalize_reloc): Remove macro.
2917 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2919 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2921 * archures.c (bfd_mach_sparc_v9m8): Define.
2922 (bfd_mach_sparc_v8plusm8): Likewise.
2923 (bfd_mach_sparc_v9_p): Adjust to M8.
2924 (bfd_mach_sparc_64bit_p): Likewise.
2925 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2926 bfd_mach_sparc_v8plusm8.
2927 * bfd-in2.h: Regenerated.
2928 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2930 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2931 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2932 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2934 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2935 bfd_mach_sparc_v8plusm8.
2937 2017-05-19 Alan Modra <amodra@gmail.com>
2939 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2940 debug and special sections when no non-note alloc sections in an
2943 2017-05-18 Alan Modra <amodra@gmail.com>
2945 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2946 * elf-m10300.c: Likewise.
2948 * elf32-arc.c: Likewise.
2949 * elf32-bfin.c: Likewise.
2950 * elf32-m68k.c: Likewise.
2951 * elf32-nds32.c: Likewise.
2952 * elf32-tilepro.c: Likewise.
2953 * elflink.c: Likewise.
2954 * elfnn-aarch64.c: Likewise.
2955 * elfnn-riscv.c: Likewise.
2956 * elfxx-tilegx.c: Likewise.
2957 * mach-o.c: Likewise.
2958 * peXXigen.c: Likewise.
2959 * vms-alpha.c: Likewise.
2960 * vms-lib.c: Likewise.
2962 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2965 * elflink.c (elf_gc_mark_debug_section): New function.
2966 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2967 referenced by kept debug sections.
2969 2017-05-16 Alan Modra <amodra@gmail.com>
2971 * elf-m10300.c: Rename occurrences of non_ir_ref.
2972 * elf32-arm.c: Likewise.
2973 * elf32-bfin.c: Likewise.
2974 * elf32-cr16.c: Likewise.
2975 * elf32-cris.c: Likewise.
2976 * elf32-d10v.c: Likewise.
2977 * elf32-dlx.c: Likewise.
2978 * elf32-fr30.c: Likewise.
2979 * elf32-frv.c: Likewise.
2980 * elf32-hppa.c: Likewise.
2981 * elf32-i370.c: Likewise.
2982 * elf32-i386.c: Likewise.
2983 * elf32-iq2000.c: Likewise.
2984 * elf32-lm32.c: Likewise.
2985 * elf32-m32c.c: Likewise.
2986 * elf32-m32r.c: Likewise.
2987 * elf32-m68hc1x.c: Likewise.
2988 * elf32-m68k.c: Likewise.
2989 * elf32-mcore.c: Likewise.
2990 * elf32-metag.c: Likewise.
2991 * elf32-microblaze.c: Likewise.
2992 * elf32-moxie.c: Likewise.
2993 * elf32-msp430.c: Likewise.
2994 * elf32-mt.c: Likewise.
2995 * elf32-nios2.c: Likewise.
2996 * elf32-or1k.c: Likewise.
2997 * elf32-ppc.c: Likewise.
2998 * elf32-rl78.c: Likewise.
2999 * elf32-s390.c: Likewise.
3000 * elf32-score.c: Likewise.
3001 * elf32-score7.c: Likewise.
3002 * elf32-sh.c: Likewise.
3003 * elf32-tic6x.c: Likewise.
3004 * elf32-tilepro.c: Likewise.
3005 * elf32-v850.c: Likewise.
3006 * elf32-vax.c: Likewise.
3007 * elf32-xstormy16.c: Likewise.
3008 * elf32-xtensa.c: Likewise.
3009 * elf64-alpha.c: Likewise.
3010 * elf64-hppa.c: Likewise.
3011 * elf64-ia64-vms.c: Likewise.
3012 * elf64-mmix.c: Likewise.
3013 * elf64-ppc.c: Likewise.
3014 * elf64-s390.c: Likewise.
3015 * elf64-sh64.c: Likewise.
3016 * elf64-x86-64.c: Likewise.
3017 * elflink.c: Likewise.
3018 * elfnn-aarch64.c: Likewise.
3019 * elfnn-ia64.c: Likewise.
3020 * elfnn-riscv.c: Likewise.
3021 * elfxx-mips.c: Likewise.
3022 * elfxx-sparc.c: Likewise.
3023 * elfxx-tilegx.c: Likewise.
3024 * linker.c: Likewise.
3026 2017-05-16 Alan Modra <amodra@gmail.com>
3028 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3029 * elflink.c (elf_link_add_object_symbols): Update to use
3031 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3033 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3035 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3037 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3039 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3041 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3042 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3044 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3046 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3048 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3050 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3051 to plt_second/plt_second_eh_frame.
3052 (elf_x86_64_link_hash_newfunc): Updated.
3053 (elf_x86_64_allocate_dynrelocs): Likewise.
3054 (elf_x86_64_size_dynamic_sections): Likewise.
3055 (elf_x86_64_relocate_section): Likewise.
3056 (elf_x86_64_finish_dynamic_symbol): Likewise.
3057 (elf_x86_64_finish_dynamic_sections): Likewise.
3058 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3059 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3061 (elf_backend_setup_gnu_properties): Updated. Create the
3062 .plt.sec section instead of the .plt.sec section.
3064 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3066 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3067 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3068 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3070 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3072 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3073 (bfd_elf64_set_reloc): Define.
3074 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3076 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3078 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3079 (struct bfd_target): New field _bfd_set_reloc.
3080 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3081 * reloc.c (_bfd_generic_set_reloc): New function.
3082 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3083 * nlm-target.h (nlm_set_reloc): Likewise.
3084 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3085 * aout-tic30.c (MY_set_reloc): Likewise.
3086 * aout-target.h (MY_set_reloc): Likewise.
3087 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3088 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3089 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3090 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3091 * aout-adobe.c (aout_32_set_reloc): Likewise.
3092 * bout.c (b_out_set_reloc): Likewise.
3093 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3094 * i386os9k.c (aout_32_set_reloc): Likewise.
3095 * ieee.c (ieee_set_reloc): Likewise.
3096 * oasys.c (oasys_set_reloc): Likewise.
3097 * som.c (som_set_reloc): Likewise.
3098 * versados.c (versados_set_reloc): Likewise.
3099 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3100 _bfd_generic_set_reloc.
3101 (rs6000_xcoff64_aix_vec): LIkewise.
3102 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3103 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3104 * i386msdos.c (msdos_set_reloc): Define to
3105 _bfd_norelocs_set_reloc.
3106 * elfcode.h (elf_set_reloc): Define.
3107 * bfd-in2.h: Regenerated.
3109 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3112 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3113 for IFUNC function address.
3115 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3117 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3118 (CONFLICT_LIST): Likewise.
3119 (opcode/arc-attrs.h): Include.
3120 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3121 (arc_extract_features): New file.
3122 (arc_stralloc): Likewise.
3123 (arc_elf_merge_attributes): Likewise.
3124 (arc_elf_merge_private_bfd_data): Use object attributes.
3125 (bfd_arc_get_mach_from_attributes): New function.
3126 (arc_elf_object_p): Use object attributes.
3127 (arc_elf_final_write_processing): Likewise.
3128 (elf32_arc_obj_attrs_arg_type): New function.
3129 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3130 (elf32_arc_section_from_shdr): Likewise.
3131 (elf_backend_obj_attrs_vendor): Define.
3132 (elf_backend_obj_attrs_section): Likewise.
3133 (elf_backend_obj_attrs_arg_type): Likewise.
3134 (elf_backend_obj_attrs_section_type): Likewise.
3135 (elf_backend_obj_attrs_handle_unknown): Likewise.
3136 (elf_backend_section_from_shdr): Likewise.
3138 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3141 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3142 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3143 and the destination is a Thumb symbol.
3145 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3147 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3148 initializer to silence GCC 4.2.
3149 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3151 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3153 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3154 (LAZY_PLT_ENTRY_SIZE): This.
3155 (NON_LAZY_PLT_ENTRY_SIZE): New.
3156 (elf_x86_64_plt0_entry): Renamed to ...
3157 (elf_x86_64_lazy_plt0_entry): This.
3158 (elf_x86_64_plt_entry): Renamed to ...
3159 (elf_x86_64_lazy_plt_entry): This.
3160 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3161 (elf_x86_64_lazy_bnd_plt0_entry): This.
3162 (elf_x86_64_legacy_plt_entry): Removed.
3163 (elf_x86_64_bnd_plt_entry): Renamed to ...
3164 (elf_x86_64_lazy_bnd_plt_entry): This.
3165 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3166 (elf_x86_64_non_lazy_plt_entry): This.
3167 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3168 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3169 (elf_x86_64_eh_frame_plt): Renamed to ...
3170 (elf_x86_64_eh_frame_lazy_plt): This.
3171 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3172 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3173 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3174 (elf_x86_64_eh_frame_non_lazy_plt): This.
3175 (elf_x86_64_lazy_plt_layout): New.
3176 (elf_x86_64_non_lazy_plt_layout): Likewise.
3177 (elf_x86_64_plt_layout): Likewise.
3178 (elf_x86_64_backend_data): Remove PLT layout information. Add
3179 os for target system.
3180 (GET_PLT_ENTRY_SIZE): Removed.
3181 (elf_x86_64_lazy_plt): New.
3182 (elf_x86_64_non_lazy_plt): Likewise.
3183 (elf_x86_64_lazy_bnd_plt): Likewise.
3184 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3185 (elf_x86-64_arch_bed): Updated.
3186 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3187 (elf_x86_64_create_dynamic_sections): Removed.
3188 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3189 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3190 (elf_x86-64_adjust_dynamic_symbol): Updated.
3191 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3192 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3193 size for PLT0 if there is no PLT0. Get plt_entry_size from
3194 non_lazy_plt for non-lazy PLT entries.
3195 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3196 from non_lazy_plt for non-lazy PLT entries.
3197 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3198 if there is no PLT0.
3199 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3200 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3201 entries with non-lazy PLT layout. Don't fill the second and third
3202 slots in the PLT entry if there is no PLT0.
3203 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3204 if there is no PLT0. Set sh_entsize on the .plt.got section.
3205 (compare_relocs): New.
3206 (elf_x86_64_plt_type): Likewise.
3207 (elf_x86_64_plt): Likewise.
3208 (elf_x86_64_nacl_plt): New. Forward declaration.
3209 (elf_x86_64_get_plt_sym_val): Removed.
3210 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3211 against all dynamic relocations.
3212 (elf_x86_64_link_setup_gnu_properties): New function.
3213 (elf_backend_create_dynamic_sections): Updated.
3214 (elf_backend_setup_gnu_properties): New.
3215 (elf_x86_64_nacl_plt): New.
3216 (elf_x86_64_nacl_arch_bed): Updated.
3218 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3220 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3221 (LAZY_PLT_ENTRY_SIZE): This.
3222 (NON_LAZY_PLT_ENTRY_SIZE): New.
3223 (elf_i386_plt0_entry): Renamed to ...
3224 (elf_i386_lazy_plt0_entry): This.
3225 (elf_i386_plt_entry): Renamed to ...
3226 (elf_i386_lazy_plt_entry): This.
3227 (elf_i386_pic_plt0_entry): Renamed to ...
3228 (elf_i386_pic_lazy_plt0_entry): This.
3229 (elf_i386_pic_plt_entry): Renamed to ...
3230 (elf_i386_pic_lazy_plt_entry): This.
3231 (elf_i386_got_plt_entry): Renamed to ...
3232 (elf_i386_non_lazy_plt_entry): This.
3233 (elf_i386_pic_got_plt_entry): Renamed to ...
3234 (elf_i386_pic_non_lazy_plt_entry): This.
3235 (elf_i386_eh_frame_plt): Renamed to ...
3236 (elf_i386_eh_frame_lazy_plt): This.
3237 (elf_i386_eh_frame_plt_got): Renamed to ...
3238 (elf_i386_eh_frame_non_lazy_plt): This.
3239 (elf_i386_plt_layout): Renamed to ...
3240 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3241 eh_frame_plt_got_size.
3242 (elf_i386_non_lazy_plt_layout): New.
3243 (elf_i386_plt_layout): Likewise.
3244 (elf_i386_non_lazy_plt): Likewise.
3245 (GET_PLT_ENTRY_SIZE): Removed.
3246 (elf_i386_plt): Renamed to ...
3247 (elf_i386_lazy_plt): This.
3248 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3249 (elf_i386_arch_bed): Updated.
3250 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3251 (elf_i386_create_dynamic_sections): Removed.
3252 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3253 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3254 (elf_i386_adjust_dynamic_symbol): Updated.
3255 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3256 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3257 size for PLT0 if there is no PLT0.
3258 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3259 output section is discarded only if GOT isn't empty.
3260 (elf_i386_relocate_section): Updated. Properly get PLT index
3261 if there is no PLT0.
3262 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3263 second and third slots in the PLT entry if there is no PLT0.
3264 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3265 if there is no PLT0. Set sh_entsize on the .plt.got section.
3266 (elf_i386_nacl_plt): Forward declaration.
3267 (elf_i386_get_plt_sym_val): Removed.
3268 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3269 against all dynamic relocations.
3270 (elf_i386_link_setup_gnu_properties): New function.
3271 (elf_backend_create_dynamic_sections): Updated.
3272 (elf_backend_setup_gnu_properties): New.
3273 (elf_i386_nacl_plt): Updated.
3274 (elf_i386_nacl_arch_bed): Likewise.
3275 (elf_i386_vxworks_arch_bed): Likewise.
3277 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3279 * elflink.c (elf_output_implib): Remove executable flag from import
3281 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3282 library is a relocatable object file.
3284 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3287 * elf32-avr.c (avr_should_move_sym): New function.
3288 (avr_should_reduce_sym_size): Likewise.
3289 (avr_should_increase_sym_size): Likewise.
3290 (elf32_avr_relax_delete_bytes): Adjust symbol values
3291 and sizes by calling new functions.
3293 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3295 * config.bfd (riscv32-*): Enable rv64.
3297 2017-05-02 Alan Modra <amodra@gmail.com>
3300 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3301 rather than h->root.type == bfd_link_hash_new.
3302 (bfd_elf_record_link_assignment): Similarly, call
3303 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3305 2017-04-29 Alan Modra <amodra@gmail.com>
3308 * reloc.c (reloc_offset_in_range): New function.
3309 (bfd_perform_relocation, bfd_install_relocation): Use it.
3310 (_bfd_final_link_relocate): Likewise.
3312 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3314 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3315 before using .plt.got.
3316 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3318 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3320 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3321 instead of "+=" to update 0.
3323 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3325 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3326 .plt.got section here.
3327 (elf_i386_check_relocs): Don't create the .plt.got section.
3328 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3329 the .plt.got and .plt.bnd sections here.
3330 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3333 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3335 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3337 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3338 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3339 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3340 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3343 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3345 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3347 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3348 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3349 the first relocatable ELF input with GNU properties.
3351 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3353 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3354 VxWorks for non-PIC.
3356 2017-04-27 Alan Modra <amodra@gmail.com>
3358 * elf-bfd.h (struct elf_backend_data): Make asection param of
3359 elf_backend_eh_frame_address_size const.
3360 (_bfd_elf_eh_frame_address_size): Likewise.
3361 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3362 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3363 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3364 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3365 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3366 (next_cie_fde_offset): Constify params.
3367 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3369 2017-04-27 Alan Modra <amodra@gmail.com>
3371 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3372 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3373 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3375 (offset_adjust): New function.
3376 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3377 (adjust_eh_frame_local_symbols): Likewise.
3378 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3379 after changing anything. Return true if anything changed.
3380 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3381 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3383 2017-04-27 Alan Modra <amodra@gmail.com>
3385 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3388 2017-04-27 Alan Modra <amodra@gmail.com>
3390 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3391 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3392 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3393 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3394 for undef and undefweak dyn_relocs.
3395 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3396 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3397 (allocate_got, allocate_dynrelocs): Likewise.
3398 (ppc64_elf_relocate_section): Likewise.
3400 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3402 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3403 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3404 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3405 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3407 2017-04-26 Nick Clifton <nickc@redhat.com>
3410 * reloc.c (bfd_perform_relocation): Check for a negative address
3413 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3416 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3418 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3419 (elf_backend_always_renumber_dynsyms): Define.
3420 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3421 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3422 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3423 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3425 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3427 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3429 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3430 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3431 sections have been created.
3433 2017-04-26 Nick Clifton <nickc@redhat.com>
3436 * compress.c (bfd_init_section_compress_status): Check the return
3437 value from bfd_malloc.
3439 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3441 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3442 no_finish_dynamic_symbol.
3443 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3445 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3446 weak symbol, don't make it dynamic.
3447 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3448 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3449 relocation for GOT reference.
3450 (elf_x86_64_finish_dynamic_symbol): Abort if
3451 no_finish_dynamic_symbol isn't 0.
3453 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3456 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3457 undefined weak symbol, don't make it dynamic.
3458 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3459 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3460 relocation for R_386_GOT32.
3462 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3465 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3467 2017-04-23 Alan Modra <amodra@gmail.com>
3470 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3471 * elf.c (lcomm_sym): New.
3472 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3473 * bfd-in2.h: Regenerate.
3475 2017-04-23 Alan Modra <amodra@gmail.com>
3478 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3479 parameters and comment.
3480 (_bfd_elf_get_reloc_section): Delete.
3481 (_bfd_elf_plt_get_reloc_section): Declare.
3482 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3483 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3485 (_bfd_elf_get_reloc_section): ..here. Delete.
3486 (assign_section_numbers): Call elf_get_reloc_section.
3487 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3488 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3490 2017-04-23 Alan Modra <amodra@gmail.com>
3493 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3496 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3499 * elf32-i386.c (elf_i386_link_hash_entry): Add
3500 no_finish_dynamic_symbol.
3501 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3502 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3503 symbol, don't make it dynamic in PIE.
3504 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3505 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3506 relocation for R_386_GOT32
3507 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3510 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3514 * elflink.c (elf_link_add_object_symbols): Require
3515 --no-dynamic-linker with -E/--dynamic-list when creating
3518 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3520 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3523 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3525 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3526 dynamic symbol sorting.
3528 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3531 * elflink.c (elf_link_add_object_symbols): Preserve
3532 dynamic_ref_after_ir_def when restoring the symbol table for
3533 unneeded dynamic object.
3535 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3538 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3539 on on undefined IFUNC symbol in the second PLT.
3541 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3543 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3545 2017-04-19 Alan Modra <amodra@gmail.com>
3547 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3548 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3549 * elf32-ppc.c:Formatting.
3550 (ensure_undefweak_dynamic): Don't make dynamic when
3551 info->dynamic_undefined_weak is zero.
3552 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3553 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3554 not default visibility. Discard undef and undefweak
3556 (ppc_elf_relocate_section): Adjust to suit.
3557 * elf64-ppc.c: Formatting.
3558 (ensure_undefweak_dynamic): Don't make dynamic when
3559 info->dynamic_undefined_weak is zero.
3560 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3561 info->dynamic_undefined_weak. Discard them earlier.
3563 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3566 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3567 before generating the version definition section.
3569 2017-04-17 Alan Modra <amodra@gmail.com>
3571 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3572 state when a regular object file defines a symbol with
3573 incompatible type to that defined by an earlier shared lib.
3575 2017-04-13 Alan Modra <amodra@gmail.com>
3577 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3579 * elf32-arm.c: Likewise.
3580 * elf32-i386.c: Likewise.
3581 * elf32-mep.c: Likewise.
3582 * elf64-ia64-vms.c: Likewise.
3583 * elf64-x86-64.c: Likewise.
3584 * elflink.c: Likewise.
3585 * elfnn-ia64.c: Likewise.
3586 * elfxx-mips.c: Likewise.
3588 2017-04-13 Alan Modra <amodra@gmail.com>
3590 * aoutx.h: Use %B and %A in error messages throughout file.
3591 * aout-cris.c: Likewise.
3592 * archive.c: Likewise.
3593 * binary.c: Likewise.
3594 * coff-rs6000.c: Likewise.
3595 * coff-tic4x.c: Likewise.
3596 * coffcode.h: Likewise.
3597 * coffgen.c: Likewise.
3598 * cofflink.c: Likewise.
3599 * coffswap.h: Likewise.
3600 * cpu-arm.c: Likewise.
3601 * elf-eh-frame.c: Likewise.
3602 * elf-m10300.c: Likewise.
3604 * elf32-arc.c: Likewise.
3605 * elf32-arm.c: Likewise.
3606 * elf32-bfin.c: Likewise.
3607 * elf32-frv.c: Likewise.
3608 * elf32-iq2000.c: Likewise.
3609 * elf32-m32c.c: Likewise.
3610 * elf32-microblaze.c: Likewise.
3611 * elf32-nds32.c: Likewise.
3612 * elf32-rl78.c: Likewise.
3613 * elf32-rx.c: Likewise.
3614 * elf32-score.c: Likewise.
3615 * elf32-score7.c: Likewise.
3616 * elf32-sh64.c: Likewise.
3617 * elf32-v850.c: Likewise.
3618 * elf32-vax.c: Likewise.
3619 * elf32-visium.c: Likewise.
3620 * elf64-ia64-vms.c: Likewise.
3621 * elf64-mmix.c: Likewise.
3622 * elf64-sh64.c: Likewise.
3623 * elfcode.h: Likewise.
3624 * elfnn-aarch64.c: Likewise.
3625 * elfnn-ia64.c: Likewise.
3626 * elfxx-mips.c: Likewise.
3627 * hpux-core.c: Likewise.
3630 * linker.c: Likewise.
3631 * merge.c: Likewise.
3633 * oasys.c: Likewise.
3634 * pdp11.c: Likewise.
3635 * peXXigen.c: Likewise.
3636 * rs6000-core.c: Likewise.
3637 * vms-alpha.c: Likewise.
3638 * xcofflink.c: Likewise.
3640 2017-04-13 Alan Modra <amodra@gmail.com>
3642 * bfd.c (PRINT_TYPE): Define.
3643 (_doprnt): New function.
3644 (error_handler_internal): Use _doprnt.
3645 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3646 calls in their natural order, throughout file.
3647 * coff-mcore.c: Likewise.
3648 * coff-ppc.c: Likewise.
3649 * coff-tic80.c: Likewise.
3650 * cofflink.c: Likewise.
3651 * elf-s390-common.c: Likewise.
3653 * elf32-arm.c: Likewise.
3654 * elf32-i386.c: Likewise.
3655 * elf32-m32r.c: Likewise.
3656 * elf32-msp430.c: Likewise.
3657 * elf32-spu.c: Likewise.
3658 * elf64-ia64-vms.c: Likewise.
3659 * elf64-sparc.c: Likewise.
3660 * elf64-x86-64.c: Likewise.
3661 * elflink.c: Likewise.
3662 * elfnn-aarch64.c: Likewise.
3663 * elfnn-ia64.c: Likewise.
3664 * elfxx-mips.c: Likewise.
3666 2017-04-13 Alan Modra <amodra@gmail.com>
3668 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3669 branch veneers" error. Fix double space and format message.
3670 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3671 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3673 2017-04-13 Alan Modra <amodra@gmail.com>
3675 * bfd-in2.h: Regenerate.
3677 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3679 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3680 extra `\n' in warning/error messages.
3681 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3682 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3684 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3686 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3687 processor-specific properties with generic ELF target vector.
3689 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3691 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3692 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3693 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3694 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3696 (link_hash_newfunc): Initialize has_got_reloc and
3698 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3700 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3702 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3704 (_bfd_sparc_elf_fixup_symbol): New function.
3705 (allocate_dynrelocs): Don't allocate space for dynamic
3706 relocations and discard relocations against resolved undefined
3707 weak symbols in executable. Don't make resolved undefined weak
3708 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3709 relocation against undefined weak symbols in PIE.
3710 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3711 relocations against resolved undefined weak symbols in PIE
3712 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3713 without ynamic PLT/GOT relocations for resolved undefined weak
3715 Don't generate dynamic relocation against resolved undefined
3716 weak symbol in executable.
3717 (pie_finish_undefweak_symbol): New function.
3718 (_bfd_sparc_elf_finish_dynamic_sections): Call
3719 pie_finish_undefweak_symbol on all symbols in PIE.
3720 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3721 (_bfd_sparc_elf_fixup_symbol): New function.
3723 2017-04-10 Nick Clifton <nickc@redhat.com>
3725 * config.bfd: Remove ns32k from obsolete list.
3727 2017-04-10 Alan Modra <amodra@gmail.com>
3730 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3731 (special_sections_i): Likewise for .init_array.
3732 (special_sections_p): Likewise for .preinit_array.
3734 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3738 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3739 ELF_COMMON_DEF_P for common symbols.
3740 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3741 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3742 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3743 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3744 07492f668d2173da7a2bda3707ff0985e0f460b6.
3746 2017-04-07 Pedro Alves <palves@redhat.com>
3748 * opncls.c (bfd_get_debug_link_info): Rename to...
3749 (bfd_get_debug_link_info_1): ... this. Change type of second
3750 parameter to void pointer. Adjust.
3751 (bfd_get_debug_link_info): Reimplement on top of
3752 bfd_get_debug_link_info_1.
3753 (separate_debug_file_exists, separate_alt_debug_file_exists):
3754 Change type of second parameter to void pointer. Adjust.
3755 (get_func_type, check_func_type): Change type of second parameter
3757 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3758 the callback functions instead of passing the address of a local.
3759 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3760 find_separate_debug_file.
3761 (get_alt_debug_link_info_shim): Change type of second parameter to
3762 void pointer. Adjust.
3763 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3764 find_separate_debug_file.
3765 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3766 of second parameter to void pointer. Adjust.
3767 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3768 pointer local to find_separate_debug_file.
3770 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3772 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3773 external symbols with a definition.
3774 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3776 2017-04-07 Alan Modra <amodra@gmail.com>
3778 * po/SRC-POTFILES.in: Regenerate.
3780 2017-04-05 Alan Modra <amodra@gmail.com>
3782 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3785 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3787 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3788 numbers for DataDirectory entry indicies passed to
3791 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3793 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3794 each GNU_MBIND section and align GNU_MBIND section to page size.
3795 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3796 segment for each GNU_MBIND section.
3797 (_bfd_elf_init_private_section_data): Copy sh_info from input
3798 for GNU_MBIND section.
3800 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3802 * elfnn-riscv.c (GP_NAME): Delete.
3803 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3804 (_bfd_riscv_relax_lui): Likewise.
3806 2017-04-04 Nick Clifton <nickc@redhat.com>
3809 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3811 (bfd_elf_final_link): Only initialize the extended symbol index
3812 section if there are extended symbol tables to list.
3814 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3816 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3817 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3818 * configure.ac (elf): Add elf-properties.lo.
3819 * Makefile.in: Regenerated.
3820 * configure: Likewise.
3821 * elf-bfd.h (elf_property_kind): New.
3822 (elf_property): Likewise.
3823 (elf_property_list): Likewise.
3824 (elf_properties): Likewise.
3825 (_bfd_elf_parse_gnu_properties): Likewise.
3826 (_bfd_elf_get_property): Likewise.
3827 (_bfd_elf_link_setup_gnu_properties): Likewise.
3828 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3829 and setup_gnu_properties.
3830 (elf_obj_tdata): Add properties.
3831 * elf-properties.c: New file.
3832 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3833 (elf_i386_merge_gnu_properties): Likewise.
3834 (elf_backend_parse_gnu_properties): Likewise.
3835 (elf_backend_merge_gnu_properties): Likewise.
3836 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3837 (elf_x86_64_merge_gnu_properties): Likewise.
3838 (elf_backend_parse_gnu_properties): Likewise.
3839 (elf_backend_merge_gnu_properties): Likewise.
3840 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3841 (elf_backend_parse_gnu_properties): Likewise.
3842 (elf_backend_setup_gnu_properties): Likewise.
3843 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3844 elf_backend_merge_gnu_properties and
3845 elf_backend_setup_gnu_properties.
3847 2017-03-30 Pip Cet <pipcet@gmail.com>
3849 * elf32-wasm32.c: Add relocation code, two relocs.
3850 * reloc.c: Add wasm32 relocations.
3851 * libbfd.h: Regenerate.
3852 * bfd-in2.h: Regenerate.
3853 * bfd/po/bfd.pot: Regenerate.
3855 2017-03-29 Nick Clifton <nickc@redhat.com>
3858 * coff-bfd.h (struct coff_section_data): Add new fields:
3859 saved_bias and bias.
3860 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3861 computed for PE binaries.
3862 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3865 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3868 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3869 to handle a local symbol with a hash-symbol-entry; without PLT.
3870 Add BFD_ASSERT for an incidental case with GOT entry present.
3871 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3872 isn't forced-or-set local.
3874 2017-03-27 Pip Cet <pipcet@gmail.com>
3876 * wasm-module.c: New file to support WebAssembly modules.
3877 * wasm-module.h: New file to support WebAssembly modules.
3878 * doc/webassembly.texi: Start documenting wasm-module.c.
3879 * config.bfd: Add wasm_vec.
3880 * targets.c: Likewise.
3881 * configure.ac: Likewise.
3882 * Makefile.am: Add entries for wasm-module.c.
3883 * Makefile.in: Regenerate.
3884 * configure: Regenerate.
3885 * po/SRC-POTFILES.in: Regenerate.
3887 2017-03-27 Pip Cet <pipcet@gmail.com>
3889 * cpu-wasm32.c: New file to support wasm32 architecture.
3890 * elf32-wasm32.c: New file to support wasm32 architecture.
3891 * Makefile.am: Add wasm32 architecture.
3892 * archures.c: Likewise.
3893 * config.bfd: Likewise.
3894 * configure.ac: Likewise.
3895 * targets.c: Likewise.
3896 * Makefile.in: Regenerate.
3897 * bfd-in2.h: Regenerate.
3898 * configure: Regenerate.
3899 * po/SRC-POTFILES.in: Regenerate.
3901 2017-03-20 Alan Modra <amodra@gmail.com>
3904 * elf64-ppc.c (compare_symbols): Stabilize sort.
3906 2017-03-18 Alan Modra <amodra@gmail.com>
3908 * elf64-ppc.c (struct ppc_link_hash_table): Add
3909 local_ifunc_resolver and maybe_local_ifunc_resolver.
3910 (ppc_build_one_stub): Set flags on emitting dynamic
3911 relocation to ifunc.
3912 (ppc64_elf_relocate_section): Likewise.
3913 (ppc64_elf_finish_dynamic_symbol): Likewise.
3914 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3915 local dynamic relocs to ifuncs.
3916 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3917 local_ifunc_resolver and maybe_local_ifunc_resolver.
3918 (ppc_elf_relocate_section): Set flag on emitting dynamic
3919 relocation to ifuncs.
3920 (ppc_elf_finish_dynamic_symbol): Likewise.
3921 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3922 dynamic relocs to ifuncs.
3924 2017-03-13 Nick Clifton <nickc@redhat.com>
3927 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3928 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3929 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3930 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3931 * bfd-in2.h: Regenerate.
3932 * libbfd.h: Regenerate.
3933 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3935 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3936 (elfNN_aarch64_howto_table): Likewise.
3937 (aarch64_tls_transition_without_check): Likewise.
3938 (aarch64_reloc_got_type): Likewise.
3939 (elfNN_aarch64_final_link_relocate): Likewise.
3940 (elfNN_aarch64_tls_relax): Likewise.
3941 (elfNN_aarch64_relocate_section): Likewise.
3942 (elfNN_aarch64_gc_sweep_hook): Likewise.
3943 (elfNN_aarch64_check_relocs): Likewise.
3944 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3945 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3947 2017-03-11 Alan Modra <amodra@gmail.com>
3949 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3950 parameter is in fact used. Whitespace fixes.
3951 * elf64-ppc.c: Likewise.
3953 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3955 * rs6000-core.c (CORE_NEW): Simplify macro when
3956 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3958 2017-03-07 Alan Modra <amodra@gmail.com>
3962 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3965 2017-03-05 Alan Modra <amodra@gmail.com>
3967 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3968 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3969 (next_cie_fde_offset): New function.
3970 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3971 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3972 four bytes. Align CIEs to four or eight bytes depending on
3973 per_encoding_aligned8. Align FDEs according to their encoding.
3974 Pad last FDE to output section alignment.
3975 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3977 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3978 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3979 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3981 2017-03-02 Martin Bickel <binutils@ineranves.de>
3984 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3985 empty segments which have a zero filesz, but a non-zero memsz.
3987 2017-03-02 Alan Modra <amodra@gmail.com>
3989 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3991 2017-02-28 Alan Modra <amodra@gmail.com>
3993 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3994 (ppc64_elf_relocate_section): Likewise.
3996 2017-02-28 Alan Modra <amodra@gmail.com>
3999 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4000 rather than elf32_nios2_hash_table or elf_hash_table.
4001 (create_got_section): Likewise.
4002 (nios2_elf32_finish_dynamic_symbol): Likewise.
4003 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4004 (nios2_elf32_size_dynamic_sections): Likewise.
4005 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4006 vars. Use htab equivalents directly instead. Don't create
4007 all dynamic sections on needing just the GOT. Use a goto
4008 rather than a fall-through with reloc test. Ensure
4009 htab->dynobj is set when making dynamic sreloc section.
4010 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4011 equivalent directly instead. Don't segfault on looking for
4012 .dynamic when dynamic sections have not been created. Don't
4013 segfault on .got.plt being discarded.
4014 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4015 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4016 fixme and another not so relevant comment.
4017 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4018 already set, set hash table dynobj on creating .sbss.
4020 2017-02-28 Alan Modra <amodra@gmail.com>
4022 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4023 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4024 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4025 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4026 (ppc64_elf_relocate_section): Likewise.
4027 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4028 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4029 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4030 * libbfd.h: Regenerate.
4031 * bfd-in2.h: Regenerate.
4033 2017-02-28 Alan Modra <amodra@gmail.com>
4035 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4036 dynamic .data.rel.ro read-only.
4037 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4038 rather than section flags when deciding where copy reloc goes.
4039 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4040 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4041 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4042 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4043 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4044 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4045 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4046 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4047 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4048 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4049 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4050 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4051 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4052 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4053 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4054 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4055 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4056 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4057 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4059 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4061 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4062 `jalr $0, $25' instruction encoding.
4064 2017-02-27 Nick Clifton <nickc@redhat.com>
4067 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4068 generating a seg-fault when encountering a symbol that has been
4069 deleted by garbage collection.
4071 2017-02-25 Alan Modra <amodra@gmail.com>
4073 * elf32-arc.c (struct dynamic_sections): Delete.
4074 (enum dyn_section_types): Delete.
4075 (dyn_section_names): Delete.
4076 (arc_create_dynamic_sections): Delete.
4077 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4078 segfault on discarded .rela.plt section.
4079 (elf_arc_size_dynamic_sections): Formatting. Don't call
4080 arc_create_dynamic_sections. Don't allocate memory for sections
4081 handled by the generic linker. Correct code finding relocs in
4082 read-only sections. Set SEC_EXCLUDE on zero size .got,
4083 .got.plt, and .dynbss sections. Do set .interp for pies.
4085 2017-02-24 Andrew Waterman <andrew@sifive.com>
4087 * elfnn-riscv.c (GP_NAME): New macro.
4088 (riscv_global_pointer_value): Use it.
4089 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4090 output section, consider only that section's alignment.
4092 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4094 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4095 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4096 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4097 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4099 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4101 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4102 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4105 2017-02-23 Alan Modra <amodra@gmail.com>
4108 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4110 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4111 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4114 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4117 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4118 processing ahead of the call to `elf_gc_sweep_symbol'.
4120 2017-02-22 Nick Clifton <nickc@redhat.com>
4123 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4124 created section 4-byte alignment.
4126 2017-02-22 Alan Modra <amodra@gmail.com>
4128 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4129 on .got or .plt output section being discarded by script.
4130 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4133 2017-02-21 Alan Modra <amodra@gmail.com>
4135 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4136 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4138 2017-02-20 Alan Modra <amodra@gmail.com>
4141 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4142 if DT_RELSZ/DT_RELASZ is zero.
4144 2017-02-17 Nick Clifton <nickc@redhat.com>
4146 * compress.c (bfd_get_full_section_contents): Remember to reduce
4147 compressed size by the sizeof the compression header when
4148 decompressing the contents.
4150 2017-02-17 Pedro Alves <palves@redhat.com>
4152 * srec.c (Chunk): Rename to ...
4153 (_bfd_srec_len): ... this.
4154 (S3Forced): Rename to ...
4155 (_bfd_srec_forceS3): ... this.
4156 * objcopy.c: Adjust all references.
4158 2017-02-17 Pedro Alves <palves@redhat.com>
4160 * archive.c (bsd_write_armap): Rename to ...
4161 (_bfd_bsd_write_armap): ... this.
4162 (coff_write_armap): Rename to ...
4163 (_bfd_coff_write_armap): ... this.
4164 * libbfd-in.h (bsd_write_armap): Rename to ...
4165 (_bfd_bsd_write_armap): ... this.
4166 (coff_write_armap): Rename to ...
4167 (_bfd_coff_write_armap): ... this.
4168 * aout-target.h, aout-tic30.c: Adjust all users.
4169 * libbfd.h: Regenerate.
4171 2017-02-17 Pedro Alves <palves@redhat.com>
4173 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4174 (warn_deprecated): Rename to ...
4175 (_bfd_warn_deprecated): ... this.
4176 * libbfd.c (warn_deprecated): Rename to ...
4177 (_bfd_warn_deprecated): ... this.
4178 * bfd-in2.h: Regenerate.
4180 2017-02-17 Pedro Alves <palves@redhat.com>
4182 * bfdio.c (real_ftell): Rename to ...
4183 (_bfd_real_ftell): ... this.
4184 (real_fseek): Rename to ...
4185 (_bfd_real_fseek): ... this.
4186 (real_fopen): Rename to ...
4187 (_bfd_real_fopen): ... this.
4188 * libbfd-in.h (real_ftell): Rename to ...
4189 (_bfd_real_ftell): ... this.
4190 (real_fseek): Rename to ...
4191 (_bfd_real_fseek): ... this.
4192 (real_fopen): Rename to ...
4193 (_bfd_real_fopen): ... this.
4194 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4195 * libbfd.h: Regenerate.
4197 2017-02-17 Pedro Alves <palves@redhat.com>
4199 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4200 * libbfd.c (read_unsigned_leb128): Rename to ...
4201 (_bfd_read_unsigned_leb128): ... this.
4202 (read_signed_leb128): Rename to ...
4203 (_bfd_read_signed_leb128): ... this.
4204 (safe_read_leb128): Rename to ...
4205 (_bfd_safe_read_leb128): ... this.
4206 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4207 (_bfd_read_unsigned_leb128): ... this.
4208 (read_signed_leb128): Rename to ...
4209 (_bfd_read_signed_leb128): ... this.
4210 (safe_read_leb128): Rename to ...
4211 (_bfd_safe_read_leb128): ... this.
4212 * libbfd.h: Renegerate.
4214 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4216 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4217 before trying to fine matching file and line information.
4219 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4221 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4222 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4223 not match current bfd, then reload debug information. Record bfd
4224 we're loading debug info for in the stash. If we have debug
4225 informatin in the cache then perform section placement before
4228 2017-02-16 Alan Modra <amodra@gmail.com>
4231 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4232 * elfxx-target.h (elf_backend_no_page_alias): Define.
4233 (elfNN_bed): Init new field.
4234 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4235 ensure PT_LOAD segment starts on a new page.
4236 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4238 2017-02-16 Alan Modra <amodra@gmail.com>
4241 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4244 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4246 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4247 * bfd-in2.h: Regenerated.
4249 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4252 * elf32-i386.c (elf_i386_relocate_section): Allow
4253 "lea foo@GOT, %reg" in PIC.
4255 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4258 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4259 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4260 error against local IFUNC symbol without a base register for
4263 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4265 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4266 `%P: %H:' with `info->callbacks->einfo'.
4267 (ppc_elf_relocate_section): Likewise.
4268 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4269 (ppc64_elf_edit_toc): Likewise.
4270 (ppc64_elf_relocate_section): Likewise.
4272 2017-02-14 Alan Modra <amodra@gmail.com>
4274 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4275 --gc-keep-exported, and test versioned field of sym rather than
4276 looking for @ in name.
4278 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4280 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4283 2017-02-13 Nick Clifton <nickc@redhat.com>
4286 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4289 2017-02-07 Andrew Waterman <andrew@sifive.com>
4291 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4292 entry size if PLT header is written.
4294 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4296 Fix sparc64 dynamic relocation processing to use the dynamic
4298 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4299 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4302 2017-02-03 Nick Clifton <nickc@redhat.com>
4305 * coffcode.h (coff_write_object_contents): Enlarge size of
4306 s_name_buf in order to avoid compile time warning about possible
4308 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4309 32-bits of insn value before printing into buffer.
4311 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4313 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4314 `max_local_dynindx'.
4315 (mips_elf_sort_hash_table): Handle it.
4316 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4317 symbols bump up `max_local_dynindx' rather than
4318 `max_non_got_dynindx'.
4320 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4322 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4323 `min_got_dynindx', `max_unref_got_dynindx' and
4324 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4325 (mips_elf_sort_hash_table): Adjust accordingly.
4327 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4329 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4330 to access the hash table.
4332 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4334 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4335 non-NULL `htab' to the beginning.
4337 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4339 * elflink.c (elf_gc_sweep): Wrap overlong line.
4341 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4343 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4344 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4345 * elfxx-mips.c (mips_elf_link_hash_table): Add
4346 `ignore_branch_isa' member.
4347 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4348 in branch relocation calculation as an error if
4349 `ignore_branch_isa' has been set.
4350 (_bfd_mips_elf_insn32): Rename to...
4351 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4352 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4353 Handle the new parameter.
4355 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4357 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4358 local variable dynobj.
4361 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4362 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4363 executable from read-only sections into sdynrelro.
4364 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4365 dynamic relocs in sdynrelro.
4366 (elf_backend_want_dynrelro): Define.
4368 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4370 * config.bfd (*-*-rtemsaout*): Mark as removed.
4372 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4374 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4375 (arm-*-rtems*): Move to (arm*-*-eabi*).
4376 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4377 (m68-*-rtems*): Move to (m68*-*-elf*).
4379 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4381 * config.bfd (*-*-rtemscoff*): Mark as removed.
4383 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4386 * elflink.c (bfd_elf_record_link_assignment): Revert last
4387 change and don't ever clear `forced_local'. Set `mark'
4389 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4391 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4392 (bfd_elf_size_dynamic_sections): ... here.
4393 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4394 and set `mark' instead in `__tls_get_addr_opt' processing.
4395 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4397 2017-01-24 Alan Modra <amodra@gmail.com>
4399 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4400 where dynamic relocs are preferable. Allow ifunc too.
4401 (ensure_undefweak_dynamic): New function.
4402 (allocate_dynrelocs): Use it here. Move plt handling last and
4403 don't make symbols dynamic, simplifying loop. Only make undef
4404 weak symbols with GOT entries dynamic. Correct condition
4405 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4406 comments. Remove goto.
4407 (ppc_elf_relocate_section): Correct test for using dynamic
4408 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4409 to suit. Set up explicit tls_index entries and implicit GOT
4410 tls_index entries resolvable at link time for
4411 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4412 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4413 (ensure_undefweak_dynamic): New function.
4414 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4415 with GOT entries dynamic. Remove unnecessary test of
4416 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4417 (ppc64_elf_relocate_section): Correct test for using dynamic
4418 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4419 to suit. Set up explicit tls_index entries and implicit GOT
4420 tls_index entries resolvable at link time for __tls_get_addr_opt.
4421 Simplify expression to clear mem for prelink.
4423 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4425 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4427 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4429 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4430 (elf_backend_hash_symbol): Define.
4432 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4435 * elflink.c (bfd_elf_record_link_assignment): Clear any
4436 `forced_local' marking for DSO symbols that are not being
4439 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4441 * elfnn-riscv.c (riscv_elf_object_p): New function.
4443 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4446 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4448 (elf_x86_64_check_relocs): Create .eh_frame section for the
4450 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4451 .eh_frame section for the .plt.bnd section.
4452 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4453 for the .plt.bnd section.
4455 2017-01-12 Nick Clifton <nickc@redhat.com>
4458 * opncls.c (find_separate_debug_file): Add include_dirs
4459 parameter. Only include the directory part of the bfd's filename
4460 in search paths if include_dirs is true. Add a couple of extra
4461 locations for looking for debug files.
4462 ( bfd_follow_gnu_debuglink): Update invocation of
4463 find_separate_debug_file.
4464 (bfd_follow_gnu_debugaltlink): Likewise.
4465 (get_build_id): New function: Finds the build-id of the given bfd.
4466 (get_build_id_name): New function: Computes the name of the
4467 separate debug info file for a bfd, based upon its build-id.
4468 (check_build_id_file): New function: Checks to see if a separate
4469 debug info file exists at the given location, and that its
4470 build-id matches that of the original bfd.
4471 (bfd_follow_build_id_debuglink): New function: Finds a separate
4472 debug info file for a given bfd by using the build-id method.
4473 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4474 method of locating a separate debug info file before using the
4476 * bfd-in2.h: Regenerate.
4478 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4481 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4482 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4483 elf_x86_64_eh_frame_plt_got.
4484 (elf_x86_64_size_dynamic_sections): Get unwind info from
4485 elf_x86_64_bnd_arch_bed for the BND PLT.
4487 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4489 * config.bfd: Add entries for i686-redox and x86_64-redox.
4491 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4493 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4495 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4496 .eh_frame section to 4 bytes for x32.
4497 (elf_x86_64_check_relocs): Likewise.
4499 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4502 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4503 (PLT_GOT_FDE_LENGTH): Likewise.
4504 (elf_i386_plt_layout): Add eh_frame_plt_got and
4505 eh_frame_plt_got_size.
4506 (elf_i386_plt): Updated.
4507 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4508 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4509 (elf_i386_size_dynamic_sections): Allocate and initialize
4510 .eh_frame section for .plt.got.
4511 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4513 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4514 eh_frame_plt_got_size.
4515 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4516 (PLT_GOT_FDE_LENGTH): Likewise.
4517 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4518 eh_frame_plt_got_size.
4519 (elf_x86_64_arch_bed): Updated.
4520 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4521 eh_frame_plt_got_size.
4522 (elf_x86_64_nacl_arch_bed): Likewise.
4523 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4524 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4525 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4526 .eh_frame section for .plt.got.
4527 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4530 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4532 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4533 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4535 2017-01-09 Nick Clifton <nickc@redhat.com>
4537 * dwarf2.c (lookup_address_in_function_table): Return early if
4538 there are no functions in the given comp unit, or if the high
4539 address of the last function in the comp unit is less than the
4542 2017-01-09 Nick Clifton <nickc@redhat.com>
4545 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4546 message if there are too many symbols to load.
4548 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4550 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4551 if relocs are cached.
4553 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4556 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4557 for R_MICROBLAZE_GOTOFF_64.
4559 2017-01-03 Nick Clifton <nickc@redhat.com>
4561 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4562 warning about using a possibly uninitialised variable.
4564 2017-01-02 Alan Modra <amodra@gmail.com>
4566 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4567 (allocate_plt_static, allocate_dynrelocs): Use it.
4569 2017-01-02 Alan Modra <amodra@gmail.com>
4571 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4572 .PARISC.unwind section.
4574 2017-01-02 Alan Modra <amodra@gmail.com>
4577 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4578 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4579 indirect to GOT pointer relative code edit.
4581 2017-01-02 Alan Modra <amodra@gmail.com>
4583 Update year range in copyright notice of all files.
4585 For older changes see ChangeLog-2016
4587 Copyright (C) 2017 Free Software Foundation, Inc.
4589 Copying and distribution of this file, with or without modification,
4590 are permitted in any medium without royalty provided the copyright
4591 notice and this notice are preserved.
4597 version-control: never