1 2019-09-05 Alan Modra <amodra@gmail.com>
3 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
5 (ppc64_elf_relocate_section): Likewise.
7 2019-09-05 Alan Modra <amodra@gmail.com>
10 * libbfd-in.h (bfd_strdup): New inline function.
11 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
13 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
14 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
16 (bfd_openstreamr): Use bfd_strdup.
17 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
18 * plugin.c (try_load_plugin): Use bfd_malloc.
19 * libbfd.h: Regenerate.
21 2019-09-02 Alan Modra <amodra@gmail.com>
24 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
26 (read_alt_indirect_string): Likewise.
27 (read_alt_indirect_ref): Likewise.
29 2019-08-31 Jim Wilson <jimw@sifive.com>
32 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
33 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
35 2019-08-30 Jim Wilson <jimw@sifive.com>
37 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
38 error, call bfd_set_error, set ret to FALSE, and goto out label.
40 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
43 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
44 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
46 2019-08-29 Alan Modra <amodra@gmail.com>
49 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
50 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
51 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
54 2019-08-29 Alan Modra <amodra@gmail.com>
56 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
57 on second insn, return it in poff.
58 (ppc64_elf_relocate_section): Add offset to paddi addend for
61 2019-08-28 Jim Wilson <jimw@sifive.com>
63 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
64 section when setting max_alignment. Update comment.
65 (_bfd_riscv_relax_pc): Likewise.
67 2019-08-29 Alan Modra <amodra@gmail.com>
70 * bfd.c (struct bfd): Add no_element_cache.
71 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
72 archive cache when no_element_cache.
73 (bfd_generic_archive_p): Set no_element_cache when opening first
74 element to check format. Close first element too.
75 (do_slurp_bsd_armap): Don't zero ardata->cache here.
76 * bfd-in2.h: Regenerate.
78 2019-08-24 Alan Modra <amodra@gmail.com>
80 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
81 symbols from GOT optimisation.
83 2019-08-23 Stafford Horne <shorne@gmail.com>
85 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
88 2019-08-23 Nick Clifton <nickc@redhat.com>
91 * elf.c (bfd_section_from_shdr): Issue an informative warning
92 message and continue processing other sections after encountering
93 a reloc section for a section which already has other relocs
96 2019-08-23 Alan Modra <amodra@gmail.com>
99 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
100 on error without freeing plts[] contents.
102 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
104 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
106 2019-08-22 Nick Clifton <nickc@redhat.com>
109 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
110 reading data from extra records.
112 2019-08-22 Tamar Christina <tamar.christina@arm.com>
115 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
116 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
117 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
118 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
121 2019-08-22 Alan Modra <amodra@gmail.com>
123 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
124 instead recognize CMSE_PREFIX in symbol name.
125 (elf32_arm_gc_mark_extra_sections): Likewise.
126 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
127 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
129 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
131 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
132 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
134 2019-08-20 Tamar Christina <tamar.christina@arm.com>
136 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
137 elf32_arm_stub_long_branch_v4t_thumb_thumb,
138 elf32_arm_stub_long_branch_v4t_thumb_arm,
139 elf32_arm_stub_short_branch_v4t_thumb_arm,
140 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
141 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
142 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
143 previous instruction.
145 2019-08-19 Tom Tromey <tromey@adacore.com>
147 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
150 2019-08-19 Alan Modra <amodra@gmail.com>
152 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
154 (struct _ppc64_elf_section_data): Likewise.
155 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
156 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
157 than TOC loop. Check PLT16 insns too.
159 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
162 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
163 PC-relative relocations back to ...
164 (elf_x86_64_relocate_section): Here.
166 2019-08-16 Martin Liska <mliska@suse.cz>
169 * elflink.c: Report error only for not relocatable.
170 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
171 here lto_slim_object as it's handled in caller.
173 2019-08-16 Alan Modra <amodra@gmail.com>
175 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
177 2019-08-15 Jim Wilson <jimw@sifive.com>
179 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
180 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
181 to c.li instruction, and use ENCODE_RVC_IMM to set value.
183 2019-08-15 Tom Tromey <tromey@adacore.com>
185 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
188 2019-08-14 Alan Modra <amodra@gmail.com>
191 * dwarf2.c (stash_comp_unit): New function, extracted from..
192 (_bfd_dwarf2_find_nearest_line): ..here.
193 (find_abstract_instance): Parse comp units and decode line info
196 2019-08-14 Alan Modra <amodra@gmail.com>
198 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
199 (comp_unit_find_nearest_line): Use it here..
200 (_bfd_dwarf2_find_symbol_bias): ..and here.
202 2019-08-14 Alan Modra <amodra@gmail.com>
204 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
205 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
206 * coffgen.c (coff_find_nearest_line_with_names): Adjust
207 _bfd_dwarf2_find_nearest_line calls.
208 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
209 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
210 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
211 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
212 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
213 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
214 * libbfd.h: Regenerate.
216 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
218 * elf-bfd.h (struct elf_backend_data): New members.
219 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
220 .gnu.hash section if necessary.
221 (struct collect_gnu_hash_codes): New member.
222 (elf_gnu_hash_process_symidx): New function name.
223 (elf_renumber_gnu_hash_syms): Ignore local and undefined
224 symbols. Record xlat location for every symbol which should have
226 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
227 dynamic section if necessary.
228 (GNU_HASH_SECTION_NAME): New define.
229 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
230 Update the section size info.
231 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
232 (struct mips_elf_link_hash_entry): New member.
233 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
235 (mips_elf_sort_hash_table): Initialize the pointer to the
237 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
238 translation table entry with the symbol dynindx.
239 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
240 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
242 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
244 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
246 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
247 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
249 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
250 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
251 (_bfd_mips_post_process_headers): Mark the ABI version as
252 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
253 but not a .hash section.
254 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
255 position in the translation table, associated with the hash
257 * elfxx-mips.h (literal_reloc_p): Define
258 elf_backend_record_xhash_symbol backend hook.
259 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
262 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
264 * elf64-bpf.c (bpf_elf_relocate_section): New function.
265 (bpf_elf_insn_disp_reloc): Delete function.
266 (elf_backend_relocate_section): Define.
268 2019-08-07 Alan Modra <amodra@gmail.com>
271 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
272 for overflow in expressions involving nsymz.
274 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
276 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
277 two pages in relro presence.
279 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
281 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
282 (get_wsr_lbeg_opcode): New functions.
283 (check_loop_aligned): Detect relaxed loops and adjust loop_len
284 and insn_len for the first actual instruction of the loop.
286 2019-07-30 Alan Modra <amodra@gmail.com>
289 * bfd.c (struct bfd): Add lto_slim_object flag.
290 * bfd-in2.h: Regenerate.
292 2019-07-29 Martin Liska <mliska@suse.cz>
295 * archive.c (_bfd_compute_and_write_armap): Come up with
296 report_plugin_err variable.
297 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
298 * elf.c (struct lto_section): New.
299 (_bfd_elf_make_section_from_shdr): Parse content of
300 .gnu_lto_.lto section.
301 * elflink.c: Report error for a missing LTO plugin.
302 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
304 2019-07-28 Alan Modra <amodra@gmail.com>
308 * elflink.c (elf_link_add_object_symbols): Report an informative
309 error on finding local symbols with index equal or greater than
310 symbol table sh_info. Correct comment. Allow such symbols in
311 dynamic objects. Abort on NULL section for symbol.
313 2019-07-26 Alan Modra <amodra@gmail.com>
315 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
316 (elf_linker): Don't define.
317 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
319 2019-07-25 YunQiang Su <syq@debian.org>
322 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
325 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
327 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
329 (reloc_type_to_name): Fix formating.
330 (arc_elf_object_p): Likewise.
331 (debug_arc_reloc): Likewise.
332 (arc_do_relocation): Likewise.
334 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
336 * elf32-arc.c (bfd_get_32_me): New function.
337 (bfd_put_32_me): Likewise.
338 (arc_elf_relax_section): Likewise.
339 (bfd_elf32_bfd_relax_section): Define.
341 2019-07-24 Alan Modra <amodra@gmail.com>
343 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
344 elf_backend_final_write_processing, don't pass linker arg.
345 (_bfd_elf_final_write_processing): Update prototype.
346 * elf.c (_bfd_elf_write_object_contents): Adjust call.
347 (_bfd_elf_final_write_processing): Return error on incompatible
348 OSABI and has_gnu_osabi. Remove linker arg.
349 * elf-nacl.h (nacl_final_write_processing): Update prototype.
350 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
351 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
352 (_bfd_mips_elf_final_write_processing): Likewise.
353 * elf-hppa.h (elf_hppa_final_write_processing): Return status
354 and remove linker arg.
355 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
356 * elf-nacl.c (nacl_final_write_processing): Likewise.
357 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
358 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
359 * elf32-arm.c (arm_final_write_processing): Likewise.
360 (elf32_arm_final_write_processing): Likewise.
361 (elf32_arm_nacl_final_write_processing): Likewise.
362 (elf32_arm_vxworks_final_write_processing): Likewise.
363 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
364 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
365 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
366 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
367 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
368 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
369 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
370 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
371 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
372 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
373 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
374 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
375 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
376 * elf32-ppc.c (ppc_final_write_processing): Likewise.
377 (ppc_elf_final_write_processing): Likewise.
378 (ppc_elf_vxworks_final_write_processing): Likewise.
379 * elf32-sparc.c (sparc_final_write_processing): Likewise.
380 (elf32_sparc_final_write_processing): Likewise.
381 (elf32_sparc_vxworks_final_write_processing): Likewise.
382 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
383 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
384 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
385 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
386 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
387 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
388 (_bfd_mips_elf_final_write_processing): Likewise.
390 2019-07-24 Alan Modra <amodra@gmail.com>
392 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
394 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
395 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
397 2019-07-24 Alan Modra <amodra@gmail.com>
399 * elf32-visium.c (visium_elf_post_process_headers): Don't set
400 EI_OSABI header byte here.
403 2019-07-23 Alan Modra <amodra@gmail.com>
405 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
406 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
407 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
408 when elf_gnu_osabi_mbind is set.
409 (_bfd_elf_map_sections_to_segments): Likewise.
410 (_bfd_elf_init_private_section_data): Likewise.
411 (_bfd_elf_final_write_processing): Update comment.
412 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
413 (elf_backend_special_sections): Define without .tbss for linux.
415 2019-07-23 Alan Modra <amodra@gmail.com>
417 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
418 Remove none, any, all enums.
419 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
420 (_bfd_elf_final_write_processing): Declare.
421 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
422 elf_backend_final_write_processing.
423 (_bfd_elf_post_process_headers): Move body of function to..
424 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
425 only when not already set. Adjust for rename.
426 * elfxx-target.h (elf_backend_final_write_processing): Default to
427 _bfd_elf_final_write_processing.
428 * elf-hppa.h (elf_hppa_final_write_processing): Call
429 _bfd_elf_final_write_processing.
430 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
431 * elf-nacl.c (nacl_final_write_processing): Likewise.
432 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
433 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
434 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
435 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
436 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
437 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
438 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
439 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
440 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
441 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
442 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
443 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
444 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
445 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
446 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
447 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
448 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
449 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
450 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
451 * elf32-arm.c (arm_final_write_processing): Split out from..
452 (elf32_arm_final_write_processing): ..here. Call
453 _bfd_elf_final_write_processing.
454 (elf32_arm_nacl_final_write_processing): Adjust.
455 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
456 (_bfd_mips_elf_final_write_processing): ..here. Call
457 _bfd_elf_final_write_processing.
458 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
459 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
460 * elf32-ppc.c (ppc_final_write_processing): Split out from..
461 (ppc_elf_final_write_processing): ..here. Call
462 _bfd_elf_final_write_processing.
463 (ppc_elf_vxworks_final_write_processing): Adjust.
464 * elf32-sparc.c (sparc_final_write_processing): Split out from..
465 (elf32_sparc_final_write_processing): ..here. Call
466 _bfd_elf_final_write_processing.
467 (elf32_sparc_vxworks_final_write_processing): Adjust.
468 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
469 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
470 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
471 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
472 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
473 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
474 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
475 * elflink.c (elf_link_add_object_symbols): Likewise.
476 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
479 2019-07-23 Omar Majid <omajid@redhat.com>
481 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
482 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
483 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
485 * peXXigen.c: Add comment about source of .NET magic numbers.
487 2019-07-19 Alan Modra <amodra@gmail.com>
489 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
490 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
491 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
492 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
493 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
494 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
495 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
496 (ppc64_elf_check_relocs): Support pcrel tls relocs.
497 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
498 * bfd-in2.h: Regenerate.
499 * libbfd.h: Regenerate.
501 2019-07-18 Alan Modra <amodra@gmail.com>
503 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
504 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
507 2019-07-18 Alan Modra <amodra@gmail.com>
509 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
510 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
512 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
513 tls_type vars unsigned int.
514 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
515 to select r_type edit.
517 2019-07-18 Alan Modra <amodra@gmail.com>
519 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
521 * elf64-ppc.c (TLS_GDIE): Likewise.
523 2019-07-18 Alan Modra <amodra@gmail.com>
525 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
526 range of tp-relative offsets.
528 2019-07-15 Alan Modra <amodra@gmail.com>
530 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
531 alias is no longer bfd_link_hash_defined, clear the alias.
533 2019-07-13 Alan Modra <amodra@gmail.com>
535 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
537 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
538 (_bfd_elf_init_2_index_sections): Likewise.
539 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
540 relocations for local TLS symbols, use STN_UNDEF as the relocation
542 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
543 leave TLS symbol value in the addend.
545 2019-07-08 Alan Modra <amodra@gmail.com>
548 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
549 size before reading first word.
551 2019-07-02 Nick Clifton <nickc@redhat.com>
554 * elf.c (is_debuginfo_file): New function.
555 (assign_file_positions_for_non_load_sections): Do not warn about
556 allocated sections outside of loadable segments if they are found
558 * elf-bfd.h (is_debuginfo_file): Prototype.
560 2019-07-02 Nick Clifton <nickc@redhat.com>
563 * compress.c (bfd_get_full_section_contents): Do not complain
564 about linker created sections that are larger than the file size.
566 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
568 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
569 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
571 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
573 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
575 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
576 sections when .text section contain secure entry functions
579 2019-07-01 Nick Clifton <nickc@redhat.com>
582 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
583 section VMA in the offset used to update exidx relocs.
585 2019-06-28 Nick Clifton <nickc@redhat.com>
588 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
589 large version reference section.
590 * compress.c (bfd_get_full_section_contents): Check for an
591 uncompressed section whose size is larger than the file size.
593 2019-06-28 Alan Modra <amodra@gmail.com>
595 * format.c (bfd_check_format_matches): Don't match plugin target
596 if another target matches. Expand comment.
597 * targets.c (_bfd_target_vector): Move plugin_vec after all other
598 non-corefile targets, outside !SELECT_VECS.
599 * config.bfd: Don't handle targ=plugin here.
600 * configure.ac: Don't add plugin to enable_targets or handle in
601 target loop setting selvecs and other target vars.
602 * configure: Regenerate.
604 2019-06-26 Nick Clifton <nickc@redhat.com>
607 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
608 messages for failures.
609 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
610 if returning an error value.
612 2019-06-25 Jan Beulich <jbeulich@suse.com>
614 * elf-properties.c (elf_find_and_remove_property): Rename last
615 parameter. Mention it in comment.
617 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
619 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
620 SEC_MERGE or SEC_CODE flags are set.
621 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
622 symtype consistently. Don't include sec_addr (sym_sec) in symval.
623 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
624 Add sec_addr (sym_sec) after handling merge sections.
626 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
629 * elf-properties.c (elf_merge_gnu_property_list): Remove the
630 property after reporting property removal.
632 2019-06-23 Alan Modra <amodra@gmail.com>
635 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
636 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
637 Reduce range of offsets allowed for other GOT relocs.
639 2019-06-23 Alan Modra <amodra@gmail.com>
642 * elfcode.h (elf_object_p): Warning fix.
644 2019-06-21 Alan Modra <amodra@gmail.com>
647 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
649 2019-06-19 Alan Modra <amodra@gmail.com>
652 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
653 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
655 2019-06-19 Alan Modra <amodra@gmail.com>
657 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
658 functions that require r2 valid to use local entry.
659 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
661 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
663 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
664 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
665 with elfNN_aarch64_allocate_local_dynrelocs.
667 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
669 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
671 2019-06-14 Alan Modra <amodra@gmail.com>
673 * Makefile.in: Regenerate.
674 * configure: Regenerate.
676 2019-06-14 Alan Modra <amodra@gmail.com>
678 * elf64-ppc.c: Fix comments involving paddi.
680 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
683 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
684 absent, or the bfd is not in the ELF formart.
685 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
687 2019-06-10 Christos Zoulas <christos@zoulas.com>
690 * elf.c (elfcore_make_auxv_note_section): New function.
691 (elfcore_grok_note): Use it.
692 (elfcore_grok_freebsd_note): Likewise.
693 (elfcore_grok_openbsd_note): Likewise.
694 (elfcore_grok_netbsd_note): Likewise. Plus add support for
695 NT_NETBSDCORE_AUXV notes.
697 2019-06-06 Sudakshina Das <sudi.das@arm.com>
699 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
700 alignment of the new gnu property section.
702 2019-06-06 Sudakshina Das <sudi.das@arm.com>
704 * bfd-in.h: Change comment.
705 * bfd-in2.h: Regenerate.
706 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
707 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
710 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
712 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
713 Remove overflow check.
715 2019-05-28 Alan Modra <amodra@gmail.com>
718 * cofflink.c (coff_link_check_archive_element): Don't assume
719 element is a coff object file after calling add_archive_element.
721 2019-05-28 Alan Modra <amodra@gmail.com>
724 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
725 attempt to set sh_entsize for excluded PLT section.
727 2019-05-28 Alan Modra <amodra@gmail.com>
730 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
731 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
732 allocated in alpha_dynamic_entries_for_reloc.
734 2019-05-28 Alan Modra <amodra@gmail.com>
737 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
738 on NULL output_section.
739 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
741 2019-05-28 Alan Modra <amodra@gmail.com>
744 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
745 entry when MUST_FIND. Abort when MUST_FIND not found.
746 (elf_m68k_get_bfd2got_entry): Likewise.
747 (elf_m68k_relocate_section): Remove now useless assert.
749 2019-05-28 Alan Modra <amodra@gmail.com>
752 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
753 from bfd_link_info, not an output section owner.
754 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
755 (elf_hppa_final_link_relocate): Likewise.
757 2019-05-28 Alan Modra <amodra@gmail.com>
760 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
761 create_object_symbols_section, obj_textsec, obj_datasec or
762 obj_bsssec. Fix other errors in placement.
763 * config.bfd: Obsolete tic30-aout.
765 2019-05-28 Alan Modra <amodra@gmail.com>
768 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
769 end of section list as well as section_count.
770 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
771 section list before returning error.
773 2019-05-27 Alan Modra <amodra@gmail.com>
775 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
777 2019-05-27 Alan Modra <amodra@gmail.com>
780 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
782 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
784 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
785 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
786 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
787 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
788 (elf_backend_merge_symbol_attribute): Define.
790 2019-05-24 Alan Modra <amodra@gmail.com>
792 * po/SRC-POTFILES.in: Regenerate.
794 2019-05-24 Alan Modra <amodra@gmail.com>
796 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
797 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
798 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
799 (struct ppc_link_hash_table): Add powerxx_stubs.
800 (ppc64_elf_check_relocs): Set powerxx_stubs.
801 (build_powerxx_offset, size_powerxx_offset),
802 (num_relocs_for_powerxx_offset),
803 (emit_relocs_for_powerxx_offset): New functions.
804 (plt_stub_size): Size powerxx stubs.
805 (ppc_build_one_stub): Emit powerxx stubs.
806 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
809 2019-05-24 Alan Modra <amodra@gmail.com>
811 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
813 (xlate_pcrel_opt): New function.
814 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
815 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
816 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
818 2019-05-24 Alan Modra <amodra@gmail.com>
820 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
821 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
822 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
823 (BFD_RELOC_PPC64_PLT_PCREL34),
824 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
825 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
826 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
827 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
828 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
829 * elf64-ppc.c (PNOP): Define.
830 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
831 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
832 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
834 (ppc64_elf_prefix_reloc): New function.
835 (struct ppc_link_hash_table): Add notoc_plt.
836 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
837 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
838 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
839 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
840 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
841 possible need for dynamic relocs on non-pcrel powerxx relocs.
842 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
843 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
844 (toc_adjusting_stub_needed): Likewise.
845 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
846 (ppc64_elf_relocate_section): Handle new powerxx relocs.
847 * bfd-in2.h: Regenerate.
848 * libbfd.h: Regenerate.
850 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
852 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
853 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
855 * configure: Regenerate.
857 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
859 * configure: Regenerated.
860 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
861 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
862 (BFD64_BACKENDS): Add elf64-bpf.lo.
863 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
864 * Makefile.in (SOURCE_HFILES): Regenerate.
865 * config.bfd (targ_cpu): Handle bpf-*-* targets.
866 * cpu-bpf.c: New file.
867 * elf64-bpf.c: Likewise.
868 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
870 * archures.c: Define architecture bfd_arch_bpf and machine
872 * reloc.c: Define BFD relocations used by the BPF target.
873 * bfd-in2.h: Regenerated.
874 * libbfd.h: Likewise.
876 2019-05-22 Alan Modra <amodra@gmail.com>
878 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
881 2019-05-22 Alan Modra <amodra@gmail.com>
883 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
884 processing on "size error in section".
886 2019-05-22 Alan Modra <amodra@gmail.com>
888 * som.c (som_bfd_free_cached_info): Call
889 _bfd_generic_close_and_cleanup.
891 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
893 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
894 for TLS_TPREL_HI16(/LO16) relocations in shared library.
896 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
898 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
899 checks. Search the RELA table for n64 relocations.
901 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
902 Faraz Shahbazker <fshahbazker@wavecomp.com>
904 * elfxx-mips.c (LA25_BC): New macro.
905 (mips_elf_link_hash_table)<compact_branches>: New field.
906 (STUB_JALRC): New macro.
907 (mipsr6_o32_exec_plt0_entry_compact): New array.
908 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
909 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
910 (mipsr6_exec_plt_entry_compact): Likewise.
911 (mips_elf_create_la25_stub): Use BC instead of J for stubs
912 when compact_branches is true.
913 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
914 PLT for MIPSR6 with compact_branches. Do not reorder the
915 compact branches PLT. Switch the lazy stub for MIPSR6
916 with compact_branches to use JALRC.
917 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
918 when compact_branches is true.
919 (_bfd_mips_elf_compact_branches): New function.
920 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
922 2019-05-21 Tamar Christina <tamar.christina@arm.com>
925 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
928 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
931 * elf32-arm.c (get_value_helper): Remove.
932 (elf32_arm_final_link_relocate): Fix branch future relocations.
934 2019-05-21 Tamar Christina <tamar.christina@arm.com>
937 * bfd-in.h (enum erratum_84319_opts): New
938 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
939 int to enum erratum_84319_opts.
940 * bfd-in2.h: Regenerate.
941 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
942 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
943 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
944 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
945 (_bfd_aarch64_resize_stubs): Amend comment.
946 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
948 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
949 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
951 (clear_erratum_843419_entry): Update erratum conditional.
953 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
956 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
957 when computing distance_short_enough.
959 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
962 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
963 Wrap around even if distance equals avr_pc_wrap_around.
965 2019-05-20 Nick Clifton <nickc@redhat.com>
967 * po/fr.po: Updated French translation.
969 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
971 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
973 2019-05-16 Alan Modra <amodra@gmail.com>
975 * elf32-arm.c (elf32_arm_write_section): Revert last change.
977 2019-05-15 Alan Modra <amodra@gmail.com>
979 * elf32-arm.c (elf32_arm_write_section): Don't leave
980 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
981 unitialised section contents.
983 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
986 * verilog.c: (VerilogDataWidth): New variable.
987 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
989 2019-05-08 Nick Clifton <nickc@redhat.com>
992 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
993 rather than FALSE if encountering a non-ELF file.
995 2019-05-06 Alan Modra <amodra@gmail.com>
997 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
999 2019-05-06 Alan Modra <amodra@gmail.com>
1001 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1002 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1003 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1004 * libbfd.h: Regenerate.
1005 * bfd-in2.h: Regenerate.
1007 2019-05-04 Alan Modra <amodra@gmail.com>
1010 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1011 following the standard section names.
1012 (bfd_decode_symclass): Prioritize section flag tests in
1013 decode_section_type before name tests in coff_section_type.
1014 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1015 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1016 their names and choose standard .text section flags for
1019 2019-05-02 Nick Clifton <nickc@redhat.com>
1022 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1023 .gnu.debugaltlink sections as debugging sections.
1025 2019-04-30 Alan Modra <amodra@gmail.com>
1027 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1028 (struct _ppc64_elf_section_data): Likewise.
1029 (ppc64_elf_check_relocs): Set above fields.
1030 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1031 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1034 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1037 * elflink.c (elf_link_output_extsym): Don't complain undefined
1038 weak dynamic reference.
1040 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1042 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1043 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1044 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1045 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1046 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1047 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1048 (elfNN_aarch64_small_plt0_bti_entry): Update.
1049 (elfNN_aarch64_small_plt_bti_entry): Update.
1050 (elfNN_aarch64_small_plt_pac_entry): Update.
1051 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1052 (setup_plt_values): Setup new entries.
1053 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1054 (elfNN_aarch64_plt_sym_val): Likewise.
1056 2019-04-22 Jim Wilson <jimw@sifive.com>
1058 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1060 2019-04-19 Alan Modra <amodra@gmail.com>
1062 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1064 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1066 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1067 building shared object.
1068 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1070 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1073 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1076 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1078 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1080 * bfd-in2.h: Regenerate.
1081 * libbfd.h: Likewise.
1083 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1085 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1086 * bfd-in2.h: Regenerated.
1087 * libbfd.h: Regenerated.
1089 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1091 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1092 * bfd-in2.h: Regenerated.
1093 * libbfd.h: Likewise.
1095 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1097 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1098 * bfd-in2.h: Regenerated.
1099 * libbfd.h: Regenerated.
1100 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1101 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1102 and R_ARM_THM_BF12 together.
1103 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1105 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1107 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1108 * libbfd.h: Regenerated.
1109 * bfd-in2.h: Regenerated.
1110 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1111 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1112 and R_ARM_THM_BF18 together.
1113 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1115 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1117 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1118 * bfd-in2.h: Regenerated.
1119 * libbfd.h: Regenerated.
1120 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1121 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1122 and R_ARM_THM_BF16 together.
1123 (get_value_helper): New reloc helper.
1124 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1126 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1128 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1129 * bfd-in2.h: Regenerate.
1130 * libbfd.h: Regenerate.
1132 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1134 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1135 * bfd-in2.h: Regenerate.
1136 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1137 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1139 (using_thumb2): Likewise.
1140 (using_thumb2_bl): Update assert.
1141 (arch_has_arm_nop): Likewise.
1142 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1143 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1145 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1147 * elf-linker-x86.h (elf_x86_cet_report): New.
1148 (elf_linker_x86_params): Add cet_report.
1149 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1150 missing IBT and SHSTK properties if needed.
1152 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1155 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1156 "h != NULL". Don't check "h != NULL" before calling.
1157 bfd_elf_gc_record_vtentry.
1158 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1159 * elf32-bfin.c (bfin_check_relocs): Likewise.
1160 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1161 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1162 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1163 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1164 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1165 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1166 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1167 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1168 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1169 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1170 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1171 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1172 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1173 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1174 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1175 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1176 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1177 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1178 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1179 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1180 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1181 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1182 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1183 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1184 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1185 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1186 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1187 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1188 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1191 2019-04-11 Alan Modra <amodra@gmail.com>
1194 * elflink.c (elf_link_add_object_symbols): Don't read partial
1195 dynamic entries from fuzzed objects.
1197 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1200 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1201 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1202 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1204 2019-04-10 Michael Forney <mforney@mforney.org>
1207 * doc/chew.c (free_words): Correctly free "push_text" strings.
1209 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1211 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1213 2019-04-08 Alan Modra <amodra@gmail.com>
1215 * configure.ac (elfxx_x86): Define and use.
1216 * configure: Regenerate.
1218 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1220 * elf-linker-x86.h: New file.
1221 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1222 to get x86-specific linker options.
1223 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1224 (elf_x86_64_check_relocs): Likewise.
1225 (elf_x86_64_relocate_section): Likewise.
1226 (elf_x86_64_link_setup_gnu_properties): Likewise.
1227 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1228 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1229 (_bfd_elf_linker_x86_set_options): New function.
1230 * elfxx-x86.h: Include "elf-linker-x86.h".
1231 (elf_x86_link_hash_table): Add params.
1233 2019-04-03 Alan Modra <amodra@gmail.com>
1235 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1236 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1237 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1238 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1239 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1240 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1242 2019-04-02 Jim Wilson <jimw@sifive.com>
1245 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1246 ELF header flags to after check for ELF object file. Loop through
1247 sections looking for code sections, if none, then skip ABI checks.
1249 2019-03-30 Andrew Waterman <andrew@sifive.com>
1251 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1254 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1256 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1257 info->export_dynamic to the conditional.
1259 2019-03-28 Alan Modra <amodra@gmail.com>
1262 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1263 * configure: Regenerate.
1264 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1265 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1266 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1267 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1268 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1270 2019-03-21 Jim Wilson <jimw@sifive.com>
1273 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1274 verify sym non-NULL before using. Add identical check using h.
1276 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1278 * elf-bfd.h (struct elf_backend_data): Add argument to
1279 merge_gnu_properties.
1280 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1281 itself and while calling bed->merge_gnu_properties.
1282 (elf_merge_gnu_property_list): Update the calls for
1283 elf_merge_gnu_properties.
1284 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1285 of --force-bti warning and add argument.
1286 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1288 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1289 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1292 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1294 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1295 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1296 (elf_backend_fixup_gnu_properties): Define for AArch64.
1298 2019-03-18 Alan Modra <amodra@gmail.com>
1301 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1302 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1303 attempt at writing glink stubs only once.
1305 2019-03-16 Alan Modra <amodra@gmail.com>
1308 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1309 (_bfd_elf_rel_local_sym): Likewise.
1310 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1311 section of symbols with unrecognized shndx.
1313 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1316 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1318 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1319 in discarded section.
1321 2019-03-15 Alan Modra <amodra@gmail.com>
1324 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1325 symbol after globals if elf_bad_symtab is not set.
1327 2019-03-15 Alan Modra <amodra@gmail.com>
1330 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1331 (_bfd_elf_rel_local_sym): Likewise.
1333 2019-03-15 Alan Modra <amodra@gmail.com>
1336 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1337 object files with sh_size not a multiple of sh_entsize.
1339 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1342 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1343 input with bad relocation.
1345 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1347 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1349 2019-03-14 Nick Clifton <nickc@redhat.com>
1352 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1353 (save_section_vma): Initialise field to the number of entries in
1355 (section_vma_same): Check that the number of entries in the
1356 sec_vma table matches the number of sections in the bfd.
1358 2019-03-14 Nick Clifton <nickc@redhat.com>
1361 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1362 section owner pointer when adding the default symbol.
1364 2019-03-14 Nick Clifton <nickc@redhat.com>
1367 * elflink.c (elf_link_add_object_symbols): Add new local variable
1368 extversym_end. Initialise it to point to the end of the version
1369 symbol table, if present. Check it when initialising and updating
1372 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1374 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1375 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1376 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1377 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1379 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1380 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1381 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1383 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1384 Szabolcs Nagy <szabolcs.nagy@arm.com>
1386 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1387 (aarch64_bti_pac_info): New.
1388 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1389 (bfd_elf32_aarch64_set_options): Likewise.
1390 * bfd-in2.h: Regenerate
1391 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1392 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1393 (elfNN_aarch64_small_plt0_bti_entry): New.
1394 (elfNN_aarch64_small_plt_bti_entry): New.
1395 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1396 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1397 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1398 tlsdesc_plt_entry_size fields.
1399 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1400 (setup_plt_values): New helper function.
1401 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1403 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1405 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1406 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1407 to plt stubs instead of fixed ones and update filling them according
1408 to the need for bti.
1409 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1410 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1411 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1412 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1413 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1415 (bfd_elfNN_get_synthetic_symtab): Define.
1416 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1417 and mising BTI NOTE SECTION.
1420 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1422 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1423 linker created inputs from merge.
1424 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1425 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1426 (elfNN_aarch64_link_setup_gnu_properties): New.
1427 (elfNN_aarch64_merge_gnu_properties): New.
1428 (elf_backend_setup_gnu_properties): Define for AArch64.
1429 (elf_backend_merge_gnu_properties): Likewise.
1430 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1431 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1432 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1433 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1434 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1435 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1436 (elf_backend_parse_gnu_properties): Define for AArch64.
1438 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1441 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1442 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1444 2019-03-12 Alan Modra <amodra@gmail.com>
1446 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1447 nmemb parameter. Use bfd_alloc2.
1448 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1450 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1451 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1452 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1454 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1455 (assign_section_numbers): Style fix.
1456 (swap_out_syms): Use bfd_malloc2.
1457 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1459 (_bfd_elf_make_empty_symbol): Style fix.
1460 (elfobj_grok_stapsdt_note_1): Formatting.
1461 * elfcode.h (elf_object_p): Use bfd_alloc2.
1462 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1463 (elf_slurp_symbol_table): Use bfd_zalloc2.
1464 (elf_slurp_reloc_table): Use bfd_alloc2.
1465 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1466 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1467 size calculation doesn't overflow.
1468 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1469 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1470 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1472 2019-03-08 Alan Modra <amodra@gmail.com>
1475 * merge.c (merge_strings): Return secinfo. Don't pad section
1477 (_bfd_merge_sections): Pad section to alignment here, if input
1478 sections contributing to merged output all pad to alignment.
1481 2019-03-06 Nick Clifton <nickc@redhat.com>
1483 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1485 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1486 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1488 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1490 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1491 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1494 * elf32-s390.c (allocate_dynrelocs): Update comment.
1496 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1498 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1500 2019-02-28 Nick Clifton <nickc@redhat.com>
1503 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1504 section that is not NUL terminated.
1506 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1509 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1510 by linker when checking copy reloc on protected symbol.
1512 2019-02-24 Alan Modra <amodra@gmail.com>
1515 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1517 2019-02-20 Eric Tsai <erictsai@cadence.com>
1519 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1520 sections between the call site and call destination and adjust
1521 call distance by the largest alignment.
1523 2019-02-20 Alan Hayward <alan.hayward@arm.com>
1525 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1526 * elf.c (elfcore_grok_aarch_pauth): New function.
1527 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1528 (elfcore_write_aarch_pauth): New function.
1529 (elfcore_write_register_note): Check for AArch64 pauth section.
1531 2019-02-20 Alan Modra <amodra@gmail.com>
1534 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1537 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1539 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1540 Darwin hosts, not just or1k.
1541 * configure: Regenerate.
1543 2019-02-20 Alan Modra <amodra@gmail.com>
1546 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1547 sentinel NUL to string buffer nearer to loop where it is used.
1548 Don't go past sentinel when scanning strings, and don't write
1550 * archive.c (do_slurp_coff_armap): Simplify string handling to
1553 2019-02-19 Alan Modra <amodra@gmail.com>
1556 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1557 attempting to prevent read past end of section.
1559 2019-02-18 Alan Modra <amodra@gmail.com>
1562 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1563 PRIx64 to generate warning messages. Print local sym names too.
1565 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
1567 * elf32-arc (INIT_SYM_STRING): Delete.
1568 (FINI_SYM_STRING): Likewise.
1569 (init_str): Likewise.
1570 (fini_str): Likewise.
1572 2019-02-08 Alan Modra <amodra@gmail.com>
1574 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1575 for bss-plt" warning to make it an error.
1577 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1580 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1581 reloc_class_ifunc for ifunc symbols.
1582 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1584 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1586 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1587 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1589 2019-02-07 Nick Clifton <nickc@redhat.com>
1591 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1592 into the definitely obsolete list.
1594 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1597 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1598 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1599 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1601 (elf_x86_64_check_relocs): Here.
1602 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1603 to check if a symbol is defined in a non-shared object.
1604 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1606 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1608 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1609 of 'labs' (and fix GCC warning).
1611 2019-01-25 Nick Clifton <nickc@redhat.com>
1613 * po/ru.po: Updated Russian translation.
1615 2019-01-23 Nick Clifton <nickc@redhat.com>
1617 * po/fr.po: Updated French translation.
1619 2019-01-21 Nick Clifton <nickc@redhat.com>
1621 * po/pt.po: Updated Portuguese translation.
1622 * po/uk.po: Updated Ukranian translation.
1624 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1627 * elf32-nds32.c (nds32_relocate_section): Add space between words
1629 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1631 (riscv_i_or_e_p): Likewise.
1632 (riscv_merge_arch_attr_info): Likewise.
1634 2019-01-19 Nick Clifton <nickc@redhat.com>
1636 * version.m4: Reset to 2.32.51
1637 * configure: Regenerate.
1638 * po/bfd.pot: Regenerate.
1640 2018-06-24 Nick Clifton <nickc@redhat.com>
1642 2.32 branch created.
1644 2019-01-16 Kito Cheng <kito@andestech.com>
1646 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1649 2019-01-16 Kito Cheng <kito@andestech.com>
1650 Nelson Chu <nelson@andestech.com>
1652 * elfnn-riscv.c (in_subsets): New.
1653 (out_subsets): Likewise.
1654 (merged_subsets): Likewise.
1655 (riscv_std_ext_p): Likewise.
1656 (riscv_non_std_ext_p): Likewise.
1657 (riscv_std_sv_ext_p): Likewise.
1658 (riscv_non_std_sv_ext_p): Likewise.
1659 (riscv_version_mismatch): Likewise.
1660 (riscv_i_or_e_p): Likewise.
1661 (riscv_merge_std_ext): Likewise.
1662 (riscv_merge_non_std_and_sv_ext): Likewise.
1663 (riscv_merge_arch_attr_info): Likewise.
1664 (riscv_merge_attributes): Likewise.
1665 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1667 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1668 (elf_backend_obj_attrs_vendor): Define.
1669 (elf_backend_obj_attrs_section_type): Likewise.
1670 (elf_backend_obj_attrs_section): Likewise.
1671 (elf_backend_obj_attrs_arg_type): Define as
1672 riscv_elf_obj_attrs_arg_type.
1673 * elfxx-riscv.c (riscv_estimate_digit): New.
1674 (riscv_estimate_arch_strlen1): Likewise.
1675 (riscv_estimate_arch_strlen): Likewise.
1676 (riscv_arch_str1): Likewise.
1677 (riscv_arch_str): Likewise.
1678 * elfxx-riscv.h (riscv_arch_str): Declare.
1680 2019-01-14 John Darrington <john@darrington.wattle.id.au>
1682 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1684 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1685 source field. (md_apply_fix): Apply final fix
1686 to BFD_RELOC_S12Z_OPR.
1687 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1689 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1692 * elf32-s390.c (allocate_dynrelocs): Update comment.
1694 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1696 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1697 * configure: Regenerate.
1699 2019-01-08 Alan Modra <amodra@gmail.com>
1703 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1706 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1708 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1709 * bfd/bfd-in2.h: Regenerate.
1710 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1711 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1713 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1715 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1716 default target, little endian target is more suitable.
1718 2019-01-04 Alan Modra <amodra@gmail.com>
1722 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1724 (EQ_VALUE_IN_FIELD): Likewise.
1725 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1727 2019-01-01 Alan Modra <amodra@gmail.com>
1729 Update year range in copyright notice of all files.
1731 For older changes see ChangeLog-2018
1733 Copyright (C) 2019 Free Software Foundation, Inc.
1735 Copying and distribution of this file, with or without modification,
1736 are permitted in any medium without royalty provided the copyright
1737 notice and this notice are preserved.
1743 version-control: never