1 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
4 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
5 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
6 (tilepro_elf_relocate_section): Don't generate dynamic
7 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
8 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
9 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
10 (tilegx_elf_relocate_section): Don't generate dynamic
11 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
13 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
16 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
17 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
19 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
20 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
22 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
24 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
25 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
26 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
28 2017-10-12 James Bowman <james.bowman@ftdichip.com>
30 * bfd-in2.h: Regenerate.
31 * libbfd.h: Regenerate.
32 * elf32-ft32.c: Add HOWTO R_FT32_15.
33 * reloc.c: Add BFD_RELOC_FT32_15.
35 2017-10-12 Nick Clifton <nickc@redhat.com>
37 * reloc.c (enum bfd_reloc_status): Start values at 2.
38 * bfd-in2.h: Regenerate.
39 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
40 that a TRUE return indicates success. Compare the result of
41 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
42 (build_one_stub): Change sense of tests against aarch64_relocate
44 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
45 than FALSE, when an error is detected.
46 (elfNN_aarch64_final_link_relocate): Likewise.
48 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
50 * elf32-i386.c (elf_backend_hide_symbol): New.
51 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
52 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
53 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
55 2017-10-12 Alan Modra <amodra@gmail.com>
57 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
58 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
59 (bfd_elf_define_start_stop): Likewise.
61 2017-10-12 Alan Modra <amodra@gmail.com>
63 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
64 when executable rather than non-PIC.
65 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
66 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
68 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
70 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
72 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
73 (elf_external_linux_prpsinfo64_ugid32): ... this.
74 (swap_linux_prpsinfo32_out): Rename to...
75 (swap_linux_prpsinfo32_ugid32_out): ... this.
76 (elf_external_linux_prpsinfo64_ugid16): New structure.
77 (swap_linux_prpsinfo64_ugid16_out): New function.
78 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
79 (elf_backend_linux_prpsinfo64_ugid16): Define.
80 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
81 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
82 of the 64-bit Linux core PRPSINFO note.
83 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
85 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
87 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
89 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
90 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
91 (elf_external_ppc_linux_prpsinfo32)
92 (swap_ppc_linux_prpsinfo32_out): Move to...
93 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
94 (swap_linux_prpsinfo32_ugid32_out): ... these.
95 (elf_external_linux_prpsinfo32): Rename to...
96 (elf_external_linux_prpsinfo32_ugid16): ... this.
97 (swap_linux_prpsinfo32_out): Rename to...
98 (swap_linux_prpsinfo32_ugid16_out): ... this.
99 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
100 (elf_backend_linux_prpsinfo32_ugid16): Define.
101 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
102 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
103 of the 32-bit Linux core PRPSINFO note.
104 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
105 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
106 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
107 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
108 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
109 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
110 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
111 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
112 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
113 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
115 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
117 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
118 `gap' member ahead of `pr_flag'.
120 2017-10-11 Pedro Alves <palves@redhat.com>
122 * bfd.c (_doprnt): Rename to ...
123 (_bfd_doprnt): ... this.
124 (error_handler_internal): Adjust.
126 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
128 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
129 instead of incrementing it.
130 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
132 2017-10-10 Renlin Li <renlin.li@arm.com>
135 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
136 symbols into dynamic.
138 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
141 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
142 (riscv_elf_link_hash_table_create): Initialize max_alignment to
144 (_bfd_riscv_relax_section): Cache the max alignment of output
145 sections if possible.
147 2017-10-10 Alan Modra <amodra@gmail.com>
149 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
150 .opd whenever .opd is present and non-zero size. Move code
151 setting abiversion to/from output file earlier. Only set
152 u.opd.func_sec when --gc-sections. Read relocs and set up
153 u.opd.func_sec values here..
154 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
156 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
158 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
160 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
163 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
165 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
166 .interp section with "ld --no-dynamic-linker".
168 2017-10-09 Alan Modra <amodra@gmail.com>
171 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
172 funcinfo_hash_table and varinfo_hash_table.
174 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
176 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
177 in read-only section with minfo.
178 (sh_elf_size_dynamic_sections): Likewise.
180 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
182 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
185 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
187 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
188 this_hdr.sh_entsize only if section size > 0.
190 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
192 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
194 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
196 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
197 in read-only section with minfo.
198 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
200 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
202 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
205 2017-10-06 John Baldwin <jhb@FreeBSD.org>
207 * elf-bfd.h (struct elf_backend_data): Add
208 `elf_backend_grok_freebsd_prstatus'.
209 * elf.c (elfcore_grok_freebsd_note): Call
210 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
212 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
214 (elf_backend_grok_freebsd_prstatus): Define.
215 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
216 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
218 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
220 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
221 and has_non_got_reloc with zero_undefweak.
222 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
223 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
225 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
226 has_non_got_reloc with zero_undefweak.
227 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
228 has_got_reloc and has_non_got_reloc with zero_undefweak.
229 (elf_x86_link_hash_entry): Likewise.
231 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
233 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
234 (VERIFY_COPY_RELOC): Likewise.
236 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
238 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
239 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
240 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
242 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
244 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
245 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
246 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
248 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
250 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
251 * elf32-i386.c (elf_i386_relocate_section): Use it.
252 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
254 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
256 * elf32-i386.c (X86_SIZE_TYPE_P): New.
257 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
258 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
259 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
260 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
262 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
264 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
265 (PLT_LOCAL_IFUNC_P): Likewise.
266 * elf32-i386.c (elf_i386_relocate_section): Use them.
267 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
269 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
271 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
272 * elf32-i386.c (elf_i386_relocate_section): Use it.
273 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
275 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
277 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
278 * elf32-i386.c (elf_i386_relocate_section): Use it.
279 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
281 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
283 * elf32-i386.c (X86_PCREL_TYPE_P): New.
284 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
285 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
286 (X86_PCREL_TYPE_P): This.
287 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
288 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
289 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
291 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
293 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
295 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
296 * elf32-i386.c (elf_i386_tls_transition): Use it.
297 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
299 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
301 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
302 Dump dynamic relocation in read-only section with minfo if
304 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
305 (maybe_set_textrel): Likewise.
306 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
307 read-only section with minfo.
309 2017-10-05 John Baldwin <jhb@FreeBSD.org>
311 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
313 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
315 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
316 in read-only section with minfo.
317 (tilepro_elf_size_dynamic_sections): Likewise.
318 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
319 (tilegx_elf_size_dynamic_sections): Likewise.
321 2017-10-05 Pedro Alves <palves@redhat.com>
324 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
325 ellipsis parameter. Split out bfd_error_on_input code to..
326 (bfd_set_input_error): .. New function.
327 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
328 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
329 * bfd-in2.h: Regenerate.
331 2017-10-05 Alan Modra <amodra@gmail.com>
333 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
334 fini_array error value.
336 2017-10-05 Alan Modra <amodra@gmail.com>
339 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
341 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
343 (elf_fake_sections): Adjust calls. Exit immediately on failure.
344 (bfd_elf_set_group_contents): Add associated reloc section indices
347 2017-10-04 Alan Modra <amodra@gmail.com>
349 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
350 classify symbols for ELFv2.
352 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
355 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
356 undergoes default promotion.
357 * bfd-in2.h: Regenerate.
359 2017-10-02 Alan Modra <amodra@gmail.com>
361 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
362 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
364 2017-10-01 Alan Modra <amodra@gmail.com>
367 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
368 (add_line_info): Always put end_sequence last.
370 2017-10-01 Alan Modra <amodra@gmail.com>
373 * dwarf2.c (read_section): Allocate buffer with extra byte for
374 bfd_simple_get_relocated_section_contents rather than copying
377 2017-09-29 Alan Modra <amodra@gmail.com>
379 * merge.c (merge_strings): Return FALSE on malloc failure.
380 (_bfd_merge_sections): Return failures from record_section and
383 2017-09-28 Alan Modra <amodra@gmail.com>
386 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
387 a case where plugin_notice isn't called.
389 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
391 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
394 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
397 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
398 output_bfd to info->callbacks->minfo.
400 2017-09-26 Nick Clifton <nickc@redhat.com>
403 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
404 assertion failure if elf_x86_64_rtype_to_howto has already issued
407 2017-09-26 Alan Modra <amodra@gmail.com>
410 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
413 2017-09-26 Nick Clifton <nickc@redhat.com>
416 * dwarf2.c (read_formatted_entries): Fail early if we know that
417 the loop parsing data entries will overflow the end of the
420 2017-09-26 Alan Modra <amodra@gmail.com>
423 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
424 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
425 to stash->info_ptr_memory, and check die_ref is within that memory.
426 Set info_ptr_end correctly when another CU is refd. Check die_ref
427 for DW_FORM_ref4 etc. is within CU.
429 2017-09-26 Alan Modra <amodra@gmail.com>
432 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
433 (read_formatted_entries): Init "fe".
434 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
436 2017-09-26 Alan Modra <amodra@gmail.com>
439 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
440 bounds in inner loop.
442 2017-09-25 Alan Modra <amodra@gmail.com>
445 * dwarf1.c (parse_die): Sanity check pointer against section limit
446 before dereferencing.
447 (parse_line_table): Likewise.
449 2017-09-25 Alan Modra <amodra@gmail.com>
452 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
454 (parse_comp_unit): Likewise.
456 2017-09-25 Alan Modra <amodra@gmail.com>
459 * dwarf2.c (read_formatted_entries): Error on format_count zero.
461 2017-09-24 Alan Modra <amodra@gmail.com>
464 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
465 within section bounds.
467 2017-09-24 Alan Modra <amodra@gmail.com>
470 * dwarf2.c (decode_line_info): Properly free line sequences on error.
472 2017-09-24 Alan Modra <amodra@gmail.com>
475 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
476 pname param. Return status. Make name const. Don't abort,
477 return an error. Formatting. Exit if current info_ptr matches
478 orig_info_ptr. Update callers.
479 (scan_unit_for_symbols): Start at nesting_level of zero. Make
480 nested_funcs an array of structs for extensibility. Formatting.
482 2017-09-24 Alan Modra <amodra@gmail.com>
485 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
486 rather than dividing by zero.
488 2017-09-24 Alan Modra <amodra@gmail.com>
491 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
493 2017-09-24 Alan Modra <amodra@gmail.com>
496 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
498 2017-09-24 Alan Modra <amodra@gmail.com>
501 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
502 SHT_GNU_verneed section for sanity. Don't zalloc memory for
505 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
508 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
511 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
514 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
515 -1 if bfd_canonicalize_dynamic_reloc returns 0.
517 2017-09-22 Pedro Alves <palves@redhat.com>
518 Alan Modra <amodra@gmail.com>
520 * version.h: Add comment.
522 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
524 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
525 NT_S390_GS_BC, correct the previously swapped invocations of
526 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
528 2017-09-19 Alan Modra <amodra@gmail.com>
531 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
534 2017-09-19 Alan Modra <amodra@gmail.com>
537 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
538 symbols before calculating verrefs. Don't renumber dynsyms
539 after gc. Exclude .gnu.version when zero or one dynsym.
540 Localize some vars and reindent.
542 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
545 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
546 return from bfd_canonicalize_dynamic_reloc.
548 2017-09-15 Alan Modra <amodra@gmail.com>
551 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
552 overflows bfd_size_type.
554 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
557 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
558 to indicate if conversion is performed.
559 (elf_i386_check_relocs): Cache section contents and relocations
560 if conversion is performed.
561 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
562 contents and relocations if conversion is performed.
564 2017-09-14 Nick Clifton <nickc@redhat.com>
567 * peXXigen.c (pe_print_idata): Extend check for HintName vector
570 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
572 * elfxx-x86.h: Fix a typo in comments.
574 2017-09-09 Kamil Rytarowski <n54@gmx.com>
576 * elf32-nds32.c: Rename __BIT() to N32_BIT().
578 2017-09-09 Alan Modra <amodra@gmail.com>
580 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
583 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
585 * elf32-i386.c (elf_i386_relocate_section): Update usage of
586 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
587 (elf_i386_finish_dynamic_symbol): Likewise.
588 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
589 (elf_x86_64_finish_dynamic_symbol): Likewise.
590 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
591 (_bfd_x86_elf_fixup_symbol): Likewise.
593 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
595 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
596 check has_non_got_reloc.
598 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
601 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
602 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
603 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
604 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
605 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
606 and linker_def on __ehdr_start if it is referenced and not
608 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
609 and return TRUE when building executable, if a symbol has
610 non-GOT/non-PLT relocations in text section or there is no
612 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
614 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
616 * elfxx-x86.h: Update comments.
618 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
620 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
621 elf_x86_plt_layout_table with elf_x86_init_table.
622 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
624 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
626 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
627 (elf_x86_init_table): This.
628 (_bfd_x86_elf_link_setup_gnu_properties): Replace
629 elf_x86_plt_layout_table with elf_x86_init_table.
631 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
633 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
634 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
635 * configure: Regenerated.
636 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
637 and r_sym fields of plt_layout.
638 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
640 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
641 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
642 r_info nor r_sym fields.
643 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
645 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
647 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
649 * (_bfd_riscv_relax_align): Call bfd_set_error and
650 print an error message when unable to relax a .align directive.
652 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
654 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
655 (riscv_record_pcrel_hi_reloc): Add absolute argument.
656 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
657 R_RISCV_PCREL_HI20 relocs, and pass the result to
658 riscv_record_pcrel_hi_reloc.
660 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
662 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
663 r_type_p. Remove the converted argument. Replace
664 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
665 the new relocation type via r_type_p.
666 (elf_i386_relocate_section): Likewise.
667 (elf_i386_finish_dynamic_symbol): Likewise.
668 (need_convert_load): Removed.
669 (check_relocs_failed): Updated.
670 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
671 instead of setting need_convert_load.
672 (_bfd_i386_elf_convert_load): Removed.
673 * elf64-x86-64.c (need_convert_load): Removed.
674 (check_relocs_failed): Updated.
675 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
676 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
677 Return the new relocation type via r_type_p.
678 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
679 instead of setting need_convert_load.
680 (elf_x86_64_check_relocs): Don't check PIC if relocation has
682 (_bfd_x86_64_elf_convert_load): Removed.
683 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
684 with SYMBOL_REFERENCES_LOCAL_P.
685 (elf_x86_64_finish_dynamic_symbol): Likewise.
686 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
688 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
689 (_bfd_x86_elf_link_symbol_references_local): New function.
690 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
691 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
692 SYMBOL_REFERENCES_LOCAL_P.
693 (elf_x86_link_hash_entry): Add local_ref.
694 (elf_x86_link_hash_table): Remove convert_load.
695 (_bfd_i386_elf_convert_load): Removed.
696 (_bfd_x86_64_elf_convert_load): Likewise.
697 (_bfd_x86_elf_link_symbol_references_local): New.
699 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
701 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
702 (elf_x86_64_info_to_howto): Get the real relocation type by
703 masking out R_X86_64_converted_reloc_bit.
704 (elf_x86_64_check_tls_transition): Get the real relocation type
705 by masking out R_X86_64_converted_reloc_bit.
706 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
707 instead of setting converted_reloc.
708 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
709 instead of converted_reloc. Get the real relocation type by
710 masking out R_X86_64_converted_reloc_bit.
711 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
712 R_X86_64_converted_reloc_bit is valid.
713 * elfxx-x86.h (converted_reloc): Removed.
715 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
717 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
718 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
719 to get the relocation type again.
720 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
721 r_type when calling elf_x86_64_tls_transition. Don't use
722 ELF32_R_TYPE to get the relocation type again.
724 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
726 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
729 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
731 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
732 argument. Don't check relocation overflow. Avoid relocation
733 overflow if --no-relax is used. Set converted_reloc on symbol
734 if a GOTPCREL relocation is converted.
735 (elf_x86_64_relocate_section): Issue a fatal error and suggest
736 --no-relax if GOTPCREL relocation conversion leads to relocation
738 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
740 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
741 Edmar Wienskoski <edmar.wienskoski@nxp.com
743 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
744 (ppc_elf_check_relocs): Handle it.
745 (ppc_elf_vle_split20): New function.
746 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
748 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
751 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
752 for x86-64 if GOT_TLS_GDESC_P is true.
754 2017-09-03 Alan Modra <amodra@gmail.com>
757 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
759 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
761 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
762 tls_get_addr for x86-64 in one place.
764 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
766 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
767 with elfxx-x86.lo for 64-bit BFD.
768 * configure: Regenerated.
770 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
772 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
773 (_bfd_i386_elf_convert_load): This. Remove static.
774 (elf_i386_size_dynamic_sections): Removed.
775 (elf_backend_size_dynamic_sections): Likewise.
776 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
777 (_bfd_x86_64_elf_convert_load): This. Remove static.
778 (elf_x86_64_size_dynamic_sections): Removed.
779 (elf_backend_size_dynamic_sections): Likewise.
780 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
781 (elf_x86_allocate_dynrelocs): This. Make it static.
782 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
783 (elf_x86_allocate_local_dynreloc): This. Make it static.
784 (elf_i386_is_reloc_section): New function.
785 (elf_x86_64_is_reloc_section): Likewise.
786 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
787 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
788 Rearrange got_entry_size initialization.
789 (_bfd_x86_elf_size_dynamic_sections): New function.
790 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
791 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
792 (_bfd_i386_elf_convert_load): New.
793 (_bfd_x86_64_elf_convert_load): Likewise.
794 (_bfd_x86_elf_size_dynamic_sections): Likewise.
795 (elf_backend_size_dynamic_sections): Likewise.
796 (_bfd_x86_elf_allocate_dynrelocs): Removed.
797 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
799 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
801 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
804 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
806 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
807 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
809 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
811 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
812 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
813 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
814 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
815 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
816 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
818 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
820 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
821 (elf_i386_allocate_local_dynrelocs): Likewise.
822 (elf_i386_size_dynamic_sections): Replace
823 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
824 with _bfd_x86_elf_allocate_dynrelocs and
825 _bfd_x86_elf_allocate_local_dynrelocs.
826 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
827 (elf_x86_64_allocate_local_dynrelocs): Likewise.
828 (elf_x86_64_size_dynamic_sections): Replace
829 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
830 with _bfd_x86_elf_allocate_dynrelocs and
831 _bfd_x86_elf_allocate_local_dynrelocs.
832 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
833 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
834 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
835 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
837 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
839 * elf32-i386.c (is_i386_elf): Removed.
840 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
841 (elf_i386_size_dynamic_sections): Likewise.
842 (elf_i386_relocate_section): Likewise.
843 * elf64-x86-64.c (is_x86_64_elf): Removed.
844 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
846 (elf_x86_64_size_dynamic_sections): Likewise.
847 (elf_x86_64_relocate_section): Likewise.
848 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
850 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
853 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
855 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
856 (elf_i386_allocate_dynrelocs): Replace
857 elf_i386_compute_jump_table_size with
858 elf_x86_compute_jump_table_size.
859 (elf_i386_size_dynamic_sections): Likewise.
860 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
861 (elf_x86_64_allocate_dynrelocs): Replace
862 elf_x86_64_compute_jump_table_size with
863 elf_x86_compute_jump_table_size.
864 (elf_x86_64_size_dynamic_sections): Likewise.
865 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
867 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
868 (elf_x86_compute_jump_table_size): New.
870 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
872 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
874 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
875 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
877 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
879 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
880 with htab->is_vxworks.
881 (elf_i386_size_dynamic_sections): Likewise.
882 (elf_i386_relocate_section): Likewise.
883 (elf_i386_finish_dynamic_symbol): Likewise.
884 (elf_i386_finish_dynamic_sections): Likewise.
886 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
888 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
889 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
890 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
891 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
892 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
893 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
894 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
895 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
897 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
900 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
901 ELF_COMMON_DEF_P for common symbols.
903 2017-09-02 Alan Modra <amodra@gmail.com>
905 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
906 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
907 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
909 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
911 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
912 (elf_backend_gc_mark_hook): Likewise.
913 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
914 (elf_backend_gc_mark_hook): Likewise.
915 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
916 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
917 (elf_backend_gc_mark_hook): Likewise.
919 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
921 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
922 (elf_backend_adjust_dynamic_symbol): Likewise.
923 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
924 (elf_backend_adjust_dynamic_symbol): Likewise.
925 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
926 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
927 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
928 (_bfd_x86_elf_adjust_dynamic_symbol): New.
929 (elf_backend_adjust_dynamic_symbol): Likewise.
931 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
933 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
936 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
938 * elf32-i386.c (elf_i386_mkobject): Removed.
939 (bfd_elf32_mkobject): Likewise.
940 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
941 (bfd_elf64_mkobject): Likewise.
942 (bfd_elf32_mkobject): Likewise.
943 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
944 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
945 (bfd_elf64_mkobject): Likewise.
946 (bfd_elf32_mkobject): Likewise.
948 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
950 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
951 Call _bfd_x86_elf_link_setup_gnu_properties.
952 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
953 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
955 (elf_x86_64_non_lazy_plt): Likewise.
956 (elf_x86_64_lazy_bnd_plt): Likewise.
957 (elf_x86_64_non_lazy_bnd_plt): Likewise.
958 (elf_x86_64_lazy_ibt_plt): Likewise.
959 (elf_x32_lazy_ibt_plt): Likewise.
960 (elf_x86_64_non_lazy_ibt_plt): Likewise.
961 (elf_x32_non_lazy_ibt_plt): Likewise.
962 (elf_x86_64_nacl_plt): Likewise.
963 (elf_x86_64_link_setup_gnu_properties): Updated. Call
964 _bfd_x86_elf_link_setup_gnu_properties.
965 * elfxx-x86.c: Include elf-vxworks.h".
966 (_bfd_x86_elf_link_setup_gnu_properties): New function.
967 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
968 comments for pic_plt0_entry and pic_plt_entry.
969 (elf_x86_non_lazy_plt_layout): Likewise.
970 (elf_x86_plt_layout_table): New.
971 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
973 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
976 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
977 .eh_frame section for the second PLT.
978 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
979 alignment of .eh_frame section for the second PLT.
981 2017-09-01 Nick Clifton <nickc@redhat.com>
984 * dwarf2.c (decode_line_info): Fix test for an overlong line info
987 2017-09-01 Nick Clifton <nickc@redhat.com>
990 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
991 attribute buffer is NUL terminated.
993 2017-08-31 Nick Clifton <nickc@redhat.com>
996 * dwarf2.c (read_section): If necessary add a terminating NUL byte
997 to dwarf string sections.
999 2017-08-31 Alan Modra <amodra@gmail.com>
1001 * po/SRC-POTFILES.in: Regenerate.
1003 2017-08-31 Alan Modra <amodra@gmail.com>
1005 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1006 for a section containing just a terminator. Allow multiple
1007 terminators at end of section.
1008 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1009 sections when not adding alignment. Assert on terminator in
1012 2017-08-31 Alan Modra <amodra@gmail.com>
1016 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1019 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1021 * configure.ac (bfd_backends): Add elf64.lo together with
1022 elfxx-x86.lo for 64-bit BFD.
1023 * configure: Regenerated.
1025 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1027 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1030 2017-08-31 Alan Modra <amodra@gmail.com>
1033 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1034 before _close_and_cleanup. Call iovec->bclose after.
1035 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1037 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1039 * elf32-i386.c (elf_i386_plt_type): Removed.
1040 (elf_i386_plt): Likewise.
1041 (elf_i386_get_synthetic_symtab): Updated. Call
1042 _bfd_x86_elf_get_synthetic_symtab.
1043 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1044 (elf_x86_64_plt): Likewise.
1045 (elf_x86_64_get_synthetic_symtab): Updated. Call
1046 _bfd_x86_elf_get_synthetic_symtab.
1047 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1048 (elf_x86_64_get_plt_got_vma): Likewise.
1049 (elf_i386_valid_plt_reloc_p): Likewise.
1050 (elf_x86_64_valid_plt_reloc_p): Likewise.
1051 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1052 * elfxx-x86.h (elf_x86_plt_type): New.
1053 (elf_x86_plt): Likewise.
1054 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1056 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1058 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1059 target_id instead of elf_machine_code.
1061 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1063 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1064 (elf_i386_lazy_plt_layout): Likewise.
1065 (elf_i386_non_lazy_plt_layout): Likewise.
1066 (elf_i386_plt_layout): Likewise.
1067 (elf_i386_link_hash_table): Likewise.
1068 (elf_i386_next_tls_desc_index): Likewise.
1069 (elf_i386_srelplt2): Likewise.
1070 (elf_i386_plt): Likewise.
1071 (elf_i386_lazy_plt): Likewise.
1072 (elf_i386_non_lazy_plt): Likewise.
1073 (elf_i386_link_hash_table_create): Likewise.
1074 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1075 (elf_i386_lazy_plt): Updated.
1076 (elf_i386_non_lazy_plt): Likewise.
1077 (elf_i386_lazy_ibt_plt): Likewise.
1078 (elf_i386_non_lazy_ibt_plt): Likewise.
1079 (elf_i386_allocate_dynrelocs): Likewise.
1080 (elf_i386_size_dynamic_sections): Likewise.
1081 (elf_i386_relocate_section): Likewise.
1082 (elf_i386_finish_dynamic_symbol): Likewise.
1083 (elf_i386_finish_dynamic_sections): Likewise.
1084 (elf_i386_get_synthetic_symtab): Likewise.
1085 (elf_i386_link_setup_gnu_properties): Likewise.
1086 (elf_i386_nacl_plt): Likewise.
1087 * elf64-x86-64.c (ABI_64_P): Removed.
1088 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1089 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1090 (elf_x86_64_lazy_plt_layout): Likewise.
1091 (elf_x86_64_non_lazy_plt_layout): Likewise.
1092 (elf_x86_64_plt_layout): Likewise.
1093 (elf_x86_64_link_hash_table): Likewise.
1094 (elf_x86_64_plt): Likewise.
1095 (elf_x86_64_lazy_plt): Likewise.
1096 (elf_x86_64_non_lazy_plt): Likewise.
1097 (elf_x86_64_link_hash_table_create): Likewise.
1098 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1099 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1100 (elf_x86_64_lazy_plt): Updated.
1101 (elf_x86_64_non_lazy_plt): Likewise.
1102 (elf_x86_64_lazy_bnd_plt): Likewise.
1103 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1104 (elf_x86_64_lazy_ibt_plt): Likewise.
1105 (elf_x32_lazy_ibt_plt): Likewise.
1106 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1107 (elf_x32_non_lazy_ibt_plt): Likewise.
1108 (elf_x86_64_allocate_dynrelocs): Likewise.
1109 (elf_x86_64_size_dynamic_sections): Likewise.
1110 (elf_x86_64_relocate_section): Likewise.
1111 (elf_x86_64_finish_dynamic_symbol): Likewise.
1112 (elf_x86_64_finish_dynamic_sections): Likewise.
1113 (elf_x86_64_get_synthetic_symtab): Likewise.
1114 (elf_x86_64_link_setup_gnu_properties): Likewise.
1115 (elf_x86_64_nacl_plt): Likewise.
1116 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1118 (ELF32_DYNAMIC_INTERPRETER): New.
1119 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1120 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1121 (_bfd_x86_elf_link_hash_table_create): Likewise.
1122 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1123 (elf_x86_link_hash_table_free): This. Make it static.
1124 * elfxx-x86.h: Don't include "objalloc.h".
1126 (elf_x86_lazy_plt_layout): Likewise.
1127 (elf_x86_non_lazy_plt_layout): Likewise.
1128 (elf_x86_plt_layout): Likewise.
1129 (_bfd_x86_elf_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_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1133 srelplt2 and next_tls_desc_index.
1134 (_bfd_x86_elf_link_hash_table_free): Removed.
1136 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1138 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1139 branch offset interpretation.
1141 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1144 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1146 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1148 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1149 (elf_x86_64_srelplt2): Likewise.
1151 2017-08-30 Alan Modra <amodra@gmail.com>
1153 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1154 (ppc64_elf_tls_optimize): Set it.
1155 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1156 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1157 addis would add zero.
1158 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1159 (ppc_elf_tls_optimize): Set it.
1160 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1161 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1163 2017-08-30 Alan Modra <amodra@gmail.com>
1165 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1166 __tls_get_addr call sequences to LE, don't move the addi down
1167 to the nop. Replace the bl with addi and leave the nop alone.
1169 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1171 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1173 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1175 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1177 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1179 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1180 (BFD64_BACKENDS): Likewise.
1181 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1182 (BFD64_BACKENDS_CFILES): Likewise.
1183 * Makefile.in: Regenerated.
1184 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1185 elf32-i386.lo and elf64-x86-64.lo.
1186 * configure: Regenerated.
1187 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1188 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1189 "objalloc.h" and "hashtab.h".
1190 (ELIMINATE_COPY_RELOCS): Removed.
1191 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1192 (SYMBOL_NO_COPYRELOC): Likewise.
1193 (elf_i386_link_hash_entry): Likewise.
1194 (GOT_UNKNOWN): Likewise.
1195 (GOT_NORMAL): Likewise.
1196 (GOT_TLS_GD): Likewise.
1197 (elf_i386_hash_entry): Likewise.
1198 (elf_i386_obj_tdata): Likewise.
1199 (elf_i386_tdata): Likewise.
1200 (elf_i386_local_got_tls_type): Likewise.
1201 (elf_i386_local_tlsdesc_gotent): Likewise.
1202 (elf_i386_hash_table): Likewise.
1203 (elf_i386_link_hash_newfunc): Likewise.
1204 (elf_i386_local_htab_hash): Likewise.
1205 (elf_i386_local_htab_eq): Likewise.
1206 (elf_i386_get_local_sym_hash): Likewise.
1207 (elf_i386_link_hash_table_free): Likewise.
1208 (elf_i386_copy_indirect_symbol): Likewise.
1209 (elf_i386_fixup_symbol): Likewise.
1210 (elf_i386_readonly_dynrelocs): Likewise.
1211 (elf_i386_always_size_sections): Likewise.
1212 (elf_i386_set_tls_module_base): Likewise.
1213 (elf_i386_dtpoff_base): Likewise.
1214 (compare_relocs): Likewise.
1215 (elf_i386_hash_symbol): Likewise.
1216 (elf_i386_parse_gnu_properties): Likewise.
1217 (elf_i386_merge_gnu_properties): Likewise.
1218 (elf_i386_link_check_relocs): Likewise.
1219 (elf_i386_merge_symbol_attribute): Likewise.
1220 (bfd_elf32_bfd_link_check_relocs): Likewise.
1221 (elf_backend_copy_indirect_symbol): Likewise.
1222 (elf_backend_always_size_sections): Likewise.
1223 (elf_backend_omit_section_dynsym): Likewise.
1224 (elf_backend_hash_symbol): Likewise.
1225 (elf_backend_fixup_symbol): Likewise.
1226 (elf_backend_parse_gnu_properties): Likewise.
1227 (elf_backend_merge_gnu_properties): Likewise.
1228 (elf_backend_merge_symbol_attribute): Likewise.
1229 (elf_i386_mkobject): Updated.
1230 (elf_i386_link_hash_table_create): Likewise.
1231 (elf_i386_check_tls_transition): Likewise.
1232 (elf_i386_tls_transition): Likewise.
1233 (elf_i386_convert_load_reloc): Likewise.
1234 (elf_i386_check_relocs): Likewise.
1235 (elf_i386_adjust_dynamic_symbol): Likewise.
1236 (elf_i386_allocate_dynrelocs): Likewise.
1237 (elf_i386_convert_load): Likewise.
1238 (elf_i386_size_dynamic_sections): Likewise.
1239 (elf_i386_relocate_section): Likewise.
1240 (elf_i386_finish_dynamic_symbol ): Likewise.
1241 (elf_i386_finish_dynamic_sections): Likewise.
1242 (elf_i386_output_arch_local_syms): Likewise.
1243 (elf_i386_get_synthetic_symtab): Likewise.
1244 (elf_i386_link_setup_gnu_properties): Likewise.
1245 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1246 of elf_link_hash_table, as base.
1247 (elf_i386_next_tls_desc_index): New.
1248 (elf_i386_srelplt2): Likewise.
1249 (elf_i386_plt): Likewise.
1250 (elf_i386_lazy_plt): Likewise.
1251 (elf_i386_non_lazy_plt): Likewise.
1252 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1253 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1254 "objalloc.h" and "hashtab.h".
1255 (ELIMINATE_COPY_RELOCS): Removed.
1256 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1257 (SYMBOL_NO_COPYRELOC): Likewise.
1258 (elf_x86_64_link_hash_entry): Likewise.
1259 (GOT_UNKNOWN): Likewise.
1260 (GOT_NORMAL): Likewise.
1261 (GOT_TLS_GD): Likewise.
1262 (elf_x86_64_hash_entry): Likewise.
1263 (elf_x86_64_obj_tdata): Likewise.
1264 (elf_x86_64_tdata): Likewise.
1265 (elf_x86_64_local_got_tls_type): Likewise.
1266 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1267 (elf_x86_64_hash_table): Likewise.
1268 (elf_x86_64_link_hash_newfunc): Likewise.
1269 (elf_x86_64_local_htab_hash): Likewise.
1270 (elf_x86_64_local_htab_eq): Likewise.
1271 (elf_x86_64_get_local_sym_hash): Likewise.
1272 (elf_x86_64_link_hash_table_free): Likewise.
1273 (elf_x86_64_copy_indirect_symbol): Likewise.
1274 (elf_x86_64_fixup_symbol): Likewise.
1275 (elf_x86_64_readonly_dynrelocs): Likewise.
1276 (elf_x86_64_always_size_sections): Likewise.
1277 (elf_x86_64_set_tls_module_base): Likewise.
1278 (elf_x86_64_dtpoff_base): Likewise.
1279 (compare_relocs): Likewise.
1280 (elf_x86_64_merge_symbol_attribute): Likewise.
1281 (elf_x86_64_hash_symbol): Likewise.
1282 (elf_x86_64_parse_gnu_properties): Likewise.
1283 (elf_x86_64_merge_gnu_properties): Likewise.
1284 (elf_x86_64_link_check_relocs): Likewise.
1285 (elf_backend_copy_indirect_symbol): Likewise.
1286 (elf_backend_always_size_sections): Likewise.
1287 (bfd_elf64_bfd_link_check_relocs): Likewise.
1288 (elf_backend_merge_symbol_attribute): Likewise.
1289 (elf_backend_hash_symbol): Likewise.
1290 (elf_backend_omit_section_dynsym): Likewise.
1291 (elf_backend_fixup_symbol): Likewise.
1292 (elf_backend_parse_gnu_properties): Likewise.
1293 (elf_backend_merge_gnu_properties): Likewise.
1294 (bfd_elf32_bfd_link_check_relocs): Likewise.
1295 (elf_x86_64_mkobject): Updated.
1296 (elf_x86_64_link_hash_table_create): Likewise.
1297 (elf_x86_64_check_tls_transition): Likewise.
1298 (elf_x86_64_tls_transition): Likewise.
1299 (elf_x86_64_convert_load_reloc): Likewise.
1300 (elf_x86_64_check_relocs): Likewise.
1301 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1302 (elf_x86_64_allocate_dynrelocs): Likewise.
1303 (elf_x86_64_convert_load): Likewise.
1304 (elf_x86_64_size_dynamic_sections): Likewise.
1305 (elf_x86_64_relocate_section): Likewise.
1306 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1307 (elf_x86_64_finish_dynamic_sections): Likewise.
1308 (elf_x86_64_output_arch_local_syms): Likewise.
1309 (elf_x86_64_get_synthetic_symtab): Likewise.
1310 (elf_x86_64_link_setup_gnu_properties): Likewise.
1311 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1312 instead of elf_link_hash_table, as base.
1313 (elf_x86_64_next_tls_desc_index): New.
1314 (elf_x86_64_srelplt2): Likewise.
1315 (elf_x86_64_plt): Likewise.
1316 (elf_x86_64_lazy_plt): Likewise.
1317 (elf_x86_64_non_lazy_plt): Likewise.
1318 * elfxx-x86.c: New file.
1319 * elfxx-x86.h: Likewise.
1321 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1323 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1325 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1327 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1329 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1330 sections before checking dynamic relocations and free invalid
1331 PLT section contents.
1332 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1334 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1336 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1337 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1339 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1342 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1344 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1346 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1348 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1350 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1352 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1355 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1356 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1357 Add a has_no_copy_on_protected bitfield.
1358 (elf_has_no_copy_on_protected): New.
1359 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1360 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1361 (elf_merge_gnu_property_list): Likewise.
1362 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1363 to FALSE for elf_has_no_copy_on_protected.
1364 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1365 (elf_i386_link_hash_entry): Add def_protected.
1366 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1367 when checking info->nocopyreloc.
1368 (elf_i386_link_setup_gnu_properties): Don't set
1369 extern_protected_data here.
1370 (elf_i386_merge_symbol_attribute): New function.
1371 (elf_backend_merge_symbol_attribute): New.
1372 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1373 (elf_x86_64_link_hash_entry): Add def_protected.
1374 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1375 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1376 when checking info->nocopyreloc.
1377 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1378 relocation run-time overflow and unresolvable R_X86_64_32S
1379 relocation against protected data symbol defined in shared object
1380 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1381 (elf_x86_64_link_setup_gnu_properties): Don't set
1382 extern_protected_data here.
1383 (elf_x86_64_merge_symbol_attribute): New function.
1384 (elf_backend_merge_symbol_attribute): New.
1386 2017-08-26 Alan Modra <amodra@gmail.com>
1388 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1389 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1390 (ppc_elf_relocate_section): Comment fix.
1391 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1392 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1393 Support dynamic relocs for TPREL16 when non-pic too.
1394 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1395 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1398 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1400 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1401 "symbol" in comments.
1402 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1404 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1407 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1408 R_X86_64_PC32 relocation run-time overflow and unresolvable
1409 R_X86_64_32S relocation with -z nocopyreloc.
1411 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1413 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1414 Undefined symbols may not have a type.
1415 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1417 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1419 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1420 bfd_link_info. Report shared, PIE or PDE object based on
1422 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1423 (elf_x86_64_relocate_section): Likewise.
1425 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1427 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1428 for function symbols.
1429 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1431 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1433 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1434 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1435 is set on any input relocatable file.
1436 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1438 2017-08-23 Alan Modra <amodra@gmail.com>
1441 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1442 ensure_undefweak_dynamic. Handle undefined too.
1443 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1444 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1445 (allocate_dynrelocs): Discard undefined non-default visibility
1446 relocs first. Make undefined syms dynamic. Tidy goto.
1448 2017-08-21 Alan Modra <amodra@gmail.com>
1449 H.J. Lu <hongjiu.lu@intel.com>
1452 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1453 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1455 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1458 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1459 undefined weak symbols.
1461 2017-08-18 Nick Clifton <nickc@redhat.com>
1464 * tekhex.c (getsym): Fix check for source pointer walking off the
1465 end of the input buffer.
1467 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1470 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1471 relocations in debug sections, change abort to _bfd_error_handler.
1473 2017-08-14 Nick Clifton <nickc@redhat.com>
1476 * elf.c (setup_group): Check for an empty or very small group
1478 * po/bfd.pot: Regenerate.
1480 2017-08-14 Alan Modra <amodra@gmail.com>
1483 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1484 alignment padding here.
1485 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1486 in a reverse pass over sections.
1488 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1491 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1492 for @plt suffixes first.
1493 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1495 2017-08-08 Nick Clifton <nickc@redhat.com>
1498 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1499 small section lengths.
1500 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1502 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1503 there is enough data present in the note.
1505 2017-08-08 Alan Modra <amodra@gmail.com>
1508 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1509 got.refcount for GOTOFF relocs, just create .got section.
1511 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1513 * elflink.c (elf_link_add_object_symbols): Move common symbol
1514 check after bed->common_definition.
1516 2017-08-07 Alan Modra <amodra@gmail.com>
1519 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1520 needed to define various dynamic tags have been discarded.
1522 2017-08-07 Nick Clifton <nickc@redhat.com>
1525 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1526 has not been set then use the bfd returned by
1527 _bfd_elf_link_setup_gnu_properties. If that is null then search
1528 through all the input bfds selecting the first normal, ELF format
1530 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1532 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1534 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1536 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1537 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1538 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1539 (elf_i386_link_check_relocs): New function.
1540 (bfd_elf32_bfd_link_check_relocs): New.
1541 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1543 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1544 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1545 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1546 (elf_x86_64_link_check_relocs): New function.
1547 (bfd_elf64_bfd_link_check_relocs): New.
1548 (bfd_elf32_bfd_link_check_relocs): Likewise.
1550 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1553 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1554 as undefined for --no-define-common.
1556 2017-08-05 Alan Modra <amodra@gmail.com>
1558 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1559 hppa_link_hash_table.
1561 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1563 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1564 entries for sysregs with negative indices.
1566 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1568 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1569 isn't the S/390 specific elf data.
1570 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1572 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1574 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1575 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1576 [R_RISCV_ADD16]: Likewise.
1577 [R_RISCV_ADD32]: Likewise.
1578 [R_RISCV_ADD64]: Likewise.
1579 [R_RISCV_SUB6]: Likewise.
1580 [R_RISCV_SUB8]: Likewise.
1581 [R_RISCV_SUB16]: Likewise.
1582 [R_RISCV_SUB32]: Likewise.
1583 [R_RISCV_SUB64]: Likewise.
1585 2017-07-31 Alan Modra <amodra@gmail.com>
1587 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1588 without ld.so checks.
1590 2017-07-29 Alan Modra <amodra@gmail.com>
1593 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1594 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1595 (is_elfv2_localentry0): Test non_zero_localentry.
1596 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1598 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1600 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1601 pointer check for htab->elf.irelplt.
1602 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1604 2017-07-27 Nick Clifton <nickc@redhat.com>
1607 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1609 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1611 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1613 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1615 (evax_bfd_print_emh): Check for invalid string lengths.
1617 2017-07-25 Nick Clifton <nickc@redhat.com>
1619 * po/fr.po: Updated French translation.
1621 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1624 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1625 16-bit absolute branches into 10-bit pc-relative branches on the
1626 MSP430 as well as the MSP430X.
1628 2017-07-25 Alan Modra <amodra@gmail.com>
1630 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1631 (stub_eh_frame_size): New function.
1632 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1633 (group_sections): Init group tls_get_addr_opt_bctrl.
1634 (ppc64_elf_size_stubs): Update sizing and initialization of
1635 .eh_frame. Iteration over stubs via group list.
1636 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1637 (ppc64_elf_finish_dynamic_sections): Update finalization of
1640 2017-07-24 Nick Clifton <nickc@redhat.com>
1643 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1644 of the relocs to the canonicalize_one_reloc routine.
1645 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1646 for the _bfd_mach_o_canonicalize_one_reloc field.
1647 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1648 res_base parameter. Use to check for corrupt pair relocs.
1649 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1651 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1653 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1656 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1657 enough data in the record before attempting to parse it.
1658 (_bfd_vms_slurp_eeom): Likewise.
1660 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1661 (image_set_ptr): Likewise.
1662 (alpha_vms_slurp_relocs): Likewise.
1664 (alpha_vms_object_p): Check for a truncated record.
1666 2017-07-24 Nick Clifton <nickc@redhat.com>
1669 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1670 an unrecognized reloc and sets the bfd_error value.
1671 * libbfd.h: Regenerate.
1672 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1674 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1675 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1676 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1677 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1678 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1680 2017-07-23 Alan Modra <amodra@gmail.com>
1682 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1685 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1688 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1689 reloc_class_ifunc for ifunc symbols.
1691 2017-07-19 Nick Clifton <nickc@redhat.com>
1694 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1695 correct magic bytes at the start, set the error to wrong format
1696 and clear the format selector before returning NULL.
1698 2017-07-19 Nick Clifton <nickc@redhat.com>
1701 * coff-rs6000.c (_bfd_strntol): New function.
1702 (_bfd_strntoll): New function.
1703 (GET_VALUE_IN_FIELD): New macro.
1704 (EQ_VALUE_IN_FIELD): new macro.
1705 (_bfd_xcoff_slurp_armap): Use new macros.
1706 (_bfd_xcoff_archive_p): Likewise.
1707 (_bfd_xcoff_read_ar_hdr): Likewise.
1708 (_bfd_xcoff_openr_next_archived_file): Likewise.
1709 (_bfd_xcoff_stat_arch_elt): Likewise.
1710 * coff64-rs6000.c (_bfd_strntol): New function.
1711 (_bfd_strntoll): New function.
1712 (GET_VALUE_IN_FIELD): New macro.
1713 (xcoff64_slurp_armap): Use new macros.
1715 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1716 John Eric Martin <John.Martin@emmicro-us.com>
1718 * bfd-in2.h: Regenerate.
1719 * libbfd.h: Regenerate.
1720 * elf32-arc.c (JLI): Define.
1721 * reloc.c: Add JLI relocations.
1723 2017-07-18 Nick Clifton <nickc@redhat.com>
1726 * coff-sh.c: Fix spelling typos.
1727 * compress.c: Likewise.
1728 * cpu-pdp11.c: Likewise.
1729 * ecofflink.c: Likewise.
1730 * elf-m10300.c: Likewise.
1732 * elf32-arm.c: Likewise.
1733 * elf32-m68k.c: Likewise.
1734 * elf32-nds32.c: Likewise.
1735 * elf32-ppc.c: Likewise.
1736 * elf32-sh.c: Likewise.
1737 * elf32-v850.c: Likewise.
1738 * elf64-ppc.c: Likewise.
1739 * elf64-x86-64.c: Likewise.
1740 * elflink.c: Likewise.
1741 * elfnn-aarch64.c: Likewise.
1742 * elfxx-mips.c: Likewise.
1744 * sunos.c: Likewise.
1745 * vms-alpha.c: Likewise.
1746 * xcofflink.c: Likewise.
1748 2017-07-18 Nick Clifton <nickc@redhat.com>
1751 * coffcode.h (handle_COMDAT): Replace abort with an error message
1754 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1757 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1760 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1762 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1764 2017-07-16 Alan Modra <amodra@gmail.com>
1766 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1767 __tls_index GOT entries when using __tls_get_addr_opt stub.
1768 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1770 2017-07-12 Alan Modra <amodra@gmail.com>
1772 * po/es.po: Update from translationproject.org/latest/bfd/.
1773 * po/fi.po: Likewise.
1774 * po/fr.po: Likewise.
1775 * po/id.po: Likewise.
1776 * po/ja.po: Likewise.
1777 * po/ro.po: Likewise.
1778 * po/ru.po: Likewise.
1779 * po/sr.po: Likewise.
1780 * po/sv.po: Likewise.
1781 * po/tr.po: Likewise.
1782 * po/uk.po: Likewise.
1783 * po/vi.po: Likewise.
1784 * po/zh_CN.po: Likewise.
1785 * po/hr.po: New file from translationproject.org.
1786 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1787 * configure: Regenerate.
1789 2017-07-12 Nick Clifton <nickc@redhat.com>
1791 Fix compile time warnings using gcc 7.1.1.
1792 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1794 (elf_xtensa_get_gotplt_section): Increase length of got_name
1796 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1797 default return of FALSE.
1798 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1799 default return of FALSE.
1801 2017-07-12 Alan Modra <amodra@gmail.com>
1803 * binary.c (binary_set_section_contents): Don't print filepos in
1805 (coff_write_object_contents): Cast size_t for error message.
1806 (coff_slurp_line_table): Don't use bfd_vma symndx.
1807 (coff_slurp_reloc_table): Remove unneeded cast.
1808 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1810 (find_abstract_instance_name): Likewise.
1811 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1812 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1813 (elf32_arm_check_relocs): Make r_symndx an int.
1814 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1816 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1818 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1820 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1821 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1822 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1823 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1824 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1825 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1826 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1827 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1828 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1829 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1830 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1831 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1832 and use %lu for error message.
1833 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1834 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1837 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1839 (elf32_arm_final_link_relocate): Likewise.
1840 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1841 * coffcode.h (styp_to_sec_flags): Likewise.
1842 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1843 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1844 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1845 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1846 (elf32_bfin_merge_private_bfd_data): Likewise.
1847 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1848 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1849 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1850 (i370_elf_relocate_section): Likewise.
1851 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1852 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1853 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1854 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1855 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1856 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1857 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1858 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1859 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1860 * ieee.c (ieee_write_id, read_id): Likewise.
1861 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1862 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1863 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1864 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1865 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1866 * stabs.c (_bfd_link_section_stabs): Likewise.
1868 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1870 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1871 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1872 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1873 * coff-sh.c (sh_relax_section): Likewise.
1874 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1875 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1876 * coffcode.h (coff_slurp_reloc_table): Likewise.
1877 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1878 (_bfd_coff_read_string_table): Likewise.
1879 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1880 * compress.c (bfd_get_full_section_contents): Likewise.
1881 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1882 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1883 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1884 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1885 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1886 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1887 (elf32_arm_write_section): Likewise.
1888 * elf32-bfin.c (bfin_relocate_section): Likewise.
1889 (bfinfdpic_relocate_section): Likewise.
1890 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1891 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1892 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1893 (elf_i386_relocate_section): Likewise.
1894 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1895 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1896 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1897 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1898 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1899 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1900 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1901 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1902 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1903 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1904 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1905 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1906 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1907 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1908 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1909 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1910 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1911 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1912 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1913 * elf32-sh.c (sh_elf_relax_section): Likewise.
1914 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1915 (sh_elf_relocate_section): Likewise.
1916 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1917 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1918 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1919 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1920 * elf32-v850.c (v850_elf_relax_section): Likewise.
1921 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1922 (elf_vax_relocate_section): Likewise.
1923 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1924 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1925 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1926 (do_fix_for_relocatable_link): Likewise.
1927 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1928 (elf64_alpha_relax_with_lituse): Likewise.
1929 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1930 (elf_hppa_final_link_relocate): Likewise.
1931 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1932 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1933 (elf64_vms_link_add_object_symbols): Likewise.
1934 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1935 (mmix_final_link_relocate): Likewise.
1936 * elf64-s390.c (invalid_tls_insn): Likewise.
1937 (elf_s390_relocate_section): Likewise.
1938 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1939 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1940 (elf_x86_64_relocate_section): Likewise.
1941 * elfcode.h (elf_slurp_symbol_table): Likewise.
1942 * elfcore.h (elf_core_file_p): Likewise.
1943 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1944 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1945 (elfNN_aarch64_relocate_section): Likewise.
1946 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1947 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1948 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1949 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1950 (_bfd_mips_elf_relocate_section): Likewise.
1951 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1952 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1953 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1954 * ieee.c (ieee_slurp_external_symbols): Likewise.
1955 * ihex.c (ihex_write_object_content): Likewise.
1956 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1957 * merge.c (_bfd_merged_section_offset): Likewise.
1958 * mmo.c (mmo_write_loc_chunk): Likewise.
1959 (mmo_write_object_contents): Likewise.
1960 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1961 * stabs.c (_bfd_link_section_stabs): Likewise.
1962 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1964 2017-07-11 Alan Modra <amodra@gmail.com>
1966 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1968 2017-07-11 Alan Modra <amodra@gmail.com>
1970 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1971 instruction" error using _bfd_error_handler, not einfo.
1973 2017-07-10 Nick Clifton <nickc@redhat.com>
1975 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1976 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1978 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1980 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1982 2017-07-07 Alan Modra <amodra@gmail.com>
1984 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1986 2017-07-07 Alan Modra <amodra@gmail.com>
1988 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1989 as long long. Move code replacing "ll" with "I64", and simplify.
1991 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1993 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1996 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1998 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2000 (line_info_add_file_name): Likewise.
2001 (decode_line_info): Likewise.
2003 2017-07-04 Tristan Gingold <gingold@adacore.com>
2005 * version.m4: Bump version to 2.29.51
2006 * configure: Regenerate.
2008 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2010 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2011 sanity check at the head of this function.
2013 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2015 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2016 dwarf_line_str_size.
2017 (struct attr_abbrev): Add field implicit_const.
2018 (dwarf_debug_sections): Add .debug_line_str.
2019 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2020 (dwarf_debug_section_assert): Add static assertion.
2021 (read_indirect_line_string): New.
2022 (read_abbrevs): Support DW_FORM_implicit_const.
2023 (is_str_attr): Support DW_FORM_line_strp.
2024 (read_attribute_value): Support DW_FORM_line_strp and
2025 DW_FORM_implicit_const.
2026 (read_attribute): Support DW_FORM_implicit_const.
2027 (line_info_add_include_dir, line_info_add_include_dir_stub):
2028 (line_info_add_file_name, read_formatted_entries): New.
2029 (decode_line_info, parse_comp_unit): Support DWARF 5.
2030 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2032 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2034 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2035 abort statement that was put for symbols that are not dynamic.
2037 2017-07-03 Tristan Gingold <gingold@adacore.com>
2039 * po/bfd.pot: Regenerate
2041 2017-07-03 Alan Modra <amodra@gmail.com>
2043 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2044 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2045 * elf.c (setup_group): Use "Lx" to print sh_size.
2046 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2047 unknown section type in hex.
2048 (copy_special_section_fields): Style fix.
2049 (bfd_section_from_shdr): Correct format for sh_link. Use a
2050 common error message for all the variants of unrecognized
2052 (assign_file_positions_for_load_sections): Use "Lx" for lma
2053 adjust error message.
2054 (assign_file_positions_for_non_load_sections): Formatting.
2055 (rewrite_elf_program_header): Formatting. Use "Lx" for
2056 bfd_vma values in error messages.
2057 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2058 ELF_R_SYM value to type expected by format.
2059 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2061 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2062 (elf_link_input_bfd): Use "Lx" for r_info.
2063 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2065 2017-07-03 Alan Modra <amodra@gmail.com>
2067 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2068 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2069 Microsoft C library variant of long long format specifier.
2070 (PRINT20): Cast value to bfd_uint64_t not long long.
2071 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2072 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2073 long long. Don't cast to bfd_vma.
2074 * elf32-score.c (score3_bfd_getl48): Likewise.
2075 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2077 2017-07-03 Alan Modra <amodra@gmail.com>
2079 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2081 (bfd_elf_print_symbol): Don't cast symbol->flags.
2082 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2083 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2084 _bfd_error_handler argument order.
2085 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2087 2017-07-03 Alan Modra <amodra@gmail.com>
2089 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2090 AC_TYPE_LONG_DOUBLE.
2091 * configure: Regenerate.
2092 * config.in: Regenerate.
2094 2017-06-29 Andrew Waterman <andrew@sifive.com>
2096 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2099 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2101 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2102 unless it is undefined weak.
2103 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2104 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2106 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2107 is not dynamic in PIC, abort.
2109 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2112 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2113 undefined weak symbols into dynamic.
2114 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2115 relocation for non-dynamic symbols.
2116 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2118 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2120 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2121 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2122 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2123 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2124 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2127 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2129 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2130 (elfcore_write_s390_gs_bc): Likewise.
2131 * elf.c (elfcore_grok_s390_gs_cb): New function.
2132 (elfcore_grok_s390_gs_bc): New function.
2133 (elfcore_grok_note): Call them.
2134 (elfcore_write_s390_gs_cb): New function.
2135 (elfcore_write_s390_gs_bc): New function.
2136 (elfcore_write_register_note): Call them.
2138 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2140 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2141 bfd_get_file_size. Check archive element size.
2142 (_bfd_generic_get_section_contents_in_window): Likewise.
2144 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2146 * bfd-in2.h: Regenerated.
2147 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2148 (bfd_get_file_size): Likewise.
2150 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2151 Matthew Fortune <matthew.fortune@imgtec.com>
2153 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2154 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2155 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2156 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2158 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2159 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2160 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2161 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2162 `bfd_mach_mips_interaptiv_mr2' entries.
2163 * bfd-in2.h: Regenerate.
2165 2017-06-27 Nick Clifton <nickc@redhat.com>
2167 * tekhex.c (pass_over): Revert accidental conversion of a local
2168 array to a static array.
2170 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2173 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2174 reloc addend if necessary. Adjust diff only if
2175 shrinked_insn_address < end_address.
2177 2017-06-27 Alan Modra <amodra@gmail.com>
2180 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2181 (_bfd_generic_get_section_contents_in_window): Likewise.
2183 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2185 * elfnn-riscv.c (perform_relocation): Support the new
2186 R_RISCV_32_PCREL relocation.
2187 (riscv_elf_relocate_section): Likewise.
2188 * elfxx-riscv.c (howto_table): Likewise.
2189 (riscv_reloc_map): Likewise.
2190 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2191 * libbfd.h: Regenerate.
2193 2017-06-27 Alan Modra <amodra@gmail.com>
2196 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2197 Use unsigned file pointer type, and remove cast.
2198 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2199 Add "count", not "sz".
2201 2017-06-26 Pedro Alves <palves@redhat.com>
2204 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2207 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2210 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2213 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2215 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2216 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2217 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2218 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2219 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2221 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2224 * compress.c (bfd_get_full_section_contents): Don't check the
2226 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2227 reject a section whose size + offset is greater than the size
2229 (_bfd_generic_get_section_contents_in_window): Likewise.
2231 2017-06-26 Nick Clifton <nickc@redhat.com>
2234 * tekhex.c (getvalue): Check for the source pointer exceeding the
2235 end pointer before the first byte is read.
2237 2017-06-26 Nick Clifton <nickc@redhat.com>
2240 * opncls.c (get_build_id): Check that the section is big enough
2241 to contain the whole note.
2242 * compress.c (bfd_get_full_section_contents): Check for and reject
2243 a section whose size is greater than the size of the entire file.
2244 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2245 contain a notes section.
2247 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2249 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2251 (elf_s390_modify_segment_map): Likewise.
2252 (bfd_elf_s390_set_options): Lisewise.
2254 2017-06-26 Alan Modra <amodra@gmail.com>
2256 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2258 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2259 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2260 .preinit_array on --just-syms bfds.
2261 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2262 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2263 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2265 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2267 * elf.c (find_link): Bounds check "hint".
2269 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2271 * elf32-arm.c (using_thumb_only): Update list of architectures in
2272 BFD_ASSERT for which the logic is valid.
2273 (using_thumb2_bl): Likewise.
2274 (using_thumb2): Likewise and return true for ARMv8-R.
2275 (arch_has_arm_nop): Likewise.
2276 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2277 merging logic. Update commentis for value 15 of v8m_baseline,
2278 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2279 merging of value 15 of Tag_CPU_arch.
2281 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2283 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2284 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2285 * bfd-in2.h: Regenerate.
2287 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2289 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2290 the error_alignment label forward. Properly align program
2291 property note section.
2293 2017-06-22 Eric Christopher <echristo@gmail.com>
2295 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2296 abs to fix a truncation warning.
2298 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2300 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2301 local undefined weak symbol to 0.
2302 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2304 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2306 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2307 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2308 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2309 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2310 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2311 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2312 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2313 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2315 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2317 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2318 (elf_i386_lazy_ibt_plt_entry): Likewise.
2319 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2320 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2321 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2322 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2323 (elf_i386_lazy_plt_layout): Likewise.
2324 (elf_i386_non_lazy_plt_layout): Likewise.
2325 (elf_i386_link_hash_entry): Add plt_second.
2326 (elf_i386_link_hash_table): Add plt_second and
2327 plt_second_eh_frame.
2328 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2329 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2330 the second PLT. Check the second PLT.
2331 (elf_i386_relocate_section): Use the second PLT to resolve
2332 PLT reference if needed.
2333 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2335 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2336 second PLT. Generate unwind info for the second PLT.
2337 (elf_i386_plt_type): Add plt_second.
2338 (elf_i386_get_synthetic_symtab): Support the second PLT.
2339 (elf_i386_parse_gnu_properties): Support
2340 GNU_PROPERTY_X86_FEATURE_1_AND.
2341 (elf_i386_merge_gnu_properties): Support
2342 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2343 on GNU_PROPERTY_X86_FEATURE_1_IBT
2344 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2345 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2346 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2347 is set on all relocatable inputs.
2348 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2349 (elf_x32_lazy_ibt_plt_entry): Likewise.
2350 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2351 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2352 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2353 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2354 (elf_x86_64_lazy_ibt_plt): Likewise.
2355 (elf_x32_lazy_ibt_plt): Likewise.
2356 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2357 (elf_x32_non_lazy_ibt_plt): Likewise.
2358 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2359 (elf_x86_64_parse_gnu_properties): Support
2360 GNU_PROPERTY_X86_FEATURE_1_AND.
2361 (elf_x86_64_merge_gnu_properties): Support
2362 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2363 on GNU_PROPERTY_X86_FEATURE_1_IBT
2364 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2365 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2366 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2367 is set on all relocatable inputs.
2369 2017-06-22 Nick Clifton <nickc@redhat.com>
2372 * som.c (setup_sections): NUL terminate the space_strings buffer.
2373 Check that the space.name field does not index beyond the end of
2374 the space_strings buffer.
2376 2017-06-21 Nick Clifton <nickc@redhat.com>
2379 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2381 2017-06-21 Nick Clifton <nickc@redhat.com>
2384 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2385 type of the size parameter.
2386 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2387 length of the counted string.
2388 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2389 (_bfd_vms_save_counted_string): Likewise.
2390 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2391 _bfd_vms_save_counted_string.
2392 (_bfd_vms_slurp_ehdr): Likewise.
2393 (_bfd_vms_slurp_egsd): Likewise.
2394 (Parse_module): Likewise.
2396 2017-06-21 Alan Modra <amodra@gmail.com>
2398 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2399 calls before tocsave calls.
2400 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2403 2017-06-21 Nick Clifton <nickc@redhat.com>
2406 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2407 bfd_get_full_section_contents returns no contents.
2409 2017-06-21 Nick Clifton <nickc@redhat.com>
2412 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2415 2017-06-21 Nick Clifton <nickc@redhat.com>
2418 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2420 (image_set_ptr): Likewise.
2421 (alpha_vms_fix_sec_rel): Likewise.
2422 (alpha_vms_slurp_relocs): Likewise.
2424 2017-06-21 Nick Clifton <nickc@redhat.com>
2427 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2429 (ieee_archive_p): Likewise.
2430 (ieee_object_p): Likewise.
2432 2017-06-21 Nick Clifton <nickc@redhat.com>
2435 * elf.c (setup_group): Zero the group section pointer list after
2436 allocation so that loops can be caught. Check for NULL pointers
2437 when processing a group list.
2439 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2441 * elf-s390.h: New file.
2442 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2444 (elf_s390_additional_program_headers): New function.
2445 (elf_s390_modify_segment_map): New function.
2446 (bfd_elf_s390_set_options): New function.
2447 (elf_backend_additional_program_headers)
2448 (elf_backend_modify_segment_map): Add macro definitions.
2450 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2453 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2454 the DYNAMIC bit instead of bfd_count_sections.
2456 2017-06-19 Nick Clifton <nickc@redhat.com>
2459 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2461 (evax_bfd_print_eeom): Likewise.
2462 (evax_bfd_print_egsd): Check for an overlarge record length.
2463 (evax_bfd_print_etir): Likewise.
2465 2017-06-19 Nick Clifton <nickc@redhat.com>
2468 * libieee.h (struct common_header_type): Add end_p field.
2469 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2471 (read_id): Check for a length that exceeds the remaining bytes in
2473 (ieee_seek): Initialise end_p.
2474 (ieee_archive_p): Likewise.
2475 (ieee_object_p): Likewise.
2477 2017-06-19 Nick Clifton <nickc@redhat.com>
2480 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2481 before reading the EIHS structure entries.
2483 2017-06-19 Nick Clifton <nickc@redhat.com>
2486 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2487 gsd_size. Check that there are enough bytes remaining to read the
2488 type and size of the next egsd. Check that the size of the egsd
2489 does not exceed the size of the record.
2491 2017-06-19 Alan Modra <amodra@gmail.com>
2493 * config.bfd: Correct targ_underscore for cris.
2495 2017-06-18 Alan Modra <amodra@gmail.com>
2497 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2498 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2500 2017-06-16 Nick Clifton <nickc@redhat.com>
2502 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2503 bucketlist is empty because there are no symbols to add to the
2506 2017-06-16 Alan Modra <amodra@gmail.com>
2512 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2513 (BFD_JUMP_TABLE_LINK): Likewise.
2514 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2515 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2516 (bfd_elf_define_start_stop): New function.
2517 * linker.c (bfd_generic_define_start_stop): New function.
2518 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2520 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2521 * aout-target.h (MY_bfd_define_start_stop): Define.
2522 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2523 * binary.c (binary_bfd_define_start_stop): Define.
2524 * bout.c (b_out_bfd_define_start_stop): Define.
2525 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2526 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2527 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2528 * coffcode.h (coff_bfd_define_start_stop): Define.
2529 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2530 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2531 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2532 * ieee.c (ieee_bfd_define_start_stop): Define.
2533 * ihex.c (ihex_bfd_define_start_stop): Define.
2534 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2535 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2536 * mmo.c (mmo_bfd_define_start_stop): Define.
2537 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2538 * oasys.c (oasys_bfd_define_start_stop): Define.
2539 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2540 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2541 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2542 * som.c (som_bfd_define_start_stop): Define.
2543 * srec.c (srec_bfd_define_start_stop): Define.
2544 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2545 * versados.c (versados_bfd_define_start_stop): Define.
2546 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2547 (alpha_vms_bfd_define_start_stop): Define.
2548 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2549 * bfd-in2.h: Regenerate.
2550 * libbfd.h: Regenerate.
2552 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2554 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2555 SYMBOL_REFERENCES_LOCAL.
2557 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2560 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2561 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2562 runtime for if there needs copy relocation elimination.
2563 (need_copy_relocation_p): New function. Return true for symbol with
2564 pc-relative references and if it's against read-only sections.
2565 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2566 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2567 that are related with accessing external objects.
2568 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2569 in elfNN_aarch64_check_relocs.
2571 2017-06-15 Nick Clifton <nickc@redhat.com>
2574 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2577 (ieee_archive_p): Likewise.
2579 2017-06-15 Nick Clifton <nickc@redhat.com>
2582 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2584 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2586 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2587 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2588 keep both windowed and call0 ABI PLT definitions.
2589 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2590 elf_xtensa_*_plt_entry endex.
2591 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2593 2017-06-14 Nick Clifton <nickc@redhat.com>
2596 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2599 2017-06-14 Nick Clifton <nickc@redhat.com>
2602 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2603 maximum value for the ascic pointer. Check that name processing
2604 does not read beyond this value.
2605 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2608 2017-06-14 Nick Clifton <nickc@redhat.com>
2611 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2612 (process_otr): Check for an invalid offset in the otr structure.
2614 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2616 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2618 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2624 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2625 vtable field to a union.
2626 (_bfd_elf_is_start_stop): Removed.
2627 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2628 __start_SECNAME and __stop_SECNAME symbols.
2629 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2630 * elflink.c (_bfd_elf_is_start_stop): Removed.
2631 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2632 _bfd_elf_is_start_stop.
2633 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2634 __stop_SECNAME symbols. Updated.
2635 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2636 (bfd_elf_gc_record_vtinherit): Likewise.
2637 (bfd_elf_gc_record_vtentry): Likewise.
2639 2017-06-13 Nick Clifton <nickc@redhat.com>
2642 * elflink.c (elf_link_adjust_relocs): Generate an error when
2643 encountering a reloc against a symbol removed by garbage
2646 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2648 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2649 to merge_gnu_properties.
2650 * elf-properties.c (elf_merge_gnu_properties): Add struct
2651 bfd_link_info * and pass it to merge_gnu_properties.
2652 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2653 and pass it to elf_merge_gnu_properties.
2654 (_bfd_elf_link_setup_gnu_properties): Pass info to
2655 elf_merge_gnu_property_list.
2656 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2658 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2660 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2663 * binary.c (binary_set_section_contents): Scale lma by octets
2664 per byte to set filepos.
2666 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2668 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2671 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2673 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2676 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2678 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2679 patched section contents for TLS IE reloc.
2680 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2682 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2684 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2685 RELOC_FOR_GLOBAL_SYMBOL macro.
2687 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2689 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2692 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2694 * config/tc-arc.c (md_undefined_symbol): Changed.
2695 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2697 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2699 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2702 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2704 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2705 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2707 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2709 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2712 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2714 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2715 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2716 is non-zero. Add clarifying comments.
2718 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2720 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2721 name. Use local IFUNC symbol name string to report unsupported
2722 non-PIC call to IFUNC function.
2723 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2724 when generating R_386_IRELATIVE relocation.
2725 (elf_i386_finish_dynamic_symbol): Likewise.
2726 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2728 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2729 when generating R_X86_64_IRELATIVE relocation.
2730 (elf_x86_64_finish_dynamic_symbol): Likewise.
2732 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2734 * elf.c (setup_group): Make sure BFD sections are created for all
2735 group sections in the input file when processing SHF_GROUP
2737 (bfd_section_from_shdr): Avoid duplicating logic already
2738 implemented in `setup_group'.
2740 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2743 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2744 if the hint address is zero.
2746 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2749 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2750 ELF_COMMON_DEF_P for common symbols.
2752 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2754 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2755 SEC_GROUP sections as SEC_EXCLUDE.
2756 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2757 (assign_section_numbers): Use resolve_section_groups flag instead
2758 of relocatable link type.
2759 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2760 flag instead of checking the final_link flag for part of the
2761 checks in here. Fix white space as a result.
2762 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2763 instead of relocatable link type.
2764 (bfd_elf_final_link): Likewise.
2766 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2768 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2770 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2771 (s3_bfd_score_elf_check_relocs): Likewise.
2772 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2773 (score_elf_final_link_relocate): Likewise.
2774 (s7_bfd_score_elf_check_relocs): Likewise.
2776 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2778 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2781 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2783 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2784 from `reloc_count' rather than decrementing it.
2785 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2786 `reloc_count' by `int_rels_per_ext_rel'.
2787 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2788 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2789 entry determination.
2790 (s3_bfd_score_elf_check_relocs): Likewise.
2791 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2792 (s7_bfd_score_elf_relocate_section): Likewise.
2793 (s7_bfd_score_elf_check_relocs): Likewise.
2794 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2795 prototype and function.
2796 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2797 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2798 triple rather than once the sum of REL and RELA relocation entry
2800 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2801 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2802 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2803 storage allocation size determination.
2804 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2805 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2806 by `int_rels_per_ext_rel' for last relocation entry
2808 (bfd_elf_final_link): Do not multiply `reloc_count' by
2809 `int_rels_per_ext_rel' for internal relocation storage
2810 allocation size determination.
2811 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2812 `int_rels_per_ext_rel' for last relocation entry determination.
2813 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2814 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2815 (_bfd_mips_elf_relocate_section): Likewise.
2817 2017-06-05 Alan Modra <amodra@gmail.com>
2820 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2822 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2824 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2825 determine structure sizes.
2826 (elfcore_grok_freebsd_prstatus): Likewise.
2828 2017-06-01 Alan Modra <amodra@gmail.com>
2830 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2831 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2833 (is_elfv2_localentry0): New function.
2834 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2835 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2836 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2837 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2838 optimized localentry:0 stubs.
2839 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2840 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2842 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2844 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2846 2017-05-30 Casey Smith <clegg89@gmail.com>
2849 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2850 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2852 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2854 * cpu-arc.c (arc_compatible): New function.
2856 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2858 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2860 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2863 * bfdio.c (bfd_get_file_size): New function.
2864 * bfd-in2.h: Regenerated.
2866 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2868 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2871 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2873 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2874 dynobj instead of htab->elf.dynobj.
2876 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2878 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2880 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2881 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2882 actual number of internal relocations retrieved. Adjust
2883 function description.
2884 (bfd_elf64_canonicalize_reloc): Remove macro.
2885 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2887 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2889 * archures.c (bfd_mach_sparc_v9m8): Define.
2890 (bfd_mach_sparc_v8plusm8): Likewise.
2891 (bfd_mach_sparc_v9_p): Adjust to M8.
2892 (bfd_mach_sparc_64bit_p): Likewise.
2893 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2894 bfd_mach_sparc_v8plusm8.
2895 * bfd-in2.h: Regenerated.
2896 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2898 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2899 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2900 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2902 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2903 bfd_mach_sparc_v8plusm8.
2905 2017-05-19 Alan Modra <amodra@gmail.com>
2907 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2908 debug and special sections when no non-note alloc sections in an
2911 2017-05-18 Alan Modra <amodra@gmail.com>
2913 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2914 * elf-m10300.c: Likewise.
2916 * elf32-arc.c: Likewise.
2917 * elf32-bfin.c: Likewise.
2918 * elf32-m68k.c: Likewise.
2919 * elf32-nds32.c: Likewise.
2920 * elf32-tilepro.c: Likewise.
2921 * elflink.c: Likewise.
2922 * elfnn-aarch64.c: Likewise.
2923 * elfnn-riscv.c: Likewise.
2924 * elfxx-tilegx.c: Likewise.
2925 * mach-o.c: Likewise.
2926 * peXXigen.c: Likewise.
2927 * vms-alpha.c: Likewise.
2928 * vms-lib.c: Likewise.
2930 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2933 * elflink.c (elf_gc_mark_debug_section): New function.
2934 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2935 referenced by kept debug sections.
2937 2017-05-16 Alan Modra <amodra@gmail.com>
2939 * elf-m10300.c: Rename occurrences of non_ir_ref.
2940 * elf32-arm.c: Likewise.
2941 * elf32-bfin.c: Likewise.
2942 * elf32-cr16.c: Likewise.
2943 * elf32-cris.c: Likewise.
2944 * elf32-d10v.c: Likewise.
2945 * elf32-dlx.c: Likewise.
2946 * elf32-fr30.c: Likewise.
2947 * elf32-frv.c: Likewise.
2948 * elf32-hppa.c: Likewise.
2949 * elf32-i370.c: Likewise.
2950 * elf32-i386.c: Likewise.
2951 * elf32-iq2000.c: Likewise.
2952 * elf32-lm32.c: Likewise.
2953 * elf32-m32c.c: Likewise.
2954 * elf32-m32r.c: Likewise.
2955 * elf32-m68hc1x.c: Likewise.
2956 * elf32-m68k.c: Likewise.
2957 * elf32-mcore.c: Likewise.
2958 * elf32-metag.c: Likewise.
2959 * elf32-microblaze.c: Likewise.
2960 * elf32-moxie.c: Likewise.
2961 * elf32-msp430.c: Likewise.
2962 * elf32-mt.c: Likewise.
2963 * elf32-nios2.c: Likewise.
2964 * elf32-or1k.c: Likewise.
2965 * elf32-ppc.c: Likewise.
2966 * elf32-rl78.c: Likewise.
2967 * elf32-s390.c: Likewise.
2968 * elf32-score.c: Likewise.
2969 * elf32-score7.c: Likewise.
2970 * elf32-sh.c: Likewise.
2971 * elf32-tic6x.c: Likewise.
2972 * elf32-tilepro.c: Likewise.
2973 * elf32-v850.c: Likewise.
2974 * elf32-vax.c: Likewise.
2975 * elf32-xstormy16.c: Likewise.
2976 * elf32-xtensa.c: Likewise.
2977 * elf64-alpha.c: Likewise.
2978 * elf64-hppa.c: Likewise.
2979 * elf64-ia64-vms.c: Likewise.
2980 * elf64-mmix.c: Likewise.
2981 * elf64-ppc.c: Likewise.
2982 * elf64-s390.c: Likewise.
2983 * elf64-sh64.c: Likewise.
2984 * elf64-x86-64.c: Likewise.
2985 * elflink.c: Likewise.
2986 * elfnn-aarch64.c: Likewise.
2987 * elfnn-ia64.c: Likewise.
2988 * elfnn-riscv.c: Likewise.
2989 * elfxx-mips.c: Likewise.
2990 * elfxx-sparc.c: Likewise.
2991 * elfxx-tilegx.c: Likewise.
2992 * linker.c: Likewise.
2994 2017-05-16 Alan Modra <amodra@gmail.com>
2996 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2997 * elflink.c (elf_link_add_object_symbols): Update to use
2999 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3001 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3003 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3005 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3007 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3009 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3010 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3012 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3014 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3016 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3018 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3019 to plt_second/plt_second_eh_frame.
3020 (elf_x86_64_link_hash_newfunc): Updated.
3021 (elf_x86_64_allocate_dynrelocs): Likewise.
3022 (elf_x86_64_size_dynamic_sections): Likewise.
3023 (elf_x86_64_relocate_section): Likewise.
3024 (elf_x86_64_finish_dynamic_symbol): Likewise.
3025 (elf_x86_64_finish_dynamic_sections): Likewise.
3026 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3027 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3029 (elf_backend_setup_gnu_properties): Updated. Create the
3030 .plt.sec section instead of the .plt.sec section.
3032 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3034 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3035 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3036 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3038 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3040 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3041 (bfd_elf64_set_reloc): Define.
3042 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3044 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3046 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3047 (struct bfd_target): New field _bfd_set_reloc.
3048 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3049 * reloc.c (_bfd_generic_set_reloc): New function.
3050 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3051 * nlm-target.h (nlm_set_reloc): Likewise.
3052 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3053 * aout-tic30.c (MY_set_reloc): Likewise.
3054 * aout-target.h (MY_set_reloc): Likewise.
3055 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3056 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3057 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3058 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3059 * aout-adobe.c (aout_32_set_reloc): Likewise.
3060 * bout.c (b_out_set_reloc): Likewise.
3061 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3062 * i386os9k.c (aout_32_set_reloc): Likewise.
3063 * ieee.c (ieee_set_reloc): Likewise.
3064 * oasys.c (oasys_set_reloc): Likewise.
3065 * som.c (som_set_reloc): Likewise.
3066 * versados.c (versados_set_reloc): Likewise.
3067 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3068 _bfd_generic_set_reloc.
3069 (rs6000_xcoff64_aix_vec): LIkewise.
3070 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3071 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3072 * i386msdos.c (msdos_set_reloc): Define to
3073 _bfd_norelocs_set_reloc.
3074 * elfcode.h (elf_set_reloc): Define.
3075 * bfd-in2.h: Regenerated.
3077 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3080 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3081 for IFUNC function address.
3083 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3085 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3086 (CONFLICT_LIST): Likewise.
3087 (opcode/arc-attrs.h): Include.
3088 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3089 (arc_extract_features): New file.
3090 (arc_stralloc): Likewise.
3091 (arc_elf_merge_attributes): Likewise.
3092 (arc_elf_merge_private_bfd_data): Use object attributes.
3093 (bfd_arc_get_mach_from_attributes): New function.
3094 (arc_elf_object_p): Use object attributes.
3095 (arc_elf_final_write_processing): Likewise.
3096 (elf32_arc_obj_attrs_arg_type): New function.
3097 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3098 (elf32_arc_section_from_shdr): Likewise.
3099 (elf_backend_obj_attrs_vendor): Define.
3100 (elf_backend_obj_attrs_section): Likewise.
3101 (elf_backend_obj_attrs_arg_type): Likewise.
3102 (elf_backend_obj_attrs_section_type): Likewise.
3103 (elf_backend_obj_attrs_handle_unknown): Likewise.
3104 (elf_backend_section_from_shdr): Likewise.
3106 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3109 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3110 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3111 and the destination is a Thumb symbol.
3113 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3115 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3116 initializer to silence GCC 4.2.
3117 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3119 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3121 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3122 (LAZY_PLT_ENTRY_SIZE): This.
3123 (NON_LAZY_PLT_ENTRY_SIZE): New.
3124 (elf_x86_64_plt0_entry): Renamed to ...
3125 (elf_x86_64_lazy_plt0_entry): This.
3126 (elf_x86_64_plt_entry): Renamed to ...
3127 (elf_x86_64_lazy_plt_entry): This.
3128 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3129 (elf_x86_64_lazy_bnd_plt0_entry): This.
3130 (elf_x86_64_legacy_plt_entry): Removed.
3131 (elf_x86_64_bnd_plt_entry): Renamed to ...
3132 (elf_x86_64_lazy_bnd_plt_entry): This.
3133 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3134 (elf_x86_64_non_lazy_plt_entry): This.
3135 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3136 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3137 (elf_x86_64_eh_frame_plt): Renamed to ...
3138 (elf_x86_64_eh_frame_lazy_plt): This.
3139 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3140 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3141 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3142 (elf_x86_64_eh_frame_non_lazy_plt): This.
3143 (elf_x86_64_lazy_plt_layout): New.
3144 (elf_x86_64_non_lazy_plt_layout): Likewise.
3145 (elf_x86_64_plt_layout): Likewise.
3146 (elf_x86_64_backend_data): Remove PLT layout information. Add
3147 os for target system.
3148 (GET_PLT_ENTRY_SIZE): Removed.
3149 (elf_x86_64_lazy_plt): New.
3150 (elf_x86_64_non_lazy_plt): Likewise.
3151 (elf_x86_64_lazy_bnd_plt): Likewise.
3152 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3153 (elf_x86-64_arch_bed): Updated.
3154 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3155 (elf_x86_64_create_dynamic_sections): Removed.
3156 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3157 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3158 (elf_x86-64_adjust_dynamic_symbol): Updated.
3159 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3160 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3161 size for PLT0 if there is no PLT0. Get plt_entry_size from
3162 non_lazy_plt for non-lazy PLT entries.
3163 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3164 from non_lazy_plt for non-lazy PLT entries.
3165 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3166 if there is no PLT0.
3167 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3168 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3169 entries with non-lazy PLT layout. Don't fill the second and third
3170 slots in the PLT entry if there is no PLT0.
3171 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3172 if there is no PLT0. Set sh_entsize on the .plt.got section.
3173 (compare_relocs): New.
3174 (elf_x86_64_plt_type): Likewise.
3175 (elf_x86_64_plt): Likewise.
3176 (elf_x86_64_nacl_plt): New. Forward declaration.
3177 (elf_x86_64_get_plt_sym_val): Removed.
3178 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3179 against all dynamic relocations.
3180 (elf_x86_64_link_setup_gnu_properties): New function.
3181 (elf_backend_create_dynamic_sections): Updated.
3182 (elf_backend_setup_gnu_properties): New.
3183 (elf_x86_64_nacl_plt): New.
3184 (elf_x86_64_nacl_arch_bed): Updated.
3186 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3188 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3189 (LAZY_PLT_ENTRY_SIZE): This.
3190 (NON_LAZY_PLT_ENTRY_SIZE): New.
3191 (elf_i386_plt0_entry): Renamed to ...
3192 (elf_i386_lazy_plt0_entry): This.
3193 (elf_i386_plt_entry): Renamed to ...
3194 (elf_i386_lazy_plt_entry): This.
3195 (elf_i386_pic_plt0_entry): Renamed to ...
3196 (elf_i386_pic_lazy_plt0_entry): This.
3197 (elf_i386_pic_plt_entry): Renamed to ...
3198 (elf_i386_pic_lazy_plt_entry): This.
3199 (elf_i386_got_plt_entry): Renamed to ...
3200 (elf_i386_non_lazy_plt_entry): This.
3201 (elf_i386_pic_got_plt_entry): Renamed to ...
3202 (elf_i386_pic_non_lazy_plt_entry): This.
3203 (elf_i386_eh_frame_plt): Renamed to ...
3204 (elf_i386_eh_frame_lazy_plt): This.
3205 (elf_i386_eh_frame_plt_got): Renamed to ...
3206 (elf_i386_eh_frame_non_lazy_plt): This.
3207 (elf_i386_plt_layout): Renamed to ...
3208 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3209 eh_frame_plt_got_size.
3210 (elf_i386_non_lazy_plt_layout): New.
3211 (elf_i386_plt_layout): Likewise.
3212 (elf_i386_non_lazy_plt): Likewise.
3213 (GET_PLT_ENTRY_SIZE): Removed.
3214 (elf_i386_plt): Renamed to ...
3215 (elf_i386_lazy_plt): This.
3216 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3217 (elf_i386_arch_bed): Updated.
3218 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3219 (elf_i386_create_dynamic_sections): Removed.
3220 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3221 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3222 (elf_i386_adjust_dynamic_symbol): Updated.
3223 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3224 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3225 size for PLT0 if there is no PLT0.
3226 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3227 output section is discarded only if GOT isn't empty.
3228 (elf_i386_relocate_section): Updated. Properly get PLT index
3229 if there is no PLT0.
3230 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3231 second and third slots in the PLT entry if there is no PLT0.
3232 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3233 if there is no PLT0. Set sh_entsize on the .plt.got section.
3234 (elf_i386_nacl_plt): Forward declaration.
3235 (elf_i386_get_plt_sym_val): Removed.
3236 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3237 against all dynamic relocations.
3238 (elf_i386_link_setup_gnu_properties): New function.
3239 (elf_backend_create_dynamic_sections): Updated.
3240 (elf_backend_setup_gnu_properties): New.
3241 (elf_i386_nacl_plt): Updated.
3242 (elf_i386_nacl_arch_bed): Likewise.
3243 (elf_i386_vxworks_arch_bed): Likewise.
3245 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3247 * elflink.c (elf_output_implib): Remove executable flag from import
3249 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3250 library is a relocatable object file.
3252 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3255 * elf32-avr.c (avr_should_move_sym): New function.
3256 (avr_should_reduce_sym_size): Likewise.
3257 (avr_should_increase_sym_size): Likewise.
3258 (elf32_avr_relax_delete_bytes): Adjust symbol values
3259 and sizes by calling new functions.
3261 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3263 * config.bfd (riscv32-*): Enable rv64.
3265 2017-05-02 Alan Modra <amodra@gmail.com>
3268 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3269 rather than h->root.type == bfd_link_hash_new.
3270 (bfd_elf_record_link_assignment): Similarly, call
3271 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3273 2017-04-29 Alan Modra <amodra@gmail.com>
3276 * reloc.c (reloc_offset_in_range): New function.
3277 (bfd_perform_relocation, bfd_install_relocation): Use it.
3278 (_bfd_final_link_relocate): Likewise.
3280 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3282 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3283 before using .plt.got.
3284 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3286 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3288 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3289 instead of "+=" to update 0.
3291 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3293 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3294 .plt.got section here.
3295 (elf_i386_check_relocs): Don't create the .plt.got section.
3296 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3297 the .plt.got and .plt.bnd sections here.
3298 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3301 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3303 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3305 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3306 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3307 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3308 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3311 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3313 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3315 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3316 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3317 the first relocatable ELF input with GNU properties.
3319 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3321 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3322 VxWorks for non-PIC.
3324 2017-04-27 Alan Modra <amodra@gmail.com>
3326 * elf-bfd.h (struct elf_backend_data): Make asection param of
3327 elf_backend_eh_frame_address_size const.
3328 (_bfd_elf_eh_frame_address_size): Likewise.
3329 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3330 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3331 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3332 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3333 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3334 (next_cie_fde_offset): Constify params.
3335 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3337 2017-04-27 Alan Modra <amodra@gmail.com>
3339 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3340 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3341 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3343 (offset_adjust): New function.
3344 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3345 (adjust_eh_frame_local_symbols): Likewise.
3346 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3347 after changing anything. Return true if anything changed.
3348 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3349 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3351 2017-04-27 Alan Modra <amodra@gmail.com>
3353 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3356 2017-04-27 Alan Modra <amodra@gmail.com>
3358 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3359 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3360 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3361 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3362 for undef and undefweak dyn_relocs.
3363 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3364 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3365 (allocate_got, allocate_dynrelocs): Likewise.
3366 (ppc64_elf_relocate_section): Likewise.
3368 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3370 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3371 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3372 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3373 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3375 2017-04-26 Nick Clifton <nickc@redhat.com>
3378 * reloc.c (bfd_perform_relocation): Check for a negative address
3381 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3384 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3386 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3387 (elf_backend_always_renumber_dynsyms): Define.
3388 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3389 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3390 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3391 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3393 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3395 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3397 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3398 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3399 sections have been created.
3401 2017-04-26 Nick Clifton <nickc@redhat.com>
3404 * compress.c (bfd_init_section_compress_status): Check the return
3405 value from bfd_malloc.
3407 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3409 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3410 no_finish_dynamic_symbol.
3411 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3413 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3414 weak symbol, don't make it dynamic.
3415 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3416 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3417 relocation for GOT reference.
3418 (elf_x86_64_finish_dynamic_symbol): Abort if
3419 no_finish_dynamic_symbol isn't 0.
3421 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3424 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3425 undefined weak symbol, don't make it dynamic.
3426 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3427 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3428 relocation for R_386_GOT32.
3430 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3433 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3435 2017-04-23 Alan Modra <amodra@gmail.com>
3438 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3439 * elf.c (lcomm_sym): New.
3440 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3441 * bfd-in2.h: Regenerate.
3443 2017-04-23 Alan Modra <amodra@gmail.com>
3446 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3447 parameters and comment.
3448 (_bfd_elf_get_reloc_section): Delete.
3449 (_bfd_elf_plt_get_reloc_section): Declare.
3450 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3451 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3453 (_bfd_elf_get_reloc_section): ..here. Delete.
3454 (assign_section_numbers): Call elf_get_reloc_section.
3455 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3456 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3458 2017-04-23 Alan Modra <amodra@gmail.com>
3461 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3464 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3467 * elf32-i386.c (elf_i386_link_hash_entry): Add
3468 no_finish_dynamic_symbol.
3469 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3470 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3471 symbol, don't make it dynamic in PIE.
3472 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3473 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3474 relocation for R_386_GOT32
3475 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3478 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3482 * elflink.c (elf_link_add_object_symbols): Require
3483 --no-dynamic-linker with -E/--dynamic-list when creating
3486 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3488 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3491 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3493 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3494 dynamic symbol sorting.
3496 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3499 * elflink.c (elf_link_add_object_symbols): Preserve
3500 dynamic_ref_after_ir_def when restoring the symbol table for
3501 unneeded dynamic object.
3503 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3506 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3507 on on undefined IFUNC symbol in the second PLT.
3509 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3511 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3513 2017-04-19 Alan Modra <amodra@gmail.com>
3515 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3516 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3517 * elf32-ppc.c:Formatting.
3518 (ensure_undefweak_dynamic): Don't make dynamic when
3519 info->dynamic_undefined_weak is zero.
3520 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3521 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3522 not default visibility. Discard undef and undefweak
3524 (ppc_elf_relocate_section): Adjust to suit.
3525 * elf64-ppc.c: Formatting.
3526 (ensure_undefweak_dynamic): Don't make dynamic when
3527 info->dynamic_undefined_weak is zero.
3528 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3529 info->dynamic_undefined_weak. Discard them earlier.
3531 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3534 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3535 before generating the version definition section.
3537 2017-04-17 Alan Modra <amodra@gmail.com>
3539 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3540 state when a regular object file defines a symbol with
3541 incompatible type to that defined by an earlier shared lib.
3543 2017-04-13 Alan Modra <amodra@gmail.com>
3545 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3547 * elf32-arm.c: Likewise.
3548 * elf32-i386.c: Likewise.
3549 * elf32-mep.c: Likewise.
3550 * elf64-ia64-vms.c: Likewise.
3551 * elf64-x86-64.c: Likewise.
3552 * elflink.c: Likewise.
3553 * elfnn-ia64.c: Likewise.
3554 * elfxx-mips.c: Likewise.
3556 2017-04-13 Alan Modra <amodra@gmail.com>
3558 * aoutx.h: Use %B and %A in error messages throughout file.
3559 * aout-cris.c: Likewise.
3560 * archive.c: Likewise.
3561 * binary.c: Likewise.
3562 * coff-rs6000.c: Likewise.
3563 * coff-tic4x.c: Likewise.
3564 * coffcode.h: Likewise.
3565 * coffgen.c: Likewise.
3566 * cofflink.c: Likewise.
3567 * coffswap.h: Likewise.
3568 * cpu-arm.c: Likewise.
3569 * elf-eh-frame.c: Likewise.
3570 * elf-m10300.c: Likewise.
3572 * elf32-arc.c: Likewise.
3573 * elf32-arm.c: Likewise.
3574 * elf32-bfin.c: Likewise.
3575 * elf32-frv.c: Likewise.
3576 * elf32-iq2000.c: Likewise.
3577 * elf32-m32c.c: Likewise.
3578 * elf32-microblaze.c: Likewise.
3579 * elf32-nds32.c: Likewise.
3580 * elf32-rl78.c: Likewise.
3581 * elf32-rx.c: Likewise.
3582 * elf32-score.c: Likewise.
3583 * elf32-score7.c: Likewise.
3584 * elf32-sh64.c: Likewise.
3585 * elf32-v850.c: Likewise.
3586 * elf32-vax.c: Likewise.
3587 * elf32-visium.c: Likewise.
3588 * elf64-ia64-vms.c: Likewise.
3589 * elf64-mmix.c: Likewise.
3590 * elf64-sh64.c: Likewise.
3591 * elfcode.h: Likewise.
3592 * elfnn-aarch64.c: Likewise.
3593 * elfnn-ia64.c: Likewise.
3594 * elfxx-mips.c: Likewise.
3595 * hpux-core.c: Likewise.
3598 * linker.c: Likewise.
3599 * merge.c: Likewise.
3601 * oasys.c: Likewise.
3602 * pdp11.c: Likewise.
3603 * peXXigen.c: Likewise.
3604 * rs6000-core.c: Likewise.
3605 * vms-alpha.c: Likewise.
3606 * xcofflink.c: Likewise.
3608 2017-04-13 Alan Modra <amodra@gmail.com>
3610 * bfd.c (PRINT_TYPE): Define.
3611 (_doprnt): New function.
3612 (error_handler_internal): Use _doprnt.
3613 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3614 calls in their natural order, throughout file.
3615 * coff-mcore.c: Likewise.
3616 * coff-ppc.c: Likewise.
3617 * coff-tic80.c: Likewise.
3618 * cofflink.c: Likewise.
3619 * elf-s390-common.c: Likewise.
3621 * elf32-arm.c: Likewise.
3622 * elf32-i386.c: Likewise.
3623 * elf32-m32r.c: Likewise.
3624 * elf32-msp430.c: Likewise.
3625 * elf32-spu.c: Likewise.
3626 * elf64-ia64-vms.c: Likewise.
3627 * elf64-sparc.c: Likewise.
3628 * elf64-x86-64.c: Likewise.
3629 * elflink.c: Likewise.
3630 * elfnn-aarch64.c: Likewise.
3631 * elfnn-ia64.c: Likewise.
3632 * elfxx-mips.c: Likewise.
3634 2017-04-13 Alan Modra <amodra@gmail.com>
3636 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3637 branch veneers" error. Fix double space and format message.
3638 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3639 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3641 2017-04-13 Alan Modra <amodra@gmail.com>
3643 * bfd-in2.h: Regenerate.
3645 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3647 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3648 extra `\n' in warning/error messages.
3649 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3650 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3652 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3654 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3655 processor-specific properties with generic ELF target vector.
3657 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3659 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3660 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3661 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3662 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3664 (link_hash_newfunc): Initialize has_got_reloc and
3666 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3668 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3670 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3672 (_bfd_sparc_elf_fixup_symbol): New function.
3673 (allocate_dynrelocs): Don't allocate space for dynamic
3674 relocations and discard relocations against resolved undefined
3675 weak symbols in executable. Don't make resolved undefined weak
3676 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3677 relocation against undefined weak symbols in PIE.
3678 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3679 relocations against resolved undefined weak symbols in PIE
3680 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3681 without ynamic PLT/GOT relocations for resolved undefined weak
3683 Don't generate dynamic relocation against resolved undefined
3684 weak symbol in executable.
3685 (pie_finish_undefweak_symbol): New function.
3686 (_bfd_sparc_elf_finish_dynamic_sections): Call
3687 pie_finish_undefweak_symbol on all symbols in PIE.
3688 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3689 (_bfd_sparc_elf_fixup_symbol): New function.
3691 2017-04-10 Nick Clifton <nickc@redhat.com>
3693 * config.bfd: Remove ns32k from obsolete list.
3695 2017-04-10 Alan Modra <amodra@gmail.com>
3698 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3699 (special_sections_i): Likewise for .init_array.
3700 (special_sections_p): Likewise for .preinit_array.
3702 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3706 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3707 ELF_COMMON_DEF_P for common symbols.
3708 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3709 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3710 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3711 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3712 07492f668d2173da7a2bda3707ff0985e0f460b6.
3714 2017-04-07 Pedro Alves <palves@redhat.com>
3716 * opncls.c (bfd_get_debug_link_info): Rename to...
3717 (bfd_get_debug_link_info_1): ... this. Change type of second
3718 parameter to void pointer. Adjust.
3719 (bfd_get_debug_link_info): Reimplement on top of
3720 bfd_get_debug_link_info_1.
3721 (separate_debug_file_exists, separate_alt_debug_file_exists):
3722 Change type of second parameter to void pointer. Adjust.
3723 (get_func_type, check_func_type): Change type of second parameter
3725 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3726 the callback functions instead of passing the address of a local.
3727 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3728 find_separate_debug_file.
3729 (get_alt_debug_link_info_shim): Change type of second parameter to
3730 void pointer. Adjust.
3731 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3732 find_separate_debug_file.
3733 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3734 of second parameter to void pointer. Adjust.
3735 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3736 pointer local to find_separate_debug_file.
3738 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3740 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3741 external symbols with a definition.
3742 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3744 2017-04-07 Alan Modra <amodra@gmail.com>
3746 * po/SRC-POTFILES.in: Regenerate.
3748 2017-04-05 Alan Modra <amodra@gmail.com>
3750 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3753 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3755 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3756 numbers for DataDirectory entry indicies passed to
3759 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3761 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3762 each GNU_MBIND section and align GNU_MBIND section to page size.
3763 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3764 segment for each GNU_MBIND section.
3765 (_bfd_elf_init_private_section_data): Copy sh_info from input
3766 for GNU_MBIND section.
3768 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3770 * elfnn-riscv.c (GP_NAME): Delete.
3771 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3772 (_bfd_riscv_relax_lui): Likewise.
3774 2017-04-04 Nick Clifton <nickc@redhat.com>
3777 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3779 (bfd_elf_final_link): Only initialize the extended symbol index
3780 section if there are extended symbol tables to list.
3782 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3784 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3785 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3786 * configure.ac (elf): Add elf-properties.lo.
3787 * Makefile.in: Regenerated.
3788 * configure: Likewise.
3789 * elf-bfd.h (elf_property_kind): New.
3790 (elf_property): Likewise.
3791 (elf_property_list): Likewise.
3792 (elf_properties): Likewise.
3793 (_bfd_elf_parse_gnu_properties): Likewise.
3794 (_bfd_elf_get_property): Likewise.
3795 (_bfd_elf_link_setup_gnu_properties): Likewise.
3796 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3797 and setup_gnu_properties.
3798 (elf_obj_tdata): Add properties.
3799 * elf-properties.c: New file.
3800 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3801 (elf_i386_merge_gnu_properties): Likewise.
3802 (elf_backend_parse_gnu_properties): Likewise.
3803 (elf_backend_merge_gnu_properties): Likewise.
3804 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3805 (elf_x86_64_merge_gnu_properties): Likewise.
3806 (elf_backend_parse_gnu_properties): Likewise.
3807 (elf_backend_merge_gnu_properties): Likewise.
3808 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3809 (elf_backend_parse_gnu_properties): Likewise.
3810 (elf_backend_setup_gnu_properties): Likewise.
3811 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3812 elf_backend_merge_gnu_properties and
3813 elf_backend_setup_gnu_properties.
3815 2017-03-30 Pip Cet <pipcet@gmail.com>
3817 * elf32-wasm32.c: Add relocation code, two relocs.
3818 * reloc.c: Add wasm32 relocations.
3819 * libbfd.h: Regenerate.
3820 * bfd-in2.h: Regenerate.
3821 * bfd/po/bfd.pot: Regenerate.
3823 2017-03-29 Nick Clifton <nickc@redhat.com>
3826 * coff-bfd.h (struct coff_section_data): Add new fields:
3827 saved_bias and bias.
3828 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3829 computed for PE binaries.
3830 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3833 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3836 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3837 to handle a local symbol with a hash-symbol-entry; without PLT.
3838 Add BFD_ASSERT for an incidental case with GOT entry present.
3839 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3840 isn't forced-or-set local.
3842 2017-03-27 Pip Cet <pipcet@gmail.com>
3844 * wasm-module.c: New file to support WebAssembly modules.
3845 * wasm-module.h: New file to support WebAssembly modules.
3846 * doc/webassembly.texi: Start documenting wasm-module.c.
3847 * config.bfd: Add wasm_vec.
3848 * targets.c: Likewise.
3849 * configure.ac: Likewise.
3850 * Makefile.am: Add entries for wasm-module.c.
3851 * Makefile.in: Regenerate.
3852 * configure: Regenerate.
3853 * po/SRC-POTFILES.in: Regenerate.
3855 2017-03-27 Pip Cet <pipcet@gmail.com>
3857 * cpu-wasm32.c: New file to support wasm32 architecture.
3858 * elf32-wasm32.c: New file to support wasm32 architecture.
3859 * Makefile.am: Add wasm32 architecture.
3860 * archures.c: Likewise.
3861 * config.bfd: Likewise.
3862 * configure.ac: Likewise.
3863 * targets.c: Likewise.
3864 * Makefile.in: Regenerate.
3865 * bfd-in2.h: Regenerate.
3866 * configure: Regenerate.
3867 * po/SRC-POTFILES.in: Regenerate.
3869 2017-03-20 Alan Modra <amodra@gmail.com>
3872 * elf64-ppc.c (compare_symbols): Stabilize sort.
3874 2017-03-18 Alan Modra <amodra@gmail.com>
3876 * elf64-ppc.c (struct ppc_link_hash_table): Add
3877 local_ifunc_resolver and maybe_local_ifunc_resolver.
3878 (ppc_build_one_stub): Set flags on emitting dynamic
3879 relocation to ifunc.
3880 (ppc64_elf_relocate_section): Likewise.
3881 (ppc64_elf_finish_dynamic_symbol): Likewise.
3882 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3883 local dynamic relocs to ifuncs.
3884 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3885 local_ifunc_resolver and maybe_local_ifunc_resolver.
3886 (ppc_elf_relocate_section): Set flag on emitting dynamic
3887 relocation to ifuncs.
3888 (ppc_elf_finish_dynamic_symbol): Likewise.
3889 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3890 dynamic relocs to ifuncs.
3892 2017-03-13 Nick Clifton <nickc@redhat.com>
3895 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3896 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3897 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3898 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3899 * bfd-in2.h: Regenerate.
3900 * libbfd.h: Regenerate.
3901 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3903 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3904 (elfNN_aarch64_howto_table): Likewise.
3905 (aarch64_tls_transition_without_check): Likewise.
3906 (aarch64_reloc_got_type): Likewise.
3907 (elfNN_aarch64_final_link_relocate): Likewise.
3908 (elfNN_aarch64_tls_relax): Likewise.
3909 (elfNN_aarch64_relocate_section): Likewise.
3910 (elfNN_aarch64_gc_sweep_hook): Likewise.
3911 (elfNN_aarch64_check_relocs): Likewise.
3912 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3913 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3915 2017-03-11 Alan Modra <amodra@gmail.com>
3917 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3918 parameter is in fact used. Whitespace fixes.
3919 * elf64-ppc.c: Likewise.
3921 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3923 * rs6000-core.c (CORE_NEW): Simplify macro when
3924 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3926 2017-03-07 Alan Modra <amodra@gmail.com>
3930 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3933 2017-03-05 Alan Modra <amodra@gmail.com>
3935 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3936 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3937 (next_cie_fde_offset): New function.
3938 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3939 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3940 four bytes. Align CIEs to four or eight bytes depending on
3941 per_encoding_aligned8. Align FDEs according to their encoding.
3942 Pad last FDE to output section alignment.
3943 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3945 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3946 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3947 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3949 2017-03-02 Martin Bickel <binutils@ineranves.de>
3952 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3953 empty segments which have a zero filesz, but a non-zero memsz.
3955 2017-03-02 Alan Modra <amodra@gmail.com>
3957 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3959 2017-02-28 Alan Modra <amodra@gmail.com>
3961 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3962 (ppc64_elf_relocate_section): Likewise.
3964 2017-02-28 Alan Modra <amodra@gmail.com>
3967 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3968 rather than elf32_nios2_hash_table or elf_hash_table.
3969 (create_got_section): Likewise.
3970 (nios2_elf32_finish_dynamic_symbol): Likewise.
3971 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3972 (nios2_elf32_size_dynamic_sections): Likewise.
3973 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3974 vars. Use htab equivalents directly instead. Don't create
3975 all dynamic sections on needing just the GOT. Use a goto
3976 rather than a fall-through with reloc test. Ensure
3977 htab->dynobj is set when making dynamic sreloc section.
3978 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3979 equivalent directly instead. Don't segfault on looking for
3980 .dynamic when dynamic sections have not been created. Don't
3981 segfault on .got.plt being discarded.
3982 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3983 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3984 fixme and another not so relevant comment.
3985 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3986 already set, set hash table dynobj on creating .sbss.
3988 2017-02-28 Alan Modra <amodra@gmail.com>
3990 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3991 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3992 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3993 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3994 (ppc64_elf_relocate_section): Likewise.
3995 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3996 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3997 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3998 * libbfd.h: Regenerate.
3999 * bfd-in2.h: Regenerate.
4001 2017-02-28 Alan Modra <amodra@gmail.com>
4003 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4004 dynamic .data.rel.ro read-only.
4005 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4006 rather than section flags when deciding where copy reloc goes.
4007 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4008 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4009 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4010 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4011 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4012 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4013 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4014 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4015 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4016 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4017 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4018 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4019 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4020 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4021 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4022 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4023 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4024 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4025 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4027 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4029 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4030 `jalr $0, $25' instruction encoding.
4032 2017-02-27 Nick Clifton <nickc@redhat.com>
4035 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4036 generating a seg-fault when encountering a symbol that has been
4037 deleted by garbage collection.
4039 2017-02-25 Alan Modra <amodra@gmail.com>
4041 * elf32-arc.c (struct dynamic_sections): Delete.
4042 (enum dyn_section_types): Delete.
4043 (dyn_section_names): Delete.
4044 (arc_create_dynamic_sections): Delete.
4045 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4046 segfault on discarded .rela.plt section.
4047 (elf_arc_size_dynamic_sections): Formatting. Don't call
4048 arc_create_dynamic_sections. Don't allocate memory for sections
4049 handled by the generic linker. Correct code finding relocs in
4050 read-only sections. Set SEC_EXCLUDE on zero size .got,
4051 .got.plt, and .dynbss sections. Do set .interp for pies.
4053 2017-02-24 Andrew Waterman <andrew@sifive.com>
4055 * elfnn-riscv.c (GP_NAME): New macro.
4056 (riscv_global_pointer_value): Use it.
4057 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4058 output section, consider only that section's alignment.
4060 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4062 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4063 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4064 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4065 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4067 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4069 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4070 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4073 2017-02-23 Alan Modra <amodra@gmail.com>
4076 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4078 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4079 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4082 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4085 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4086 processing ahead of the call to `elf_gc_sweep_symbol'.
4088 2017-02-22 Nick Clifton <nickc@redhat.com>
4091 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4092 created section 4-byte alignment.
4094 2017-02-22 Alan Modra <amodra@gmail.com>
4096 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4097 on .got or .plt output section being discarded by script.
4098 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4101 2017-02-21 Alan Modra <amodra@gmail.com>
4103 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4104 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4106 2017-02-20 Alan Modra <amodra@gmail.com>
4109 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4110 if DT_RELSZ/DT_RELASZ is zero.
4112 2017-02-17 Nick Clifton <nickc@redhat.com>
4114 * compress.c (bfd_get_full_section_contents): Remember to reduce
4115 compressed size by the sizeof the compression header when
4116 decompressing the contents.
4118 2017-02-17 Pedro Alves <palves@redhat.com>
4120 * srec.c (Chunk): Rename to ...
4121 (_bfd_srec_len): ... this.
4122 (S3Forced): Rename to ...
4123 (_bfd_srec_forceS3): ... this.
4124 * objcopy.c: Adjust all references.
4126 2017-02-17 Pedro Alves <palves@redhat.com>
4128 * archive.c (bsd_write_armap): Rename to ...
4129 (_bfd_bsd_write_armap): ... this.
4130 (coff_write_armap): Rename to ...
4131 (_bfd_coff_write_armap): ... this.
4132 * libbfd-in.h (bsd_write_armap): Rename to ...
4133 (_bfd_bsd_write_armap): ... this.
4134 (coff_write_armap): Rename to ...
4135 (_bfd_coff_write_armap): ... this.
4136 * aout-target.h, aout-tic30.c: Adjust all users.
4137 * libbfd.h: Regenerate.
4139 2017-02-17 Pedro Alves <palves@redhat.com>
4141 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4142 (warn_deprecated): Rename to ...
4143 (_bfd_warn_deprecated): ... this.
4144 * libbfd.c (warn_deprecated): Rename to ...
4145 (_bfd_warn_deprecated): ... this.
4146 * bfd-in2.h: Regenerate.
4148 2017-02-17 Pedro Alves <palves@redhat.com>
4150 * bfdio.c (real_ftell): Rename to ...
4151 (_bfd_real_ftell): ... this.
4152 (real_fseek): Rename to ...
4153 (_bfd_real_fseek): ... this.
4154 (real_fopen): Rename to ...
4155 (_bfd_real_fopen): ... this.
4156 * libbfd-in.h (real_ftell): Rename to ...
4157 (_bfd_real_ftell): ... this.
4158 (real_fseek): Rename to ...
4159 (_bfd_real_fseek): ... this.
4160 (real_fopen): Rename to ...
4161 (_bfd_real_fopen): ... this.
4162 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4163 * libbfd.h: Regenerate.
4165 2017-02-17 Pedro Alves <palves@redhat.com>
4167 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4168 * libbfd.c (read_unsigned_leb128): Rename to ...
4169 (_bfd_read_unsigned_leb128): ... this.
4170 (read_signed_leb128): Rename to ...
4171 (_bfd_read_signed_leb128): ... this.
4172 (safe_read_leb128): Rename to ...
4173 (_bfd_safe_read_leb128): ... this.
4174 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4175 (_bfd_read_unsigned_leb128): ... this.
4176 (read_signed_leb128): Rename to ...
4177 (_bfd_read_signed_leb128): ... this.
4178 (safe_read_leb128): Rename to ...
4179 (_bfd_safe_read_leb128): ... this.
4180 * libbfd.h: Renegerate.
4182 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4184 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4185 before trying to fine matching file and line information.
4187 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4189 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4190 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4191 not match current bfd, then reload debug information. Record bfd
4192 we're loading debug info for in the stash. If we have debug
4193 informatin in the cache then perform section placement before
4196 2017-02-16 Alan Modra <amodra@gmail.com>
4199 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4200 * elfxx-target.h (elf_backend_no_page_alias): Define.
4201 (elfNN_bed): Init new field.
4202 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4203 ensure PT_LOAD segment starts on a new page.
4204 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4206 2017-02-16 Alan Modra <amodra@gmail.com>
4209 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4212 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4214 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4215 * bfd-in2.h: Regenerated.
4217 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4220 * elf32-i386.c (elf_i386_relocate_section): Allow
4221 "lea foo@GOT, %reg" in PIC.
4223 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4226 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4227 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4228 error against local IFUNC symbol without a base register for
4231 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4233 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4234 `%P: %H:' with `info->callbacks->einfo'.
4235 (ppc_elf_relocate_section): Likewise.
4236 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4237 (ppc64_elf_edit_toc): Likewise.
4238 (ppc64_elf_relocate_section): Likewise.
4240 2017-02-14 Alan Modra <amodra@gmail.com>
4242 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4243 --gc-keep-exported, and test versioned field of sym rather than
4244 looking for @ in name.
4246 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4248 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4251 2017-02-13 Nick Clifton <nickc@redhat.com>
4254 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4257 2017-02-07 Andrew Waterman <andrew@sifive.com>
4259 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4260 entry size if PLT header is written.
4262 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4264 Fix sparc64 dynamic relocation processing to use the dynamic
4266 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4267 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4270 2017-02-03 Nick Clifton <nickc@redhat.com>
4273 * coffcode.h (coff_write_object_contents): Enlarge size of
4274 s_name_buf in order to avoid compile time warning about possible
4276 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4277 32-bits of insn value before printing into buffer.
4279 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4281 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4282 `max_local_dynindx'.
4283 (mips_elf_sort_hash_table): Handle it.
4284 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4285 symbols bump up `max_local_dynindx' rather than
4286 `max_non_got_dynindx'.
4288 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4290 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4291 `min_got_dynindx', `max_unref_got_dynindx' and
4292 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4293 (mips_elf_sort_hash_table): Adjust accordingly.
4295 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4297 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4298 to access the hash table.
4300 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4302 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4303 non-NULL `htab' to the beginning.
4305 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4307 * elflink.c (elf_gc_sweep): Wrap overlong line.
4309 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4311 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4312 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4313 * elfxx-mips.c (mips_elf_link_hash_table): Add
4314 `ignore_branch_isa' member.
4315 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4316 in branch relocation calculation as an error if
4317 `ignore_branch_isa' has been set.
4318 (_bfd_mips_elf_insn32): Rename to...
4319 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4320 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4321 Handle the new parameter.
4323 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4325 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4326 local variable dynobj.
4329 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4330 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4331 executable from read-only sections into sdynrelro.
4332 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4333 dynamic relocs in sdynrelro.
4334 (elf_backend_want_dynrelro): Define.
4336 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4338 * config.bfd (*-*-rtemsaout*): Mark as removed.
4340 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4342 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4343 (arm-*-rtems*): Move to (arm*-*-eabi*).
4344 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4345 (m68-*-rtems*): Move to (m68*-*-elf*).
4347 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4349 * config.bfd (*-*-rtemscoff*): Mark as removed.
4351 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4354 * elflink.c (bfd_elf_record_link_assignment): Revert last
4355 change and don't ever clear `forced_local'. Set `mark'
4357 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4359 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4360 (bfd_elf_size_dynamic_sections): ... here.
4361 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4362 and set `mark' instead in `__tls_get_addr_opt' processing.
4363 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4365 2017-01-24 Alan Modra <amodra@gmail.com>
4367 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4368 where dynamic relocs are preferable. Allow ifunc too.
4369 (ensure_undefweak_dynamic): New function.
4370 (allocate_dynrelocs): Use it here. Move plt handling last and
4371 don't make symbols dynamic, simplifying loop. Only make undef
4372 weak symbols with GOT entries dynamic. Correct condition
4373 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4374 comments. Remove goto.
4375 (ppc_elf_relocate_section): Correct test for using dynamic
4376 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4377 to suit. Set up explicit tls_index entries and implicit GOT
4378 tls_index entries resolvable at link time for
4379 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4380 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4381 (ensure_undefweak_dynamic): New function.
4382 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4383 with GOT entries dynamic. Remove unnecessary test of
4384 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4385 (ppc64_elf_relocate_section): Correct test for using dynamic
4386 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4387 to suit. Set up explicit tls_index entries and implicit GOT
4388 tls_index entries resolvable at link time for __tls_get_addr_opt.
4389 Simplify expression to clear mem for prelink.
4391 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4393 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4395 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4397 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4398 (elf_backend_hash_symbol): Define.
4400 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4403 * elflink.c (bfd_elf_record_link_assignment): Clear any
4404 `forced_local' marking for DSO symbols that are not being
4407 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4409 * elfnn-riscv.c (riscv_elf_object_p): New function.
4411 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4414 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4416 (elf_x86_64_check_relocs): Create .eh_frame section for the
4418 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4419 .eh_frame section for the .plt.bnd section.
4420 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4421 for the .plt.bnd section.
4423 2017-01-12 Nick Clifton <nickc@redhat.com>
4426 * opncls.c (find_separate_debug_file): Add include_dirs
4427 parameter. Only include the directory part of the bfd's filename
4428 in search paths if include_dirs is true. Add a couple of extra
4429 locations for looking for debug files.
4430 ( bfd_follow_gnu_debuglink): Update invocation of
4431 find_separate_debug_file.
4432 (bfd_follow_gnu_debugaltlink): Likewise.
4433 (get_build_id): New function: Finds the build-id of the given bfd.
4434 (get_build_id_name): New function: Computes the name of the
4435 separate debug info file for a bfd, based upon its build-id.
4436 (check_build_id_file): New function: Checks to see if a separate
4437 debug info file exists at the given location, and that its
4438 build-id matches that of the original bfd.
4439 (bfd_follow_build_id_debuglink): New function: Finds a separate
4440 debug info file for a given bfd by using the build-id method.
4441 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4442 method of locating a separate debug info file before using the
4444 * bfd-in2.h: Regenerate.
4446 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4449 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4450 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4451 elf_x86_64_eh_frame_plt_got.
4452 (elf_x86_64_size_dynamic_sections): Get unwind info from
4453 elf_x86_64_bnd_arch_bed for the BND PLT.
4455 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4457 * config.bfd: Add entries for i686-redox and x86_64-redox.
4459 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4461 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4463 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4464 .eh_frame section to 4 bytes for x32.
4465 (elf_x86_64_check_relocs): Likewise.
4467 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4470 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4471 (PLT_GOT_FDE_LENGTH): Likewise.
4472 (elf_i386_plt_layout): Add eh_frame_plt_got and
4473 eh_frame_plt_got_size.
4474 (elf_i386_plt): Updated.
4475 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4476 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4477 (elf_i386_size_dynamic_sections): Allocate and initialize
4478 .eh_frame section for .plt.got.
4479 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4481 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4482 eh_frame_plt_got_size.
4483 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4484 (PLT_GOT_FDE_LENGTH): Likewise.
4485 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4486 eh_frame_plt_got_size.
4487 (elf_x86_64_arch_bed): Updated.
4488 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4489 eh_frame_plt_got_size.
4490 (elf_x86_64_nacl_arch_bed): Likewise.
4491 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4492 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4493 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4494 .eh_frame section for .plt.got.
4495 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4498 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4500 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4501 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4503 2017-01-09 Nick Clifton <nickc@redhat.com>
4505 * dwarf2.c (lookup_address_in_function_table): Return early if
4506 there are no functions in the given comp unit, or if the high
4507 address of the last function in the comp unit is less than the
4510 2017-01-09 Nick Clifton <nickc@redhat.com>
4513 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4514 message if there are too many symbols to load.
4516 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4518 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4519 if relocs are cached.
4521 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4524 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4525 for R_MICROBLAZE_GOTOFF_64.
4527 2017-01-03 Nick Clifton <nickc@redhat.com>
4529 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4530 warning about using a possibly uninitialised variable.
4532 2017-01-02 Alan Modra <amodra@gmail.com>
4534 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4535 (allocate_plt_static, allocate_dynrelocs): Use it.
4537 2017-01-02 Alan Modra <amodra@gmail.com>
4539 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4540 .PARISC.unwind section.
4542 2017-01-02 Alan Modra <amodra@gmail.com>
4545 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4546 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4547 indirect to GOT pointer relative code edit.
4549 2017-01-02 Alan Modra <amodra@gmail.com>
4551 Update year range in copyright notice of all files.
4553 For older changes see ChangeLog-2016
4555 Copyright (C) 2017 Free Software Foundation, Inc.
4557 Copying and distribution of this file, with or without modification,
4558 are permitted in any medium without royalty provided the copyright
4559 notice and this notice are preserved.
4565 version-control: never