1 2019-09-23 Alan Modra <amodra@gmail.com>
3 * bfd-in.h (bfd_sunos_get_needed_list),
4 (bfd_sunos_record_link_assignment),
5 (bfd_sunos_size_dynamic_sections),
6 (bfd_i386linux_size_dynamic_sections),
7 (bfd_sparclinux_size_dynamic_sections): Delete obsolete decls.
8 * bfd-in2.h: Regenerate.
10 2019-09-23 Alan Modra <amodra@gmail.com>
12 * bfd-in.h: Move xcoff function declarations..
13 * xcofflink.h: ..to here, new file.
14 * xcofflink.c: Include xcofflink.h.
15 * coff-rs6000.c (bfd_xcoff_ar_archive_set_magic): Delete unused func.
16 * bfd-in2.h: Regenerate.
18 2019-09-23 Alan Modra <amodra@gmail.com>
20 * bfd-in.h: Delete coff forward refs and move coff declaration..
21 * coff-bfd.h: ..to here.
22 * bfd-in2.h: Regenerate.
24 2019-09-23 Alan Modra <amodra@gmail.com>
26 * bfd-in.h: Move arm declaraions..
27 * cpu-arm.h: ..to here, new file..
28 * coff-arm.h: ..and here, new file..
29 * elf32-arm.h: ..and here, new file.
30 * cpu-arm.c: Include cpu-arm.h.
31 * coff-arm.c: Include cpu-arm.h and coff-arm.h.
32 * elf32-arm.c: Include cpu-arm.h and elf32-arm.h.
33 * pe-arm.c: Move function rename defines later.
34 * pe-arm-wince.c: Likewise and include sysdep.h and bfd.h early.
35 * bfd-in2.h: Regenerate.
37 2019-09-23 Alan Modra <amodra@gmail.com>
39 * bfd-in.h: Move tic6x function declaration..
40 * elf32-tic6x.h: ..to here.
41 * bfd-in2.h: Regenerate.
43 2019-09-23 Alan Modra <amodra@gmail.com>
45 * bfd-in.h: Move aarch64 declarations and defines..
46 * cpu-aarch64.h: ..to here, new file..
47 * elfxx-aarch64.h: ..and here.
48 * cpu-aarch64.c: Include cpu-aarch64.h.
49 * elfnn-aarch64.c: Likewise.
50 * bfd-in2.h: Regenerate.
52 2019-09-23 Alan Modra <amodra@gmail.com>
54 * bfd-in.h: Delete ticoff function declarations.
55 * coff-tic54x.c (bfd_ticoff_set_section_load_page),
56 (bfd_ticoff_get_section_load_page): Make static.
57 * bfd-in2.h: Regenerate.
59 2019-09-23 Alan Modra <amodra@gmail.com>
61 * bfd-in.h: Move h8300 function declaration to..
62 * cpu-h8300.h: ..here, new file.
63 * cpu-h8300.c: Include cpu-h8300.h.
64 * elf32-h8300.c: Likewise.
65 * bfd-in2.h: Regenerate.
67 2019-09-23 Alan Modra <amodra@gmail.com>
69 * bfd-in.h: Move ia64 function declarations..
70 * elfxx-ia64.h: ..to here.
71 * bfd-in2.h: Regenerate.
73 2019-09-23 Alan Modra <amodra@gmail.com>
75 * bfd-in.h: Move v850 function declarations..
76 * elf32-v850.h: ..to here, new file.
77 * elf32-v850.c: Include elf32-v850.h.
78 * bfd-in2.h: Regenerate.
80 2019-09-23 Alan Modra <amodra@gmail.com>
82 * bfd-in.h: Move mips function declaration to..
83 * elfxx-mips.h: ..here.
84 * bfd-in2.h: Regenerate.
86 2019-09-23 Alan Modra <amodra@gmail.com>
88 * bfd-in.h: Move csky function declarations to..
89 * elf32-csky.h: ..here, new file.
90 * elf32-csky.c: Include elf32-csky.h.
91 * bfd-in2.h: Regenerate.
93 2019-09-20 Nelson Chu <nelson.chu@sifive.com>
95 * elfnn-riscv.c (riscv_pcgp_hi_reloc): Add new field undefined_weak.
96 (riscv_record_pcgp_hi_reloc): New parameter undefined_weak.
97 Set undefined_weak field from it.
98 (relax_func_t): New parameter undefined_weak.
99 (_bfd_riscv_relax_call): New ignored parameter undefined_weak.
100 (_bfd_riscv_relax_tls_le): Likewise.
101 (_bfd_riscv_relax_align): Likewise.
102 (_bfd_riscv_relax_delete): Likewise.
103 (_bfd_riscv_relax_lui): New parameter undefined_weak. If true,
104 allow relaxing. For LO12* relocs, set rs1 to x0 when undefined_weak.
105 (_bfd_riscv_relax_pc): New parameter undefined_weak. For LO12* relocs,
106 set undefined_weak from hi_reloc. If true, allow relaxing. For LO12*
107 relocs, set rs1 to x0 when undefined_weak and change to non-pcrel
109 (_bfd_riscv_relax_section): New local undefined_weak. Set for
110 undef weak relocs that can be relaxed. Pass to relax_func call.
112 2019-09-20 Alan Modra <amodra@gmail.com>
114 * bfd-in.h (bfd_section_name, bfd_section_size, bfd_section_vma),
115 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
116 (bfd_section_userdata, bfd_is_com_section, discarded_section),
117 (bfd_get_section_limit_octets, bfd_get_section_limit): Delete macros.
118 * bfd.c (bfd_get_section_limit_octets, bfd_get_section_limit),
119 (bfd_section_list_remove, bfd_section_list_append),
120 (bfd_section_list_prepend, bfd_section_list_insert_after),
121 (bfd_section_list_insert_before, bfd_section_removed_from_list):
122 New inline functions.
123 * section.c (bfd_is_und_section, bfd_is_abs_section),
124 (bfd_is_ind_section, bfd_is_const_section, bfd_section_list_remove),
125 (bfd_section_list_append, bfd_section_list_prepend),
126 (bfd_section_list_insert_after, bfd_section_list_insert_before),
127 (bfd_section_removed_from_list): Delete macros.
128 (bfd_section_name, bfd_section_size, bfd_section_vma),
129 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
130 (bfd_section_userdata, bfd_is_com_section, bfd_is_und_section),
131 (bfd_is_abs_section, bfd_is_ind_section, bfd_is_const_section),
132 (discarded_section): New inline functions.
133 * bfd-in2.h: Regenerate.
135 2019-09-20 Alan Modra <amodra@gmail.com>
137 * bfd-in.h (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
138 (bfd_asymbol_bfd, bfd_asymbol_flavour, bfd_set_asymbol_name): Delete.
139 * bfd.c (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
140 (bfd_asymbol_bfd, bfd_set_asymbol_name): New inline functions.
141 * targets.c (bfd_asymbol_flavour): Likewise.
142 * bfd-in2.h: Regenerate.
144 2019-09-20 Alan Modra <amodra@gmail.com>
146 * archive.c (bfd_generic_archive_p): Use bfd_set_thin_archive.
147 * bfd-in.h (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
148 (bfd_get_target, bfd_get_flavour, bfd_family_coff, bfd_big_endian),
149 (bfd_little_endian, bfd_header_big_endian, bfd_header_little_endian),
150 (bfd_get_file_flags, bfd_applicable_file_flags),
151 (bfd_applicable_section_flags, bfd_has_map, bfd_is_thin_archive),
152 (bfd_valid_reloc_types, bfd_usrdata, bfd_get_start_address),
153 (bfd_get_symcount, bfd_get_outsymbols, bfd_count_sections),
154 (bfd_get_dynamic_symcount, bfd_get_symbol_leading_char): Delete.
155 * bfd/bfd.c (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
156 (bfd_get_file_flags, bfd_get_start_address, bfd_get_symcount),
157 (bfd_get_dynamic_symcount, bfd_get_outsymbols, bfd_count_sections),
158 (bfd_has_map, bfd_is_thin_archive, bfd_set_thin_archive),
159 (bfd_usrdata, bfd_set_usrdata): New inline functions.
160 * targets.c (bfd_get_target, bfd_get_flavour),
161 (bfd_applicable_file_flags, bfd_family_coff, bfd_big_endian),
162 (bfd_little_endian, bfd_header_big_endian),
163 (bfd_header_little_endian, bfd_applicable_section_flags),
164 (bfd_get_symbol_leading_char): New inline functions.
165 * bfd-in2.h: Regenerate.
167 2019-09-20 Alan Modra <amodra@gmail.com>
169 * elf64-ppc.c (ppc64_glibc_dynamic_reloc): New function.
170 (ppc64_elf_relocate_section): Warn if emitting unsupported dynamic
173 2019-09-18 Alan Modra <amodra@gmail.com>
175 * bfd-in.h (bfd_get_section_name, bfd_get_section_vma),
176 (bfd_get_section_lma, bfd_get_section_alignment),
177 (bfd_get_section_size, bfd_get_section_flags),
178 (bfd_get_section_userdata): Delete.
179 (bfd_section_name, bfd_section_size, bfd_section_vma),
180 (bfd_section_lma, bfd_section_alignment): Lose bfd parameter.
181 (bfd_section_flags, bfd_section_userdata): New.
182 (bfd_is_com_section): Rename parameter.
183 * section.c (bfd_set_section_userdata, bfd_set_section_vma),
184 (bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section),
185 (bfd_set_section_size): Delete bfd parameter, rename section parameter.
186 (bfd_set_section_lma): New.
187 * bfd-in2.h: Regenerate.
188 * mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param,
190 * aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c,
191 * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
192 * compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h,
193 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c,
194 * elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c,
195 * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
196 * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c,
197 * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c,
198 * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c,
199 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
200 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
201 * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
202 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
203 * elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c,
204 * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
205 * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
206 * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c,
207 * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
208 * elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
209 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
210 * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c,
211 * elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
212 * elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c,
213 * mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c,
214 * peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c,
215 * xcofflink.c: Update throughout for bfd section macro and function
218 2019-09-18 Alan Modra <amodra@gmail.com>
220 * bfd-in.h (bfd_asymbol_section): Rename from bfd_get_section.
221 (bfd_get_output_section): Delete.
222 (bfd_asymbol_base): Delete.
223 (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
224 (bfd_asymbol_bfd, bfd_asymbol_flavour): Tidy.
225 (bfd_set_asymbol_name): New macro.
226 * bfd-in2.h: Regenerate.
227 * aout-cris.c: Update throughout to use bfd_asymbol_section.
229 * cofflink.c: Likewise.
230 * dwarf2.c: Likewise.
233 * elf32-arm.c: Likewise.
234 * elf32-mips.c: Likewise.
235 * elf32-score.c: Likewise.
236 * elf32-score7.c: Likewise.
237 * elfn32-mips.c: Likewise.
238 * elfnn-aarch64.c: Likewise.
239 * elfxx-mips.c: Likewise.
240 * linker.c: Likewise.
242 * elf64-mmix.c (mmix_elf_reloc): Part expand bfd_get_output_section.
244 2019-09-18 Simon Marchi <simon.marchi@polymtl.ca>
246 * Makefile.in: Re-generate.
247 * configure: Re-generate.
248 * doc/Makefile.in: Re-generate.
250 2019-09-18 Alan Modra <amodra@gmail.com>
252 * aoutx.h (slurp_symbol_table): Don't set symcount using bfd_get
254 * pdp11.c (slurp_symbol_table): Likewise.
255 * som.c (som_slurp_symbol_table): Likewise.
256 * coff-ppc.c (ppc_bfd_coff_final_link): Likewise.
257 * coffcode.h (coff_slurp_symbol_table): Likewise.
258 * cofflink.c (_bfd_coff_final_link): Likewise.
259 * ecoff.c (ecoff_slurp_symbolic_header): Likewise.
260 (_bfd_ecoff_slurp_symbolic_info): Likewise.
261 (_bfd_ecoff_slurp_symbol_table): Likewise.
262 (_bfd_ecoff_bfd_final_link): Likewise.
263 * elf.c (_bfd_elf_canonicalize_symtab): Likewise.
264 * elflink.c (elf_link_output_symstrtab): Likewise.
265 (bfd_elf_final_link): Likewise.
266 * peicode.h (pe_ILF_build_a_bfd): Likewise.
267 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
268 * aoutx.h (some_aout_object_p, slurp_symbol_table): Don't set
269 start_address or symcount using bfd_get macros.
270 * coffgen.c (coff_real_object_p): Likewise.
271 * pdp11.c (some_aout_object_p, slurp_symbol_table): Likewise.
272 * som.c (som_object_setup, som_slurp_symbol_table): Likewise.
273 * elfcore.h (elf_core_file_p): Don't set start_address using
275 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Don't set dynsymcount
277 * bfd.c (bfd_set_file_flags): Don't set flags using bfd_get macro.
278 * linker.c (bfd_generic_link_read_symbols): Don't set outsymbols
279 or symcount using bfd_get macros.
280 (_bfd_generic_final_link, generic_add_output_symbol): Likewise.
281 * syms.c (bfd_set_symtab): Likewise.
282 * vms-alpha.c (alpha_vms_bfd_final_link): Likewise.
283 * archive.c (do_slurp_bsd_armap): Don't set has_armap using
285 (do_slurp_coff_armap, bfd_slurp_armap): Likewise.
286 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
287 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
288 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
289 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
290 * som.c (som_slurp_armap): Likewise.
292 2019-09-18 Alan Modra <amodra@gmail.com>
294 * archures.c (bfd_get_arch): Make param const.
295 (bfd_get_mach, bfd_arch_bits_per_byte): Likewise.
296 (bfd_arch_bits_per_address, bfd_octets_per_byte): Likewise.
297 * bfd-in2.h: Regenerate.
299 2019-09-18 Alan Modra <amodra@gmail.com>
301 * bfd-in.h (carsym.name): Make const.
302 * reloc.c (struct reloc_howto_struct.name): Likewise.
303 * targets.c (bfd_target.name): Likewise.!
304 * bfd.c (bfd_get_sign_extend_vma): Make variable const.
305 * som.c (som_bfd_fill_in_ar_symbols): Use an intermediary variable
306 when setting carsym.name.
307 * bfd-in2.h: Regenerate.
309 2019-09-18 Alan Modra <amodra@gmail.com>
311 * mach-o.c (bfd_mach_o_fat_member_init): Likewise. Replace
312 xstrdup and xmalloc with bfd_strdup and bfd_malloc. Return an
313 error status. Adjust calls.
314 * vms-lib.c (_bfd_vms_lib_get_module): Test mhd->id earlier.
315 Close bfd on failure. Replace xstrdup/bfd_alloc use with
316 bfd_malloc. Use bfd_set_filename.
318 2019-09-18 Alan Modra <amodra@gmail.com>
320 * elf64-ppc.c (must_be_dyn_reloc): Return 0 for TOC16 relocs.
321 (ppc64_elf_check_relocs): Support dynamic/copy relocs for TOC16.
322 (ppc64_elf_adjust_dynamic_symbol): Don't keep dynamic reloc when
323 needs_copy even if all relocs are in rw sections.
324 (dec_dynrel_count): Handle TOC16 relocs.
325 (ppc64_elf_relocate_section): Support dynamic relocs for TOC16.
326 (ppc64_elf_finish_dynamic_symbol): Adjust to handle needs_copy
329 2019-09-16 Phil Blundell <pb@pbcl.net>
331 * version.m4: Set version to 2.33.50.
332 * Makefile.in, configure, doc/Makefile.in: Regenerated.
334 2019-09-11 Tom Tromey <tom@tromey.com>
336 * opncls.c (bfd_set_filename): New function.
337 * bfd-in2.h: Regenerate.
339 2019-09-11 Alan Modra <amodra@gmail.com>
341 * targets.c (struct bfd_target): Add _bfd_group_name.
342 (BFD_JUMP_TABLE): Likewise.
343 * coffgen.c (bfd_coff_group_name): New function.
344 * elf.c (bfd_elf_group_name): New function.
345 * linker.c (_bfd_nolink_bfd_group_name): New function.
346 * section.c (bfd_generic_group_name): New function.
347 * elf-bfd.h (bfd_elf_group_name): Declare.
348 * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
349 * libcoff-in.h (bfd_coff_group_name): Declare.
350 * aout-target.h (MY_bfd_group_name): Define.
351 * aout-tic30.c (MY_bfd_group_name): Define.
352 * bfd.c (bfd_group_name): Define.
353 * binary.c (binary_bfd_group_name): Define.
354 * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
355 * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
356 * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
357 * coffcode.h (coff_bfd_group_name): Define.
358 * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
359 * i386msdos.c (msdos_bfd_group_name): Define.
360 * ihex.c (ihex_bfd_group_name): Define.
361 * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
362 * mmo.c (mmo_bfd_group_name): Define.
363 * pef.c (bfd_pef_bfd_group_name): Define.
364 * plugin.c (bfd_plugin_bfd_group_name): Define.
365 * ppcboot.c (ppcboot_bfd_group_name): Define.
366 * som.c (som_bfd_group_name): Define.
367 * srec.c (srec_bfd_group_name): Define.
368 * tekhex.c (tekhex_bfd_group_name): Define.
369 * verilog.c (verilog_bfd_group_name): Define.
370 * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
371 * xsym.c (bfd_sym_bfd_group_name): Define.
372 * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
373 (rs6000_xcoff64_aix_vec): Likewise.
374 * bfd-in2.h: Regenerate.
375 * libbfd.h: Regenerate.
376 * libcoff.h: Regenerate.
378 2019-09-10 Nick Clifton <nickc@redhat.com>
381 * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
383 (bfd_default_arch_struct): Initialise the new field.
384 * bfd-in2.h: Regenerate.
385 * cpu-aarch64.c: Initialise the new field.
386 * cpu-alpha.c: Likewise.
387 * cpu-arc.c: Likewise.
388 * cpu-arm.c: Likewise.
389 * cpu-avr.c: Likewise.
390 * cpu-bfin.c: Likewise.
391 * cpu-bpf.c: Likewise.
392 * cpu-cr16.c: Likewise.
393 * cpu-cr16c.c: Likewise.
394 * cpu-cris.c: Likewise.
395 * cpu-crx.c: Likewise.
396 * cpu-csky.c: Likewise.
397 * cpu-d10v.c: Likewise.
398 * cpu-d30v.c: Likewise.
399 * cpu-dlx.c: Likewise.
400 * cpu-epiphany.c: Likewise.
401 * cpu-fr30.c: Likewise.
402 * cpu-frv.c: Likewise.
403 * cpu-ft32.c: Likewise.
404 * cpu-h8300.c: Likewise.
405 * cpu-hppa.c: Likewise.
406 * cpu-i386.c: Likewise.
407 * cpu-ia64.c: Likewise.
408 * cpu-iamcu.c: Likewise.
409 * cpu-ip2k.c: Likewise.
410 * cpu-iq2000.c: Likewise.
411 * cpu-k1om.c: Likewise.
412 * cpu-l1om.c: Likewise.
413 * cpu-lm32.c: Likewise.
414 * cpu-m10200.c: Likewise.
415 * cpu-m10300.c: Likewise.
416 * cpu-m32c.c: Likewise.
417 * cpu-m32r.c: Likewise.
418 * cpu-m68hc11.c: Likewise.
419 * cpu-m68hc12.c: Likewise.
420 * cpu-m68k.c: Likewise.
421 * cpu-m9s12x.c: Likewise.
422 * cpu-m9s12xg.c: Likewise.
423 * cpu-mcore.c: Likewise.
424 * cpu-mep.c: Likewise.
425 * cpu-metag.c: Likewise.
426 * cpu-microblaze.c: Likewise.
427 * cpu-mips.c: Likewise.
428 * cpu-mmix.c: Likewise.
429 * cpu-moxie.c: Likewise.
430 * cpu-msp430.c: Likewise.
431 * cpu-mt.c: Likewise.
432 * cpu-nds32.c: Likewise.
433 * cpu-nfp.c: Likewise.
434 * cpu-nios2.c: Likewise.
435 * cpu-ns32k.c: Likewise.
436 * cpu-or1k.c: Likewise.
437 * cpu-pdp11.c: Likewise.
438 * cpu-pj.c: Likewise.
439 * cpu-plugin.c: Likewise.
440 * cpu-powerpc.c: Likewise.
441 * cpu-pru.c: Likewise.
442 * cpu-riscv.c: Likewise.
443 * cpu-rl78.c: Likewise.
444 * cpu-rs6000.c: Likewise.
445 * cpu-rx.c: Likewise.
446 * cpu-s12z.c: Likewise.
447 * cpu-s390.c: Likewise.
448 * cpu-score.c: Likewise.
449 * cpu-sh.c: Likewise.
450 * cpu-sparc.c: Likewise.
451 * cpu-spu.c: Likewise.
452 * cpu-tic30.c: Likewise.
453 * cpu-tic4x.c: Likewise.
454 * cpu-tic54x.c: Likewise.
455 * cpu-tic6x.c: Likewise.
456 * cpu-tic80.c: Likewise.
457 * cpu-tilegx.c: Likewise.
458 * cpu-tilepro.c: Likewise.
459 * cpu-v850.c: Likewise.
460 * cpu-v850_rh850.c: Likewise.
461 * cpu-vax.c: Likewise.
462 * cpu-visium.c: Likewise.
463 * cpu-wasm32.c: Likewise.
464 * cpu-xc16x.c: Likewise.
465 * cpu-xgate.c: Likewise.
466 * cpu-xstormy16.c: Likewise.
467 * cpu-xtensa.c: Likewise.
468 * cpu-z80.c: Likewise.
469 * cpu-z8k.c: Likewise.
471 2019-09-09 Phil Blundell <pb@pbcl.net>
473 binutils 2.33 branch created.
475 2019-09-06 Alan Modra <amodra@gmail.com>
477 * aout-target.h (object_p): Formatting.
478 * bfd-in.h (bfd_get_filename): Don't cast to char*.
479 * corefile.c (generic_core_file_matches_executable_p): Constify
480 variables and remove cast.
481 * bfd-in2.h: Regenerate.
483 2019-09-05 Alan Modra <amodra@gmail.com>
485 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
486 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
487 in the GOT/PLT entry rather than affecting the offset to that
489 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
491 2019-09-05 Alan Modra <amodra@gmail.com>
493 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
494 in second instruction.
495 (ppc64_elf_relocate_section): Likewise.
497 2019-09-05 Alan Modra <amodra@gmail.com>
500 * libbfd-in.h (bfd_strdup): New inline function.
501 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
503 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
504 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
506 (bfd_openstreamr): Use bfd_strdup.
507 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
508 * plugin.c (try_load_plugin): Use bfd_malloc.
509 * libbfd.h: Regenerate.
511 2019-09-02 Alan Modra <amodra@gmail.com>
514 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
516 (read_alt_indirect_string): Likewise.
517 (read_alt_indirect_ref): Likewise.
519 2019-08-31 Jim Wilson <jimw@sifive.com>
522 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
523 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
525 2019-08-30 Jim Wilson <jimw@sifive.com>
527 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
528 error, call bfd_set_error, set ret to FALSE, and goto out label.
530 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
533 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
534 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
536 2019-08-29 Alan Modra <amodra@gmail.com>
539 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
540 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
541 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
544 2019-08-29 Alan Modra <amodra@gmail.com>
546 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
547 on second insn, return it in poff.
548 (ppc64_elf_relocate_section): Add offset to paddi addend for
551 2019-08-28 Jim Wilson <jimw@sifive.com>
553 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
554 section when setting max_alignment. Update comment.
555 (_bfd_riscv_relax_pc): Likewise.
557 2019-08-29 Alan Modra <amodra@gmail.com>
560 * bfd.c (struct bfd): Add no_element_cache.
561 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
562 archive cache when no_element_cache.
563 (bfd_generic_archive_p): Set no_element_cache when opening first
564 element to check format. Close first element too.
565 (do_slurp_bsd_armap): Don't zero ardata->cache here.
566 * bfd-in2.h: Regenerate.
568 2019-08-24 Alan Modra <amodra@gmail.com>
570 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
571 symbols from GOT optimisation.
573 2019-08-23 Stafford Horne <shorne@gmail.com>
575 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
578 2019-08-23 Nick Clifton <nickc@redhat.com>
581 * elf.c (bfd_section_from_shdr): Issue an informative warning
582 message and continue processing other sections after encountering
583 a reloc section for a section which already has other relocs
586 2019-08-23 Alan Modra <amodra@gmail.com>
589 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
590 on error without freeing plts[] contents.
592 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
594 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
596 2019-08-22 Nick Clifton <nickc@redhat.com>
599 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
600 reading data from extra records.
602 2019-08-22 Tamar Christina <tamar.christina@arm.com>
605 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
606 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
607 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
608 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
611 2019-08-22 Alan Modra <amodra@gmail.com>
613 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
614 instead recognize CMSE_PREFIX in symbol name.
615 (elf32_arm_gc_mark_extra_sections): Likewise.
616 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
617 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
619 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
621 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
622 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
624 2019-08-20 Tamar Christina <tamar.christina@arm.com>
626 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
627 elf32_arm_stub_long_branch_v4t_thumb_thumb,
628 elf32_arm_stub_long_branch_v4t_thumb_arm,
629 elf32_arm_stub_short_branch_v4t_thumb_arm,
630 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
631 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
632 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
633 previous instruction.
635 2019-08-19 Tom Tromey <tromey@adacore.com>
637 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
640 2019-08-19 Alan Modra <amodra@gmail.com>
642 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
644 (struct _ppc64_elf_section_data): Likewise.
645 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
646 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
647 than TOC loop. Check PLT16 insns too.
649 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
652 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
653 PC-relative relocations back to ...
654 (elf_x86_64_relocate_section): Here.
656 2019-08-16 Martin Liska <mliska@suse.cz>
659 * elflink.c: Report error only for not relocatable.
660 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
661 here lto_slim_object as it's handled in caller.
663 2019-08-16 Alan Modra <amodra@gmail.com>
665 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
667 2019-08-15 Jim Wilson <jimw@sifive.com>
669 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
670 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
671 to c.li instruction, and use ENCODE_RVC_IMM to set value.
673 2019-08-15 Tom Tromey <tromey@adacore.com>
675 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
678 2019-08-14 Alan Modra <amodra@gmail.com>
681 * dwarf2.c (stash_comp_unit): New function, extracted from..
682 (_bfd_dwarf2_find_nearest_line): ..here.
683 (find_abstract_instance): Parse comp units and decode line info
686 2019-08-14 Alan Modra <amodra@gmail.com>
688 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
689 (comp_unit_find_nearest_line): Use it here..
690 (_bfd_dwarf2_find_symbol_bias): ..and here.
692 2019-08-14 Alan Modra <amodra@gmail.com>
694 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
695 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
696 * coffgen.c (coff_find_nearest_line_with_names): Adjust
697 _bfd_dwarf2_find_nearest_line calls.
698 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
699 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
700 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
701 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
702 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
703 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
704 * libbfd.h: Regenerate.
706 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
708 * elf-bfd.h (struct elf_backend_data): New members.
709 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
710 .gnu.hash section if necessary.
711 (struct collect_gnu_hash_codes): New member.
712 (elf_gnu_hash_process_symidx): New function name.
713 (elf_renumber_gnu_hash_syms): Ignore local and undefined
714 symbols. Record xlat location for every symbol which should have
716 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
717 dynamic section if necessary.
718 (GNU_HASH_SECTION_NAME): New define.
719 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
720 Update the section size info.
721 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
722 (struct mips_elf_link_hash_entry): New member.
723 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
725 (mips_elf_sort_hash_table): Initialize the pointer to the
727 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
728 translation table entry with the symbol dynindx.
729 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
730 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
732 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
734 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
736 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
737 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
739 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
740 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
741 (_bfd_mips_post_process_headers): Mark the ABI version as
742 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
743 but not a .hash section.
744 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
745 position in the translation table, associated with the hash
747 * elfxx-mips.h (literal_reloc_p): Define
748 elf_backend_record_xhash_symbol backend hook.
749 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
752 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
754 * elf64-bpf.c (bpf_elf_relocate_section): New function.
755 (bpf_elf_insn_disp_reloc): Delete function.
756 (elf_backend_relocate_section): Define.
758 2019-08-07 Alan Modra <amodra@gmail.com>
761 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
762 for overflow in expressions involving nsymz.
764 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
766 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
767 two pages in relro presence.
769 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
771 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
772 (get_wsr_lbeg_opcode): New functions.
773 (check_loop_aligned): Detect relaxed loops and adjust loop_len
774 and insn_len for the first actual instruction of the loop.
776 2019-07-30 Alan Modra <amodra@gmail.com>
779 * bfd.c (struct bfd): Add lto_slim_object flag.
780 * bfd-in2.h: Regenerate.
782 2019-07-29 Martin Liska <mliska@suse.cz>
785 * archive.c (_bfd_compute_and_write_armap): Come up with
786 report_plugin_err variable.
787 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
788 * elf.c (struct lto_section): New.
789 (_bfd_elf_make_section_from_shdr): Parse content of
790 .gnu_lto_.lto section.
791 * elflink.c: Report error for a missing LTO plugin.
792 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
794 2019-07-28 Alan Modra <amodra@gmail.com>
798 * elflink.c (elf_link_add_object_symbols): Report an informative
799 error on finding local symbols with index equal or greater than
800 symbol table sh_info. Correct comment. Allow such symbols in
801 dynamic objects. Abort on NULL section for symbol.
803 2019-07-26 Alan Modra <amodra@gmail.com>
805 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
806 (elf_linker): Don't define.
807 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
809 2019-07-25 YunQiang Su <syq@debian.org>
812 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
815 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
817 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
819 (reloc_type_to_name): Fix formating.
820 (arc_elf_object_p): Likewise.
821 (debug_arc_reloc): Likewise.
822 (arc_do_relocation): Likewise.
824 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
826 * elf32-arc.c (bfd_get_32_me): New function.
827 (bfd_put_32_me): Likewise.
828 (arc_elf_relax_section): Likewise.
829 (bfd_elf32_bfd_relax_section): Define.
831 2019-07-24 Alan Modra <amodra@gmail.com>
833 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
834 elf_backend_final_write_processing, don't pass linker arg.
835 (_bfd_elf_final_write_processing): Update prototype.
836 * elf.c (_bfd_elf_write_object_contents): Adjust call.
837 (_bfd_elf_final_write_processing): Return error on incompatible
838 OSABI and has_gnu_osabi. Remove linker arg.
839 * elf-nacl.h (nacl_final_write_processing): Update prototype.
840 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
841 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
842 (_bfd_mips_elf_final_write_processing): Likewise.
843 * elf-hppa.h (elf_hppa_final_write_processing): Return status
844 and remove linker arg.
845 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
846 * elf-nacl.c (nacl_final_write_processing): Likewise.
847 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
848 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
849 * elf32-arm.c (arm_final_write_processing): Likewise.
850 (elf32_arm_final_write_processing): Likewise.
851 (elf32_arm_nacl_final_write_processing): Likewise.
852 (elf32_arm_vxworks_final_write_processing): Likewise.
853 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
854 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
855 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
856 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
857 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
858 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
859 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
860 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
861 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
862 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
863 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
864 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
865 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
866 * elf32-ppc.c (ppc_final_write_processing): Likewise.
867 (ppc_elf_final_write_processing): Likewise.
868 (ppc_elf_vxworks_final_write_processing): Likewise.
869 * elf32-sparc.c (sparc_final_write_processing): Likewise.
870 (elf32_sparc_final_write_processing): Likewise.
871 (elf32_sparc_vxworks_final_write_processing): Likewise.
872 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
873 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
874 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
875 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
876 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
877 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
878 (_bfd_mips_elf_final_write_processing): Likewise.
880 2019-07-24 Alan Modra <amodra@gmail.com>
882 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
884 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
885 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
887 2019-07-24 Alan Modra <amodra@gmail.com>
889 * elf32-visium.c (visium_elf_post_process_headers): Don't set
890 EI_OSABI header byte here.
893 2019-07-23 Alan Modra <amodra@gmail.com>
895 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
896 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
897 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
898 when elf_gnu_osabi_mbind is set.
899 (_bfd_elf_map_sections_to_segments): Likewise.
900 (_bfd_elf_init_private_section_data): Likewise.
901 (_bfd_elf_final_write_processing): Update comment.
902 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
903 (elf_backend_special_sections): Define without .tbss for linux.
905 2019-07-23 Alan Modra <amodra@gmail.com>
907 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
908 Remove none, any, all enums.
909 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
910 (_bfd_elf_final_write_processing): Declare.
911 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
912 elf_backend_final_write_processing.
913 (_bfd_elf_post_process_headers): Move body of function to..
914 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
915 only when not already set. Adjust for rename.
916 * elfxx-target.h (elf_backend_final_write_processing): Default to
917 _bfd_elf_final_write_processing.
918 * elf-hppa.h (elf_hppa_final_write_processing): Call
919 _bfd_elf_final_write_processing.
920 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
921 * elf-nacl.c (nacl_final_write_processing): Likewise.
922 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
923 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
924 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
925 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
926 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
927 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
928 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
929 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
930 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
931 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
932 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
933 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
934 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
935 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
936 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
937 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
938 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
939 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
940 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
941 * elf32-arm.c (arm_final_write_processing): Split out from..
942 (elf32_arm_final_write_processing): ..here. Call
943 _bfd_elf_final_write_processing.
944 (elf32_arm_nacl_final_write_processing): Adjust.
945 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
946 (_bfd_mips_elf_final_write_processing): ..here. Call
947 _bfd_elf_final_write_processing.
948 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
949 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
950 * elf32-ppc.c (ppc_final_write_processing): Split out from..
951 (ppc_elf_final_write_processing): ..here. Call
952 _bfd_elf_final_write_processing.
953 (ppc_elf_vxworks_final_write_processing): Adjust.
954 * elf32-sparc.c (sparc_final_write_processing): Split out from..
955 (elf32_sparc_final_write_processing): ..here. Call
956 _bfd_elf_final_write_processing.
957 (elf32_sparc_vxworks_final_write_processing): Adjust.
958 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
959 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
960 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
961 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
962 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
963 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
964 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
965 * elflink.c (elf_link_add_object_symbols): Likewise.
966 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
969 2019-07-23 Omar Majid <omajid@redhat.com>
971 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
972 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
973 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
975 * peXXigen.c: Add comment about source of .NET magic numbers.
977 2019-07-19 Alan Modra <amodra@gmail.com>
979 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
980 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
981 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
982 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
983 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
984 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
985 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
986 (ppc64_elf_check_relocs): Support pcrel tls relocs.
987 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
988 * bfd-in2.h: Regenerate.
989 * libbfd.h: Regenerate.
991 2019-07-18 Alan Modra <amodra@gmail.com>
993 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
994 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
997 2019-07-18 Alan Modra <amodra@gmail.com>
999 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
1000 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
1001 is more than 8 bits.
1002 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
1003 tls_type vars unsigned int.
1004 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
1005 to select r_type edit.
1007 2019-07-18 Alan Modra <amodra@gmail.com>
1009 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
1011 * elf64-ppc.c (TLS_GDIE): Likewise.
1013 2019-07-18 Alan Modra <amodra@gmail.com>
1015 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
1016 range of tp-relative offsets.
1018 2019-07-15 Alan Modra <amodra@gmail.com>
1020 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
1021 alias is no longer bfd_link_hash_defined, clear the alias.
1023 2019-07-13 Alan Modra <amodra@gmail.com>
1025 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
1027 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
1028 (_bfd_elf_init_2_index_sections): Likewise.
1029 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
1030 relocations for local TLS symbols, use STN_UNDEF as the relocation
1032 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
1033 leave TLS symbol value in the addend.
1035 2019-07-08 Alan Modra <amodra@gmail.com>
1038 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
1039 size before reading first word.
1041 2019-07-02 Nick Clifton <nickc@redhat.com>
1044 * elf.c (is_debuginfo_file): New function.
1045 (assign_file_positions_for_non_load_sections): Do not warn about
1046 allocated sections outside of loadable segments if they are found
1047 in a debuginfo file.
1048 * elf-bfd.h (is_debuginfo_file): Prototype.
1050 2019-07-02 Nick Clifton <nickc@redhat.com>
1053 * compress.c (bfd_get_full_section_contents): Do not complain
1054 about linker created sections that are larger than the file size.
1056 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
1058 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
1059 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
1061 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
1063 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
1065 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
1066 sections when .text section contain secure entry functions
1069 2019-07-01 Nick Clifton <nickc@redhat.com>
1072 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
1073 section VMA in the offset used to update exidx relocs.
1075 2019-06-28 Nick Clifton <nickc@redhat.com>
1078 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
1079 large version reference section.
1080 * compress.c (bfd_get_full_section_contents): Check for an
1081 uncompressed section whose size is larger than the file size.
1083 2019-06-28 Alan Modra <amodra@gmail.com>
1085 * format.c (bfd_check_format_matches): Don't match plugin target
1086 if another target matches. Expand comment.
1087 * targets.c (_bfd_target_vector): Move plugin_vec after all other
1088 non-corefile targets, outside !SELECT_VECS.
1089 * config.bfd: Don't handle targ=plugin here.
1090 * configure.ac: Don't add plugin to enable_targets or handle in
1091 target loop setting selvecs and other target vars.
1092 * configure: Regenerate.
1094 2019-06-26 Nick Clifton <nickc@redhat.com>
1097 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
1098 messages for failures.
1099 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
1100 if returning an error value.
1102 2019-06-25 Jan Beulich <jbeulich@suse.com>
1104 * elf-properties.c (elf_find_and_remove_property): Rename last
1105 parameter. Mention it in comment.
1107 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
1109 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
1110 SEC_MERGE or SEC_CODE flags are set.
1111 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
1112 symtype consistently. Don't include sec_addr (sym_sec) in symval.
1113 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
1114 Add sec_addr (sym_sec) after handling merge sections.
1116 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
1119 * elf-properties.c (elf_merge_gnu_property_list): Remove the
1120 property after reporting property removal.
1122 2019-06-23 Alan Modra <amodra@gmail.com>
1125 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
1126 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
1127 Reduce range of offsets allowed for other GOT relocs.
1129 2019-06-23 Alan Modra <amodra@gmail.com>
1132 * elfcode.h (elf_object_p): Warning fix.
1134 2019-06-21 Alan Modra <amodra@gmail.com>
1137 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
1139 2019-06-19 Alan Modra <amodra@gmail.com>
1142 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
1143 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
1145 2019-06-19 Alan Modra <amodra@gmail.com>
1147 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
1148 functions that require r2 valid to use local entry.
1149 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
1151 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1153 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
1154 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
1155 with elfNN_aarch64_allocate_local_dynrelocs.
1157 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
1159 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
1161 2019-06-14 Alan Modra <amodra@gmail.com>
1163 * Makefile.in: Regenerate.
1164 * configure: Regenerate.
1166 2019-06-14 Alan Modra <amodra@gmail.com>
1168 * elf64-ppc.c: Fix comments involving paddi.
1170 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
1173 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
1174 absent, or the bfd is not in the ELF formart.
1175 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
1177 2019-06-10 Christos Zoulas <christos@zoulas.com>
1180 * elf.c (elfcore_make_auxv_note_section): New function.
1181 (elfcore_grok_note): Use it.
1182 (elfcore_grok_freebsd_note): Likewise.
1183 (elfcore_grok_openbsd_note): Likewise.
1184 (elfcore_grok_netbsd_note): Likewise. Plus add support for
1185 NT_NETBSDCORE_AUXV notes.
1187 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1189 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
1190 alignment of the new gnu property section.
1192 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1194 * bfd-in.h: Change comment.
1195 * bfd-in2.h: Regenerate.
1196 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
1197 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
1200 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
1202 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
1203 Remove overflow check.
1205 2019-05-28 Alan Modra <amodra@gmail.com>
1208 * cofflink.c (coff_link_check_archive_element): Don't assume
1209 element is a coff object file after calling add_archive_element.
1211 2019-05-28 Alan Modra <amodra@gmail.com>
1214 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
1215 attempt to set sh_entsize for excluded PLT section.
1217 2019-05-28 Alan Modra <amodra@gmail.com>
1220 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
1221 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
1222 allocated in alpha_dynamic_entries_for_reloc.
1224 2019-05-28 Alan Modra <amodra@gmail.com>
1227 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
1228 on NULL output_section.
1229 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
1231 2019-05-28 Alan Modra <amodra@gmail.com>
1234 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
1235 entry when MUST_FIND. Abort when MUST_FIND not found.
1236 (elf_m68k_get_bfd2got_entry): Likewise.
1237 (elf_m68k_relocate_section): Remove now useless assert.
1239 2019-05-28 Alan Modra <amodra@gmail.com>
1242 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
1243 from bfd_link_info, not an output section owner.
1244 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
1245 (elf_hppa_final_link_relocate): Likewise.
1247 2019-05-28 Alan Modra <amodra@gmail.com>
1250 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
1251 create_object_symbols_section, obj_textsec, obj_datasec or
1252 obj_bsssec. Fix other errors in placement.
1253 * config.bfd: Obsolete tic30-aout.
1255 2019-05-28 Alan Modra <amodra@gmail.com>
1258 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
1259 end of section list as well as section_count.
1260 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
1261 section list before returning error.
1263 2019-05-27 Alan Modra <amodra@gmail.com>
1265 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
1267 2019-05-27 Alan Modra <amodra@gmail.com>
1270 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
1272 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
1274 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
1275 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
1276 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
1277 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
1278 (elf_backend_merge_symbol_attribute): Define.
1280 2019-05-24 Alan Modra <amodra@gmail.com>
1282 * po/SRC-POTFILES.in: Regenerate.
1284 2019-05-24 Alan Modra <amodra@gmail.com>
1286 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
1287 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
1288 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
1289 (struct ppc_link_hash_table): Add powerxx_stubs.
1290 (ppc64_elf_check_relocs): Set powerxx_stubs.
1291 (build_powerxx_offset, size_powerxx_offset),
1292 (num_relocs_for_powerxx_offset),
1293 (emit_relocs_for_powerxx_offset): New functions.
1294 (plt_stub_size): Size powerxx stubs.
1295 (ppc_build_one_stub): Emit powerxx stubs.
1296 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
1299 2019-05-24 Alan Modra <amodra@gmail.com>
1301 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
1302 R_PPC64_GOT_PCREL34.
1303 (xlate_pcrel_opt): New function.
1304 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
1305 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1306 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
1308 2019-05-24 Alan Modra <amodra@gmail.com>
1310 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
1311 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
1312 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
1313 (BFD_RELOC_PPC64_PLT_PCREL34),
1314 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
1315 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
1316 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
1317 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
1318 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
1319 * elf64-ppc.c (PNOP): Define.
1320 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
1321 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
1322 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
1324 (ppc64_elf_prefix_reloc): New function.
1325 (struct ppc_link_hash_table): Add notoc_plt.
1326 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
1327 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
1328 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
1329 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
1330 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
1331 possible need for dynamic relocs on non-pcrel powerxx relocs.
1332 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
1333 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
1334 (toc_adjusting_stub_needed): Likewise.
1335 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
1336 (ppc64_elf_relocate_section): Handle new powerxx relocs.
1337 * bfd-in2.h: Regenerate.
1338 * libbfd.h: Regenerate.
1340 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1342 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
1343 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
1345 * configure: Regenerate.
1347 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1349 * configure: Regenerated.
1350 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
1351 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
1352 (BFD64_BACKENDS): Add elf64-bpf.lo.
1353 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
1354 * Makefile.in (SOURCE_HFILES): Regenerate.
1355 * config.bfd (targ_cpu): Handle bpf-*-* targets.
1356 * cpu-bpf.c: New file.
1357 * elf64-bpf.c: Likewise.
1358 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
1360 * archures.c: Define architecture bfd_arch_bpf and machine
1362 * reloc.c: Define BFD relocations used by the BPF target.
1363 * bfd-in2.h: Regenerated.
1364 * libbfd.h: Likewise.
1366 2019-05-22 Alan Modra <amodra@gmail.com>
1368 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
1371 2019-05-22 Alan Modra <amodra@gmail.com>
1373 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
1374 processing on "size error in section".
1376 2019-05-22 Alan Modra <amodra@gmail.com>
1378 * som.c (som_bfd_free_cached_info): Call
1379 _bfd_generic_close_and_cleanup.
1381 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1383 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
1384 for TLS_TPREL_HI16(/LO16) relocations in shared library.
1386 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1388 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
1389 checks. Search the RELA table for n64 relocations.
1391 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
1392 Faraz Shahbazker <fshahbazker@wavecomp.com>
1394 * elfxx-mips.c (LA25_BC): New macro.
1395 (mips_elf_link_hash_table)<compact_branches>: New field.
1396 (STUB_JALRC): New macro.
1397 (mipsr6_o32_exec_plt0_entry_compact): New array.
1398 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
1399 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
1400 (mipsr6_exec_plt_entry_compact): Likewise.
1401 (mips_elf_create_la25_stub): Use BC instead of J for stubs
1402 when compact_branches is true.
1403 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
1404 PLT for MIPSR6 with compact_branches. Do not reorder the
1405 compact branches PLT. Switch the lazy stub for MIPSR6
1406 with compact_branches to use JALRC.
1407 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
1408 when compact_branches is true.
1409 (_bfd_mips_elf_compact_branches): New function.
1410 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
1412 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1415 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
1416 Fix print formatter.
1418 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1421 * elf32-arm.c (get_value_helper): Remove.
1422 (elf32_arm_final_link_relocate): Fix branch future relocations.
1424 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1427 * bfd-in.h (enum erratum_84319_opts): New
1428 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1429 int to enum erratum_84319_opts.
1430 * bfd-in2.h: Regenerate.
1431 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
1432 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
1433 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
1434 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
1435 (_bfd_aarch64_resize_stubs): Amend comment.
1436 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
1438 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
1439 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
1441 (clear_erratum_843419_entry): Update erratum conditional.
1443 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1446 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
1447 when computing distance_short_enough.
1449 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1452 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1453 Wrap around even if distance equals avr_pc_wrap_around.
1455 2019-05-20 Nick Clifton <nickc@redhat.com>
1457 * po/fr.po: Updated French translation.
1459 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1461 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1463 2019-05-16 Alan Modra <amodra@gmail.com>
1465 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1467 2019-05-15 Alan Modra <amodra@gmail.com>
1469 * elf32-arm.c (elf32_arm_write_section): Don't leave
1470 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1471 unitialised section contents.
1473 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1476 * verilog.c: (VerilogDataWidth): New variable.
1477 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1479 2019-05-08 Nick Clifton <nickc@redhat.com>
1482 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1483 rather than FALSE if encountering a non-ELF file.
1485 2019-05-06 Alan Modra <amodra@gmail.com>
1487 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1489 2019-05-06 Alan Modra <amodra@gmail.com>
1491 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1492 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1493 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1494 * libbfd.h: Regenerate.
1495 * bfd-in2.h: Regenerate.
1497 2019-05-04 Alan Modra <amodra@gmail.com>
1500 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1501 following the standard section names.
1502 (bfd_decode_symclass): Prioritize section flag tests in
1503 decode_section_type before name tests in coff_section_type.
1504 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1505 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1506 their names and choose standard .text section flags for
1509 2019-05-02 Nick Clifton <nickc@redhat.com>
1512 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1513 .gnu.debugaltlink sections as debugging sections.
1515 2019-04-30 Alan Modra <amodra@gmail.com>
1517 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1518 (struct _ppc64_elf_section_data): Likewise.
1519 (ppc64_elf_check_relocs): Set above fields.
1520 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1521 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1524 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1527 * elflink.c (elf_link_output_extsym): Don't complain undefined
1528 weak dynamic reference.
1530 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1532 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1533 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1534 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1535 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1536 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1537 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1538 (elfNN_aarch64_small_plt0_bti_entry): Update.
1539 (elfNN_aarch64_small_plt_bti_entry): Update.
1540 (elfNN_aarch64_small_plt_pac_entry): Update.
1541 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1542 (setup_plt_values): Setup new entries.
1543 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1544 (elfNN_aarch64_plt_sym_val): Likewise.
1546 2019-04-22 Jim Wilson <jimw@sifive.com>
1548 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1550 2019-04-19 Alan Modra <amodra@gmail.com>
1552 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1554 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1556 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1557 building shared object.
1558 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1560 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1563 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1566 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1568 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1570 * bfd-in2.h: Regenerate.
1571 * libbfd.h: Likewise.
1573 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1575 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1576 * bfd-in2.h: Regenerated.
1577 * libbfd.h: Regenerated.
1579 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1581 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1582 * bfd-in2.h: Regenerated.
1583 * libbfd.h: Likewise.
1585 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1587 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1588 * bfd-in2.h: Regenerated.
1589 * libbfd.h: Regenerated.
1590 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1591 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1592 and R_ARM_THM_BF12 together.
1593 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1595 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1597 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1598 * libbfd.h: Regenerated.
1599 * bfd-in2.h: Regenerated.
1600 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1601 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1602 and R_ARM_THM_BF18 together.
1603 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1605 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1607 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1608 * bfd-in2.h: Regenerated.
1609 * libbfd.h: Regenerated.
1610 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1611 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1612 and R_ARM_THM_BF16 together.
1613 (get_value_helper): New reloc helper.
1614 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1616 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1618 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1619 * bfd-in2.h: Regenerate.
1620 * libbfd.h: Regenerate.
1622 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1624 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1625 * bfd-in2.h: Regenerate.
1626 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1627 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1629 (using_thumb2): Likewise.
1630 (using_thumb2_bl): Update assert.
1631 (arch_has_arm_nop): Likewise.
1632 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1633 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1635 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1637 * elf-linker-x86.h (elf_x86_cet_report): New.
1638 (elf_linker_x86_params): Add cet_report.
1639 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1640 missing IBT and SHSTK properties if needed.
1642 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1645 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1646 "h != NULL". Don't check "h != NULL" before calling.
1647 bfd_elf_gc_record_vtentry.
1648 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1649 * elf32-bfin.c (bfin_check_relocs): Likewise.
1650 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1651 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1652 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1653 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1654 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1655 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1656 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1657 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1658 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1659 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1660 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1661 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1662 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1663 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1664 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1665 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1666 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1667 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1668 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1669 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1670 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1671 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1672 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1673 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1674 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1675 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1676 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1677 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1678 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1681 2019-04-11 Alan Modra <amodra@gmail.com>
1684 * elflink.c (elf_link_add_object_symbols): Don't read partial
1685 dynamic entries from fuzzed objects.
1687 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1690 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1691 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1692 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1694 2019-04-10 Michael Forney <mforney@mforney.org>
1697 * doc/chew.c (free_words): Correctly free "push_text" strings.
1699 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1701 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1703 2019-04-08 Alan Modra <amodra@gmail.com>
1705 * configure.ac (elfxx_x86): Define and use.
1706 * configure: Regenerate.
1708 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1710 * elf-linker-x86.h: New file.
1711 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1712 to get x86-specific linker options.
1713 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1714 (elf_x86_64_check_relocs): Likewise.
1715 (elf_x86_64_relocate_section): Likewise.
1716 (elf_x86_64_link_setup_gnu_properties): Likewise.
1717 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1718 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1719 (_bfd_elf_linker_x86_set_options): New function.
1720 * elfxx-x86.h: Include "elf-linker-x86.h".
1721 (elf_x86_link_hash_table): Add params.
1723 2019-04-03 Alan Modra <amodra@gmail.com>
1725 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1726 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1727 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1728 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1729 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1730 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1732 2019-04-02 Jim Wilson <jimw@sifive.com>
1735 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1736 ELF header flags to after check for ELF object file. Loop through
1737 sections looking for code sections, if none, then skip ABI checks.
1739 2019-03-30 Andrew Waterman <andrew@sifive.com>
1741 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1744 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1746 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1747 info->export_dynamic to the conditional.
1749 2019-03-28 Alan Modra <amodra@gmail.com>
1752 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1753 * configure: Regenerate.
1754 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1755 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1756 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1757 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1758 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1760 2019-03-21 Jim Wilson <jimw@sifive.com>
1763 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1764 verify sym non-NULL before using. Add identical check using h.
1766 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1768 * elf-bfd.h (struct elf_backend_data): Add argument to
1769 merge_gnu_properties.
1770 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1771 itself and while calling bed->merge_gnu_properties.
1772 (elf_merge_gnu_property_list): Update the calls for
1773 elf_merge_gnu_properties.
1774 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1775 of --force-bti warning and add argument.
1776 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1778 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1779 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1782 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1784 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1785 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1786 (elf_backend_fixup_gnu_properties): Define for AArch64.
1788 2019-03-18 Alan Modra <amodra@gmail.com>
1791 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1792 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1793 attempt at writing glink stubs only once.
1795 2019-03-16 Alan Modra <amodra@gmail.com>
1798 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1799 (_bfd_elf_rel_local_sym): Likewise.
1800 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1801 section of symbols with unrecognized shndx.
1803 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1806 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1808 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1809 in discarded section.
1811 2019-03-15 Alan Modra <amodra@gmail.com>
1814 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1815 symbol after globals if elf_bad_symtab is not set.
1817 2019-03-15 Alan Modra <amodra@gmail.com>
1820 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1821 (_bfd_elf_rel_local_sym): Likewise.
1823 2019-03-15 Alan Modra <amodra@gmail.com>
1826 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1827 object files with sh_size not a multiple of sh_entsize.
1829 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1832 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1833 input with bad relocation.
1835 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1837 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1839 2019-03-14 Nick Clifton <nickc@redhat.com>
1842 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1843 (save_section_vma): Initialise field to the number of entries in
1845 (section_vma_same): Check that the number of entries in the
1846 sec_vma table matches the number of sections in the bfd.
1848 2019-03-14 Nick Clifton <nickc@redhat.com>
1851 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1852 section owner pointer when adding the default symbol.
1854 2019-03-14 Nick Clifton <nickc@redhat.com>
1857 * elflink.c (elf_link_add_object_symbols): Add new local variable
1858 extversym_end. Initialise it to point to the end of the version
1859 symbol table, if present. Check it when initialising and updating
1862 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1864 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1865 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1866 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1867 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1869 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1870 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1871 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1873 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1874 Szabolcs Nagy <szabolcs.nagy@arm.com>
1876 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1877 (aarch64_bti_pac_info): New.
1878 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1879 (bfd_elf32_aarch64_set_options): Likewise.
1880 * bfd-in2.h: Regenerate
1881 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1882 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1883 (elfNN_aarch64_small_plt0_bti_entry): New.
1884 (elfNN_aarch64_small_plt_bti_entry): New.
1885 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1886 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1887 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1888 tlsdesc_plt_entry_size fields.
1889 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1890 (setup_plt_values): New helper function.
1891 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1893 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1895 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1896 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1897 to plt stubs instead of fixed ones and update filling them according
1898 to the need for bti.
1899 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1900 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1901 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1902 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1903 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1905 (bfd_elfNN_get_synthetic_symtab): Define.
1906 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1907 and mising BTI NOTE SECTION.
1910 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1912 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1913 linker created inputs from merge.
1914 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1915 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1916 (elfNN_aarch64_link_setup_gnu_properties): New.
1917 (elfNN_aarch64_merge_gnu_properties): New.
1918 (elf_backend_setup_gnu_properties): Define for AArch64.
1919 (elf_backend_merge_gnu_properties): Likewise.
1920 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1921 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1922 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1923 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1924 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1925 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1926 (elf_backend_parse_gnu_properties): Define for AArch64.
1928 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1931 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1932 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1934 2019-03-12 Alan Modra <amodra@gmail.com>
1936 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1937 nmemb parameter. Use bfd_alloc2.
1938 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1940 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1941 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1942 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1944 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1945 (assign_section_numbers): Style fix.
1946 (swap_out_syms): Use bfd_malloc2.
1947 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1949 (_bfd_elf_make_empty_symbol): Style fix.
1950 (elfobj_grok_stapsdt_note_1): Formatting.
1951 * elfcode.h (elf_object_p): Use bfd_alloc2.
1952 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1953 (elf_slurp_symbol_table): Use bfd_zalloc2.
1954 (elf_slurp_reloc_table): Use bfd_alloc2.
1955 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1956 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1957 size calculation doesn't overflow.
1958 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1959 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1960 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1962 2019-03-08 Alan Modra <amodra@gmail.com>
1965 * merge.c (merge_strings): Return secinfo. Don't pad section
1967 (_bfd_merge_sections): Pad section to alignment here, if input
1968 sections contributing to merged output all pad to alignment.
1971 2019-03-06 Nick Clifton <nickc@redhat.com>
1973 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1975 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1976 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1978 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1980 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1981 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1984 * elf32-s390.c (allocate_dynrelocs): Update comment.
1986 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1988 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1990 2019-02-28 Nick Clifton <nickc@redhat.com>
1993 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1994 section that is not NUL terminated.
1996 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1999 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
2000 by linker when checking copy reloc on protected symbol.
2002 2019-02-24 Alan Modra <amodra@gmail.com>
2005 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
2007 2019-02-20 Eric Tsai <erictsai@cadence.com>
2009 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
2010 sections between the call site and call destination and adjust
2011 call distance by the largest alignment.
2013 2019-02-20 Alan Hayward <alan.hayward@arm.com>
2015 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
2016 * elf.c (elfcore_grok_aarch_pauth): New function.
2017 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
2018 (elfcore_write_aarch_pauth): New function.
2019 (elfcore_write_register_note): Check for AArch64 pauth section.
2021 2019-02-20 Alan Modra <amodra@gmail.com>
2024 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
2027 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
2029 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
2030 Darwin hosts, not just or1k.
2031 * configure: Regenerate.
2033 2019-02-20 Alan Modra <amodra@gmail.com>
2036 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
2037 sentinel NUL to string buffer nearer to loop where it is used.
2038 Don't go past sentinel when scanning strings, and don't write
2040 * archive.c (do_slurp_coff_armap): Simplify string handling to
2043 2019-02-19 Alan Modra <amodra@gmail.com>
2046 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
2047 attempting to prevent read past end of section.
2049 2019-02-18 Alan Modra <amodra@gmail.com>
2052 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
2053 PRIx64 to generate warning messages. Print local sym names too.
2055 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
2057 * elf32-arc (INIT_SYM_STRING): Delete.
2058 (FINI_SYM_STRING): Likewise.
2059 (init_str): Likewise.
2060 (fini_str): Likewise.
2062 2019-02-08 Alan Modra <amodra@gmail.com>
2064 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
2065 for bss-plt" warning to make it an error.
2067 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2070 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
2071 reloc_class_ifunc for ifunc symbols.
2072 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
2074 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2076 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
2077 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
2079 2019-02-07 Nick Clifton <nickc@redhat.com>
2081 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
2082 into the definitely obsolete list.
2084 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
2087 * elf64-x86-64.c (elf_x86_64_need_pic): Check
2088 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
2089 (elf_x86_64_relocate_section): Move PIC check for PC-relative
2091 (elf_x86_64_check_relocs): Here.
2092 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
2093 to check if a symbol is defined in a non-shared object.
2094 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
2096 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
2098 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
2099 of 'labs' (and fix GCC warning).
2101 2019-01-25 Nick Clifton <nickc@redhat.com>
2103 * po/ru.po: Updated Russian translation.
2105 2019-01-23 Nick Clifton <nickc@redhat.com>
2107 * po/fr.po: Updated French translation.
2109 2019-01-21 Nick Clifton <nickc@redhat.com>
2111 * po/pt.po: Updated Portuguese translation.
2112 * po/uk.po: Updated Ukranian translation.
2114 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
2117 * elf32-nds32.c (nds32_relocate_section): Add space between words
2119 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
2121 (riscv_i_or_e_p): Likewise.
2122 (riscv_merge_arch_attr_info): Likewise.
2124 2019-01-19 Nick Clifton <nickc@redhat.com>
2126 * version.m4: Reset to 2.32.51
2127 * configure: Regenerate.
2128 * po/bfd.pot: Regenerate.
2130 2018-06-24 Nick Clifton <nickc@redhat.com>
2132 2.32 branch created.
2134 2019-01-16 Kito Cheng <kito@andestech.com>
2136 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
2139 2019-01-16 Kito Cheng <kito@andestech.com>
2140 Nelson Chu <nelson@andestech.com>
2142 * elfnn-riscv.c (in_subsets): New.
2143 (out_subsets): Likewise.
2144 (merged_subsets): Likewise.
2145 (riscv_std_ext_p): Likewise.
2146 (riscv_non_std_ext_p): Likewise.
2147 (riscv_std_sv_ext_p): Likewise.
2148 (riscv_non_std_sv_ext_p): Likewise.
2149 (riscv_version_mismatch): Likewise.
2150 (riscv_i_or_e_p): Likewise.
2151 (riscv_merge_std_ext): Likewise.
2152 (riscv_merge_non_std_and_sv_ext): Likewise.
2153 (riscv_merge_arch_attr_info): Likewise.
2154 (riscv_merge_attributes): Likewise.
2155 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
2157 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
2158 (elf_backend_obj_attrs_vendor): Define.
2159 (elf_backend_obj_attrs_section_type): Likewise.
2160 (elf_backend_obj_attrs_section): Likewise.
2161 (elf_backend_obj_attrs_arg_type): Define as
2162 riscv_elf_obj_attrs_arg_type.
2163 * elfxx-riscv.c (riscv_estimate_digit): New.
2164 (riscv_estimate_arch_strlen1): Likewise.
2165 (riscv_estimate_arch_strlen): Likewise.
2166 (riscv_arch_str1): Likewise.
2167 (riscv_arch_str): Likewise.
2168 * elfxx-riscv.h (riscv_arch_str): Declare.
2170 2019-01-14 John Darrington <john@darrington.wattle.id.au>
2172 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
2174 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
2175 source field. (md_apply_fix): Apply final fix
2176 to BFD_RELOC_S12Z_OPR.
2177 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
2179 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2182 * elf32-s390.c (allocate_dynrelocs): Update comment.
2184 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
2186 * warning.m4: Adjust egrep pattern for non-GNU compilers.
2187 * configure: Regenerate.
2189 2019-01-08 Alan Modra <amodra@gmail.com>
2193 * ihex.c (ihex_write_object_contents): Properly check 32-bit
2196 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
2198 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
2199 * bfd/bfd-in2.h: Regenerate.
2200 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
2201 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
2203 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
2205 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
2206 default target, little endian target is more suitable.
2208 2019-01-04 Alan Modra <amodra@gmail.com>
2212 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
2214 (EQ_VALUE_IN_FIELD): Likewise.
2215 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
2217 2019-01-01 Alan Modra <amodra@gmail.com>
2219 Update year range in copyright notice of all files.
2221 For older changes see ChangeLog-2018
2223 Copyright (C) 2019 Free Software Foundation, Inc.
2225 Copying and distribution of this file, with or without modification,
2226 are permitted in any medium without royalty provided the copyright
2227 notice and this notice are preserved.
2233 version-control: never