1 2019-09-26 Alan Modra <amodra@gmail.com>
4 * Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
5 * plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
6 ${bindir}/../lib/bfd-plugins if different.
7 * Makefile.in: Regenerate.
9 2019-09-23 Alan Modra <amodra@gmail.com>
11 * elf64-ppc.c (ppc64_elf_check_relocs): Use bfd_link_executable
12 in choosing between different actions for shared library and
13 non-shared library cases. Delete ELIMINATE_COPY_RELOCS test.
14 (dec_dynrel_count): Likewise. Account for ifunc special case.
15 (ppc64_elf_adjust_dynamic_symbol): Copy relocs are for executables,
17 (allocate_dynrelocs): Comment fixes. Delete ELIMINATE_COPY_RELOCS
20 2019-09-23 Alan Modra <amodra@gmail.com>
22 * Makefile.am (SOURCE_HFILES): Add many missing .h files.
23 * Makefile.in: Regenerate.
24 * po/SRC-POTFILES.in: Regenerate.
26 2019-09-23 Alan Modra <amodra@gmail.com>
28 * bfd-in.h (bfd_symbol, bfd_section_already_linked),
29 (bfd_elf_version_tree): Delete forward declarations.
30 Move other forward decls and remaining elf function decl later.
31 (bfd_section_already_linked_table_init),
32 (bfd_section_already_linked_table_free),
33 (_bfd_handle_already_linked, _bfd_nearby_section),
34 (_bfd_fix_excluded_sec_syms): Move to bfdlink.h.
36 2019-09-23 Alan Modra <amodra@gmail.com>
38 * bfd-in.h: Move ecoff function declarations..
39 * ecoff-bfd.h: ..to here, new file.
40 * ecoff.c: Include ecoff-bfd.h.
41 * ecofflink.c: Likewise.
42 * elf64-alpha.c: Likewise.
43 * elfxx-mips.c: Likewise.
44 * bfd-in2.h: Regenerate.
46 2019-09-23 Alan Modra <amodra@gmail.com>
48 * bfd-in.h (enum notice_asneeded_action): Move to bfdlink.h.
49 Move most other elf declarations..
50 * elf-bfd.h: ..to here.
51 * bfd-in2.h: Regenerate.
53 2019-09-23 Alan Modra <amodra@gmail.com>
55 * bfd-in.h: Move m68k function declaration..
56 * cpu-m68k.h: ..to here, new file..
57 * elf32-m68k.h: ..and here, new file.
58 * elf32-m68k.c: Include cpu-m68k.h and elf32-m68k.h.
59 * bfd-in2.h: Regenerate.
61 2019-09-23 Alan Modra <amodra@gmail.com>
63 * bfd-in.h: Move bfin function declaration..
64 * elf32-bfin.h: ..to here, new file.
65 * elf32-bfin.c: Include elf32-bfin.h.
66 * bfd-in2.h: Regenerate.
68 2019-09-23 Alan Modra <amodra@gmail.com>
70 * bfd-in.h: Move cr16 function declaration..
71 * elf32-cr16.h: ..to here, new file.
72 * elf32-cr16.c: Include elf32-cr16.h.
73 * bfd-in2.h: Regenerate.
75 2019-09-23 Alan Modra <amodra@gmail.com>
77 * bfd-in.h (bfd_sunos_get_needed_list),
78 (bfd_sunos_record_link_assignment),
79 (bfd_sunos_size_dynamic_sections),
80 (bfd_i386linux_size_dynamic_sections),
81 (bfd_sparclinux_size_dynamic_sections): Delete obsolete decls.
82 * bfd-in2.h: Regenerate.
84 2019-09-23 Alan Modra <amodra@gmail.com>
86 * bfd-in.h: Move xcoff function declarations..
87 * xcofflink.h: ..to here, new file.
88 * xcofflink.c: Include xcofflink.h.
89 * coff-rs6000.c (bfd_xcoff_ar_archive_set_magic): Delete unused func.
90 * bfd-in2.h: Regenerate.
92 2019-09-23 Alan Modra <amodra@gmail.com>
94 * bfd-in.h: Delete coff forward refs and move coff declaration..
95 * coff-bfd.h: ..to here.
96 * bfd-in2.h: Regenerate.
98 2019-09-23 Alan Modra <amodra@gmail.com>
100 * bfd-in.h: Move arm declaraions..
101 * cpu-arm.h: ..to here, new file..
102 * coff-arm.h: ..and here, new file..
103 * elf32-arm.h: ..and here, new file.
104 * cpu-arm.c: Include cpu-arm.h.
105 * coff-arm.c: Include cpu-arm.h and coff-arm.h.
106 * elf32-arm.c: Include cpu-arm.h and elf32-arm.h.
107 * pe-arm.c: Move function rename defines later.
108 * pe-arm-wince.c: Likewise and include sysdep.h and bfd.h early.
109 * bfd-in2.h: Regenerate.
111 2019-09-23 Alan Modra <amodra@gmail.com>
113 * bfd-in.h: Move tic6x function declaration..
114 * elf32-tic6x.h: ..to here.
115 * bfd-in2.h: Regenerate.
117 2019-09-23 Alan Modra <amodra@gmail.com>
119 * bfd-in.h: Move aarch64 declarations and defines..
120 * cpu-aarch64.h: ..to here, new file..
121 * elfxx-aarch64.h: ..and here.
122 * cpu-aarch64.c: Include cpu-aarch64.h.
123 * elfnn-aarch64.c: Likewise.
124 * bfd-in2.h: Regenerate.
126 2019-09-23 Alan Modra <amodra@gmail.com>
128 * bfd-in.h: Delete ticoff function declarations.
129 * coff-tic54x.c (bfd_ticoff_set_section_load_page),
130 (bfd_ticoff_get_section_load_page): Make static.
131 * bfd-in2.h: Regenerate.
133 2019-09-23 Alan Modra <amodra@gmail.com>
135 * bfd-in.h: Move h8300 function declaration to..
136 * cpu-h8300.h: ..here, new file.
137 * cpu-h8300.c: Include cpu-h8300.h.
138 * elf32-h8300.c: Likewise.
139 * bfd-in2.h: Regenerate.
141 2019-09-23 Alan Modra <amodra@gmail.com>
143 * bfd-in.h: Move ia64 function declarations..
144 * elfxx-ia64.h: ..to here.
145 * bfd-in2.h: Regenerate.
147 2019-09-23 Alan Modra <amodra@gmail.com>
149 * bfd-in.h: Move v850 function declarations..
150 * elf32-v850.h: ..to here, new file.
151 * elf32-v850.c: Include elf32-v850.h.
152 * bfd-in2.h: Regenerate.
154 2019-09-23 Alan Modra <amodra@gmail.com>
156 * bfd-in.h: Move mips function declaration to..
157 * elfxx-mips.h: ..here.
158 * bfd-in2.h: Regenerate.
160 2019-09-23 Alan Modra <amodra@gmail.com>
162 * bfd-in.h: Move csky function declarations to..
163 * elf32-csky.h: ..here, new file.
164 * elf32-csky.c: Include elf32-csky.h.
165 * bfd-in2.h: Regenerate.
167 2019-09-20 Nelson Chu <nelson.chu@sifive.com>
169 * elfnn-riscv.c (riscv_pcgp_hi_reloc): Add new field undefined_weak.
170 (riscv_record_pcgp_hi_reloc): New parameter undefined_weak.
171 Set undefined_weak field from it.
172 (relax_func_t): New parameter undefined_weak.
173 (_bfd_riscv_relax_call): New ignored parameter undefined_weak.
174 (_bfd_riscv_relax_tls_le): Likewise.
175 (_bfd_riscv_relax_align): Likewise.
176 (_bfd_riscv_relax_delete): Likewise.
177 (_bfd_riscv_relax_lui): New parameter undefined_weak. If true,
178 allow relaxing. For LO12* relocs, set rs1 to x0 when undefined_weak.
179 (_bfd_riscv_relax_pc): New parameter undefined_weak. For LO12* relocs,
180 set undefined_weak from hi_reloc. If true, allow relaxing. For LO12*
181 relocs, set rs1 to x0 when undefined_weak and change to non-pcrel
183 (_bfd_riscv_relax_section): New local undefined_weak. Set for
184 undef weak relocs that can be relaxed. Pass to relax_func call.
186 2019-09-20 Alan Modra <amodra@gmail.com>
188 * bfd-in.h (bfd_section_name, bfd_section_size, bfd_section_vma),
189 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
190 (bfd_section_userdata, bfd_is_com_section, discarded_section),
191 (bfd_get_section_limit_octets, bfd_get_section_limit): Delete macros.
192 * bfd.c (bfd_get_section_limit_octets, bfd_get_section_limit),
193 (bfd_section_list_remove, bfd_section_list_append),
194 (bfd_section_list_prepend, bfd_section_list_insert_after),
195 (bfd_section_list_insert_before, bfd_section_removed_from_list):
196 New inline functions.
197 * section.c (bfd_is_und_section, bfd_is_abs_section),
198 (bfd_is_ind_section, bfd_is_const_section, bfd_section_list_remove),
199 (bfd_section_list_append, bfd_section_list_prepend),
200 (bfd_section_list_insert_after, bfd_section_list_insert_before),
201 (bfd_section_removed_from_list): Delete macros.
202 (bfd_section_name, bfd_section_size, bfd_section_vma),
203 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
204 (bfd_section_userdata, bfd_is_com_section, bfd_is_und_section),
205 (bfd_is_abs_section, bfd_is_ind_section, bfd_is_const_section),
206 (discarded_section): New inline functions.
207 * bfd-in2.h: Regenerate.
209 2019-09-20 Alan Modra <amodra@gmail.com>
211 * bfd-in.h (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
212 (bfd_asymbol_bfd, bfd_asymbol_flavour, bfd_set_asymbol_name): Delete.
213 * bfd.c (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
214 (bfd_asymbol_bfd, bfd_set_asymbol_name): New inline functions.
215 * targets.c (bfd_asymbol_flavour): Likewise.
216 * bfd-in2.h: Regenerate.
218 2019-09-20 Alan Modra <amodra@gmail.com>
220 * archive.c (bfd_generic_archive_p): Use bfd_set_thin_archive.
221 * bfd-in.h (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
222 (bfd_get_target, bfd_get_flavour, bfd_family_coff, bfd_big_endian),
223 (bfd_little_endian, bfd_header_big_endian, bfd_header_little_endian),
224 (bfd_get_file_flags, bfd_applicable_file_flags),
225 (bfd_applicable_section_flags, bfd_has_map, bfd_is_thin_archive),
226 (bfd_valid_reloc_types, bfd_usrdata, bfd_get_start_address),
227 (bfd_get_symcount, bfd_get_outsymbols, bfd_count_sections),
228 (bfd_get_dynamic_symcount, bfd_get_symbol_leading_char): Delete.
229 * bfd/bfd.c (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
230 (bfd_get_file_flags, bfd_get_start_address, bfd_get_symcount),
231 (bfd_get_dynamic_symcount, bfd_get_outsymbols, bfd_count_sections),
232 (bfd_has_map, bfd_is_thin_archive, bfd_set_thin_archive),
233 (bfd_usrdata, bfd_set_usrdata): New inline functions.
234 * targets.c (bfd_get_target, bfd_get_flavour),
235 (bfd_applicable_file_flags, bfd_family_coff, bfd_big_endian),
236 (bfd_little_endian, bfd_header_big_endian),
237 (bfd_header_little_endian, bfd_applicable_section_flags),
238 (bfd_get_symbol_leading_char): New inline functions.
239 * bfd-in2.h: Regenerate.
241 2019-09-20 Alan Modra <amodra@gmail.com>
243 * elf64-ppc.c (ppc64_glibc_dynamic_reloc): New function.
244 (ppc64_elf_relocate_section): Warn if emitting unsupported dynamic
247 2019-09-18 Alan Modra <amodra@gmail.com>
249 * bfd-in.h (bfd_get_section_name, bfd_get_section_vma),
250 (bfd_get_section_lma, bfd_get_section_alignment),
251 (bfd_get_section_size, bfd_get_section_flags),
252 (bfd_get_section_userdata): Delete.
253 (bfd_section_name, bfd_section_size, bfd_section_vma),
254 (bfd_section_lma, bfd_section_alignment): Lose bfd parameter.
255 (bfd_section_flags, bfd_section_userdata): New.
256 (bfd_is_com_section): Rename parameter.
257 * section.c (bfd_set_section_userdata, bfd_set_section_vma),
258 (bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section),
259 (bfd_set_section_size): Delete bfd parameter, rename section parameter.
260 (bfd_set_section_lma): New.
261 * bfd-in2.h: Regenerate.
262 * mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param,
264 * aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c,
265 * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
266 * compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h,
267 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c,
268 * elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c,
269 * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
270 * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c,
271 * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c,
272 * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c,
273 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
274 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
275 * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
276 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
277 * elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c,
278 * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
279 * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
280 * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c,
281 * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
282 * elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
283 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
284 * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c,
285 * elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
286 * elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c,
287 * mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c,
288 * peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c,
289 * xcofflink.c: Update throughout for bfd section macro and function
292 2019-09-18 Alan Modra <amodra@gmail.com>
294 * bfd-in.h (bfd_asymbol_section): Rename from bfd_get_section.
295 (bfd_get_output_section): Delete.
296 (bfd_asymbol_base): Delete.
297 (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
298 (bfd_asymbol_bfd, bfd_asymbol_flavour): Tidy.
299 (bfd_set_asymbol_name): New macro.
300 * bfd-in2.h: Regenerate.
301 * aout-cris.c: Update throughout to use bfd_asymbol_section.
303 * cofflink.c: Likewise.
304 * dwarf2.c: Likewise.
307 * elf32-arm.c: Likewise.
308 * elf32-mips.c: Likewise.
309 * elf32-score.c: Likewise.
310 * elf32-score7.c: Likewise.
311 * elfn32-mips.c: Likewise.
312 * elfnn-aarch64.c: Likewise.
313 * elfxx-mips.c: Likewise.
314 * linker.c: Likewise.
316 * elf64-mmix.c (mmix_elf_reloc): Part expand bfd_get_output_section.
318 2019-09-18 Simon Marchi <simon.marchi@polymtl.ca>
320 * Makefile.in: Re-generate.
321 * configure: Re-generate.
322 * doc/Makefile.in: Re-generate.
324 2019-09-18 Alan Modra <amodra@gmail.com>
326 * aoutx.h (slurp_symbol_table): Don't set symcount using bfd_get
328 * pdp11.c (slurp_symbol_table): Likewise.
329 * som.c (som_slurp_symbol_table): Likewise.
330 * coff-ppc.c (ppc_bfd_coff_final_link): Likewise.
331 * coffcode.h (coff_slurp_symbol_table): Likewise.
332 * cofflink.c (_bfd_coff_final_link): Likewise.
333 * ecoff.c (ecoff_slurp_symbolic_header): Likewise.
334 (_bfd_ecoff_slurp_symbolic_info): Likewise.
335 (_bfd_ecoff_slurp_symbol_table): Likewise.
336 (_bfd_ecoff_bfd_final_link): Likewise.
337 * elf.c (_bfd_elf_canonicalize_symtab): Likewise.
338 * elflink.c (elf_link_output_symstrtab): Likewise.
339 (bfd_elf_final_link): Likewise.
340 * peicode.h (pe_ILF_build_a_bfd): Likewise.
341 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
342 * aoutx.h (some_aout_object_p, slurp_symbol_table): Don't set
343 start_address or symcount using bfd_get macros.
344 * coffgen.c (coff_real_object_p): Likewise.
345 * pdp11.c (some_aout_object_p, slurp_symbol_table): Likewise.
346 * som.c (som_object_setup, som_slurp_symbol_table): Likewise.
347 * elfcore.h (elf_core_file_p): Don't set start_address using
349 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Don't set dynsymcount
351 * bfd.c (bfd_set_file_flags): Don't set flags using bfd_get macro.
352 * linker.c (bfd_generic_link_read_symbols): Don't set outsymbols
353 or symcount using bfd_get macros.
354 (_bfd_generic_final_link, generic_add_output_symbol): Likewise.
355 * syms.c (bfd_set_symtab): Likewise.
356 * vms-alpha.c (alpha_vms_bfd_final_link): Likewise.
357 * archive.c (do_slurp_bsd_armap): Don't set has_armap using
359 (do_slurp_coff_armap, bfd_slurp_armap): Likewise.
360 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
361 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
362 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
363 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
364 * som.c (som_slurp_armap): Likewise.
366 2019-09-18 Alan Modra <amodra@gmail.com>
368 * archures.c (bfd_get_arch): Make param const.
369 (bfd_get_mach, bfd_arch_bits_per_byte): Likewise.
370 (bfd_arch_bits_per_address, bfd_octets_per_byte): Likewise.
371 * bfd-in2.h: Regenerate.
373 2019-09-18 Alan Modra <amodra@gmail.com>
375 * bfd-in.h (carsym.name): Make const.
376 * reloc.c (struct reloc_howto_struct.name): Likewise.
377 * targets.c (bfd_target.name): Likewise.!
378 * bfd.c (bfd_get_sign_extend_vma): Make variable const.
379 * som.c (som_bfd_fill_in_ar_symbols): Use an intermediary variable
380 when setting carsym.name.
381 * bfd-in2.h: Regenerate.
383 2019-09-18 Alan Modra <amodra@gmail.com>
385 * mach-o.c (bfd_mach_o_fat_member_init): Likewise. Replace
386 xstrdup and xmalloc with bfd_strdup and bfd_malloc. Return an
387 error status. Adjust calls.
388 * vms-lib.c (_bfd_vms_lib_get_module): Test mhd->id earlier.
389 Close bfd on failure. Replace xstrdup/bfd_alloc use with
390 bfd_malloc. Use bfd_set_filename.
392 2019-09-18 Alan Modra <amodra@gmail.com>
394 * elf64-ppc.c (must_be_dyn_reloc): Return 0 for TOC16 relocs.
395 (ppc64_elf_check_relocs): Support dynamic/copy relocs for TOC16.
396 (ppc64_elf_adjust_dynamic_symbol): Don't keep dynamic reloc when
397 needs_copy even if all relocs are in rw sections.
398 (dec_dynrel_count): Handle TOC16 relocs.
399 (ppc64_elf_relocate_section): Support dynamic relocs for TOC16.
400 (ppc64_elf_finish_dynamic_symbol): Adjust to handle needs_copy
403 2019-09-16 Phil Blundell <pb@pbcl.net>
405 * version.m4: Set version to 2.33.50.
406 * Makefile.in, configure, doc/Makefile.in: Regenerated.
408 2019-09-11 Tom Tromey <tom@tromey.com>
410 * opncls.c (bfd_set_filename): New function.
411 * bfd-in2.h: Regenerate.
413 2019-09-11 Alan Modra <amodra@gmail.com>
415 * targets.c (struct bfd_target): Add _bfd_group_name.
416 (BFD_JUMP_TABLE): Likewise.
417 * coffgen.c (bfd_coff_group_name): New function.
418 * elf.c (bfd_elf_group_name): New function.
419 * linker.c (_bfd_nolink_bfd_group_name): New function.
420 * section.c (bfd_generic_group_name): New function.
421 * elf-bfd.h (bfd_elf_group_name): Declare.
422 * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
423 * libcoff-in.h (bfd_coff_group_name): Declare.
424 * aout-target.h (MY_bfd_group_name): Define.
425 * aout-tic30.c (MY_bfd_group_name): Define.
426 * bfd.c (bfd_group_name): Define.
427 * binary.c (binary_bfd_group_name): Define.
428 * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
429 * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
430 * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
431 * coffcode.h (coff_bfd_group_name): Define.
432 * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
433 * i386msdos.c (msdos_bfd_group_name): Define.
434 * ihex.c (ihex_bfd_group_name): Define.
435 * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
436 * mmo.c (mmo_bfd_group_name): Define.
437 * pef.c (bfd_pef_bfd_group_name): Define.
438 * plugin.c (bfd_plugin_bfd_group_name): Define.
439 * ppcboot.c (ppcboot_bfd_group_name): Define.
440 * som.c (som_bfd_group_name): Define.
441 * srec.c (srec_bfd_group_name): Define.
442 * tekhex.c (tekhex_bfd_group_name): Define.
443 * verilog.c (verilog_bfd_group_name): Define.
444 * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
445 * xsym.c (bfd_sym_bfd_group_name): Define.
446 * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
447 (rs6000_xcoff64_aix_vec): Likewise.
448 * bfd-in2.h: Regenerate.
449 * libbfd.h: Regenerate.
450 * libcoff.h: Regenerate.
452 2019-09-10 Nick Clifton <nickc@redhat.com>
455 * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
457 (bfd_default_arch_struct): Initialise the new field.
458 * bfd-in2.h: Regenerate.
459 * cpu-aarch64.c: Initialise the new field.
460 * cpu-alpha.c: Likewise.
461 * cpu-arc.c: Likewise.
462 * cpu-arm.c: Likewise.
463 * cpu-avr.c: Likewise.
464 * cpu-bfin.c: Likewise.
465 * cpu-bpf.c: Likewise.
466 * cpu-cr16.c: Likewise.
467 * cpu-cr16c.c: Likewise.
468 * cpu-cris.c: Likewise.
469 * cpu-crx.c: Likewise.
470 * cpu-csky.c: Likewise.
471 * cpu-d10v.c: Likewise.
472 * cpu-d30v.c: Likewise.
473 * cpu-dlx.c: Likewise.
474 * cpu-epiphany.c: Likewise.
475 * cpu-fr30.c: Likewise.
476 * cpu-frv.c: Likewise.
477 * cpu-ft32.c: Likewise.
478 * cpu-h8300.c: Likewise.
479 * cpu-hppa.c: Likewise.
480 * cpu-i386.c: Likewise.
481 * cpu-ia64.c: Likewise.
482 * cpu-iamcu.c: Likewise.
483 * cpu-ip2k.c: Likewise.
484 * cpu-iq2000.c: Likewise.
485 * cpu-k1om.c: Likewise.
486 * cpu-l1om.c: Likewise.
487 * cpu-lm32.c: Likewise.
488 * cpu-m10200.c: Likewise.
489 * cpu-m10300.c: Likewise.
490 * cpu-m32c.c: Likewise.
491 * cpu-m32r.c: Likewise.
492 * cpu-m68hc11.c: Likewise.
493 * cpu-m68hc12.c: Likewise.
494 * cpu-m68k.c: Likewise.
495 * cpu-m9s12x.c: Likewise.
496 * cpu-m9s12xg.c: Likewise.
497 * cpu-mcore.c: Likewise.
498 * cpu-mep.c: Likewise.
499 * cpu-metag.c: Likewise.
500 * cpu-microblaze.c: Likewise.
501 * cpu-mips.c: Likewise.
502 * cpu-mmix.c: Likewise.
503 * cpu-moxie.c: Likewise.
504 * cpu-msp430.c: Likewise.
505 * cpu-mt.c: Likewise.
506 * cpu-nds32.c: Likewise.
507 * cpu-nfp.c: Likewise.
508 * cpu-nios2.c: Likewise.
509 * cpu-ns32k.c: Likewise.
510 * cpu-or1k.c: Likewise.
511 * cpu-pdp11.c: Likewise.
512 * cpu-pj.c: Likewise.
513 * cpu-plugin.c: Likewise.
514 * cpu-powerpc.c: Likewise.
515 * cpu-pru.c: Likewise.
516 * cpu-riscv.c: Likewise.
517 * cpu-rl78.c: Likewise.
518 * cpu-rs6000.c: Likewise.
519 * cpu-rx.c: Likewise.
520 * cpu-s12z.c: Likewise.
521 * cpu-s390.c: Likewise.
522 * cpu-score.c: Likewise.
523 * cpu-sh.c: Likewise.
524 * cpu-sparc.c: Likewise.
525 * cpu-spu.c: Likewise.
526 * cpu-tic30.c: Likewise.
527 * cpu-tic4x.c: Likewise.
528 * cpu-tic54x.c: Likewise.
529 * cpu-tic6x.c: Likewise.
530 * cpu-tic80.c: Likewise.
531 * cpu-tilegx.c: Likewise.
532 * cpu-tilepro.c: Likewise.
533 * cpu-v850.c: Likewise.
534 * cpu-v850_rh850.c: Likewise.
535 * cpu-vax.c: Likewise.
536 * cpu-visium.c: Likewise.
537 * cpu-wasm32.c: Likewise.
538 * cpu-xc16x.c: Likewise.
539 * cpu-xgate.c: Likewise.
540 * cpu-xstormy16.c: Likewise.
541 * cpu-xtensa.c: Likewise.
542 * cpu-z80.c: Likewise.
543 * cpu-z8k.c: Likewise.
545 2019-09-09 Phil Blundell <pb@pbcl.net>
547 binutils 2.33 branch created.
549 2019-09-06 Alan Modra <amodra@gmail.com>
551 * aout-target.h (object_p): Formatting.
552 * bfd-in.h (bfd_get_filename): Don't cast to char*.
553 * corefile.c (generic_core_file_matches_executable_p): Constify
554 variables and remove cast.
555 * bfd-in2.h: Regenerate.
557 2019-09-05 Alan Modra <amodra@gmail.com>
559 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
560 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
561 in the GOT/PLT entry rather than affecting the offset to that
563 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
565 2019-09-05 Alan Modra <amodra@gmail.com>
567 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
568 in second instruction.
569 (ppc64_elf_relocate_section): Likewise.
571 2019-09-05 Alan Modra <amodra@gmail.com>
574 * libbfd-in.h (bfd_strdup): New inline function.
575 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
577 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
578 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
580 (bfd_openstreamr): Use bfd_strdup.
581 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
582 * plugin.c (try_load_plugin): Use bfd_malloc.
583 * libbfd.h: Regenerate.
585 2019-09-02 Alan Modra <amodra@gmail.com>
588 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
590 (read_alt_indirect_string): Likewise.
591 (read_alt_indirect_ref): Likewise.
593 2019-08-31 Jim Wilson <jimw@sifive.com>
596 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
597 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
599 2019-08-30 Jim Wilson <jimw@sifive.com>
601 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
602 error, call bfd_set_error, set ret to FALSE, and goto out label.
604 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
607 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
608 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
610 2019-08-29 Alan Modra <amodra@gmail.com>
613 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
614 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
615 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
618 2019-08-29 Alan Modra <amodra@gmail.com>
620 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
621 on second insn, return it in poff.
622 (ppc64_elf_relocate_section): Add offset to paddi addend for
625 2019-08-28 Jim Wilson <jimw@sifive.com>
627 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
628 section when setting max_alignment. Update comment.
629 (_bfd_riscv_relax_pc): Likewise.
631 2019-08-29 Alan Modra <amodra@gmail.com>
634 * bfd.c (struct bfd): Add no_element_cache.
635 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
636 archive cache when no_element_cache.
637 (bfd_generic_archive_p): Set no_element_cache when opening first
638 element to check format. Close first element too.
639 (do_slurp_bsd_armap): Don't zero ardata->cache here.
640 * bfd-in2.h: Regenerate.
642 2019-08-24 Alan Modra <amodra@gmail.com>
644 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
645 symbols from GOT optimisation.
647 2019-08-23 Stafford Horne <shorne@gmail.com>
649 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
652 2019-08-23 Nick Clifton <nickc@redhat.com>
655 * elf.c (bfd_section_from_shdr): Issue an informative warning
656 message and continue processing other sections after encountering
657 a reloc section for a section which already has other relocs
660 2019-08-23 Alan Modra <amodra@gmail.com>
663 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
664 on error without freeing plts[] contents.
666 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
668 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
670 2019-08-22 Nick Clifton <nickc@redhat.com>
673 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
674 reading data from extra records.
676 2019-08-22 Tamar Christina <tamar.christina@arm.com>
679 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
680 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
681 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
682 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
685 2019-08-22 Alan Modra <amodra@gmail.com>
687 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
688 instead recognize CMSE_PREFIX in symbol name.
689 (elf32_arm_gc_mark_extra_sections): Likewise.
690 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
691 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
693 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
695 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
696 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
698 2019-08-20 Tamar Christina <tamar.christina@arm.com>
700 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
701 elf32_arm_stub_long_branch_v4t_thumb_thumb,
702 elf32_arm_stub_long_branch_v4t_thumb_arm,
703 elf32_arm_stub_short_branch_v4t_thumb_arm,
704 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
705 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
706 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
707 previous instruction.
709 2019-08-19 Tom Tromey <tromey@adacore.com>
711 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
714 2019-08-19 Alan Modra <amodra@gmail.com>
716 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
718 (struct _ppc64_elf_section_data): Likewise.
719 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
720 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
721 than TOC loop. Check PLT16 insns too.
723 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
726 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
727 PC-relative relocations back to ...
728 (elf_x86_64_relocate_section): Here.
730 2019-08-16 Martin Liska <mliska@suse.cz>
733 * elflink.c: Report error only for not relocatable.
734 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
735 here lto_slim_object as it's handled in caller.
737 2019-08-16 Alan Modra <amodra@gmail.com>
739 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
741 2019-08-15 Jim Wilson <jimw@sifive.com>
743 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
744 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
745 to c.li instruction, and use ENCODE_RVC_IMM to set value.
747 2019-08-15 Tom Tromey <tromey@adacore.com>
749 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
752 2019-08-14 Alan Modra <amodra@gmail.com>
755 * dwarf2.c (stash_comp_unit): New function, extracted from..
756 (_bfd_dwarf2_find_nearest_line): ..here.
757 (find_abstract_instance): Parse comp units and decode line info
760 2019-08-14 Alan Modra <amodra@gmail.com>
762 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
763 (comp_unit_find_nearest_line): Use it here..
764 (_bfd_dwarf2_find_symbol_bias): ..and here.
766 2019-08-14 Alan Modra <amodra@gmail.com>
768 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
769 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
770 * coffgen.c (coff_find_nearest_line_with_names): Adjust
771 _bfd_dwarf2_find_nearest_line calls.
772 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
773 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
774 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
775 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
776 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
777 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
778 * libbfd.h: Regenerate.
780 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
782 * elf-bfd.h (struct elf_backend_data): New members.
783 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
784 .gnu.hash section if necessary.
785 (struct collect_gnu_hash_codes): New member.
786 (elf_gnu_hash_process_symidx): New function name.
787 (elf_renumber_gnu_hash_syms): Ignore local and undefined
788 symbols. Record xlat location for every symbol which should have
790 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
791 dynamic section if necessary.
792 (GNU_HASH_SECTION_NAME): New define.
793 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
794 Update the section size info.
795 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
796 (struct mips_elf_link_hash_entry): New member.
797 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
799 (mips_elf_sort_hash_table): Initialize the pointer to the
801 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
802 translation table entry with the symbol dynindx.
803 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
804 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
806 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
808 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
810 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
811 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
813 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
814 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
815 (_bfd_mips_post_process_headers): Mark the ABI version as
816 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
817 but not a .hash section.
818 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
819 position in the translation table, associated with the hash
821 * elfxx-mips.h (literal_reloc_p): Define
822 elf_backend_record_xhash_symbol backend hook.
823 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
826 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
828 * elf64-bpf.c (bpf_elf_relocate_section): New function.
829 (bpf_elf_insn_disp_reloc): Delete function.
830 (elf_backend_relocate_section): Define.
832 2019-08-07 Alan Modra <amodra@gmail.com>
835 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
836 for overflow in expressions involving nsymz.
838 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
840 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
841 two pages in relro presence.
843 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
845 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
846 (get_wsr_lbeg_opcode): New functions.
847 (check_loop_aligned): Detect relaxed loops and adjust loop_len
848 and insn_len for the first actual instruction of the loop.
850 2019-07-30 Alan Modra <amodra@gmail.com>
853 * bfd.c (struct bfd): Add lto_slim_object flag.
854 * bfd-in2.h: Regenerate.
856 2019-07-29 Martin Liska <mliska@suse.cz>
859 * archive.c (_bfd_compute_and_write_armap): Come up with
860 report_plugin_err variable.
861 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
862 * elf.c (struct lto_section): New.
863 (_bfd_elf_make_section_from_shdr): Parse content of
864 .gnu_lto_.lto section.
865 * elflink.c: Report error for a missing LTO plugin.
866 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
868 2019-07-28 Alan Modra <amodra@gmail.com>
872 * elflink.c (elf_link_add_object_symbols): Report an informative
873 error on finding local symbols with index equal or greater than
874 symbol table sh_info. Correct comment. Allow such symbols in
875 dynamic objects. Abort on NULL section for symbol.
877 2019-07-26 Alan Modra <amodra@gmail.com>
879 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
880 (elf_linker): Don't define.
881 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
883 2019-07-25 YunQiang Su <syq@debian.org>
886 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
889 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
891 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
893 (reloc_type_to_name): Fix formating.
894 (arc_elf_object_p): Likewise.
895 (debug_arc_reloc): Likewise.
896 (arc_do_relocation): Likewise.
898 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
900 * elf32-arc.c (bfd_get_32_me): New function.
901 (bfd_put_32_me): Likewise.
902 (arc_elf_relax_section): Likewise.
903 (bfd_elf32_bfd_relax_section): Define.
905 2019-07-24 Alan Modra <amodra@gmail.com>
907 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
908 elf_backend_final_write_processing, don't pass linker arg.
909 (_bfd_elf_final_write_processing): Update prototype.
910 * elf.c (_bfd_elf_write_object_contents): Adjust call.
911 (_bfd_elf_final_write_processing): Return error on incompatible
912 OSABI and has_gnu_osabi. Remove linker arg.
913 * elf-nacl.h (nacl_final_write_processing): Update prototype.
914 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
915 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
916 (_bfd_mips_elf_final_write_processing): Likewise.
917 * elf-hppa.h (elf_hppa_final_write_processing): Return status
918 and remove linker arg.
919 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
920 * elf-nacl.c (nacl_final_write_processing): Likewise.
921 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
922 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
923 * elf32-arm.c (arm_final_write_processing): Likewise.
924 (elf32_arm_final_write_processing): Likewise.
925 (elf32_arm_nacl_final_write_processing): Likewise.
926 (elf32_arm_vxworks_final_write_processing): Likewise.
927 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
928 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
929 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
930 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
931 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
932 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
933 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
934 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
935 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
936 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
937 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
938 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
939 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
940 * elf32-ppc.c (ppc_final_write_processing): Likewise.
941 (ppc_elf_final_write_processing): Likewise.
942 (ppc_elf_vxworks_final_write_processing): Likewise.
943 * elf32-sparc.c (sparc_final_write_processing): Likewise.
944 (elf32_sparc_final_write_processing): Likewise.
945 (elf32_sparc_vxworks_final_write_processing): Likewise.
946 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
947 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
948 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
949 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
950 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
951 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
952 (_bfd_mips_elf_final_write_processing): Likewise.
954 2019-07-24 Alan Modra <amodra@gmail.com>
956 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
958 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
959 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
961 2019-07-24 Alan Modra <amodra@gmail.com>
963 * elf32-visium.c (visium_elf_post_process_headers): Don't set
964 EI_OSABI header byte here.
967 2019-07-23 Alan Modra <amodra@gmail.com>
969 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
970 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
971 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
972 when elf_gnu_osabi_mbind is set.
973 (_bfd_elf_map_sections_to_segments): Likewise.
974 (_bfd_elf_init_private_section_data): Likewise.
975 (_bfd_elf_final_write_processing): Update comment.
976 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
977 (elf_backend_special_sections): Define without .tbss for linux.
979 2019-07-23 Alan Modra <amodra@gmail.com>
981 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
982 Remove none, any, all enums.
983 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
984 (_bfd_elf_final_write_processing): Declare.
985 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
986 elf_backend_final_write_processing.
987 (_bfd_elf_post_process_headers): Move body of function to..
988 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
989 only when not already set. Adjust for rename.
990 * elfxx-target.h (elf_backend_final_write_processing): Default to
991 _bfd_elf_final_write_processing.
992 * elf-hppa.h (elf_hppa_final_write_processing): Call
993 _bfd_elf_final_write_processing.
994 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
995 * elf-nacl.c (nacl_final_write_processing): Likewise.
996 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
997 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
998 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
999 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
1000 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
1001 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
1002 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
1003 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
1004 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
1005 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
1006 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
1007 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
1008 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
1009 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
1010 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
1011 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
1012 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1013 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
1014 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
1015 * elf32-arm.c (arm_final_write_processing): Split out from..
1016 (elf32_arm_final_write_processing): ..here. Call
1017 _bfd_elf_final_write_processing.
1018 (elf32_arm_nacl_final_write_processing): Adjust.
1019 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
1020 (_bfd_mips_elf_final_write_processing): ..here. Call
1021 _bfd_elf_final_write_processing.
1022 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
1023 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
1024 * elf32-ppc.c (ppc_final_write_processing): Split out from..
1025 (ppc_elf_final_write_processing): ..here. Call
1026 _bfd_elf_final_write_processing.
1027 (ppc_elf_vxworks_final_write_processing): Adjust.
1028 * elf32-sparc.c (sparc_final_write_processing): Split out from..
1029 (elf32_sparc_final_write_processing): ..here. Call
1030 _bfd_elf_final_write_processing.
1031 (elf32_sparc_vxworks_final_write_processing): Adjust.
1032 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
1033 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
1034 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
1035 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
1036 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
1037 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
1038 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1039 * elflink.c (elf_link_add_object_symbols): Likewise.
1040 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
1043 2019-07-23 Omar Majid <omajid@redhat.com>
1045 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
1046 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
1047 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
1049 * peXXigen.c: Add comment about source of .NET magic numbers.
1051 2019-07-19 Alan Modra <amodra@gmail.com>
1053 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
1054 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
1055 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
1056 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
1057 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
1058 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
1059 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
1060 (ppc64_elf_check_relocs): Support pcrel tls relocs.
1061 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
1062 * bfd-in2.h: Regenerate.
1063 * libbfd.h: Regenerate.
1065 2019-07-18 Alan Modra <amodra@gmail.com>
1067 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
1068 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
1071 2019-07-18 Alan Modra <amodra@gmail.com>
1073 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
1074 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
1075 is more than 8 bits.
1076 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
1077 tls_type vars unsigned int.
1078 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
1079 to select r_type edit.
1081 2019-07-18 Alan Modra <amodra@gmail.com>
1083 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
1085 * elf64-ppc.c (TLS_GDIE): Likewise.
1087 2019-07-18 Alan Modra <amodra@gmail.com>
1089 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
1090 range of tp-relative offsets.
1092 2019-07-15 Alan Modra <amodra@gmail.com>
1094 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
1095 alias is no longer bfd_link_hash_defined, clear the alias.
1097 2019-07-13 Alan Modra <amodra@gmail.com>
1099 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
1101 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
1102 (_bfd_elf_init_2_index_sections): Likewise.
1103 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
1104 relocations for local TLS symbols, use STN_UNDEF as the relocation
1106 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
1107 leave TLS symbol value in the addend.
1109 2019-07-08 Alan Modra <amodra@gmail.com>
1112 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
1113 size before reading first word.
1115 2019-07-02 Nick Clifton <nickc@redhat.com>
1118 * elf.c (is_debuginfo_file): New function.
1119 (assign_file_positions_for_non_load_sections): Do not warn about
1120 allocated sections outside of loadable segments if they are found
1121 in a debuginfo file.
1122 * elf-bfd.h (is_debuginfo_file): Prototype.
1124 2019-07-02 Nick Clifton <nickc@redhat.com>
1127 * compress.c (bfd_get_full_section_contents): Do not complain
1128 about linker created sections that are larger than the file size.
1130 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
1132 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
1133 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
1135 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
1137 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
1139 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
1140 sections when .text section contain secure entry functions
1143 2019-07-01 Nick Clifton <nickc@redhat.com>
1146 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
1147 section VMA in the offset used to update exidx relocs.
1149 2019-06-28 Nick Clifton <nickc@redhat.com>
1152 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
1153 large version reference section.
1154 * compress.c (bfd_get_full_section_contents): Check for an
1155 uncompressed section whose size is larger than the file size.
1157 2019-06-28 Alan Modra <amodra@gmail.com>
1159 * format.c (bfd_check_format_matches): Don't match plugin target
1160 if another target matches. Expand comment.
1161 * targets.c (_bfd_target_vector): Move plugin_vec after all other
1162 non-corefile targets, outside !SELECT_VECS.
1163 * config.bfd: Don't handle targ=plugin here.
1164 * configure.ac: Don't add plugin to enable_targets or handle in
1165 target loop setting selvecs and other target vars.
1166 * configure: Regenerate.
1168 2019-06-26 Nick Clifton <nickc@redhat.com>
1171 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
1172 messages for failures.
1173 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
1174 if returning an error value.
1176 2019-06-25 Jan Beulich <jbeulich@suse.com>
1178 * elf-properties.c (elf_find_and_remove_property): Rename last
1179 parameter. Mention it in comment.
1181 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
1183 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
1184 SEC_MERGE or SEC_CODE flags are set.
1185 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
1186 symtype consistently. Don't include sec_addr (sym_sec) in symval.
1187 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
1188 Add sec_addr (sym_sec) after handling merge sections.
1190 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
1193 * elf-properties.c (elf_merge_gnu_property_list): Remove the
1194 property after reporting property removal.
1196 2019-06-23 Alan Modra <amodra@gmail.com>
1199 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
1200 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
1201 Reduce range of offsets allowed for other GOT relocs.
1203 2019-06-23 Alan Modra <amodra@gmail.com>
1206 * elfcode.h (elf_object_p): Warning fix.
1208 2019-06-21 Alan Modra <amodra@gmail.com>
1211 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
1213 2019-06-19 Alan Modra <amodra@gmail.com>
1216 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
1217 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
1219 2019-06-19 Alan Modra <amodra@gmail.com>
1221 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
1222 functions that require r2 valid to use local entry.
1223 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
1225 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1227 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
1228 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
1229 with elfNN_aarch64_allocate_local_dynrelocs.
1231 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
1233 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
1235 2019-06-14 Alan Modra <amodra@gmail.com>
1237 * Makefile.in: Regenerate.
1238 * configure: Regenerate.
1240 2019-06-14 Alan Modra <amodra@gmail.com>
1242 * elf64-ppc.c: Fix comments involving paddi.
1244 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
1247 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
1248 absent, or the bfd is not in the ELF formart.
1249 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
1251 2019-06-10 Christos Zoulas <christos@zoulas.com>
1254 * elf.c (elfcore_make_auxv_note_section): New function.
1255 (elfcore_grok_note): Use it.
1256 (elfcore_grok_freebsd_note): Likewise.
1257 (elfcore_grok_openbsd_note): Likewise.
1258 (elfcore_grok_netbsd_note): Likewise. Plus add support for
1259 NT_NETBSDCORE_AUXV notes.
1261 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1263 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
1264 alignment of the new gnu property section.
1266 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1268 * bfd-in.h: Change comment.
1269 * bfd-in2.h: Regenerate.
1270 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
1271 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
1274 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
1276 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
1277 Remove overflow check.
1279 2019-05-28 Alan Modra <amodra@gmail.com>
1282 * cofflink.c (coff_link_check_archive_element): Don't assume
1283 element is a coff object file after calling add_archive_element.
1285 2019-05-28 Alan Modra <amodra@gmail.com>
1288 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
1289 attempt to set sh_entsize for excluded PLT section.
1291 2019-05-28 Alan Modra <amodra@gmail.com>
1294 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
1295 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
1296 allocated in alpha_dynamic_entries_for_reloc.
1298 2019-05-28 Alan Modra <amodra@gmail.com>
1301 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
1302 on NULL output_section.
1303 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
1305 2019-05-28 Alan Modra <amodra@gmail.com>
1308 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
1309 entry when MUST_FIND. Abort when MUST_FIND not found.
1310 (elf_m68k_get_bfd2got_entry): Likewise.
1311 (elf_m68k_relocate_section): Remove now useless assert.
1313 2019-05-28 Alan Modra <amodra@gmail.com>
1316 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
1317 from bfd_link_info, not an output section owner.
1318 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
1319 (elf_hppa_final_link_relocate): Likewise.
1321 2019-05-28 Alan Modra <amodra@gmail.com>
1324 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
1325 create_object_symbols_section, obj_textsec, obj_datasec or
1326 obj_bsssec. Fix other errors in placement.
1327 * config.bfd: Obsolete tic30-aout.
1329 2019-05-28 Alan Modra <amodra@gmail.com>
1332 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
1333 end of section list as well as section_count.
1334 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
1335 section list before returning error.
1337 2019-05-27 Alan Modra <amodra@gmail.com>
1339 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
1341 2019-05-27 Alan Modra <amodra@gmail.com>
1344 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
1346 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
1348 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
1349 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
1350 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
1351 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
1352 (elf_backend_merge_symbol_attribute): Define.
1354 2019-05-24 Alan Modra <amodra@gmail.com>
1356 * po/SRC-POTFILES.in: Regenerate.
1358 2019-05-24 Alan Modra <amodra@gmail.com>
1360 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
1361 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
1362 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
1363 (struct ppc_link_hash_table): Add powerxx_stubs.
1364 (ppc64_elf_check_relocs): Set powerxx_stubs.
1365 (build_powerxx_offset, size_powerxx_offset),
1366 (num_relocs_for_powerxx_offset),
1367 (emit_relocs_for_powerxx_offset): New functions.
1368 (plt_stub_size): Size powerxx stubs.
1369 (ppc_build_one_stub): Emit powerxx stubs.
1370 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
1373 2019-05-24 Alan Modra <amodra@gmail.com>
1375 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
1376 R_PPC64_GOT_PCREL34.
1377 (xlate_pcrel_opt): New function.
1378 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
1379 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1380 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
1382 2019-05-24 Alan Modra <amodra@gmail.com>
1384 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
1385 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
1386 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
1387 (BFD_RELOC_PPC64_PLT_PCREL34),
1388 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
1389 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
1390 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
1391 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
1392 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
1393 * elf64-ppc.c (PNOP): Define.
1394 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
1395 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
1396 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
1398 (ppc64_elf_prefix_reloc): New function.
1399 (struct ppc_link_hash_table): Add notoc_plt.
1400 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
1401 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
1402 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
1403 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
1404 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
1405 possible need for dynamic relocs on non-pcrel powerxx relocs.
1406 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
1407 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
1408 (toc_adjusting_stub_needed): Likewise.
1409 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
1410 (ppc64_elf_relocate_section): Handle new powerxx relocs.
1411 * bfd-in2.h: Regenerate.
1412 * libbfd.h: Regenerate.
1414 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1416 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
1417 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
1419 * configure: Regenerate.
1421 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1423 * configure: Regenerated.
1424 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
1425 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
1426 (BFD64_BACKENDS): Add elf64-bpf.lo.
1427 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
1428 * Makefile.in (SOURCE_HFILES): Regenerate.
1429 * config.bfd (targ_cpu): Handle bpf-*-* targets.
1430 * cpu-bpf.c: New file.
1431 * elf64-bpf.c: Likewise.
1432 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
1434 * archures.c: Define architecture bfd_arch_bpf and machine
1436 * reloc.c: Define BFD relocations used by the BPF target.
1437 * bfd-in2.h: Regenerated.
1438 * libbfd.h: Likewise.
1440 2019-05-22 Alan Modra <amodra@gmail.com>
1442 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
1445 2019-05-22 Alan Modra <amodra@gmail.com>
1447 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
1448 processing on "size error in section".
1450 2019-05-22 Alan Modra <amodra@gmail.com>
1452 * som.c (som_bfd_free_cached_info): Call
1453 _bfd_generic_close_and_cleanup.
1455 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1457 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
1458 for TLS_TPREL_HI16(/LO16) relocations in shared library.
1460 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1462 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
1463 checks. Search the RELA table for n64 relocations.
1465 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
1466 Faraz Shahbazker <fshahbazker@wavecomp.com>
1468 * elfxx-mips.c (LA25_BC): New macro.
1469 (mips_elf_link_hash_table)<compact_branches>: New field.
1470 (STUB_JALRC): New macro.
1471 (mipsr6_o32_exec_plt0_entry_compact): New array.
1472 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
1473 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
1474 (mipsr6_exec_plt_entry_compact): Likewise.
1475 (mips_elf_create_la25_stub): Use BC instead of J for stubs
1476 when compact_branches is true.
1477 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
1478 PLT for MIPSR6 with compact_branches. Do not reorder the
1479 compact branches PLT. Switch the lazy stub for MIPSR6
1480 with compact_branches to use JALRC.
1481 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
1482 when compact_branches is true.
1483 (_bfd_mips_elf_compact_branches): New function.
1484 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
1486 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1489 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
1490 Fix print formatter.
1492 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1495 * elf32-arm.c (get_value_helper): Remove.
1496 (elf32_arm_final_link_relocate): Fix branch future relocations.
1498 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1501 * bfd-in.h (enum erratum_84319_opts): New
1502 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1503 int to enum erratum_84319_opts.
1504 * bfd-in2.h: Regenerate.
1505 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
1506 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
1507 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
1508 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
1509 (_bfd_aarch64_resize_stubs): Amend comment.
1510 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
1512 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
1513 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
1515 (clear_erratum_843419_entry): Update erratum conditional.
1517 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1520 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
1521 when computing distance_short_enough.
1523 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1526 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1527 Wrap around even if distance equals avr_pc_wrap_around.
1529 2019-05-20 Nick Clifton <nickc@redhat.com>
1531 * po/fr.po: Updated French translation.
1533 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1535 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1537 2019-05-16 Alan Modra <amodra@gmail.com>
1539 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1541 2019-05-15 Alan Modra <amodra@gmail.com>
1543 * elf32-arm.c (elf32_arm_write_section): Don't leave
1544 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1545 unitialised section contents.
1547 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1550 * verilog.c: (VerilogDataWidth): New variable.
1551 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1553 2019-05-08 Nick Clifton <nickc@redhat.com>
1556 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1557 rather than FALSE if encountering a non-ELF file.
1559 2019-05-06 Alan Modra <amodra@gmail.com>
1561 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1563 2019-05-06 Alan Modra <amodra@gmail.com>
1565 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1566 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1567 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1568 * libbfd.h: Regenerate.
1569 * bfd-in2.h: Regenerate.
1571 2019-05-04 Alan Modra <amodra@gmail.com>
1574 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1575 following the standard section names.
1576 (bfd_decode_symclass): Prioritize section flag tests in
1577 decode_section_type before name tests in coff_section_type.
1578 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1579 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1580 their names and choose standard .text section flags for
1583 2019-05-02 Nick Clifton <nickc@redhat.com>
1586 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1587 .gnu.debugaltlink sections as debugging sections.
1589 2019-04-30 Alan Modra <amodra@gmail.com>
1591 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1592 (struct _ppc64_elf_section_data): Likewise.
1593 (ppc64_elf_check_relocs): Set above fields.
1594 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1595 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1598 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1601 * elflink.c (elf_link_output_extsym): Don't complain undefined
1602 weak dynamic reference.
1604 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1606 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1607 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1608 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1609 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1610 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1611 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1612 (elfNN_aarch64_small_plt0_bti_entry): Update.
1613 (elfNN_aarch64_small_plt_bti_entry): Update.
1614 (elfNN_aarch64_small_plt_pac_entry): Update.
1615 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1616 (setup_plt_values): Setup new entries.
1617 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1618 (elfNN_aarch64_plt_sym_val): Likewise.
1620 2019-04-22 Jim Wilson <jimw@sifive.com>
1622 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1624 2019-04-19 Alan Modra <amodra@gmail.com>
1626 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1628 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1630 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1631 building shared object.
1632 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1634 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1637 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1640 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1642 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1644 * bfd-in2.h: Regenerate.
1645 * libbfd.h: Likewise.
1647 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1649 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1650 * bfd-in2.h: Regenerated.
1651 * libbfd.h: Regenerated.
1653 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1655 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1656 * bfd-in2.h: Regenerated.
1657 * libbfd.h: Likewise.
1659 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1661 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1662 * bfd-in2.h: Regenerated.
1663 * libbfd.h: Regenerated.
1664 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1665 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1666 and R_ARM_THM_BF12 together.
1667 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1669 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1671 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1672 * libbfd.h: Regenerated.
1673 * bfd-in2.h: Regenerated.
1674 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1675 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1676 and R_ARM_THM_BF18 together.
1677 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1679 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1681 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1682 * bfd-in2.h: Regenerated.
1683 * libbfd.h: Regenerated.
1684 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1685 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1686 and R_ARM_THM_BF16 together.
1687 (get_value_helper): New reloc helper.
1688 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1690 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1692 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1693 * bfd-in2.h: Regenerate.
1694 * libbfd.h: Regenerate.
1696 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1698 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1699 * bfd-in2.h: Regenerate.
1700 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1701 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1703 (using_thumb2): Likewise.
1704 (using_thumb2_bl): Update assert.
1705 (arch_has_arm_nop): Likewise.
1706 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1707 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1709 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1711 * elf-linker-x86.h (elf_x86_cet_report): New.
1712 (elf_linker_x86_params): Add cet_report.
1713 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1714 missing IBT and SHSTK properties if needed.
1716 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1719 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1720 "h != NULL". Don't check "h != NULL" before calling.
1721 bfd_elf_gc_record_vtentry.
1722 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1723 * elf32-bfin.c (bfin_check_relocs): Likewise.
1724 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1725 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1726 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1727 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1728 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1729 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1730 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1731 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1732 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1733 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1734 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1735 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1736 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1737 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1738 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1739 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1740 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1741 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1742 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1743 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1744 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1745 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1746 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1747 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1748 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1749 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1750 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1751 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1752 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1755 2019-04-11 Alan Modra <amodra@gmail.com>
1758 * elflink.c (elf_link_add_object_symbols): Don't read partial
1759 dynamic entries from fuzzed objects.
1761 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1764 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1765 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1766 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1768 2019-04-10 Michael Forney <mforney@mforney.org>
1771 * doc/chew.c (free_words): Correctly free "push_text" strings.
1773 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1775 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1777 2019-04-08 Alan Modra <amodra@gmail.com>
1779 * configure.ac (elfxx_x86): Define and use.
1780 * configure: Regenerate.
1782 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1784 * elf-linker-x86.h: New file.
1785 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1786 to get x86-specific linker options.
1787 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1788 (elf_x86_64_check_relocs): Likewise.
1789 (elf_x86_64_relocate_section): Likewise.
1790 (elf_x86_64_link_setup_gnu_properties): Likewise.
1791 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1792 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1793 (_bfd_elf_linker_x86_set_options): New function.
1794 * elfxx-x86.h: Include "elf-linker-x86.h".
1795 (elf_x86_link_hash_table): Add params.
1797 2019-04-03 Alan Modra <amodra@gmail.com>
1799 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1800 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1801 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1802 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1803 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1804 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1806 2019-04-02 Jim Wilson <jimw@sifive.com>
1809 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1810 ELF header flags to after check for ELF object file. Loop through
1811 sections looking for code sections, if none, then skip ABI checks.
1813 2019-03-30 Andrew Waterman <andrew@sifive.com>
1815 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1818 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1820 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1821 info->export_dynamic to the conditional.
1823 2019-03-28 Alan Modra <amodra@gmail.com>
1826 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1827 * configure: Regenerate.
1828 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1829 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1830 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1831 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1832 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1834 2019-03-21 Jim Wilson <jimw@sifive.com>
1837 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1838 verify sym non-NULL before using. Add identical check using h.
1840 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1842 * elf-bfd.h (struct elf_backend_data): Add argument to
1843 merge_gnu_properties.
1844 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1845 itself and while calling bed->merge_gnu_properties.
1846 (elf_merge_gnu_property_list): Update the calls for
1847 elf_merge_gnu_properties.
1848 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1849 of --force-bti warning and add argument.
1850 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1852 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1853 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1856 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1858 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1859 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1860 (elf_backend_fixup_gnu_properties): Define for AArch64.
1862 2019-03-18 Alan Modra <amodra@gmail.com>
1865 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1866 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1867 attempt at writing glink stubs only once.
1869 2019-03-16 Alan Modra <amodra@gmail.com>
1872 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1873 (_bfd_elf_rel_local_sym): Likewise.
1874 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1875 section of symbols with unrecognized shndx.
1877 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1880 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1882 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1883 in discarded section.
1885 2019-03-15 Alan Modra <amodra@gmail.com>
1888 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1889 symbol after globals if elf_bad_symtab is not set.
1891 2019-03-15 Alan Modra <amodra@gmail.com>
1894 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1895 (_bfd_elf_rel_local_sym): Likewise.
1897 2019-03-15 Alan Modra <amodra@gmail.com>
1900 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1901 object files with sh_size not a multiple of sh_entsize.
1903 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1906 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1907 input with bad relocation.
1909 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1911 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1913 2019-03-14 Nick Clifton <nickc@redhat.com>
1916 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1917 (save_section_vma): Initialise field to the number of entries in
1919 (section_vma_same): Check that the number of entries in the
1920 sec_vma table matches the number of sections in the bfd.
1922 2019-03-14 Nick Clifton <nickc@redhat.com>
1925 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1926 section owner pointer when adding the default symbol.
1928 2019-03-14 Nick Clifton <nickc@redhat.com>
1931 * elflink.c (elf_link_add_object_symbols): Add new local variable
1932 extversym_end. Initialise it to point to the end of the version
1933 symbol table, if present. Check it when initialising and updating
1936 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1938 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1939 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1940 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1941 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1943 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1944 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1945 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1947 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1948 Szabolcs Nagy <szabolcs.nagy@arm.com>
1950 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1951 (aarch64_bti_pac_info): New.
1952 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1953 (bfd_elf32_aarch64_set_options): Likewise.
1954 * bfd-in2.h: Regenerate
1955 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1956 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1957 (elfNN_aarch64_small_plt0_bti_entry): New.
1958 (elfNN_aarch64_small_plt_bti_entry): New.
1959 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1960 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1961 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1962 tlsdesc_plt_entry_size fields.
1963 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1964 (setup_plt_values): New helper function.
1965 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1967 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1969 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1970 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1971 to plt stubs instead of fixed ones and update filling them according
1972 to the need for bti.
1973 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1974 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1975 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1976 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1977 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1979 (bfd_elfNN_get_synthetic_symtab): Define.
1980 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1981 and mising BTI NOTE SECTION.
1984 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1986 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1987 linker created inputs from merge.
1988 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1989 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1990 (elfNN_aarch64_link_setup_gnu_properties): New.
1991 (elfNN_aarch64_merge_gnu_properties): New.
1992 (elf_backend_setup_gnu_properties): Define for AArch64.
1993 (elf_backend_merge_gnu_properties): Likewise.
1994 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1995 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1996 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1997 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1998 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1999 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
2000 (elf_backend_parse_gnu_properties): Define for AArch64.
2002 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
2005 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
2006 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
2008 2019-03-12 Alan Modra <amodra@gmail.com>
2010 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
2011 nmemb parameter. Use bfd_alloc2.
2012 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
2014 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
2015 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
2016 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
2018 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
2019 (assign_section_numbers): Style fix.
2020 (swap_out_syms): Use bfd_malloc2.
2021 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
2023 (_bfd_elf_make_empty_symbol): Style fix.
2024 (elfobj_grok_stapsdt_note_1): Formatting.
2025 * elfcode.h (elf_object_p): Use bfd_alloc2.
2026 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
2027 (elf_slurp_symbol_table): Use bfd_zalloc2.
2028 (elf_slurp_reloc_table): Use bfd_alloc2.
2029 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
2030 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
2031 size calculation doesn't overflow.
2032 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
2033 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
2034 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
2036 2019-03-08 Alan Modra <amodra@gmail.com>
2039 * merge.c (merge_strings): Return secinfo. Don't pad section
2041 (_bfd_merge_sections): Pad section to alignment here, if input
2042 sections contributing to merged output all pad to alignment.
2045 2019-03-06 Nick Clifton <nickc@redhat.com>
2047 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
2049 * coffgen.c (coff_find_nearest_line_with_names): Do not call
2050 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
2052 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
2054 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
2055 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2058 * elf32-s390.c (allocate_dynrelocs): Update comment.
2060 2019-02-28 Tamar Christina <tamar.christina@arm.com>
2062 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
2064 2019-02-28 Nick Clifton <nickc@redhat.com>
2067 * elf.c (bfd_elf_string_from_elf_section): Check for a string
2068 section that is not NUL terminated.
2070 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
2073 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
2074 by linker when checking copy reloc on protected symbol.
2076 2019-02-24 Alan Modra <amodra@gmail.com>
2079 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
2081 2019-02-20 Eric Tsai <erictsai@cadence.com>
2083 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
2084 sections between the call site and call destination and adjust
2085 call distance by the largest alignment.
2087 2019-02-20 Alan Hayward <alan.hayward@arm.com>
2089 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
2090 * elf.c (elfcore_grok_aarch_pauth): New function.
2091 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
2092 (elfcore_write_aarch_pauth): New function.
2093 (elfcore_write_register_note): Check for AArch64 pauth section.
2095 2019-02-20 Alan Modra <amodra@gmail.com>
2098 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
2101 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
2103 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
2104 Darwin hosts, not just or1k.
2105 * configure: Regenerate.
2107 2019-02-20 Alan Modra <amodra@gmail.com>
2110 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
2111 sentinel NUL to string buffer nearer to loop where it is used.
2112 Don't go past sentinel when scanning strings, and don't write
2114 * archive.c (do_slurp_coff_armap): Simplify string handling to
2117 2019-02-19 Alan Modra <amodra@gmail.com>
2120 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
2121 attempting to prevent read past end of section.
2123 2019-02-18 Alan Modra <amodra@gmail.com>
2126 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
2127 PRIx64 to generate warning messages. Print local sym names too.
2129 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
2131 * elf32-arc (INIT_SYM_STRING): Delete.
2132 (FINI_SYM_STRING): Likewise.
2133 (init_str): Likewise.
2134 (fini_str): Likewise.
2136 2019-02-08 Alan Modra <amodra@gmail.com>
2138 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
2139 for bss-plt" warning to make it an error.
2141 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2144 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
2145 reloc_class_ifunc for ifunc symbols.
2146 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
2148 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2150 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
2151 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
2153 2019-02-07 Nick Clifton <nickc@redhat.com>
2155 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
2156 into the definitely obsolete list.
2158 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
2161 * elf64-x86-64.c (elf_x86_64_need_pic): Check
2162 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
2163 (elf_x86_64_relocate_section): Move PIC check for PC-relative
2165 (elf_x86_64_check_relocs): Here.
2166 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
2167 to check if a symbol is defined in a non-shared object.
2168 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
2170 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
2172 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
2173 of 'labs' (and fix GCC warning).
2175 2019-01-25 Nick Clifton <nickc@redhat.com>
2177 * po/ru.po: Updated Russian translation.
2179 2019-01-23 Nick Clifton <nickc@redhat.com>
2181 * po/fr.po: Updated French translation.
2183 2019-01-21 Nick Clifton <nickc@redhat.com>
2185 * po/pt.po: Updated Portuguese translation.
2186 * po/uk.po: Updated Ukranian translation.
2188 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
2191 * elf32-nds32.c (nds32_relocate_section): Add space between words
2193 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
2195 (riscv_i_or_e_p): Likewise.
2196 (riscv_merge_arch_attr_info): Likewise.
2198 2019-01-19 Nick Clifton <nickc@redhat.com>
2200 * version.m4: Reset to 2.32.51
2201 * configure: Regenerate.
2202 * po/bfd.pot: Regenerate.
2204 2018-06-24 Nick Clifton <nickc@redhat.com>
2206 2.32 branch created.
2208 2019-01-16 Kito Cheng <kito@andestech.com>
2210 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
2213 2019-01-16 Kito Cheng <kito@andestech.com>
2214 Nelson Chu <nelson@andestech.com>
2216 * elfnn-riscv.c (in_subsets): New.
2217 (out_subsets): Likewise.
2218 (merged_subsets): Likewise.
2219 (riscv_std_ext_p): Likewise.
2220 (riscv_non_std_ext_p): Likewise.
2221 (riscv_std_sv_ext_p): Likewise.
2222 (riscv_non_std_sv_ext_p): Likewise.
2223 (riscv_version_mismatch): Likewise.
2224 (riscv_i_or_e_p): Likewise.
2225 (riscv_merge_std_ext): Likewise.
2226 (riscv_merge_non_std_and_sv_ext): Likewise.
2227 (riscv_merge_arch_attr_info): Likewise.
2228 (riscv_merge_attributes): Likewise.
2229 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
2231 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
2232 (elf_backend_obj_attrs_vendor): Define.
2233 (elf_backend_obj_attrs_section_type): Likewise.
2234 (elf_backend_obj_attrs_section): Likewise.
2235 (elf_backend_obj_attrs_arg_type): Define as
2236 riscv_elf_obj_attrs_arg_type.
2237 * elfxx-riscv.c (riscv_estimate_digit): New.
2238 (riscv_estimate_arch_strlen1): Likewise.
2239 (riscv_estimate_arch_strlen): Likewise.
2240 (riscv_arch_str1): Likewise.
2241 (riscv_arch_str): Likewise.
2242 * elfxx-riscv.h (riscv_arch_str): Declare.
2244 2019-01-14 John Darrington <john@darrington.wattle.id.au>
2246 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
2248 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
2249 source field. (md_apply_fix): Apply final fix
2250 to BFD_RELOC_S12Z_OPR.
2251 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
2253 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2256 * elf32-s390.c (allocate_dynrelocs): Update comment.
2258 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
2260 * warning.m4: Adjust egrep pattern for non-GNU compilers.
2261 * configure: Regenerate.
2263 2019-01-08 Alan Modra <amodra@gmail.com>
2267 * ihex.c (ihex_write_object_contents): Properly check 32-bit
2270 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
2272 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
2273 * bfd/bfd-in2.h: Regenerate.
2274 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
2275 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
2277 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
2279 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
2280 default target, little endian target is more suitable.
2282 2019-01-04 Alan Modra <amodra@gmail.com>
2286 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
2288 (EQ_VALUE_IN_FIELD): Likewise.
2289 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
2291 2019-01-01 Alan Modra <amodra@gmail.com>
2293 Update year range in copyright notice of all files.
2295 For older changes see ChangeLog-2018
2297 Copyright (C) 2019 Free Software Foundation, Inc.
2299 Copying and distribution of this file, with or without modification,
2300 are permitted in any medium without royalty provided the copyright
2301 notice and this notice are preserved.
2307 version-control: never