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