1 2019-09-18 Alan Modra <amodra@gmail.com>
3 * bfd-in.h (carsym.name): Make const.
4 * reloc.c (struct reloc_howto_struct.name): Likewise.
5 * targets.c (bfd_target.name): Likewise.!
6 * bfd.c (bfd_get_sign_extend_vma): Make variable const.
7 * som.c (som_bfd_fill_in_ar_symbols): Use an intermediary variable
8 when setting carsym.name.
9 * bfd-in2.h: Regenerate.
11 2019-09-18 Alan Modra <amodra@gmail.com>
13 * mach-o.c (bfd_mach_o_fat_member_init): Likewise. Replace
14 xstrdup and xmalloc with bfd_strdup and bfd_malloc. Return an
15 error status. Adjust calls.
16 * vms-lib.c (_bfd_vms_lib_get_module): Test mhd->id earlier.
17 Close bfd on failure. Replace xstrdup/bfd_alloc use with
18 bfd_malloc. Use bfd_set_filename.
20 2019-09-18 Alan Modra <amodra@gmail.com>
22 * elf64-ppc.c (must_be_dyn_reloc): Return 0 for TOC16 relocs.
23 (ppc64_elf_check_relocs): Support dynamic/copy relocs for TOC16.
24 (ppc64_elf_adjust_dynamic_symbol): Don't keep dynamic reloc when
25 needs_copy even if all relocs are in rw sections.
26 (dec_dynrel_count): Handle TOC16 relocs.
27 (ppc64_elf_relocate_section): Support dynamic relocs for TOC16.
28 (ppc64_elf_finish_dynamic_symbol): Adjust to handle needs_copy
31 2019-09-16 Phil Blundell <pb@pbcl.net>
33 * version.m4: Set version to 2.33.50.
34 * Makefile.in, configure, doc/Makefile.in: Regenerated.
36 2019-09-11 Tom Tromey <tom@tromey.com>
38 * opncls.c (bfd_set_filename): New function.
39 * bfd-in2.h: Regenerate.
41 2019-09-11 Alan Modra <amodra@gmail.com>
43 * targets.c (struct bfd_target): Add _bfd_group_name.
44 (BFD_JUMP_TABLE): Likewise.
45 * coffgen.c (bfd_coff_group_name): New function.
46 * elf.c (bfd_elf_group_name): New function.
47 * linker.c (_bfd_nolink_bfd_group_name): New function.
48 * section.c (bfd_generic_group_name): New function.
49 * elf-bfd.h (bfd_elf_group_name): Declare.
50 * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
51 * libcoff-in.h (bfd_coff_group_name): Declare.
52 * aout-target.h (MY_bfd_group_name): Define.
53 * aout-tic30.c (MY_bfd_group_name): Define.
54 * bfd.c (bfd_group_name): Define.
55 * binary.c (binary_bfd_group_name): Define.
56 * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
57 * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
58 * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
59 * coffcode.h (coff_bfd_group_name): Define.
60 * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
61 * i386msdos.c (msdos_bfd_group_name): Define.
62 * ihex.c (ihex_bfd_group_name): Define.
63 * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
64 * mmo.c (mmo_bfd_group_name): Define.
65 * pef.c (bfd_pef_bfd_group_name): Define.
66 * plugin.c (bfd_plugin_bfd_group_name): Define.
67 * ppcboot.c (ppcboot_bfd_group_name): Define.
68 * som.c (som_bfd_group_name): Define.
69 * srec.c (srec_bfd_group_name): Define.
70 * tekhex.c (tekhex_bfd_group_name): Define.
71 * verilog.c (verilog_bfd_group_name): Define.
72 * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
73 * xsym.c (bfd_sym_bfd_group_name): Define.
74 * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
75 (rs6000_xcoff64_aix_vec): Likewise.
76 * bfd-in2.h: Regenerate.
77 * libbfd.h: Regenerate.
78 * libcoff.h: Regenerate.
80 2019-09-10 Nick Clifton <nickc@redhat.com>
83 * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
85 (bfd_default_arch_struct): Initialise the new field.
86 * bfd-in2.h: Regenerate.
87 * cpu-aarch64.c: Initialise the new field.
88 * cpu-alpha.c: Likewise.
89 * cpu-arc.c: Likewise.
90 * cpu-arm.c: Likewise.
91 * cpu-avr.c: Likewise.
92 * cpu-bfin.c: Likewise.
93 * cpu-bpf.c: Likewise.
94 * cpu-cr16.c: Likewise.
95 * cpu-cr16c.c: Likewise.
96 * cpu-cris.c: Likewise.
97 * cpu-crx.c: Likewise.
98 * cpu-csky.c: Likewise.
99 * cpu-d10v.c: Likewise.
100 * cpu-d30v.c: Likewise.
101 * cpu-dlx.c: Likewise.
102 * cpu-epiphany.c: Likewise.
103 * cpu-fr30.c: Likewise.
104 * cpu-frv.c: Likewise.
105 * cpu-ft32.c: Likewise.
106 * cpu-h8300.c: Likewise.
107 * cpu-hppa.c: Likewise.
108 * cpu-i386.c: Likewise.
109 * cpu-ia64.c: Likewise.
110 * cpu-iamcu.c: Likewise.
111 * cpu-ip2k.c: Likewise.
112 * cpu-iq2000.c: Likewise.
113 * cpu-k1om.c: Likewise.
114 * cpu-l1om.c: Likewise.
115 * cpu-lm32.c: Likewise.
116 * cpu-m10200.c: Likewise.
117 * cpu-m10300.c: Likewise.
118 * cpu-m32c.c: Likewise.
119 * cpu-m32r.c: Likewise.
120 * cpu-m68hc11.c: Likewise.
121 * cpu-m68hc12.c: Likewise.
122 * cpu-m68k.c: Likewise.
123 * cpu-m9s12x.c: Likewise.
124 * cpu-m9s12xg.c: Likewise.
125 * cpu-mcore.c: Likewise.
126 * cpu-mep.c: Likewise.
127 * cpu-metag.c: Likewise.
128 * cpu-microblaze.c: Likewise.
129 * cpu-mips.c: Likewise.
130 * cpu-mmix.c: Likewise.
131 * cpu-moxie.c: Likewise.
132 * cpu-msp430.c: Likewise.
133 * cpu-mt.c: Likewise.
134 * cpu-nds32.c: Likewise.
135 * cpu-nfp.c: Likewise.
136 * cpu-nios2.c: Likewise.
137 * cpu-ns32k.c: Likewise.
138 * cpu-or1k.c: Likewise.
139 * cpu-pdp11.c: Likewise.
140 * cpu-pj.c: Likewise.
141 * cpu-plugin.c: Likewise.
142 * cpu-powerpc.c: Likewise.
143 * cpu-pru.c: Likewise.
144 * cpu-riscv.c: Likewise.
145 * cpu-rl78.c: Likewise.
146 * cpu-rs6000.c: Likewise.
147 * cpu-rx.c: Likewise.
148 * cpu-s12z.c: Likewise.
149 * cpu-s390.c: Likewise.
150 * cpu-score.c: Likewise.
151 * cpu-sh.c: Likewise.
152 * cpu-sparc.c: Likewise.
153 * cpu-spu.c: Likewise.
154 * cpu-tic30.c: Likewise.
155 * cpu-tic4x.c: Likewise.
156 * cpu-tic54x.c: Likewise.
157 * cpu-tic6x.c: Likewise.
158 * cpu-tic80.c: Likewise.
159 * cpu-tilegx.c: Likewise.
160 * cpu-tilepro.c: Likewise.
161 * cpu-v850.c: Likewise.
162 * cpu-v850_rh850.c: Likewise.
163 * cpu-vax.c: Likewise.
164 * cpu-visium.c: Likewise.
165 * cpu-wasm32.c: Likewise.
166 * cpu-xc16x.c: Likewise.
167 * cpu-xgate.c: Likewise.
168 * cpu-xstormy16.c: Likewise.
169 * cpu-xtensa.c: Likewise.
170 * cpu-z80.c: Likewise.
171 * cpu-z8k.c: Likewise.
173 2019-09-09 Phil Blundell <pb@pbcl.net>
175 binutils 2.33 branch created.
177 2019-09-06 Alan Modra <amodra@gmail.com>
179 * aout-target.h (object_p): Formatting.
180 * bfd-in.h (bfd_get_filename): Don't cast to char*.
181 * corefile.c (generic_core_file_matches_executable_p): Constify
182 variables and remove cast.
183 * bfd-in2.h: Regenerate.
185 2019-09-05 Alan Modra <amodra@gmail.com>
187 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
188 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
189 in the GOT/PLT entry rather than affecting the offset to that
191 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
193 2019-09-05 Alan Modra <amodra@gmail.com>
195 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
196 in second instruction.
197 (ppc64_elf_relocate_section): Likewise.
199 2019-09-05 Alan Modra <amodra@gmail.com>
202 * libbfd-in.h (bfd_strdup): New inline function.
203 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
205 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
206 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
208 (bfd_openstreamr): Use bfd_strdup.
209 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
210 * plugin.c (try_load_plugin): Use bfd_malloc.
211 * libbfd.h: Regenerate.
213 2019-09-02 Alan Modra <amodra@gmail.com>
216 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
218 (read_alt_indirect_string): Likewise.
219 (read_alt_indirect_ref): Likewise.
221 2019-08-31 Jim Wilson <jimw@sifive.com>
224 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
225 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
227 2019-08-30 Jim Wilson <jimw@sifive.com>
229 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
230 error, call bfd_set_error, set ret to FALSE, and goto out label.
232 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
235 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
236 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
238 2019-08-29 Alan Modra <amodra@gmail.com>
241 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
242 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
243 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
246 2019-08-29 Alan Modra <amodra@gmail.com>
248 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
249 on second insn, return it in poff.
250 (ppc64_elf_relocate_section): Add offset to paddi addend for
253 2019-08-28 Jim Wilson <jimw@sifive.com>
255 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
256 section when setting max_alignment. Update comment.
257 (_bfd_riscv_relax_pc): Likewise.
259 2019-08-29 Alan Modra <amodra@gmail.com>
262 * bfd.c (struct bfd): Add no_element_cache.
263 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
264 archive cache when no_element_cache.
265 (bfd_generic_archive_p): Set no_element_cache when opening first
266 element to check format. Close first element too.
267 (do_slurp_bsd_armap): Don't zero ardata->cache here.
268 * bfd-in2.h: Regenerate.
270 2019-08-24 Alan Modra <amodra@gmail.com>
272 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
273 symbols from GOT optimisation.
275 2019-08-23 Stafford Horne <shorne@gmail.com>
277 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
280 2019-08-23 Nick Clifton <nickc@redhat.com>
283 * elf.c (bfd_section_from_shdr): Issue an informative warning
284 message and continue processing other sections after encountering
285 a reloc section for a section which already has other relocs
288 2019-08-23 Alan Modra <amodra@gmail.com>
291 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
292 on error without freeing plts[] contents.
294 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
296 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
298 2019-08-22 Nick Clifton <nickc@redhat.com>
301 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
302 reading data from extra records.
304 2019-08-22 Tamar Christina <tamar.christina@arm.com>
307 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
308 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
309 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
310 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
313 2019-08-22 Alan Modra <amodra@gmail.com>
315 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
316 instead recognize CMSE_PREFIX in symbol name.
317 (elf32_arm_gc_mark_extra_sections): Likewise.
318 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
319 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
321 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
323 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
324 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
326 2019-08-20 Tamar Christina <tamar.christina@arm.com>
328 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
329 elf32_arm_stub_long_branch_v4t_thumb_thumb,
330 elf32_arm_stub_long_branch_v4t_thumb_arm,
331 elf32_arm_stub_short_branch_v4t_thumb_arm,
332 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
333 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
334 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
335 previous instruction.
337 2019-08-19 Tom Tromey <tromey@adacore.com>
339 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
342 2019-08-19 Alan Modra <amodra@gmail.com>
344 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
346 (struct _ppc64_elf_section_data): Likewise.
347 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
348 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
349 than TOC loop. Check PLT16 insns too.
351 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
354 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
355 PC-relative relocations back to ...
356 (elf_x86_64_relocate_section): Here.
358 2019-08-16 Martin Liska <mliska@suse.cz>
361 * elflink.c: Report error only for not relocatable.
362 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
363 here lto_slim_object as it's handled in caller.
365 2019-08-16 Alan Modra <amodra@gmail.com>
367 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
369 2019-08-15 Jim Wilson <jimw@sifive.com>
371 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
372 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
373 to c.li instruction, and use ENCODE_RVC_IMM to set value.
375 2019-08-15 Tom Tromey <tromey@adacore.com>
377 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
380 2019-08-14 Alan Modra <amodra@gmail.com>
383 * dwarf2.c (stash_comp_unit): New function, extracted from..
384 (_bfd_dwarf2_find_nearest_line): ..here.
385 (find_abstract_instance): Parse comp units and decode line info
388 2019-08-14 Alan Modra <amodra@gmail.com>
390 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
391 (comp_unit_find_nearest_line): Use it here..
392 (_bfd_dwarf2_find_symbol_bias): ..and here.
394 2019-08-14 Alan Modra <amodra@gmail.com>
396 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
397 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
398 * coffgen.c (coff_find_nearest_line_with_names): Adjust
399 _bfd_dwarf2_find_nearest_line calls.
400 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
401 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
402 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
403 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
404 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
405 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
406 * libbfd.h: Regenerate.
408 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
410 * elf-bfd.h (struct elf_backend_data): New members.
411 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
412 .gnu.hash section if necessary.
413 (struct collect_gnu_hash_codes): New member.
414 (elf_gnu_hash_process_symidx): New function name.
415 (elf_renumber_gnu_hash_syms): Ignore local and undefined
416 symbols. Record xlat location for every symbol which should have
418 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
419 dynamic section if necessary.
420 (GNU_HASH_SECTION_NAME): New define.
421 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
422 Update the section size info.
423 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
424 (struct mips_elf_link_hash_entry): New member.
425 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
427 (mips_elf_sort_hash_table): Initialize the pointer to the
429 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
430 translation table entry with the symbol dynindx.
431 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
432 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
434 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
436 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
438 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
439 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
441 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
442 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
443 (_bfd_mips_post_process_headers): Mark the ABI version as
444 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
445 but not a .hash section.
446 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
447 position in the translation table, associated with the hash
449 * elfxx-mips.h (literal_reloc_p): Define
450 elf_backend_record_xhash_symbol backend hook.
451 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
454 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
456 * elf64-bpf.c (bpf_elf_relocate_section): New function.
457 (bpf_elf_insn_disp_reloc): Delete function.
458 (elf_backend_relocate_section): Define.
460 2019-08-07 Alan Modra <amodra@gmail.com>
463 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
464 for overflow in expressions involving nsymz.
466 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
468 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
469 two pages in relro presence.
471 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
473 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
474 (get_wsr_lbeg_opcode): New functions.
475 (check_loop_aligned): Detect relaxed loops and adjust loop_len
476 and insn_len for the first actual instruction of the loop.
478 2019-07-30 Alan Modra <amodra@gmail.com>
481 * bfd.c (struct bfd): Add lto_slim_object flag.
482 * bfd-in2.h: Regenerate.
484 2019-07-29 Martin Liska <mliska@suse.cz>
487 * archive.c (_bfd_compute_and_write_armap): Come up with
488 report_plugin_err variable.
489 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
490 * elf.c (struct lto_section): New.
491 (_bfd_elf_make_section_from_shdr): Parse content of
492 .gnu_lto_.lto section.
493 * elflink.c: Report error for a missing LTO plugin.
494 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
496 2019-07-28 Alan Modra <amodra@gmail.com>
500 * elflink.c (elf_link_add_object_symbols): Report an informative
501 error on finding local symbols with index equal or greater than
502 symbol table sh_info. Correct comment. Allow such symbols in
503 dynamic objects. Abort on NULL section for symbol.
505 2019-07-26 Alan Modra <amodra@gmail.com>
507 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
508 (elf_linker): Don't define.
509 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
511 2019-07-25 YunQiang Su <syq@debian.org>
514 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
517 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
519 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
521 (reloc_type_to_name): Fix formating.
522 (arc_elf_object_p): Likewise.
523 (debug_arc_reloc): Likewise.
524 (arc_do_relocation): Likewise.
526 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
528 * elf32-arc.c (bfd_get_32_me): New function.
529 (bfd_put_32_me): Likewise.
530 (arc_elf_relax_section): Likewise.
531 (bfd_elf32_bfd_relax_section): Define.
533 2019-07-24 Alan Modra <amodra@gmail.com>
535 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
536 elf_backend_final_write_processing, don't pass linker arg.
537 (_bfd_elf_final_write_processing): Update prototype.
538 * elf.c (_bfd_elf_write_object_contents): Adjust call.
539 (_bfd_elf_final_write_processing): Return error on incompatible
540 OSABI and has_gnu_osabi. Remove linker arg.
541 * elf-nacl.h (nacl_final_write_processing): Update prototype.
542 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
543 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
544 (_bfd_mips_elf_final_write_processing): Likewise.
545 * elf-hppa.h (elf_hppa_final_write_processing): Return status
546 and remove linker arg.
547 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
548 * elf-nacl.c (nacl_final_write_processing): Likewise.
549 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
550 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
551 * elf32-arm.c (arm_final_write_processing): Likewise.
552 (elf32_arm_final_write_processing): Likewise.
553 (elf32_arm_nacl_final_write_processing): Likewise.
554 (elf32_arm_vxworks_final_write_processing): Likewise.
555 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
556 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
557 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
558 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
559 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
560 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
561 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
562 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
563 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
564 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
565 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
566 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
567 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
568 * elf32-ppc.c (ppc_final_write_processing): Likewise.
569 (ppc_elf_final_write_processing): Likewise.
570 (ppc_elf_vxworks_final_write_processing): Likewise.
571 * elf32-sparc.c (sparc_final_write_processing): Likewise.
572 (elf32_sparc_final_write_processing): Likewise.
573 (elf32_sparc_vxworks_final_write_processing): Likewise.
574 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
575 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
576 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
577 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
578 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
579 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
580 (_bfd_mips_elf_final_write_processing): Likewise.
582 2019-07-24 Alan Modra <amodra@gmail.com>
584 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
586 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
587 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
589 2019-07-24 Alan Modra <amodra@gmail.com>
591 * elf32-visium.c (visium_elf_post_process_headers): Don't set
592 EI_OSABI header byte here.
595 2019-07-23 Alan Modra <amodra@gmail.com>
597 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
598 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
599 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
600 when elf_gnu_osabi_mbind is set.
601 (_bfd_elf_map_sections_to_segments): Likewise.
602 (_bfd_elf_init_private_section_data): Likewise.
603 (_bfd_elf_final_write_processing): Update comment.
604 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
605 (elf_backend_special_sections): Define without .tbss for linux.
607 2019-07-23 Alan Modra <amodra@gmail.com>
609 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
610 Remove none, any, all enums.
611 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
612 (_bfd_elf_final_write_processing): Declare.
613 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
614 elf_backend_final_write_processing.
615 (_bfd_elf_post_process_headers): Move body of function to..
616 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
617 only when not already set. Adjust for rename.
618 * elfxx-target.h (elf_backend_final_write_processing): Default to
619 _bfd_elf_final_write_processing.
620 * elf-hppa.h (elf_hppa_final_write_processing): Call
621 _bfd_elf_final_write_processing.
622 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
623 * elf-nacl.c (nacl_final_write_processing): Likewise.
624 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
625 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
626 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
627 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
628 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
629 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
630 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
631 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
632 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
633 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
634 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
635 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
636 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
637 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
638 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
639 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
640 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
641 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
642 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
643 * elf32-arm.c (arm_final_write_processing): Split out from..
644 (elf32_arm_final_write_processing): ..here. Call
645 _bfd_elf_final_write_processing.
646 (elf32_arm_nacl_final_write_processing): Adjust.
647 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
648 (_bfd_mips_elf_final_write_processing): ..here. Call
649 _bfd_elf_final_write_processing.
650 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
651 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
652 * elf32-ppc.c (ppc_final_write_processing): Split out from..
653 (ppc_elf_final_write_processing): ..here. Call
654 _bfd_elf_final_write_processing.
655 (ppc_elf_vxworks_final_write_processing): Adjust.
656 * elf32-sparc.c (sparc_final_write_processing): Split out from..
657 (elf32_sparc_final_write_processing): ..here. Call
658 _bfd_elf_final_write_processing.
659 (elf32_sparc_vxworks_final_write_processing): Adjust.
660 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
661 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
662 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
663 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
664 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
665 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
666 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
667 * elflink.c (elf_link_add_object_symbols): Likewise.
668 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
671 2019-07-23 Omar Majid <omajid@redhat.com>
673 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
674 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
675 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
677 * peXXigen.c: Add comment about source of .NET magic numbers.
679 2019-07-19 Alan Modra <amodra@gmail.com>
681 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
682 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
683 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
684 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
685 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
686 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
687 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
688 (ppc64_elf_check_relocs): Support pcrel tls relocs.
689 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
690 * bfd-in2.h: Regenerate.
691 * libbfd.h: Regenerate.
693 2019-07-18 Alan Modra <amodra@gmail.com>
695 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
696 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
699 2019-07-18 Alan Modra <amodra@gmail.com>
701 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
702 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
704 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
705 tls_type vars unsigned int.
706 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
707 to select r_type edit.
709 2019-07-18 Alan Modra <amodra@gmail.com>
711 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
713 * elf64-ppc.c (TLS_GDIE): Likewise.
715 2019-07-18 Alan Modra <amodra@gmail.com>
717 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
718 range of tp-relative offsets.
720 2019-07-15 Alan Modra <amodra@gmail.com>
722 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
723 alias is no longer bfd_link_hash_defined, clear the alias.
725 2019-07-13 Alan Modra <amodra@gmail.com>
727 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
729 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
730 (_bfd_elf_init_2_index_sections): Likewise.
731 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
732 relocations for local TLS symbols, use STN_UNDEF as the relocation
734 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
735 leave TLS symbol value in the addend.
737 2019-07-08 Alan Modra <amodra@gmail.com>
740 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
741 size before reading first word.
743 2019-07-02 Nick Clifton <nickc@redhat.com>
746 * elf.c (is_debuginfo_file): New function.
747 (assign_file_positions_for_non_load_sections): Do not warn about
748 allocated sections outside of loadable segments if they are found
750 * elf-bfd.h (is_debuginfo_file): Prototype.
752 2019-07-02 Nick Clifton <nickc@redhat.com>
755 * compress.c (bfd_get_full_section_contents): Do not complain
756 about linker created sections that are larger than the file size.
758 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
760 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
761 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
763 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
765 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
767 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
768 sections when .text section contain secure entry functions
771 2019-07-01 Nick Clifton <nickc@redhat.com>
774 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
775 section VMA in the offset used to update exidx relocs.
777 2019-06-28 Nick Clifton <nickc@redhat.com>
780 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
781 large version reference section.
782 * compress.c (bfd_get_full_section_contents): Check for an
783 uncompressed section whose size is larger than the file size.
785 2019-06-28 Alan Modra <amodra@gmail.com>
787 * format.c (bfd_check_format_matches): Don't match plugin target
788 if another target matches. Expand comment.
789 * targets.c (_bfd_target_vector): Move plugin_vec after all other
790 non-corefile targets, outside !SELECT_VECS.
791 * config.bfd: Don't handle targ=plugin here.
792 * configure.ac: Don't add plugin to enable_targets or handle in
793 target loop setting selvecs and other target vars.
794 * configure: Regenerate.
796 2019-06-26 Nick Clifton <nickc@redhat.com>
799 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
800 messages for failures.
801 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
802 if returning an error value.
804 2019-06-25 Jan Beulich <jbeulich@suse.com>
806 * elf-properties.c (elf_find_and_remove_property): Rename last
807 parameter. Mention it in comment.
809 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
811 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
812 SEC_MERGE or SEC_CODE flags are set.
813 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
814 symtype consistently. Don't include sec_addr (sym_sec) in symval.
815 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
816 Add sec_addr (sym_sec) after handling merge sections.
818 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
821 * elf-properties.c (elf_merge_gnu_property_list): Remove the
822 property after reporting property removal.
824 2019-06-23 Alan Modra <amodra@gmail.com>
827 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
828 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
829 Reduce range of offsets allowed for other GOT relocs.
831 2019-06-23 Alan Modra <amodra@gmail.com>
834 * elfcode.h (elf_object_p): Warning fix.
836 2019-06-21 Alan Modra <amodra@gmail.com>
839 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
841 2019-06-19 Alan Modra <amodra@gmail.com>
844 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
845 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
847 2019-06-19 Alan Modra <amodra@gmail.com>
849 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
850 functions that require r2 valid to use local entry.
851 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
853 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
855 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
856 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
857 with elfNN_aarch64_allocate_local_dynrelocs.
859 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
861 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
863 2019-06-14 Alan Modra <amodra@gmail.com>
865 * Makefile.in: Regenerate.
866 * configure: Regenerate.
868 2019-06-14 Alan Modra <amodra@gmail.com>
870 * elf64-ppc.c: Fix comments involving paddi.
872 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
875 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
876 absent, or the bfd is not in the ELF formart.
877 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
879 2019-06-10 Christos Zoulas <christos@zoulas.com>
882 * elf.c (elfcore_make_auxv_note_section): New function.
883 (elfcore_grok_note): Use it.
884 (elfcore_grok_freebsd_note): Likewise.
885 (elfcore_grok_openbsd_note): Likewise.
886 (elfcore_grok_netbsd_note): Likewise. Plus add support for
887 NT_NETBSDCORE_AUXV notes.
889 2019-06-06 Sudakshina Das <sudi.das@arm.com>
891 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
892 alignment of the new gnu property section.
894 2019-06-06 Sudakshina Das <sudi.das@arm.com>
896 * bfd-in.h: Change comment.
897 * bfd-in2.h: Regenerate.
898 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
899 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
902 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
904 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
905 Remove overflow check.
907 2019-05-28 Alan Modra <amodra@gmail.com>
910 * cofflink.c (coff_link_check_archive_element): Don't assume
911 element is a coff object file after calling add_archive_element.
913 2019-05-28 Alan Modra <amodra@gmail.com>
916 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
917 attempt to set sh_entsize for excluded PLT section.
919 2019-05-28 Alan Modra <amodra@gmail.com>
922 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
923 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
924 allocated in alpha_dynamic_entries_for_reloc.
926 2019-05-28 Alan Modra <amodra@gmail.com>
929 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
930 on NULL output_section.
931 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
933 2019-05-28 Alan Modra <amodra@gmail.com>
936 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
937 entry when MUST_FIND. Abort when MUST_FIND not found.
938 (elf_m68k_get_bfd2got_entry): Likewise.
939 (elf_m68k_relocate_section): Remove now useless assert.
941 2019-05-28 Alan Modra <amodra@gmail.com>
944 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
945 from bfd_link_info, not an output section owner.
946 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
947 (elf_hppa_final_link_relocate): Likewise.
949 2019-05-28 Alan Modra <amodra@gmail.com>
952 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
953 create_object_symbols_section, obj_textsec, obj_datasec or
954 obj_bsssec. Fix other errors in placement.
955 * config.bfd: Obsolete tic30-aout.
957 2019-05-28 Alan Modra <amodra@gmail.com>
960 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
961 end of section list as well as section_count.
962 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
963 section list before returning error.
965 2019-05-27 Alan Modra <amodra@gmail.com>
967 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
969 2019-05-27 Alan Modra <amodra@gmail.com>
972 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
974 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
976 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
977 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
978 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
979 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
980 (elf_backend_merge_symbol_attribute): Define.
982 2019-05-24 Alan Modra <amodra@gmail.com>
984 * po/SRC-POTFILES.in: Regenerate.
986 2019-05-24 Alan Modra <amodra@gmail.com>
988 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
989 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
990 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
991 (struct ppc_link_hash_table): Add powerxx_stubs.
992 (ppc64_elf_check_relocs): Set powerxx_stubs.
993 (build_powerxx_offset, size_powerxx_offset),
994 (num_relocs_for_powerxx_offset),
995 (emit_relocs_for_powerxx_offset): New functions.
996 (plt_stub_size): Size powerxx stubs.
997 (ppc_build_one_stub): Emit powerxx stubs.
998 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
1001 2019-05-24 Alan Modra <amodra@gmail.com>
1003 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
1004 R_PPC64_GOT_PCREL34.
1005 (xlate_pcrel_opt): New function.
1006 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
1007 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1008 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
1010 2019-05-24 Alan Modra <amodra@gmail.com>
1012 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
1013 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
1014 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
1015 (BFD_RELOC_PPC64_PLT_PCREL34),
1016 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
1017 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
1018 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
1019 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
1020 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
1021 * elf64-ppc.c (PNOP): Define.
1022 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
1023 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
1024 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
1026 (ppc64_elf_prefix_reloc): New function.
1027 (struct ppc_link_hash_table): Add notoc_plt.
1028 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
1029 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
1030 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
1031 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
1032 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
1033 possible need for dynamic relocs on non-pcrel powerxx relocs.
1034 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
1035 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
1036 (toc_adjusting_stub_needed): Likewise.
1037 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
1038 (ppc64_elf_relocate_section): Handle new powerxx relocs.
1039 * bfd-in2.h: Regenerate.
1040 * libbfd.h: Regenerate.
1042 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1044 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
1045 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
1047 * configure: Regenerate.
1049 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1051 * configure: Regenerated.
1052 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
1053 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
1054 (BFD64_BACKENDS): Add elf64-bpf.lo.
1055 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
1056 * Makefile.in (SOURCE_HFILES): Regenerate.
1057 * config.bfd (targ_cpu): Handle bpf-*-* targets.
1058 * cpu-bpf.c: New file.
1059 * elf64-bpf.c: Likewise.
1060 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
1062 * archures.c: Define architecture bfd_arch_bpf and machine
1064 * reloc.c: Define BFD relocations used by the BPF target.
1065 * bfd-in2.h: Regenerated.
1066 * libbfd.h: Likewise.
1068 2019-05-22 Alan Modra <amodra@gmail.com>
1070 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
1073 2019-05-22 Alan Modra <amodra@gmail.com>
1075 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
1076 processing on "size error in section".
1078 2019-05-22 Alan Modra <amodra@gmail.com>
1080 * som.c (som_bfd_free_cached_info): Call
1081 _bfd_generic_close_and_cleanup.
1083 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1085 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
1086 for TLS_TPREL_HI16(/LO16) relocations in shared library.
1088 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1090 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
1091 checks. Search the RELA table for n64 relocations.
1093 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
1094 Faraz Shahbazker <fshahbazker@wavecomp.com>
1096 * elfxx-mips.c (LA25_BC): New macro.
1097 (mips_elf_link_hash_table)<compact_branches>: New field.
1098 (STUB_JALRC): New macro.
1099 (mipsr6_o32_exec_plt0_entry_compact): New array.
1100 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
1101 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
1102 (mipsr6_exec_plt_entry_compact): Likewise.
1103 (mips_elf_create_la25_stub): Use BC instead of J for stubs
1104 when compact_branches is true.
1105 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
1106 PLT for MIPSR6 with compact_branches. Do not reorder the
1107 compact branches PLT. Switch the lazy stub for MIPSR6
1108 with compact_branches to use JALRC.
1109 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
1110 when compact_branches is true.
1111 (_bfd_mips_elf_compact_branches): New function.
1112 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
1114 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1117 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
1118 Fix print formatter.
1120 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1123 * elf32-arm.c (get_value_helper): Remove.
1124 (elf32_arm_final_link_relocate): Fix branch future relocations.
1126 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1129 * bfd-in.h (enum erratum_84319_opts): New
1130 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1131 int to enum erratum_84319_opts.
1132 * bfd-in2.h: Regenerate.
1133 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
1134 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
1135 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
1136 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
1137 (_bfd_aarch64_resize_stubs): Amend comment.
1138 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
1140 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
1141 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
1143 (clear_erratum_843419_entry): Update erratum conditional.
1145 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1148 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
1149 when computing distance_short_enough.
1151 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1154 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1155 Wrap around even if distance equals avr_pc_wrap_around.
1157 2019-05-20 Nick Clifton <nickc@redhat.com>
1159 * po/fr.po: Updated French translation.
1161 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1163 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1165 2019-05-16 Alan Modra <amodra@gmail.com>
1167 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1169 2019-05-15 Alan Modra <amodra@gmail.com>
1171 * elf32-arm.c (elf32_arm_write_section): Don't leave
1172 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1173 unitialised section contents.
1175 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1178 * verilog.c: (VerilogDataWidth): New variable.
1179 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1181 2019-05-08 Nick Clifton <nickc@redhat.com>
1184 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1185 rather than FALSE if encountering a non-ELF file.
1187 2019-05-06 Alan Modra <amodra@gmail.com>
1189 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1191 2019-05-06 Alan Modra <amodra@gmail.com>
1193 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1194 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1195 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1196 * libbfd.h: Regenerate.
1197 * bfd-in2.h: Regenerate.
1199 2019-05-04 Alan Modra <amodra@gmail.com>
1202 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1203 following the standard section names.
1204 (bfd_decode_symclass): Prioritize section flag tests in
1205 decode_section_type before name tests in coff_section_type.
1206 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1207 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1208 their names and choose standard .text section flags for
1211 2019-05-02 Nick Clifton <nickc@redhat.com>
1214 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1215 .gnu.debugaltlink sections as debugging sections.
1217 2019-04-30 Alan Modra <amodra@gmail.com>
1219 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1220 (struct _ppc64_elf_section_data): Likewise.
1221 (ppc64_elf_check_relocs): Set above fields.
1222 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1223 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1226 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1229 * elflink.c (elf_link_output_extsym): Don't complain undefined
1230 weak dynamic reference.
1232 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1234 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1235 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1236 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1237 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1238 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1239 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1240 (elfNN_aarch64_small_plt0_bti_entry): Update.
1241 (elfNN_aarch64_small_plt_bti_entry): Update.
1242 (elfNN_aarch64_small_plt_pac_entry): Update.
1243 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1244 (setup_plt_values): Setup new entries.
1245 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1246 (elfNN_aarch64_plt_sym_val): Likewise.
1248 2019-04-22 Jim Wilson <jimw@sifive.com>
1250 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1252 2019-04-19 Alan Modra <amodra@gmail.com>
1254 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1256 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1258 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1259 building shared object.
1260 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1262 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1265 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1268 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1270 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1272 * bfd-in2.h: Regenerate.
1273 * libbfd.h: Likewise.
1275 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1277 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1278 * bfd-in2.h: Regenerated.
1279 * libbfd.h: Regenerated.
1281 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1283 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1284 * bfd-in2.h: Regenerated.
1285 * libbfd.h: Likewise.
1287 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1289 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1290 * bfd-in2.h: Regenerated.
1291 * libbfd.h: Regenerated.
1292 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1293 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1294 and R_ARM_THM_BF12 together.
1295 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1297 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1299 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1300 * libbfd.h: Regenerated.
1301 * bfd-in2.h: Regenerated.
1302 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1303 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1304 and R_ARM_THM_BF18 together.
1305 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1307 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1309 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1310 * bfd-in2.h: Regenerated.
1311 * libbfd.h: Regenerated.
1312 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1313 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1314 and R_ARM_THM_BF16 together.
1315 (get_value_helper): New reloc helper.
1316 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1318 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1320 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1321 * bfd-in2.h: Regenerate.
1322 * libbfd.h: Regenerate.
1324 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1326 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1327 * bfd-in2.h: Regenerate.
1328 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1329 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1331 (using_thumb2): Likewise.
1332 (using_thumb2_bl): Update assert.
1333 (arch_has_arm_nop): Likewise.
1334 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1335 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1337 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1339 * elf-linker-x86.h (elf_x86_cet_report): New.
1340 (elf_linker_x86_params): Add cet_report.
1341 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1342 missing IBT and SHSTK properties if needed.
1344 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1347 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1348 "h != NULL". Don't check "h != NULL" before calling.
1349 bfd_elf_gc_record_vtentry.
1350 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1351 * elf32-bfin.c (bfin_check_relocs): Likewise.
1352 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1353 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1354 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1355 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1356 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1357 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1358 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1359 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1360 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1361 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1362 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1363 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1364 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1365 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1366 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1367 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1368 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1369 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1370 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1371 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1372 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1373 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1374 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1375 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1376 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1377 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1378 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1379 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1380 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1383 2019-04-11 Alan Modra <amodra@gmail.com>
1386 * elflink.c (elf_link_add_object_symbols): Don't read partial
1387 dynamic entries from fuzzed objects.
1389 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1392 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1393 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1394 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1396 2019-04-10 Michael Forney <mforney@mforney.org>
1399 * doc/chew.c (free_words): Correctly free "push_text" strings.
1401 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1403 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1405 2019-04-08 Alan Modra <amodra@gmail.com>
1407 * configure.ac (elfxx_x86): Define and use.
1408 * configure: Regenerate.
1410 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1412 * elf-linker-x86.h: New file.
1413 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1414 to get x86-specific linker options.
1415 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1416 (elf_x86_64_check_relocs): Likewise.
1417 (elf_x86_64_relocate_section): Likewise.
1418 (elf_x86_64_link_setup_gnu_properties): Likewise.
1419 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1420 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1421 (_bfd_elf_linker_x86_set_options): New function.
1422 * elfxx-x86.h: Include "elf-linker-x86.h".
1423 (elf_x86_link_hash_table): Add params.
1425 2019-04-03 Alan Modra <amodra@gmail.com>
1427 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1428 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1429 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1430 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1431 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1432 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1434 2019-04-02 Jim Wilson <jimw@sifive.com>
1437 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1438 ELF header flags to after check for ELF object file. Loop through
1439 sections looking for code sections, if none, then skip ABI checks.
1441 2019-03-30 Andrew Waterman <andrew@sifive.com>
1443 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1446 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1448 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1449 info->export_dynamic to the conditional.
1451 2019-03-28 Alan Modra <amodra@gmail.com>
1454 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1455 * configure: Regenerate.
1456 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1457 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1458 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1459 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1460 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1462 2019-03-21 Jim Wilson <jimw@sifive.com>
1465 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1466 verify sym non-NULL before using. Add identical check using h.
1468 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1470 * elf-bfd.h (struct elf_backend_data): Add argument to
1471 merge_gnu_properties.
1472 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1473 itself and while calling bed->merge_gnu_properties.
1474 (elf_merge_gnu_property_list): Update the calls for
1475 elf_merge_gnu_properties.
1476 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1477 of --force-bti warning and add argument.
1478 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1480 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1481 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1484 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1486 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1487 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1488 (elf_backend_fixup_gnu_properties): Define for AArch64.
1490 2019-03-18 Alan Modra <amodra@gmail.com>
1493 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1494 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1495 attempt at writing glink stubs only once.
1497 2019-03-16 Alan Modra <amodra@gmail.com>
1500 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1501 (_bfd_elf_rel_local_sym): Likewise.
1502 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1503 section of symbols with unrecognized shndx.
1505 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1508 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1510 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1511 in discarded section.
1513 2019-03-15 Alan Modra <amodra@gmail.com>
1516 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1517 symbol after globals if elf_bad_symtab is not set.
1519 2019-03-15 Alan Modra <amodra@gmail.com>
1522 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1523 (_bfd_elf_rel_local_sym): Likewise.
1525 2019-03-15 Alan Modra <amodra@gmail.com>
1528 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1529 object files with sh_size not a multiple of sh_entsize.
1531 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1534 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1535 input with bad relocation.
1537 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1539 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1541 2019-03-14 Nick Clifton <nickc@redhat.com>
1544 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1545 (save_section_vma): Initialise field to the number of entries in
1547 (section_vma_same): Check that the number of entries in the
1548 sec_vma table matches the number of sections in the bfd.
1550 2019-03-14 Nick Clifton <nickc@redhat.com>
1553 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1554 section owner pointer when adding the default symbol.
1556 2019-03-14 Nick Clifton <nickc@redhat.com>
1559 * elflink.c (elf_link_add_object_symbols): Add new local variable
1560 extversym_end. Initialise it to point to the end of the version
1561 symbol table, if present. Check it when initialising and updating
1564 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1566 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1567 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1568 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1569 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1571 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1572 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1573 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1575 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1576 Szabolcs Nagy <szabolcs.nagy@arm.com>
1578 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1579 (aarch64_bti_pac_info): New.
1580 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1581 (bfd_elf32_aarch64_set_options): Likewise.
1582 * bfd-in2.h: Regenerate
1583 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1584 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1585 (elfNN_aarch64_small_plt0_bti_entry): New.
1586 (elfNN_aarch64_small_plt_bti_entry): New.
1587 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1588 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1589 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1590 tlsdesc_plt_entry_size fields.
1591 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1592 (setup_plt_values): New helper function.
1593 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1595 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1597 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1598 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1599 to plt stubs instead of fixed ones and update filling them according
1600 to the need for bti.
1601 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1602 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1603 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1604 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1605 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1607 (bfd_elfNN_get_synthetic_symtab): Define.
1608 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1609 and mising BTI NOTE SECTION.
1612 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1614 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1615 linker created inputs from merge.
1616 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1617 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1618 (elfNN_aarch64_link_setup_gnu_properties): New.
1619 (elfNN_aarch64_merge_gnu_properties): New.
1620 (elf_backend_setup_gnu_properties): Define for AArch64.
1621 (elf_backend_merge_gnu_properties): Likewise.
1622 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1623 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1624 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1625 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1626 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1627 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1628 (elf_backend_parse_gnu_properties): Define for AArch64.
1630 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1633 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1634 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1636 2019-03-12 Alan Modra <amodra@gmail.com>
1638 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1639 nmemb parameter. Use bfd_alloc2.
1640 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1642 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1643 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1644 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1646 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1647 (assign_section_numbers): Style fix.
1648 (swap_out_syms): Use bfd_malloc2.
1649 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1651 (_bfd_elf_make_empty_symbol): Style fix.
1652 (elfobj_grok_stapsdt_note_1): Formatting.
1653 * elfcode.h (elf_object_p): Use bfd_alloc2.
1654 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1655 (elf_slurp_symbol_table): Use bfd_zalloc2.
1656 (elf_slurp_reloc_table): Use bfd_alloc2.
1657 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1658 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1659 size calculation doesn't overflow.
1660 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1661 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1662 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1664 2019-03-08 Alan Modra <amodra@gmail.com>
1667 * merge.c (merge_strings): Return secinfo. Don't pad section
1669 (_bfd_merge_sections): Pad section to alignment here, if input
1670 sections contributing to merged output all pad to alignment.
1673 2019-03-06 Nick Clifton <nickc@redhat.com>
1675 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1677 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1678 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1680 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1682 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1683 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1686 * elf32-s390.c (allocate_dynrelocs): Update comment.
1688 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1690 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1692 2019-02-28 Nick Clifton <nickc@redhat.com>
1695 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1696 section that is not NUL terminated.
1698 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1701 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1702 by linker when checking copy reloc on protected symbol.
1704 2019-02-24 Alan Modra <amodra@gmail.com>
1707 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1709 2019-02-20 Eric Tsai <erictsai@cadence.com>
1711 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1712 sections between the call site and call destination and adjust
1713 call distance by the largest alignment.
1715 2019-02-20 Alan Hayward <alan.hayward@arm.com>
1717 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1718 * elf.c (elfcore_grok_aarch_pauth): New function.
1719 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1720 (elfcore_write_aarch_pauth): New function.
1721 (elfcore_write_register_note): Check for AArch64 pauth section.
1723 2019-02-20 Alan Modra <amodra@gmail.com>
1726 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1729 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1731 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1732 Darwin hosts, not just or1k.
1733 * configure: Regenerate.
1735 2019-02-20 Alan Modra <amodra@gmail.com>
1738 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1739 sentinel NUL to string buffer nearer to loop where it is used.
1740 Don't go past sentinel when scanning strings, and don't write
1742 * archive.c (do_slurp_coff_armap): Simplify string handling to
1745 2019-02-19 Alan Modra <amodra@gmail.com>
1748 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1749 attempting to prevent read past end of section.
1751 2019-02-18 Alan Modra <amodra@gmail.com>
1754 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1755 PRIx64 to generate warning messages. Print local sym names too.
1757 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
1759 * elf32-arc (INIT_SYM_STRING): Delete.
1760 (FINI_SYM_STRING): Likewise.
1761 (init_str): Likewise.
1762 (fini_str): Likewise.
1764 2019-02-08 Alan Modra <amodra@gmail.com>
1766 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1767 for bss-plt" warning to make it an error.
1769 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1772 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1773 reloc_class_ifunc for ifunc symbols.
1774 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1776 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1778 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1779 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1781 2019-02-07 Nick Clifton <nickc@redhat.com>
1783 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1784 into the definitely obsolete list.
1786 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1789 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1790 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1791 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1793 (elf_x86_64_check_relocs): Here.
1794 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1795 to check if a symbol is defined in a non-shared object.
1796 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1798 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1800 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1801 of 'labs' (and fix GCC warning).
1803 2019-01-25 Nick Clifton <nickc@redhat.com>
1805 * po/ru.po: Updated Russian translation.
1807 2019-01-23 Nick Clifton <nickc@redhat.com>
1809 * po/fr.po: Updated French translation.
1811 2019-01-21 Nick Clifton <nickc@redhat.com>
1813 * po/pt.po: Updated Portuguese translation.
1814 * po/uk.po: Updated Ukranian translation.
1816 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1819 * elf32-nds32.c (nds32_relocate_section): Add space between words
1821 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1823 (riscv_i_or_e_p): Likewise.
1824 (riscv_merge_arch_attr_info): Likewise.
1826 2019-01-19 Nick Clifton <nickc@redhat.com>
1828 * version.m4: Reset to 2.32.51
1829 * configure: Regenerate.
1830 * po/bfd.pot: Regenerate.
1832 2018-06-24 Nick Clifton <nickc@redhat.com>
1834 2.32 branch created.
1836 2019-01-16 Kito Cheng <kito@andestech.com>
1838 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1841 2019-01-16 Kito Cheng <kito@andestech.com>
1842 Nelson Chu <nelson@andestech.com>
1844 * elfnn-riscv.c (in_subsets): New.
1845 (out_subsets): Likewise.
1846 (merged_subsets): Likewise.
1847 (riscv_std_ext_p): Likewise.
1848 (riscv_non_std_ext_p): Likewise.
1849 (riscv_std_sv_ext_p): Likewise.
1850 (riscv_non_std_sv_ext_p): Likewise.
1851 (riscv_version_mismatch): Likewise.
1852 (riscv_i_or_e_p): Likewise.
1853 (riscv_merge_std_ext): Likewise.
1854 (riscv_merge_non_std_and_sv_ext): Likewise.
1855 (riscv_merge_arch_attr_info): Likewise.
1856 (riscv_merge_attributes): Likewise.
1857 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1859 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1860 (elf_backend_obj_attrs_vendor): Define.
1861 (elf_backend_obj_attrs_section_type): Likewise.
1862 (elf_backend_obj_attrs_section): Likewise.
1863 (elf_backend_obj_attrs_arg_type): Define as
1864 riscv_elf_obj_attrs_arg_type.
1865 * elfxx-riscv.c (riscv_estimate_digit): New.
1866 (riscv_estimate_arch_strlen1): Likewise.
1867 (riscv_estimate_arch_strlen): Likewise.
1868 (riscv_arch_str1): Likewise.
1869 (riscv_arch_str): Likewise.
1870 * elfxx-riscv.h (riscv_arch_str): Declare.
1872 2019-01-14 John Darrington <john@darrington.wattle.id.au>
1874 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1876 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1877 source field. (md_apply_fix): Apply final fix
1878 to BFD_RELOC_S12Z_OPR.
1879 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1881 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1884 * elf32-s390.c (allocate_dynrelocs): Update comment.
1886 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1888 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1889 * configure: Regenerate.
1891 2019-01-08 Alan Modra <amodra@gmail.com>
1895 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1898 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1900 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1901 * bfd/bfd-in2.h: Regenerate.
1902 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1903 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1905 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1907 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1908 default target, little endian target is more suitable.
1910 2019-01-04 Alan Modra <amodra@gmail.com>
1914 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1916 (EQ_VALUE_IN_FIELD): Likewise.
1917 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1919 2019-01-01 Alan Modra <amodra@gmail.com>
1921 Update year range in copyright notice of all files.
1923 For older changes see ChangeLog-2018
1925 Copyright (C) 2019 Free Software Foundation, Inc.
1927 Copying and distribution of this file, with or without modification,
1928 are permitted in any medium without royalty provided the copyright
1929 notice and this notice are preserved.
1935 version-control: never