Constify argument to make_tempname and make_tempdir
[deliverable/binutils-gdb.git] / bfd / ChangeLog
... / ...
CommitLineData
12019-09-11 Alan Modra <amodra@gmail.com>
2
3 * targets.c (struct bfd_target): Add _bfd_group_name.
4 (BFD_JUMP_TABLE): Likewise.
5 * coffgen.c (bfd_coff_group_name): New function.
6 * elf.c (bfd_elf_group_name): New function.
7 * linker.c (_bfd_nolink_bfd_group_name): New function.
8 * section.c (bfd_generic_group_name): New function.
9 * elf-bfd.h (bfd_elf_group_name): Declare.
10 * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
11 * libcoff-in.h (bfd_coff_group_name): Declare.
12 * aout-target.h (MY_bfd_group_name): Define.
13 * aout-tic30.c (MY_bfd_group_name): Define.
14 * bfd.c (bfd_group_name): Define.
15 * binary.c (binary_bfd_group_name): Define.
16 * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
17 * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
18 * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
19 * coffcode.h (coff_bfd_group_name): Define.
20 * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
21 * i386msdos.c (msdos_bfd_group_name): Define.
22 * ihex.c (ihex_bfd_group_name): Define.
23 * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
24 * mmo.c (mmo_bfd_group_name): Define.
25 * pef.c (bfd_pef_bfd_group_name): Define.
26 * plugin.c (bfd_plugin_bfd_group_name): Define.
27 * ppcboot.c (ppcboot_bfd_group_name): Define.
28 * som.c (som_bfd_group_name): Define.
29 * srec.c (srec_bfd_group_name): Define.
30 * tekhex.c (tekhex_bfd_group_name): Define.
31 * verilog.c (verilog_bfd_group_name): Define.
32 * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
33 * xsym.c (bfd_sym_bfd_group_name): Define.
34 * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
35 (rs6000_xcoff64_aix_vec): Likewise.
36 * bfd-in2.h: Regenerate.
37 * libbfd.h: Regenerate.
38 * libcoff.h: Regenerate.
39
402019-09-10 Nick Clifton <nickc@redhat.com>
41
42 PR 24907
43 * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
44 field.
45 (bfd_default_arch_struct): Initialise the new field.
46 * bfd-in2.h: Regenerate.
47 * cpu-aarch64.c: Initialise the new field.
48 * cpu-alpha.c: Likewise.
49 * cpu-arc.c: Likewise.
50 * cpu-arm.c: Likewise.
51 * cpu-avr.c: Likewise.
52 * cpu-bfin.c: Likewise.
53 * cpu-bpf.c: Likewise.
54 * cpu-cr16.c: Likewise.
55 * cpu-cr16c.c: Likewise.
56 * cpu-cris.c: Likewise.
57 * cpu-crx.c: Likewise.
58 * cpu-csky.c: Likewise.
59 * cpu-d10v.c: Likewise.
60 * cpu-d30v.c: Likewise.
61 * cpu-dlx.c: Likewise.
62 * cpu-epiphany.c: Likewise.
63 * cpu-fr30.c: Likewise.
64 * cpu-frv.c: Likewise.
65 * cpu-ft32.c: Likewise.
66 * cpu-h8300.c: Likewise.
67 * cpu-hppa.c: Likewise.
68 * cpu-i386.c: Likewise.
69 * cpu-ia64.c: Likewise.
70 * cpu-iamcu.c: Likewise.
71 * cpu-ip2k.c: Likewise.
72 * cpu-iq2000.c: Likewise.
73 * cpu-k1om.c: Likewise.
74 * cpu-l1om.c: Likewise.
75 * cpu-lm32.c: Likewise.
76 * cpu-m10200.c: Likewise.
77 * cpu-m10300.c: Likewise.
78 * cpu-m32c.c: Likewise.
79 * cpu-m32r.c: Likewise.
80 * cpu-m68hc11.c: Likewise.
81 * cpu-m68hc12.c: Likewise.
82 * cpu-m68k.c: Likewise.
83 * cpu-m9s12x.c: Likewise.
84 * cpu-m9s12xg.c: Likewise.
85 * cpu-mcore.c: Likewise.
86 * cpu-mep.c: Likewise.
87 * cpu-metag.c: Likewise.
88 * cpu-microblaze.c: Likewise.
89 * cpu-mips.c: Likewise.
90 * cpu-mmix.c: Likewise.
91 * cpu-moxie.c: Likewise.
92 * cpu-msp430.c: Likewise.
93 * cpu-mt.c: Likewise.
94 * cpu-nds32.c: Likewise.
95 * cpu-nfp.c: Likewise.
96 * cpu-nios2.c: Likewise.
97 * cpu-ns32k.c: Likewise.
98 * cpu-or1k.c: Likewise.
99 * cpu-pdp11.c: Likewise.
100 * cpu-pj.c: Likewise.
101 * cpu-plugin.c: Likewise.
102 * cpu-powerpc.c: Likewise.
103 * cpu-pru.c: Likewise.
104 * cpu-riscv.c: Likewise.
105 * cpu-rl78.c: Likewise.
106 * cpu-rs6000.c: Likewise.
107 * cpu-rx.c: Likewise.
108 * cpu-s12z.c: Likewise.
109 * cpu-s390.c: Likewise.
110 * cpu-score.c: Likewise.
111 * cpu-sh.c: Likewise.
112 * cpu-sparc.c: Likewise.
113 * cpu-spu.c: Likewise.
114 * cpu-tic30.c: Likewise.
115 * cpu-tic4x.c: Likewise.
116 * cpu-tic54x.c: Likewise.
117 * cpu-tic6x.c: Likewise.
118 * cpu-tic80.c: Likewise.
119 * cpu-tilegx.c: Likewise.
120 * cpu-tilepro.c: Likewise.
121 * cpu-v850.c: Likewise.
122 * cpu-v850_rh850.c: Likewise.
123 * cpu-vax.c: Likewise.
124 * cpu-visium.c: Likewise.
125 * cpu-wasm32.c: Likewise.
126 * cpu-xc16x.c: Likewise.
127 * cpu-xgate.c: Likewise.
128 * cpu-xstormy16.c: Likewise.
129 * cpu-xtensa.c: Likewise.
130 * cpu-z80.c: Likewise.
131 * cpu-z8k.c: Likewise.
132
1332019-09-09 Phil Blundell <pb@pbcl.net>
134
135 binutils 2.33 branch created.
136
1372019-09-06 Alan Modra <amodra@gmail.com>
138
139 * aout-target.h (object_p): Formatting.
140 * bfd-in.h (bfd_get_filename): Don't cast to char*.
141 * corefile.c (generic_core_file_matches_executable_p): Constify
142 variables and remove cast.
143 * bfd-in2.h: Regenerate.
144
1452019-09-05 Alan Modra <amodra@gmail.com>
146
147 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
148 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
149 in the GOT/PLT entry rather than affecting the offset to that
150 GOI/PLT entry.
151 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
152
1532019-09-05 Alan Modra <amodra@gmail.com>
154
155 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
156 in second instruction.
157 (ppc64_elf_relocate_section): Likewise.
158
1592019-09-05 Alan Modra <amodra@gmail.com>
160
161 PR 24955
162 * libbfd-in.h (bfd_strdup): New inline function.
163 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
164 bfd on error.
165 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
166 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
167 on error.
168 (bfd_openstreamr): Use bfd_strdup.
169 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
170 * plugin.c (try_load_plugin): Use bfd_malloc.
171 * libbfd.h: Regenerate.
172
1732019-09-02 Alan Modra <amodra@gmail.com>
174
175 PR 11983
176 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
177 on success. Tidy.
178 (read_alt_indirect_string): Likewise.
179 (read_alt_indirect_ref): Likewise.
180
1812019-08-31 Jim Wilson <jimw@sifive.com>
182
183 PR 23825
184 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
185 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
186
1872019-08-30 Jim Wilson <jimw@sifive.com>
188
189 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
190 error, call bfd_set_error, set ret to FALSE, and goto out label.
191
1922019-08-30 H.J. Lu <hongjiu.lu@intel.com>
193
194 PR ld/24951
195 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
196 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
197
1982019-08-29 Alan Modra <amodra@gmail.com>
199
200 PR 24697
201 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
202 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
203 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
204 reloc.
205
2062019-08-29 Alan Modra <amodra@gmail.com>
207
208 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
209 on second insn, return it in poff.
210 (ppc64_elf_relocate_section): Add offset to paddi addend for
211 PCREL_OPT.
212
2132019-08-28 Jim Wilson <jimw@sifive.com>
214
215 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
216 section when setting max_alignment. Update comment.
217 (_bfd_riscv_relax_pc): Likewise.
218
2192019-08-29 Alan Modra <amodra@gmail.com>
220
221 PR 24891
222 * bfd.c (struct bfd): Add no_element_cache.
223 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
224 archive cache when no_element_cache.
225 (bfd_generic_archive_p): Set no_element_cache when opening first
226 element to check format. Close first element too.
227 (do_slurp_bsd_armap): Don't zero ardata->cache here.
228 * bfd-in2.h: Regenerate.
229
2302019-08-24 Alan Modra <amodra@gmail.com>
231
232 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
233 symbols from GOT optimisation.
234
2352019-08-23 Stafford Horne <shorne@gmail.com>
236
237 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
238 PLT GOT entries.
239
2402019-08-23 Nick Clifton <nickc@redhat.com>
241
242 PR 24456
243 * elf.c (bfd_section_from_shdr): Issue an informative warning
244 message and continue processing other sections after encountering
245 a reloc section for a section which already has other relocs
246 associated with it.
247
2482019-08-23 Alan Modra <amodra@gmail.com>
249
250 PR 24933
251 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
252 on error without freeing plts[] contents.
253
2542019-08-22 Dennis Zhang <dennis.zhang@arm.com>
255
256 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
257
2582019-08-22 Nick Clifton <nickc@redhat.com>
259
260 PR 24922
261 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
262 reading data from extra records.
263
2642019-08-22 Tamar Christina <tamar.christina@arm.com>
265
266 PR ld/24601
267 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
268 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
269 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
270 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
271 for weak TLS.
272
2732019-08-22 Alan Modra <amodra@gmail.com>
274
275 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
276 instead recognize CMSE_PREFIX in symbol name.
277 (elf32_arm_gc_mark_extra_sections): Likewise.
278 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
279 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
280
2812019-08-20 Dennis Zhang <dennis.zhang@arm.com>
282
283 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
284 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
285
2862019-08-20 Tamar Christina <tamar.christina@arm.com>
287
288 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
289 elf32_arm_stub_long_branch_v4t_thumb_thumb,
290 elf32_arm_stub_long_branch_v4t_thumb_arm,
291 elf32_arm_stub_short_branch_v4t_thumb_arm,
292 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
293 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
294 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
295 previous instruction.
296
2972019-08-19 Tom Tromey <tromey@adacore.com>
298
299 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
300 holding symbols.
301
3022019-08-19 Alan Modra <amodra@gmail.com>
303
304 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
305 to has_optrel.
306 (struct _ppc64_elf_section_data): Likewise.
307 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
308 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
309 than TOC loop. Check PLT16 insns too.
310
3112019-08-16 H.J. Lu <hongjiu.lu@intel.com>
312
313 PR ld/24905
314 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
315 PC-relative relocations back to ...
316 (elf_x86_64_relocate_section): Here.
317
3182019-08-16 Martin Liska <mliska@suse.cz>
319
320 PR ld/24912
321 * elflink.c: Report error only for not relocatable.
322 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
323 here lto_slim_object as it's handled in caller.
324
3252019-08-16 Alan Modra <amodra@gmail.com>
326
327 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
328
3292019-08-15 Jim Wilson <jimw@sifive.com>
330
331 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
332 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
333 to c.li instruction, and use ENCODE_RVC_IMM to set value.
334
3352019-08-15 Tom Tromey <tromey@adacore.com>
336
337 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
338 of section.
339
3402019-08-14 Alan Modra <amodra@gmail.com>
341
342 PR 24623
343 * dwarf2.c (stash_comp_unit): New function, extracted from..
344 (_bfd_dwarf2_find_nearest_line): ..here.
345 (find_abstract_instance): Parse comp units and decode line info
346 as needed.
347
3482019-08-14 Alan Modra <amodra@gmail.com>
349
350 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
351 (comp_unit_find_nearest_line): Use it here..
352 (_bfd_dwarf2_find_symbol_bias): ..and here.
353
3542019-08-14 Alan Modra <amodra@gmail.com>
355
356 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
357 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
358 * coffgen.c (coff_find_nearest_line_with_names): Adjust
359 _bfd_dwarf2_find_nearest_line calls.
360 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
361 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
362 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
363 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
364 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
365 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
366 * libbfd.h: Regenerate.
367
3682019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
369
370 * elf-bfd.h (struct elf_backend_data): New members.
371 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
372 .gnu.hash section if necessary.
373 (struct collect_gnu_hash_codes): New member.
374 (elf_gnu_hash_process_symidx): New function name.
375 (elf_renumber_gnu_hash_syms): Ignore local and undefined
376 symbols. Record xlat location for every symbol which should have
377 a .MIPS.xhash entry.
378 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
379 dynamic section if necessary.
380 (GNU_HASH_SECTION_NAME): New define.
381 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
382 Update the section size info.
383 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
384 (struct mips_elf_link_hash_entry): New member.
385 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
386 table location.
387 (mips_elf_sort_hash_table): Initialize the pointer to the
388 .MIPS.xhash section.
389 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
390 translation table entry with the symbol dynindx.
391 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
392 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
393 info.
394 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
395 section.
396 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
397 dynamic section.
398 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
399 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
400 sh_link info.
401 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
402 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
403 (_bfd_mips_post_process_headers): Mark the ABI version as
404 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
405 but not a .hash section.
406 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
407 position in the translation table, associated with the hash
408 entry.
409 * elfxx-mips.h (literal_reloc_p): Define
410 elf_backend_record_xhash_symbol backend hook.
411 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
412 backend hook.
413
4142019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
415
416 * elf64-bpf.c (bpf_elf_relocate_section): New function.
417 (bpf_elf_insn_disp_reloc): Delete function.
418 (elf_backend_relocate_section): Define.
419
4202019-08-07 Alan Modra <amodra@gmail.com>
421
422 PR 24644
423 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
424 for overflow in expressions involving nsymz.
425
4262019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
427
428 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
429 two pages in relro presence.
430
4312019-08-01 Max Filippov <jcmvbkbc@gmail.com>
432
433 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
434 (get_wsr_lbeg_opcode): New functions.
435 (check_loop_aligned): Detect relaxed loops and adjust loop_len
436 and insn_len for the first actual instruction of the loop.
437
4382019-07-30 Alan Modra <amodra@gmail.com>
439
440 PR 24768
441 * bfd.c (struct bfd): Add lto_slim_object flag.
442 * bfd-in2.h: Regenerate.
443
4442019-07-29 Martin Liska <mliska@suse.cz>
445
446 PR 24768
447 * archive.c (_bfd_compute_and_write_armap): Come up with
448 report_plugin_err variable.
449 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
450 * elf.c (struct lto_section): New.
451 (_bfd_elf_make_section_from_shdr): Parse content of
452 .gnu_lto_.lto section.
453 * elflink.c: Report error for a missing LTO plugin.
454 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
455
4562019-07-28 Alan Modra <amodra@gmail.com>
457
458 PR 24857
459 PR 24339
460 * elflink.c (elf_link_add_object_symbols): Report an informative
461 error on finding local symbols with index equal or greater than
462 symbol table sh_info. Correct comment. Allow such symbols in
463 dynamic objects. Abort on NULL section for symbol.
464
4652019-07-26 Alan Modra <amodra@gmail.com>
466
467 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
468 (elf_linker): Don't define.
469 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
470
4712019-07-25 YunQiang Su <syq@debian.org>
472
473 PR 24832
474 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
475 mips inputs.
476
4772019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
478
479 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
480 formating.
481 (reloc_type_to_name): Fix formating.
482 (arc_elf_object_p): Likewise.
483 (debug_arc_reloc): Likewise.
484 (arc_do_relocation): Likewise.
485
4862019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
487
488 * elf32-arc.c (bfd_get_32_me): New function.
489 (bfd_put_32_me): Likewise.
490 (arc_elf_relax_section): Likewise.
491 (bfd_elf32_bfd_relax_section): Define.
492
4932019-07-24 Alan Modra <amodra@gmail.com>
494
495 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
496 elf_backend_final_write_processing, don't pass linker arg.
497 (_bfd_elf_final_write_processing): Update prototype.
498 * elf.c (_bfd_elf_write_object_contents): Adjust call.
499 (_bfd_elf_final_write_processing): Return error on incompatible
500 OSABI and has_gnu_osabi. Remove linker arg.
501 * elf-nacl.h (nacl_final_write_processing): Update prototype.
502 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
503 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
504 (_bfd_mips_elf_final_write_processing): Likewise.
505 * elf-hppa.h (elf_hppa_final_write_processing): Return status
506 and remove linker arg.
507 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
508 * elf-nacl.c (nacl_final_write_processing): Likewise.
509 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
510 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
511 * elf32-arm.c (arm_final_write_processing): Likewise.
512 (elf32_arm_final_write_processing): Likewise.
513 (elf32_arm_nacl_final_write_processing): Likewise.
514 (elf32_arm_vxworks_final_write_processing): Likewise.
515 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
516 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
517 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
518 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
519 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
520 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
521 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
522 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
523 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
524 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
525 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
526 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
527 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
528 * elf32-ppc.c (ppc_final_write_processing): Likewise.
529 (ppc_elf_final_write_processing): Likewise.
530 (ppc_elf_vxworks_final_write_processing): Likewise.
531 * elf32-sparc.c (sparc_final_write_processing): Likewise.
532 (elf32_sparc_final_write_processing): Likewise.
533 (elf32_sparc_vxworks_final_write_processing): Likewise.
534 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
535 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
536 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
537 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
538 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
539 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
540 (_bfd_mips_elf_final_write_processing): Likewise.
541
5422019-07-24 Alan Modra <amodra@gmail.com>
543
544 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
545 early.
546 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
547 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
548
5492019-07-24 Alan Modra <amodra@gmail.com>
550
551 * elf32-visium.c (visium_elf_post_process_headers): Don't set
552 EI_OSABI header byte here.
553 (ELF_OSABI): Define.
554
5552019-07-23 Alan Modra <amodra@gmail.com>
556
557 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
558 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
559 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
560 when elf_gnu_osabi_mbind is set.
561 (_bfd_elf_map_sections_to_segments): Likewise.
562 (_bfd_elf_init_private_section_data): Likewise.
563 (_bfd_elf_final_write_processing): Update comment.
564 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
565 (elf_backend_special_sections): Define without .tbss for linux.
566
5672019-07-23 Alan Modra <amodra@gmail.com>
568
569 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
570 Remove none, any, all enums.
571 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
572 (_bfd_elf_final_write_processing): Declare.
573 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
574 elf_backend_final_write_processing.
575 (_bfd_elf_post_process_headers): Move body of function to..
576 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
577 only when not already set. Adjust for rename.
578 * elfxx-target.h (elf_backend_final_write_processing): Default to
579 _bfd_elf_final_write_processing.
580 * elf-hppa.h (elf_hppa_final_write_processing): Call
581 _bfd_elf_final_write_processing.
582 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
583 * elf-nacl.c (nacl_final_write_processing): Likewise.
584 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
585 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
586 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
587 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
588 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
589 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
590 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
591 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
592 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
593 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
594 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
595 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
596 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
597 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
598 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
599 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
600 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
601 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
602 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
603 * elf32-arm.c (arm_final_write_processing): Split out from..
604 (elf32_arm_final_write_processing): ..here. Call
605 _bfd_elf_final_write_processing.
606 (elf32_arm_nacl_final_write_processing): Adjust.
607 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
608 (_bfd_mips_elf_final_write_processing): ..here. Call
609 _bfd_elf_final_write_processing.
610 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
611 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
612 * elf32-ppc.c (ppc_final_write_processing): Split out from..
613 (ppc_elf_final_write_processing): ..here. Call
614 _bfd_elf_final_write_processing.
615 (ppc_elf_vxworks_final_write_processing): Adjust.
616 * elf32-sparc.c (sparc_final_write_processing): Split out from..
617 (elf32_sparc_final_write_processing): ..here. Call
618 _bfd_elf_final_write_processing.
619 (elf32_sparc_vxworks_final_write_processing): Adjust.
620 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
621 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
622 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
623 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
624 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
625 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
626 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
627 * elflink.c (elf_link_add_object_symbols): Likewise.
628 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
629 instead.
630
6312019-07-23 Omar Majid <omajid@redhat.com>
632
633 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
634 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
635 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
636 AMD64_NETBSD_MAGIC.
637 * peXXigen.c: Add comment about source of .NET magic numbers.
638
6392019-07-19 Alan Modra <amodra@gmail.com>
640
641 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
642 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
643 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
644 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
645 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
646 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
647 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
648 (ppc64_elf_check_relocs): Support pcrel tls relocs.
649 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
650 * bfd-in2.h: Regenerate.
651 * libbfd.h: Regenerate.
652
6532019-07-18 Alan Modra <amodra@gmail.com>
654
655 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
656 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
657 match test.
658
6592019-07-18 Alan Modra <amodra@gmail.com>
660
661 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
662 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
663 is more than 8 bits.
664 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
665 tls_type vars unsigned int.
666 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
667 to select r_type edit.
668
6692019-07-18 Alan Modra <amodra@gmail.com>
670
671 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
672 Correct comment.
673 * elf64-ppc.c (TLS_GDIE): Likewise.
674
6752019-07-18 Alan Modra <amodra@gmail.com>
676
677 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
678 range of tp-relative offsets.
679
6802019-07-15 Alan Modra <amodra@gmail.com>
681
682 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
683 alias is no longer bfd_link_hash_defined, clear the alias.
684
6852019-07-13 Alan Modra <amodra@gmail.com>
686
687 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
688 tls_sec.
689 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
690 (_bfd_elf_init_2_index_sections): Likewise.
691 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
692 relocations for local TLS symbols, use STN_UNDEF as the relocation
693 symbol.
694 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
695 leave TLS symbol value in the addend.
696
6972019-07-08 Alan Modra <amodra@gmail.com>
698
699 PR 24785
700 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
701 size before reading first word.
702
7032019-07-02 Nick Clifton <nickc@redhat.com>
704
705 PR 24717
706 * elf.c (is_debuginfo_file): New function.
707 (assign_file_positions_for_non_load_sections): Do not warn about
708 allocated sections outside of loadable segments if they are found
709 in a debuginfo file.
710 * elf-bfd.h (is_debuginfo_file): Prototype.
711
7122019-07-02 Nick Clifton <nickc@redhat.com>
713
714 PR 24753
715 * compress.c (bfd_get_full_section_contents): Do not complain
716 about linker created sections that are larger than the file size.
717
7182019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
719
720 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
721 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
722 for CMSE stubs.
723 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
724
7252019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
726
727 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
728 sections when .text section contain secure entry functions
729 is marked.
730
7312019-07-01 Nick Clifton <nickc@redhat.com>
732
733 PR 23839
734 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
735 section VMA in the offset used to update exidx relocs.
736
7372019-06-28 Nick Clifton <nickc@redhat.com>
738
739 PR 24708
740 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
741 large version reference section.
742 * compress.c (bfd_get_full_section_contents): Check for an
743 uncompressed section whose size is larger than the file size.
744
7452019-06-28 Alan Modra <amodra@gmail.com>
746
747 * format.c (bfd_check_format_matches): Don't match plugin target
748 if another target matches. Expand comment.
749 * targets.c (_bfd_target_vector): Move plugin_vec after all other
750 non-corefile targets, outside !SELECT_VECS.
751 * config.bfd: Don't handle targ=plugin here.
752 * configure.ac: Don't add plugin to enable_targets or handle in
753 target loop setting selvecs and other target vars.
754 * configure: Regenerate.
755
7562019-06-26 Nick Clifton <nickc@redhat.com>
757
758 PR 24703
759 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
760 messages for failures.
761 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
762 if returning an error value.
763
7642019-06-25 Jan Beulich <jbeulich@suse.com>
765
766 * elf-properties.c (elf_find_and_remove_property): Rename last
767 parameter. Mention it in comment.
768
7692019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
770
771 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
772 SEC_MERGE or SEC_CODE flags are set.
773 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
774 symtype consistently. Don't include sec_addr (sym_sec) in symval.
775 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
776 Add sec_addr (sym_sec) after handling merge sections.
777
7782019-06-24 H.J. Lu <hongjiu.lu@intel.com>
779
780 PR ld/24721
781 * elf-properties.c (elf_merge_gnu_property_list): Remove the
782 property after reporting property removal.
783
7842019-06-23 Alan Modra <amodra@gmail.com>
785
786 PR 24704
787 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
788 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
789 Reduce range of offsets allowed for other GOT relocs.
790
7912019-06-23 Alan Modra <amodra@gmail.com>
792
793 PR 24689
794 * elfcode.h (elf_object_p): Warning fix.
795
7962019-06-21 Alan Modra <amodra@gmail.com>
797
798 PR 24689
799 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
800
8012019-06-19 Alan Modra <amodra@gmail.com>
802
803 PR 24697
804 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
805 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
806
8072019-06-19 Alan Modra <amodra@gmail.com>
808
809 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
810 functions that require r2 valid to use local entry.
811 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
812
8132019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
814
815 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
816 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
817 with elfNN_aarch64_allocate_local_dynrelocs.
818
8192019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
820
821 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
822
8232019-06-14 Alan Modra <amodra@gmail.com>
824
825 * Makefile.in: Regenerate.
826 * configure: Regenerate.
827
8282019-06-14 Alan Modra <amodra@gmail.com>
829
830 * elf64-ppc.c: Fix comments involving paddi.
831
8322019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
833
834 PR 24643
835 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
836 absent, or the bfd is not in the ELF formart.
837 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
838
8392019-06-10 Christos Zoulas <christos@zoulas.com>
840
841 PR 24650
842 * elf.c (elfcore_make_auxv_note_section): New function.
843 (elfcore_grok_note): Use it.
844 (elfcore_grok_freebsd_note): Likewise.
845 (elfcore_grok_openbsd_note): Likewise.
846 (elfcore_grok_netbsd_note): Likewise. Plus add support for
847 NT_NETBSDCORE_AUXV notes.
848
8492019-06-06 Sudakshina Das <sudi.das@arm.com>
850
851 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
852 alignment of the new gnu property section.
853
8542019-06-06 Sudakshina Das <sudi.das@arm.com>
855
856 * bfd-in.h: Change comment.
857 * bfd-in2.h: Regenerate.
858 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
859 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
860 Likwise.
861
8622019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
863
864 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
865 Remove overflow check.
866
8672019-05-28 Alan Modra <amodra@gmail.com>
868
869 PR 24596
870 * cofflink.c (coff_link_check_archive_element): Don't assume
871 element is a coff object file after calling add_archive_element.
872
8732019-05-28 Alan Modra <amodra@gmail.com>
874
875 PR 24596
876 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
877 attempt to set sh_entsize for excluded PLT section.
878
8792019-05-28 Alan Modra <amodra@gmail.com>
880
881 PR 24596
882 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
883 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
884 allocated in alpha_dynamic_entries_for_reloc.
885
8862019-05-28 Alan Modra <amodra@gmail.com>
887
888 PR 24596
889 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
890 on NULL output_section.
891 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
892
8932019-05-28 Alan Modra <amodra@gmail.com>
894
895 PR 24596
896 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
897 entry when MUST_FIND. Abort when MUST_FIND not found.
898 (elf_m68k_get_bfd2got_entry): Likewise.
899 (elf_m68k_relocate_section): Remove now useless assert.
900
9012019-05-28 Alan Modra <amodra@gmail.com>
902
903 PR 24596
904 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
905 from bfd_link_info, not an output section owner.
906 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
907 (elf_hppa_final_link_relocate): Likewise.
908
9092019-05-28 Alan Modra <amodra@gmail.com>
910
911 PR 24596
912 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
913 create_object_symbols_section, obj_textsec, obj_datasec or
914 obj_bsssec. Fix other errors in placement.
915 * config.bfd: Obsolete tic30-aout.
916
9172019-05-28 Alan Modra <amodra@gmail.com>
918
919 PR 24596
920 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
921 end of section list as well as section_count.
922 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
923 section list before returning error.
924
9252019-05-27 Alan Modra <amodra@gmail.com>
926
927 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
928
9292019-05-27 Alan Modra <amodra@gmail.com>
930
931 PR 24596
932 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
933
9342019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
935
936 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
937 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
938 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
939 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
940 (elf_backend_merge_symbol_attribute): Define.
941
9422019-05-24 Alan Modra <amodra@gmail.com>
943
944 * po/SRC-POTFILES.in: Regenerate.
945
9462019-05-24 Alan Modra <amodra@gmail.com>
947
948 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
949 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
950 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
951 (struct ppc_link_hash_table): Add powerxx_stubs.
952 (ppc64_elf_check_relocs): Set powerxx_stubs.
953 (build_powerxx_offset, size_powerxx_offset),
954 (num_relocs_for_powerxx_offset),
955 (emit_relocs_for_powerxx_offset): New functions.
956 (plt_stub_size): Size powerxx stubs.
957 (ppc_build_one_stub): Emit powerxx stubs.
958 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
959 powerxx stubs.
960
9612019-05-24 Alan Modra <amodra@gmail.com>
962
963 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
964 R_PPC64_GOT_PCREL34.
965 (xlate_pcrel_opt): New function.
966 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
967 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
968 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
969
9702019-05-24 Alan Modra <amodra@gmail.com>
971
972 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
973 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
974 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
975 (BFD_RELOC_PPC64_PLT_PCREL34),
976 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
977 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
978 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
979 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
980 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
981 * elf64-ppc.c (PNOP): Define.
982 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
983 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
984 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
985 relocs.
986 (ppc64_elf_prefix_reloc): New function.
987 (struct ppc_link_hash_table): Add notoc_plt.
988 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
989 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
990 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
991 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
992 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
993 possible need for dynamic relocs on non-pcrel powerxx relocs.
994 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
995 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
996 (toc_adjusting_stub_needed): Likewise.
997 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
998 (ppc64_elf_relocate_section): Handle new powerxx relocs.
999 * bfd-in2.h: Regenerate.
1000 * libbfd.h: Regenerate.
1001
10022019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1003
1004 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
1005 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
1006 bpf_elf64_be_vec.
1007 * configure: Regenerate.
1008
10092019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1010
1011 * configure: Regenerated.
1012 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
1013 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
1014 (BFD64_BACKENDS): Add elf64-bpf.lo.
1015 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
1016 * Makefile.in (SOURCE_HFILES): Regenerate.
1017 * config.bfd (targ_cpu): Handle bpf-*-* targets.
1018 * cpu-bpf.c: New file.
1019 * elf64-bpf.c: Likewise.
1020 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
1021 bpf_elf64_le_vec.
1022 * archures.c: Define architecture bfd_arch_bpf and machine
1023 bfd_arch_bpf.
1024 * reloc.c: Define BFD relocations used by the BPF target.
1025 * bfd-in2.h: Regenerated.
1026 * libbfd.h: Likewise.
1027
10282019-05-22 Alan Modra <amodra@gmail.com>
1029
1030 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
1031 contents.
1032
10332019-05-22 Alan Modra <amodra@gmail.com>
1034
1035 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
1036 processing on "size error in section".
1037
10382019-05-22 Alan Modra <amodra@gmail.com>
1039
1040 * som.c (som_bfd_free_cached_info): Call
1041 _bfd_generic_close_and_cleanup.
1042
10432019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1044
1045 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
1046 for TLS_TPREL_HI16(/LO16) relocations in shared library.
1047
10482019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1049
1050 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
1051 checks. Search the RELA table for n64 relocations.
1052
10532019-05-21 Matthew Fortune <matthew.fortune@mips.com>
1054 Faraz Shahbazker <fshahbazker@wavecomp.com>
1055
1056 * elfxx-mips.c (LA25_BC): New macro.
1057 (mips_elf_link_hash_table)<compact_branches>: New field.
1058 (STUB_JALRC): New macro.
1059 (mipsr6_o32_exec_plt0_entry_compact): New array.
1060 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
1061 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
1062 (mipsr6_exec_plt_entry_compact): Likewise.
1063 (mips_elf_create_la25_stub): Use BC instead of J for stubs
1064 when compact_branches is true.
1065 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
1066 PLT for MIPSR6 with compact_branches. Do not reorder the
1067 compact branches PLT. Switch the lazy stub for MIPSR6
1068 with compact_branches to use JALRC.
1069 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
1070 when compact_branches is true.
1071 (_bfd_mips_elf_compact_branches): New function.
1072 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
1073
10742019-05-21 Tamar Christina <tamar.christina@arm.com>
1075
1076 PR ld/24373
1077 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
1078 Fix print formatter.
1079
10802019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1081
1082 PR 24460
1083 * elf32-arm.c (get_value_helper): Remove.
1084 (elf32_arm_final_link_relocate): Fix branch future relocations.
1085
10862019-05-21 Tamar Christina <tamar.christina@arm.com>
1087
1088 PR ld/24373
1089 * bfd-in.h (enum erratum_84319_opts): New
1090 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1091 int to enum erratum_84319_opts.
1092 * bfd-in2.h: Regenerate.
1093 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
1094 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
1095 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
1096 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
1097 (_bfd_aarch64_resize_stubs): Amend comment.
1098 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
1099 requested.
1100 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
1101 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
1102 erratum workaround.
1103 (clear_erratum_843419_entry): Update erratum conditional.
1104
11052019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1106
1107 PR ld/24571
1108 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
1109 when computing distance_short_enough.
1110
11112019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1112
1113 PR ld/24564
1114 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1115 Wrap around even if distance equals avr_pc_wrap_around.
1116
11172019-05-20 Nick Clifton <nickc@redhat.com>
1118
1119 * po/fr.po: Updated French translation.
1120
11212019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1122
1123 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1124
11252019-05-16 Alan Modra <amodra@gmail.com>
1126
1127 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1128
11292019-05-15 Alan Modra <amodra@gmail.com>
1130
1131 * elf32-arm.c (elf32_arm_write_section): Don't leave
1132 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1133 unitialised section contents.
1134
11352019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1136
1137 PR 19921
1138 * verilog.c: (VerilogDataWidth): New variable.
1139 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1140
11412019-05-08 Nick Clifton <nickc@redhat.com>
1142
1143 PR 24523
1144 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1145 rather than FALSE if encountering a non-ELF file.
1146
11472019-05-06 Alan Modra <amodra@gmail.com>
1148
1149 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1150
11512019-05-06 Alan Modra <amodra@gmail.com>
1152
1153 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1154 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1155 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1156 * libbfd.h: Regenerate.
1157 * bfd-in2.h: Regenerate.
1158
11592019-05-04 Alan Modra <amodra@gmail.com>
1160
1161 PR 24511
1162 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1163 following the standard section names.
1164 (bfd_decode_symclass): Prioritize section flag tests in
1165 decode_section_type before name tests in coff_section_type.
1166 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1167 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1168 their names and choose standard .text section flags for
1169 fake_section.
1170
11712019-05-02 Nick Clifton <nickc@redhat.com>
1172
1173 PR 24493
1174 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1175 .gnu.debugaltlink sections as debugging sections.
1176
11772019-04-30 Alan Modra <amodra@gmail.com>
1178
1179 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1180 (struct _ppc64_elf_section_data): Likewise.
1181 (ppc64_elf_check_relocs): Set above fields.
1182 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1183 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1184 when possible.
1185
11862019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1187
1188 PR ld/24486
1189 * elflink.c (elf_link_output_extsym): Don't complain undefined
1190 weak dynamic reference.
1191
11922019-04-25 Sudakshina Das <sudi.das@arm.com>
1193
1194 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1195 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1196 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1197 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1198 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1199 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1200 (elfNN_aarch64_small_plt0_bti_entry): Update.
1201 (elfNN_aarch64_small_plt_bti_entry): Update.
1202 (elfNN_aarch64_small_plt_pac_entry): Update.
1203 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1204 (setup_plt_values): Setup new entries.
1205 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1206 (elfNN_aarch64_plt_sym_val): Likewise.
1207
12082019-04-22 Jim Wilson <jimw@sifive.com>
1209
1210 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1211
12122019-04-19 Alan Modra <amodra@gmail.com>
1213
1214 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1215
12162019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1217
1218 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1219 building shared object.
1220 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1221
12222019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1223
1224 PR ld/24458
1225 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1226 linker_def.
1227
12282019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1229
1230 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1231 relocation.
1232 * bfd-in2.h: Regenerate.
1233 * libbfd.h: Likewise.
1234
12352019-04-15 Sudakshina Das <sudi.das@arm.com>
1236
1237 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1238 * bfd-in2.h: Regenerated.
1239 * libbfd.h: Regenerated.
1240
12412019-04-15 Sudakshina Das <sudi.das@arm.com>
1242
1243 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1244 * bfd-in2.h: Regenerated.
1245 * libbfd.h: Likewise.
1246
12472019-04-15 Sudakshina Das <sudi.das@arm.com>
1248
1249 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1250 * bfd-in2.h: Regenerated.
1251 * libbfd.h: Regenerated.
1252 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1253 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1254 and R_ARM_THM_BF12 together.
1255 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1256
12572019-04-15 Sudakshina Das <sudi.das@arm.com>
1258
1259 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1260 * libbfd.h: Regenerated.
1261 * bfd-in2.h: Regenerated.
1262 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1263 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1264 and R_ARM_THM_BF18 together.
1265 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1266
12672019-04-15 Sudakshina Das <sudi.das@arm.com>
1268
1269 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1270 * bfd-in2.h: Regenerated.
1271 * libbfd.h: Regenerated.
1272 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1273 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1274 and R_ARM_THM_BF16 together.
1275 (get_value_helper): New reloc helper.
1276 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1277
12782019-04-15 Sudakshina Das <sudi.das@arm.com>
1279
1280 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1281 * bfd-in2.h: Regenerate.
1282 * libbfd.h: Regenerate.
1283
12842019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1285
1286 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1287 * bfd-in2.h: Regenerate.
1288 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1289 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1290 and update assert.
1291 (using_thumb2): Likewise.
1292 (using_thumb2_bl): Update assert.
1293 (arch_has_arm_nop): Likewise.
1294 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1295 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1296
12972019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1298
1299 * elf-linker-x86.h (elf_x86_cet_report): New.
1300 (elf_linker_x86_params): Add cet_report.
1301 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1302 missing IBT and SHSTK properties if needed.
1303
13042019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1305
1306 PR ld/24436
1307 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1308 "h != NULL". Don't check "h != NULL" before calling.
1309 bfd_elf_gc_record_vtentry.
1310 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1311 * elf32-bfin.c (bfin_check_relocs): Likewise.
1312 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1313 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1314 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1315 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1316 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1317 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1318 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1319 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1320 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1321 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1322 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1323 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1324 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1325 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1326 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1327 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1328 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1329 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1330 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1331 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1332 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1333 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1334 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1335 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1336 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1337 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1338 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1339 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1340 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1341 VTENTRY entry.
1342
13432019-04-11 Alan Modra <amodra@gmail.com>
1344
1345 PR 24435
1346 * elflink.c (elf_link_add_object_symbols): Don't read partial
1347 dynamic entries from fuzzed objects.
1348
13492019-04-11 Tamar Christina <tamar.christina@arm.com>
1350
1351 PR ld/24302
1352 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1353 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1354 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1355
13562019-04-10 Michael Forney <mforney@mforney.org>
1357
1358 PR 24427
1359 * doc/chew.c (free_words): Correctly free "push_text" strings.
1360
13612019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1362
1363 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1364
13652019-04-08 Alan Modra <amodra@gmail.com>
1366
1367 * configure.ac (elfxx_x86): Define and use.
1368 * configure: Regenerate.
1369
13702019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1371
1372 * elf-linker-x86.h: New file.
1373 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1374 to get x86-specific linker options.
1375 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1376 (elf_x86_64_check_relocs): Likewise.
1377 (elf_x86_64_relocate_section): Likewise.
1378 (elf_x86_64_link_setup_gnu_properties): Likewise.
1379 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1380 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1381 (_bfd_elf_linker_x86_set_options): New function.
1382 * elfxx-x86.h: Include "elf-linker-x86.h".
1383 (elf_x86_link_hash_table): Add params.
1384
13852019-04-03 Alan Modra <amodra@gmail.com>
1386
1387 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1388 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1389 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1390 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1391 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1392 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1393
13942019-04-02 Jim Wilson <jimw@sifive.com>
1395
1396 PR 24389
1397 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1398 ELF header flags to after check for ELF object file. Loop through
1399 sections looking for code sections, if none, then skip ABI checks.
1400
14012019-03-30 Andrew Waterman <andrew@sifive.com>
1402
1403 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1404 rd == X_RA case.
1405
14062019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1407
1408 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1409 info->export_dynamic to the conditional.
1410
14112019-03-28 Alan Modra <amodra@gmail.com>
1412
1413 PR 24392
1414 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1415 * configure: Regenerate.
1416 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1417 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1418 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1419 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1420 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1421
14222019-03-21 Jim Wilson <jimw@sifive.com>
1423
1424 PR 24365
1425 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1426 verify sym non-NULL before using. Add identical check using h.
1427
14282019-03-21 Sudakshina Das <sudi.das@arm.com>
1429
1430 * elf-bfd.h (struct elf_backend_data): Add argument to
1431 merge_gnu_properties.
1432 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1433 itself and while calling bed->merge_gnu_properties.
1434 (elf_merge_gnu_property_list): Update the calls for
1435 elf_merge_gnu_properties.
1436 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1437 of --force-bti warning and add argument.
1438 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1439 warning.
1440 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1441 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1442 declaration.
1443
14442019-03-20 Sudakshina Das <sudi.das@arm.com>
1445
1446 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1447 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1448 (elf_backend_fixup_gnu_properties): Define for AArch64.
1449
14502019-03-18 Alan Modra <amodra@gmail.com>
1451
1452 PR 24355
1453 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1454 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1455 attempt at writing glink stubs only once.
1456
14572019-03-16 Alan Modra <amodra@gmail.com>
1458
1459 PR 24337
1460 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1461 (_bfd_elf_rel_local_sym): Likewise.
1462 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1463 section of symbols with unrecognized shndx.
1464
14652019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1466
1467 PR ld/24267
1468 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1469 section.
1470 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1471 in discarded section.
1472
14732019-03-15 Alan Modra <amodra@gmail.com>
1474
1475 PR 24339
1476 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1477 symbol after globals if elf_bad_symtab is not set.
1478
14792019-03-15 Alan Modra <amodra@gmail.com>
1480
1481 PR 24337
1482 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1483 (_bfd_elf_rel_local_sym): Likewise.
1484
14852019-03-15 Alan Modra <amodra@gmail.com>
1486
1487 PR 24336
1488 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1489 object files with sh_size not a multiple of sh_entsize.
1490
14912019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1492
1493 PR ld/24338
1494 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1495 input with bad relocation.
1496
149722019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1498
1499 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1500
15012019-03-14 Nick Clifton <nickc@redhat.com>
1502
1503 PR 24334
1504 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1505 (save_section_vma): Initialise field to the number of entries in
1506 the sec_vma table.
1507 (section_vma_same): Check that the number of entries in the
1508 sec_vma table matches the number of sections in the bfd.
1509
15102019-03-14 Nick Clifton <nickc@redhat.com>
1511
1512 PR 24333
1513 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1514 section owner pointer when adding the default symbol.
1515
15162019-03-14 Nick Clifton <nickc@redhat.com>
1517
1518 PR 24332
1519 * elflink.c (elf_link_add_object_symbols): Add new local variable
1520 extversym_end. Initialise it to point to the end of the version
1521 symbol table, if present. Check it when initialising and updating
1522 the ever pointer.
1523
15242019-03-13 Sudakshina Das <sudi.das@arm.com>
1525
1526 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1527 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1528 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1529 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1530 and PLT_PAC_PLT.
1531 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1532 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1533 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1534
15352019-03-13 Sudakshina Das <sudi.das@arm.com>
1536 Szabolcs Nagy <szabolcs.nagy@arm.com>
1537
1538 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1539 (aarch64_bti_pac_info): New.
1540 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1541 (bfd_elf32_aarch64_set_options): Likewise.
1542 * bfd-in2.h: Regenerate
1543 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1544 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1545 (elfNN_aarch64_small_plt0_bti_entry): New.
1546 (elfNN_aarch64_small_plt_bti_entry): New.
1547 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1548 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1549 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1550 tlsdesc_plt_entry_size fields.
1551 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1552 (setup_plt_values): New helper function.
1553 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1554 bti enable type.
1555 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1556 fixed macros.
1557 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1558 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1559 to plt stubs instead of fixed ones and update filling them according
1560 to the need for bti.
1561 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1562 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1563 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1564 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1565 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1566 is set.
1567 (bfd_elfNN_get_synthetic_symtab): Define.
1568 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1569 and mising BTI NOTE SECTION.
1570
1571
15722019-03-13 Sudakshina Das <sudi.das@arm.com>
1573
1574 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1575 linker created inputs from merge.
1576 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1577 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1578 (elfNN_aarch64_link_setup_gnu_properties): New.
1579 (elfNN_aarch64_merge_gnu_properties): New.
1580 (elf_backend_setup_gnu_properties): Define for AArch64.
1581 (elf_backend_merge_gnu_properties): Likewise.
1582 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1583 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1584 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1585 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1586 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1587 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1588 (elf_backend_parse_gnu_properties): Define for AArch64.
1589
15902019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1591
1592 PR ld/24322
1593 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1594 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1595
15962019-03-12 Alan Modra <amodra@gmail.com>
1597
1598 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1599 nmemb parameter. Use bfd_alloc2.
1600 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1601 Delete assertion.
1602 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1603 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1604 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1605 doesn't overflow.
1606 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1607 (assign_section_numbers): Style fix.
1608 (swap_out_syms): Use bfd_malloc2.
1609 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1610 overflow.
1611 (_bfd_elf_make_empty_symbol): Style fix.
1612 (elfobj_grok_stapsdt_note_1): Formatting.
1613 * elfcode.h (elf_object_p): Use bfd_alloc2.
1614 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1615 (elf_slurp_symbol_table): Use bfd_zalloc2.
1616 (elf_slurp_reloc_table): Use bfd_alloc2.
1617 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1618 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1619 size calculation doesn't overflow.
1620 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1621 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1622 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1623
16242019-03-08 Alan Modra <amodra@gmail.com>
1625
1626 PR 24311
1627 * merge.c (merge_strings): Return secinfo. Don't pad section
1628 to alignment here.
1629 (_bfd_merge_sections): Pad section to alignment here, if input
1630 sections contributing to merged output all pad to alignment.
1631 Formatting.
1632
16332019-03-06 Nick Clifton <nickc@redhat.com>
1634
1635 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1636 table pointer.
1637 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1638 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1639
16402019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1641
1642 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1643 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1644
1645 PR 20113
1646 * elf32-s390.c (allocate_dynrelocs): Update comment.
1647
16482019-02-28 Tamar Christina <tamar.christina@arm.com>
1649
1650 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1651
16522019-02-28 Nick Clifton <nickc@redhat.com>
1653
1654 PR 24273
1655 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1656 section that is not NUL terminated.
1657
16582019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1659
1660 PR ld/24276
1661 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1662 by linker when checking copy reloc on protected symbol.
1663
16642019-02-24 Alan Modra <amodra@gmail.com>
1665
1666 PR 24144
1667 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1668
16692019-02-20 Eric Tsai <erictsai@cadence.com>
1670
1671 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1672 sections between the call site and call destination and adjust
1673 call distance by the largest alignment.
1674
16752019-02-20 Alan Hayward <alan.hayward@arm.com>
1676
1677 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1678 * elf.c (elfcore_grok_aarch_pauth): New function.
1679 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1680 (elfcore_write_aarch_pauth): New function.
1681 (elfcore_write_register_note): Check for AArch64 pauth section.
1682
16832019-02-20 Alan Modra <amodra@gmail.com>
1684
1685 PR 24225
1686 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1687 return value.
1688
16892019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1690
1691 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1692 Darwin hosts, not just or1k.
1693 * configure: Regenerate.
1694
16952019-02-20 Alan Modra <amodra@gmail.com>
1696
1697 PR 24236
1698 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1699 sentinel NUL to string buffer nearer to loop where it is used.
1700 Don't go past sentinel when scanning strings, and don't write
1701 NUL again.
1702 * archive.c (do_slurp_coff_armap): Simplify string handling to
1703 archive64.c style.
1704
17052019-02-19 Alan Modra <amodra@gmail.com>
1706
1707 PR 24235
1708 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1709 attempting to prevent read past end of section.
1710
17112019-02-18 Alan Modra <amodra@gmail.com>
1712
1713 PR 24225
1714 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1715 PRIx64 to generate warning messages. Print local sym names too.
1716
17172019-02-09 Vineet Gupta <vgupta@synopsys.com>
1718
1719 * elf32-arc (INIT_SYM_STRING): Delete.
1720 (FINI_SYM_STRING): Likewise.
1721 (init_str): Likewise.
1722 (fini_str): Likewise.
1723
17242019-02-08 Alan Modra <amodra@gmail.com>
1725
1726 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1727 for bss-plt" warning to make it an error.
1728
17292019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1730
1731 PR ld/18841
1732 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1733 reloc_class_ifunc for ifunc symbols.
1734 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1735
17362019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1737
1738 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1739 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1740
17412019-02-07 Nick Clifton <nickc@redhat.com>
1742
1743 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1744 into the definitely obsolete list.
1745
17462019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1747
1748 PR ld/24151
1749 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1750 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1751 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1752 relocations to ...
1753 (elf_x86_64_check_relocs): Here.
1754 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1755 to check if a symbol is defined in a non-shared object.
1756 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1757
17582019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1759
1760 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1761 of 'labs' (and fix GCC warning).
1762
17632019-01-25 Nick Clifton <nickc@redhat.com>
1764
1765 * po/ru.po: Updated Russian translation.
1766
17672019-01-23 Nick Clifton <nickc@redhat.com>
1768
1769 * po/fr.po: Updated French translation.
1770
17712019-01-21 Nick Clifton <nickc@redhat.com>
1772
1773 * po/pt.po: Updated Portuguese translation.
1774 * po/uk.po: Updated Ukranian translation.
1775
17762019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1777
1778 PR 24108
1779 * elf32-nds32.c (nds32_relocate_section): Add space between words
1780 in error message.
1781 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1782 error message.
1783 (riscv_i_or_e_p): Likewise.
1784 (riscv_merge_arch_attr_info): Likewise.
1785
17862019-01-19 Nick Clifton <nickc@redhat.com>
1787
1788 * version.m4: Reset to 2.32.51
1789 * configure: Regenerate.
1790 * po/bfd.pot: Regenerate.
1791
17922018-06-24 Nick Clifton <nickc@redhat.com>
1793
1794 2.32 branch created.
1795
17962019-01-16 Kito Cheng <kito@andestech.com>
1797
1798 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1799 for OBJ_ATTR_PROC.
1800
18012019-01-16 Kito Cheng <kito@andestech.com>
1802 Nelson Chu <nelson@andestech.com>
1803
1804 * elfnn-riscv.c (in_subsets): New.
1805 (out_subsets): Likewise.
1806 (merged_subsets): Likewise.
1807 (riscv_std_ext_p): Likewise.
1808 (riscv_non_std_ext_p): Likewise.
1809 (riscv_std_sv_ext_p): Likewise.
1810 (riscv_non_std_sv_ext_p): Likewise.
1811 (riscv_version_mismatch): Likewise.
1812 (riscv_i_or_e_p): Likewise.
1813 (riscv_merge_std_ext): Likewise.
1814 (riscv_merge_non_std_and_sv_ext): Likewise.
1815 (riscv_merge_arch_attr_info): Likewise.
1816 (riscv_merge_attributes): Likewise.
1817 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1818
1819 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1820 (elf_backend_obj_attrs_vendor): Define.
1821 (elf_backend_obj_attrs_section_type): Likewise.
1822 (elf_backend_obj_attrs_section): Likewise.
1823 (elf_backend_obj_attrs_arg_type): Define as
1824 riscv_elf_obj_attrs_arg_type.
1825 * elfxx-riscv.c (riscv_estimate_digit): New.
1826 (riscv_estimate_arch_strlen1): Likewise.
1827 (riscv_estimate_arch_strlen): Likewise.
1828 (riscv_arch_str1): Likewise.
1829 (riscv_arch_str): Likewise.
1830 * elfxx-riscv.h (riscv_arch_str): Declare.
1831
18322019-01-14 John Darrington <john@darrington.wattle.id.au>
1833
1834 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1835 * libbfd.h: regen.
1836 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1837 source field. (md_apply_fix): Apply final fix
1838 to BFD_RELOC_S12Z_OPR.
1839 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1840
18412019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1842
1843 PR 20113
1844 * elf32-s390.c (allocate_dynrelocs): Update comment.
1845
18462019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1847
1848 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1849 * configure: Regenerate.
1850
18512019-01-08 Alan Modra <amodra@gmail.com>
1852
1853 PR 23699
1854 PR 24065
1855 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1856 address range.
1857
18582019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1859
1860 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1861 * bfd/bfd-in2.h: Regenerate.
1862 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1863 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1864
18652019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1866
1867 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1868 default target, little endian target is more suitable.
1869
18702019-01-04 Alan Modra <amodra@gmail.com>
1871
1872 PR 24061
1873 PR 21786
1874 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1875 adjust all callers.
1876 (EQ_VALUE_IN_FIELD): Likewise.
1877 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1878
18792019-01-01 Alan Modra <amodra@gmail.com>
1880
1881 Update year range in copyright notice of all files.
1882
1883For older changes see ChangeLog-2018
1884\f
1885Copyright (C) 2019 Free Software Foundation, Inc.
1886
1887Copying and distribution of this file, with or without modification,
1888are permitted in any medium without royalty provided the copyright
1889notice and this notice are preserved.
1890
1891Local Variables:
1892mode: change-log
1893left-margin: 8
1894fill-column: 74
1895version-control: never
1896End:
This page took 0.039589 seconds and 4 git commands to generate.