1 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
3 * elf-strtab.c (_bfd_elf_strtab_len): New.
4 (_bfd_elf_strtab_str): Likewise.
5 * bfd-elf.h: Declare them.
7 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
9 * elf-bfd.h (bfd_elf_get_str_section): Add.
10 * elf.c (bfd_elf_get_str_section): No longer static.
12 2019-09-26 Alan Modra <amodra@gmail.com>
15 * Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
16 * plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
17 ${bindir}/../lib/bfd-plugins if different.
18 * Makefile.in: Regenerate.
20 2019-09-23 Alan Modra <amodra@gmail.com>
22 * elf64-ppc.c (ppc64_elf_check_relocs): Use bfd_link_executable
23 in choosing between different actions for shared library and
24 non-shared library cases. Delete ELIMINATE_COPY_RELOCS test.
25 (dec_dynrel_count): Likewise. Account for ifunc special case.
26 (ppc64_elf_adjust_dynamic_symbol): Copy relocs are for executables,
28 (allocate_dynrelocs): Comment fixes. Delete ELIMINATE_COPY_RELOCS
31 2019-09-23 Alan Modra <amodra@gmail.com>
33 * Makefile.am (SOURCE_HFILES): Add many missing .h files.
34 * Makefile.in: Regenerate.
35 * po/SRC-POTFILES.in: Regenerate.
37 2019-09-23 Alan Modra <amodra@gmail.com>
39 * bfd-in.h (bfd_symbol, bfd_section_already_linked),
40 (bfd_elf_version_tree): Delete forward declarations.
41 Move other forward decls and remaining elf function decl later.
42 (bfd_section_already_linked_table_init),
43 (bfd_section_already_linked_table_free),
44 (_bfd_handle_already_linked, _bfd_nearby_section),
45 (_bfd_fix_excluded_sec_syms): Move to bfdlink.h.
47 2019-09-23 Alan Modra <amodra@gmail.com>
49 * bfd-in.h: Move ecoff function declarations..
50 * ecoff-bfd.h: ..to here, new file.
51 * ecoff.c: Include ecoff-bfd.h.
52 * ecofflink.c: Likewise.
53 * elf64-alpha.c: Likewise.
54 * elfxx-mips.c: Likewise.
55 * bfd-in2.h: Regenerate.
57 2019-09-23 Alan Modra <amodra@gmail.com>
59 * bfd-in.h (enum notice_asneeded_action): Move to bfdlink.h.
60 Move most other elf declarations..
61 * elf-bfd.h: ..to here.
62 * bfd-in2.h: Regenerate.
64 2019-09-23 Alan Modra <amodra@gmail.com>
66 * bfd-in.h: Move m68k function declaration..
67 * cpu-m68k.h: ..to here, new file..
68 * elf32-m68k.h: ..and here, new file.
69 * elf32-m68k.c: Include cpu-m68k.h and elf32-m68k.h.
70 * bfd-in2.h: Regenerate.
72 2019-09-23 Alan Modra <amodra@gmail.com>
74 * bfd-in.h: Move bfin function declaration..
75 * elf32-bfin.h: ..to here, new file.
76 * elf32-bfin.c: Include elf32-bfin.h.
77 * bfd-in2.h: Regenerate.
79 2019-09-23 Alan Modra <amodra@gmail.com>
81 * bfd-in.h: Move cr16 function declaration..
82 * elf32-cr16.h: ..to here, new file.
83 * elf32-cr16.c: Include elf32-cr16.h.
84 * bfd-in2.h: Regenerate.
86 2019-09-23 Alan Modra <amodra@gmail.com>
88 * bfd-in.h (bfd_sunos_get_needed_list),
89 (bfd_sunos_record_link_assignment),
90 (bfd_sunos_size_dynamic_sections),
91 (bfd_i386linux_size_dynamic_sections),
92 (bfd_sparclinux_size_dynamic_sections): Delete obsolete decls.
93 * bfd-in2.h: Regenerate.
95 2019-09-23 Alan Modra <amodra@gmail.com>
97 * bfd-in.h: Move xcoff function declarations..
98 * xcofflink.h: ..to here, new file.
99 * xcofflink.c: Include xcofflink.h.
100 * coff-rs6000.c (bfd_xcoff_ar_archive_set_magic): Delete unused func.
101 * bfd-in2.h: Regenerate.
103 2019-09-23 Alan Modra <amodra@gmail.com>
105 * bfd-in.h: Delete coff forward refs and move coff declaration..
106 * coff-bfd.h: ..to here.
107 * bfd-in2.h: Regenerate.
109 2019-09-23 Alan Modra <amodra@gmail.com>
111 * bfd-in.h: Move arm declaraions..
112 * cpu-arm.h: ..to here, new file..
113 * coff-arm.h: ..and here, new file..
114 * elf32-arm.h: ..and here, new file.
115 * cpu-arm.c: Include cpu-arm.h.
116 * coff-arm.c: Include cpu-arm.h and coff-arm.h.
117 * elf32-arm.c: Include cpu-arm.h and elf32-arm.h.
118 * pe-arm.c: Move function rename defines later.
119 * pe-arm-wince.c: Likewise and include sysdep.h and bfd.h early.
120 * bfd-in2.h: Regenerate.
122 2019-09-23 Alan Modra <amodra@gmail.com>
124 * bfd-in.h: Move tic6x function declaration..
125 * elf32-tic6x.h: ..to here.
126 * bfd-in2.h: Regenerate.
128 2019-09-23 Alan Modra <amodra@gmail.com>
130 * bfd-in.h: Move aarch64 declarations and defines..
131 * cpu-aarch64.h: ..to here, new file..
132 * elfxx-aarch64.h: ..and here.
133 * cpu-aarch64.c: Include cpu-aarch64.h.
134 * elfnn-aarch64.c: Likewise.
135 * bfd-in2.h: Regenerate.
137 2019-09-23 Alan Modra <amodra@gmail.com>
139 * bfd-in.h: Delete ticoff function declarations.
140 * coff-tic54x.c (bfd_ticoff_set_section_load_page),
141 (bfd_ticoff_get_section_load_page): Make static.
142 * bfd-in2.h: Regenerate.
144 2019-09-23 Alan Modra <amodra@gmail.com>
146 * bfd-in.h: Move h8300 function declaration to..
147 * cpu-h8300.h: ..here, new file.
148 * cpu-h8300.c: Include cpu-h8300.h.
149 * elf32-h8300.c: Likewise.
150 * bfd-in2.h: Regenerate.
152 2019-09-23 Alan Modra <amodra@gmail.com>
154 * bfd-in.h: Move ia64 function declarations..
155 * elfxx-ia64.h: ..to here.
156 * bfd-in2.h: Regenerate.
158 2019-09-23 Alan Modra <amodra@gmail.com>
160 * bfd-in.h: Move v850 function declarations..
161 * elf32-v850.h: ..to here, new file.
162 * elf32-v850.c: Include elf32-v850.h.
163 * bfd-in2.h: Regenerate.
165 2019-09-23 Alan Modra <amodra@gmail.com>
167 * bfd-in.h: Move mips function declaration to..
168 * elfxx-mips.h: ..here.
169 * bfd-in2.h: Regenerate.
171 2019-09-23 Alan Modra <amodra@gmail.com>
173 * bfd-in.h: Move csky function declarations to..
174 * elf32-csky.h: ..here, new file.
175 * elf32-csky.c: Include elf32-csky.h.
176 * bfd-in2.h: Regenerate.
178 2019-09-20 Nelson Chu <nelson.chu@sifive.com>
180 * elfnn-riscv.c (riscv_pcgp_hi_reloc): Add new field undefined_weak.
181 (riscv_record_pcgp_hi_reloc): New parameter undefined_weak.
182 Set undefined_weak field from it.
183 (relax_func_t): New parameter undefined_weak.
184 (_bfd_riscv_relax_call): New ignored parameter undefined_weak.
185 (_bfd_riscv_relax_tls_le): Likewise.
186 (_bfd_riscv_relax_align): Likewise.
187 (_bfd_riscv_relax_delete): Likewise.
188 (_bfd_riscv_relax_lui): New parameter undefined_weak. If true,
189 allow relaxing. For LO12* relocs, set rs1 to x0 when undefined_weak.
190 (_bfd_riscv_relax_pc): New parameter undefined_weak. For LO12* relocs,
191 set undefined_weak from hi_reloc. If true, allow relaxing. For LO12*
192 relocs, set rs1 to x0 when undefined_weak and change to non-pcrel
194 (_bfd_riscv_relax_section): New local undefined_weak. Set for
195 undef weak relocs that can be relaxed. Pass to relax_func call.
197 2019-09-20 Alan Modra <amodra@gmail.com>
199 * bfd-in.h (bfd_section_name, bfd_section_size, bfd_section_vma),
200 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
201 (bfd_section_userdata, bfd_is_com_section, discarded_section),
202 (bfd_get_section_limit_octets, bfd_get_section_limit): Delete macros.
203 * bfd.c (bfd_get_section_limit_octets, bfd_get_section_limit),
204 (bfd_section_list_remove, bfd_section_list_append),
205 (bfd_section_list_prepend, bfd_section_list_insert_after),
206 (bfd_section_list_insert_before, bfd_section_removed_from_list):
207 New inline functions.
208 * section.c (bfd_is_und_section, bfd_is_abs_section),
209 (bfd_is_ind_section, bfd_is_const_section, bfd_section_list_remove),
210 (bfd_section_list_append, bfd_section_list_prepend),
211 (bfd_section_list_insert_after, bfd_section_list_insert_before),
212 (bfd_section_removed_from_list): Delete macros.
213 (bfd_section_name, bfd_section_size, bfd_section_vma),
214 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
215 (bfd_section_userdata, bfd_is_com_section, bfd_is_und_section),
216 (bfd_is_abs_section, bfd_is_ind_section, bfd_is_const_section),
217 (discarded_section): New inline functions.
218 * bfd-in2.h: Regenerate.
220 2019-09-20 Alan Modra <amodra@gmail.com>
222 * bfd-in.h (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
223 (bfd_asymbol_bfd, bfd_asymbol_flavour, bfd_set_asymbol_name): Delete.
224 * bfd.c (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
225 (bfd_asymbol_bfd, bfd_set_asymbol_name): New inline functions.
226 * targets.c (bfd_asymbol_flavour): Likewise.
227 * bfd-in2.h: Regenerate.
229 2019-09-20 Alan Modra <amodra@gmail.com>
231 * archive.c (bfd_generic_archive_p): Use bfd_set_thin_archive.
232 * bfd-in.h (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
233 (bfd_get_target, bfd_get_flavour, bfd_family_coff, bfd_big_endian),
234 (bfd_little_endian, bfd_header_big_endian, bfd_header_little_endian),
235 (bfd_get_file_flags, bfd_applicable_file_flags),
236 (bfd_applicable_section_flags, bfd_has_map, bfd_is_thin_archive),
237 (bfd_valid_reloc_types, bfd_usrdata, bfd_get_start_address),
238 (bfd_get_symcount, bfd_get_outsymbols, bfd_count_sections),
239 (bfd_get_dynamic_symcount, bfd_get_symbol_leading_char): Delete.
240 * bfd/bfd.c (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
241 (bfd_get_file_flags, bfd_get_start_address, bfd_get_symcount),
242 (bfd_get_dynamic_symcount, bfd_get_outsymbols, bfd_count_sections),
243 (bfd_has_map, bfd_is_thin_archive, bfd_set_thin_archive),
244 (bfd_usrdata, bfd_set_usrdata): New inline functions.
245 * targets.c (bfd_get_target, bfd_get_flavour),
246 (bfd_applicable_file_flags, bfd_family_coff, bfd_big_endian),
247 (bfd_little_endian, bfd_header_big_endian),
248 (bfd_header_little_endian, bfd_applicable_section_flags),
249 (bfd_get_symbol_leading_char): New inline functions.
250 * bfd-in2.h: Regenerate.
252 2019-09-20 Alan Modra <amodra@gmail.com>
254 * elf64-ppc.c (ppc64_glibc_dynamic_reloc): New function.
255 (ppc64_elf_relocate_section): Warn if emitting unsupported dynamic
258 2019-09-18 Alan Modra <amodra@gmail.com>
260 * bfd-in.h (bfd_get_section_name, bfd_get_section_vma),
261 (bfd_get_section_lma, bfd_get_section_alignment),
262 (bfd_get_section_size, bfd_get_section_flags),
263 (bfd_get_section_userdata): Delete.
264 (bfd_section_name, bfd_section_size, bfd_section_vma),
265 (bfd_section_lma, bfd_section_alignment): Lose bfd parameter.
266 (bfd_section_flags, bfd_section_userdata): New.
267 (bfd_is_com_section): Rename parameter.
268 * section.c (bfd_set_section_userdata, bfd_set_section_vma),
269 (bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section),
270 (bfd_set_section_size): Delete bfd parameter, rename section parameter.
271 (bfd_set_section_lma): New.
272 * bfd-in2.h: Regenerate.
273 * mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param,
275 * aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c,
276 * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
277 * compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h,
278 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c,
279 * elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c,
280 * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
281 * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c,
282 * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c,
283 * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c,
284 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
285 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
286 * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
287 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
288 * elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c,
289 * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
290 * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
291 * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c,
292 * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
293 * elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
294 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
295 * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c,
296 * elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
297 * elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c,
298 * mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c,
299 * peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c,
300 * xcofflink.c: Update throughout for bfd section macro and function
303 2019-09-18 Alan Modra <amodra@gmail.com>
305 * bfd-in.h (bfd_asymbol_section): Rename from bfd_get_section.
306 (bfd_get_output_section): Delete.
307 (bfd_asymbol_base): Delete.
308 (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
309 (bfd_asymbol_bfd, bfd_asymbol_flavour): Tidy.
310 (bfd_set_asymbol_name): New macro.
311 * bfd-in2.h: Regenerate.
312 * aout-cris.c: Update throughout to use bfd_asymbol_section.
314 * cofflink.c: Likewise.
315 * dwarf2.c: Likewise.
318 * elf32-arm.c: Likewise.
319 * elf32-mips.c: Likewise.
320 * elf32-score.c: Likewise.
321 * elf32-score7.c: Likewise.
322 * elfn32-mips.c: Likewise.
323 * elfnn-aarch64.c: Likewise.
324 * elfxx-mips.c: Likewise.
325 * linker.c: Likewise.
327 * elf64-mmix.c (mmix_elf_reloc): Part expand bfd_get_output_section.
329 2019-09-18 Simon Marchi <simon.marchi@polymtl.ca>
331 * Makefile.in: Re-generate.
332 * configure: Re-generate.
333 * doc/Makefile.in: Re-generate.
335 2019-09-18 Alan Modra <amodra@gmail.com>
337 * aoutx.h (slurp_symbol_table): Don't set symcount using bfd_get
339 * pdp11.c (slurp_symbol_table): Likewise.
340 * som.c (som_slurp_symbol_table): Likewise.
341 * coff-ppc.c (ppc_bfd_coff_final_link): Likewise.
342 * coffcode.h (coff_slurp_symbol_table): Likewise.
343 * cofflink.c (_bfd_coff_final_link): Likewise.
344 * ecoff.c (ecoff_slurp_symbolic_header): Likewise.
345 (_bfd_ecoff_slurp_symbolic_info): Likewise.
346 (_bfd_ecoff_slurp_symbol_table): Likewise.
347 (_bfd_ecoff_bfd_final_link): Likewise.
348 * elf.c (_bfd_elf_canonicalize_symtab): Likewise.
349 * elflink.c (elf_link_output_symstrtab): Likewise.
350 (bfd_elf_final_link): Likewise.
351 * peicode.h (pe_ILF_build_a_bfd): Likewise.
352 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
353 * aoutx.h (some_aout_object_p, slurp_symbol_table): Don't set
354 start_address or symcount using bfd_get macros.
355 * coffgen.c (coff_real_object_p): Likewise.
356 * pdp11.c (some_aout_object_p, slurp_symbol_table): Likewise.
357 * som.c (som_object_setup, som_slurp_symbol_table): Likewise.
358 * elfcore.h (elf_core_file_p): Don't set start_address using
360 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Don't set dynsymcount
362 * bfd.c (bfd_set_file_flags): Don't set flags using bfd_get macro.
363 * linker.c (bfd_generic_link_read_symbols): Don't set outsymbols
364 or symcount using bfd_get macros.
365 (_bfd_generic_final_link, generic_add_output_symbol): Likewise.
366 * syms.c (bfd_set_symtab): Likewise.
367 * vms-alpha.c (alpha_vms_bfd_final_link): Likewise.
368 * archive.c (do_slurp_bsd_armap): Don't set has_armap using
370 (do_slurp_coff_armap, bfd_slurp_armap): Likewise.
371 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
372 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
373 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
374 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
375 * som.c (som_slurp_armap): Likewise.
377 2019-09-18 Alan Modra <amodra@gmail.com>
379 * archures.c (bfd_get_arch): Make param const.
380 (bfd_get_mach, bfd_arch_bits_per_byte): Likewise.
381 (bfd_arch_bits_per_address, bfd_octets_per_byte): Likewise.
382 * bfd-in2.h: Regenerate.
384 2019-09-18 Alan Modra <amodra@gmail.com>
386 * bfd-in.h (carsym.name): Make const.
387 * reloc.c (struct reloc_howto_struct.name): Likewise.
388 * targets.c (bfd_target.name): Likewise.!
389 * bfd.c (bfd_get_sign_extend_vma): Make variable const.
390 * som.c (som_bfd_fill_in_ar_symbols): Use an intermediary variable
391 when setting carsym.name.
392 * bfd-in2.h: Regenerate.
394 2019-09-18 Alan Modra <amodra@gmail.com>
396 * mach-o.c (bfd_mach_o_fat_member_init): Likewise. Replace
397 xstrdup and xmalloc with bfd_strdup and bfd_malloc. Return an
398 error status. Adjust calls.
399 * vms-lib.c (_bfd_vms_lib_get_module): Test mhd->id earlier.
400 Close bfd on failure. Replace xstrdup/bfd_alloc use with
401 bfd_malloc. Use bfd_set_filename.
403 2019-09-18 Alan Modra <amodra@gmail.com>
405 * elf64-ppc.c (must_be_dyn_reloc): Return 0 for TOC16 relocs.
406 (ppc64_elf_check_relocs): Support dynamic/copy relocs for TOC16.
407 (ppc64_elf_adjust_dynamic_symbol): Don't keep dynamic reloc when
408 needs_copy even if all relocs are in rw sections.
409 (dec_dynrel_count): Handle TOC16 relocs.
410 (ppc64_elf_relocate_section): Support dynamic relocs for TOC16.
411 (ppc64_elf_finish_dynamic_symbol): Adjust to handle needs_copy
414 2019-09-16 Phil Blundell <pb@pbcl.net>
416 * version.m4: Set version to 2.33.50.
417 * Makefile.in, configure, doc/Makefile.in: Regenerated.
419 2019-09-11 Tom Tromey <tom@tromey.com>
421 * opncls.c (bfd_set_filename): New function.
422 * bfd-in2.h: Regenerate.
424 2019-09-11 Alan Modra <amodra@gmail.com>
426 * targets.c (struct bfd_target): Add _bfd_group_name.
427 (BFD_JUMP_TABLE): Likewise.
428 * coffgen.c (bfd_coff_group_name): New function.
429 * elf.c (bfd_elf_group_name): New function.
430 * linker.c (_bfd_nolink_bfd_group_name): New function.
431 * section.c (bfd_generic_group_name): New function.
432 * elf-bfd.h (bfd_elf_group_name): Declare.
433 * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
434 * libcoff-in.h (bfd_coff_group_name): Declare.
435 * aout-target.h (MY_bfd_group_name): Define.
436 * aout-tic30.c (MY_bfd_group_name): Define.
437 * bfd.c (bfd_group_name): Define.
438 * binary.c (binary_bfd_group_name): Define.
439 * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
440 * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
441 * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
442 * coffcode.h (coff_bfd_group_name): Define.
443 * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
444 * i386msdos.c (msdos_bfd_group_name): Define.
445 * ihex.c (ihex_bfd_group_name): Define.
446 * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
447 * mmo.c (mmo_bfd_group_name): Define.
448 * pef.c (bfd_pef_bfd_group_name): Define.
449 * plugin.c (bfd_plugin_bfd_group_name): Define.
450 * ppcboot.c (ppcboot_bfd_group_name): Define.
451 * som.c (som_bfd_group_name): Define.
452 * srec.c (srec_bfd_group_name): Define.
453 * tekhex.c (tekhex_bfd_group_name): Define.
454 * verilog.c (verilog_bfd_group_name): Define.
455 * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
456 * xsym.c (bfd_sym_bfd_group_name): Define.
457 * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
458 (rs6000_xcoff64_aix_vec): Likewise.
459 * bfd-in2.h: Regenerate.
460 * libbfd.h: Regenerate.
461 * libcoff.h: Regenerate.
463 2019-09-10 Nick Clifton <nickc@redhat.com>
466 * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
468 (bfd_default_arch_struct): Initialise the new field.
469 * bfd-in2.h: Regenerate.
470 * cpu-aarch64.c: Initialise the new field.
471 * cpu-alpha.c: Likewise.
472 * cpu-arc.c: Likewise.
473 * cpu-arm.c: Likewise.
474 * cpu-avr.c: Likewise.
475 * cpu-bfin.c: Likewise.
476 * cpu-bpf.c: Likewise.
477 * cpu-cr16.c: Likewise.
478 * cpu-cr16c.c: Likewise.
479 * cpu-cris.c: Likewise.
480 * cpu-crx.c: Likewise.
481 * cpu-csky.c: Likewise.
482 * cpu-d10v.c: Likewise.
483 * cpu-d30v.c: Likewise.
484 * cpu-dlx.c: Likewise.
485 * cpu-epiphany.c: Likewise.
486 * cpu-fr30.c: Likewise.
487 * cpu-frv.c: Likewise.
488 * cpu-ft32.c: Likewise.
489 * cpu-h8300.c: Likewise.
490 * cpu-hppa.c: Likewise.
491 * cpu-i386.c: Likewise.
492 * cpu-ia64.c: Likewise.
493 * cpu-iamcu.c: Likewise.
494 * cpu-ip2k.c: Likewise.
495 * cpu-iq2000.c: Likewise.
496 * cpu-k1om.c: Likewise.
497 * cpu-l1om.c: Likewise.
498 * cpu-lm32.c: Likewise.
499 * cpu-m10200.c: Likewise.
500 * cpu-m10300.c: Likewise.
501 * cpu-m32c.c: Likewise.
502 * cpu-m32r.c: Likewise.
503 * cpu-m68hc11.c: Likewise.
504 * cpu-m68hc12.c: Likewise.
505 * cpu-m68k.c: Likewise.
506 * cpu-m9s12x.c: Likewise.
507 * cpu-m9s12xg.c: Likewise.
508 * cpu-mcore.c: Likewise.
509 * cpu-mep.c: Likewise.
510 * cpu-metag.c: Likewise.
511 * cpu-microblaze.c: Likewise.
512 * cpu-mips.c: Likewise.
513 * cpu-mmix.c: Likewise.
514 * cpu-moxie.c: Likewise.
515 * cpu-msp430.c: Likewise.
516 * cpu-mt.c: Likewise.
517 * cpu-nds32.c: Likewise.
518 * cpu-nfp.c: Likewise.
519 * cpu-nios2.c: Likewise.
520 * cpu-ns32k.c: Likewise.
521 * cpu-or1k.c: Likewise.
522 * cpu-pdp11.c: Likewise.
523 * cpu-pj.c: Likewise.
524 * cpu-plugin.c: Likewise.
525 * cpu-powerpc.c: Likewise.
526 * cpu-pru.c: Likewise.
527 * cpu-riscv.c: Likewise.
528 * cpu-rl78.c: Likewise.
529 * cpu-rs6000.c: Likewise.
530 * cpu-rx.c: Likewise.
531 * cpu-s12z.c: Likewise.
532 * cpu-s390.c: Likewise.
533 * cpu-score.c: Likewise.
534 * cpu-sh.c: Likewise.
535 * cpu-sparc.c: Likewise.
536 * cpu-spu.c: Likewise.
537 * cpu-tic30.c: Likewise.
538 * cpu-tic4x.c: Likewise.
539 * cpu-tic54x.c: Likewise.
540 * cpu-tic6x.c: Likewise.
541 * cpu-tic80.c: Likewise.
542 * cpu-tilegx.c: Likewise.
543 * cpu-tilepro.c: Likewise.
544 * cpu-v850.c: Likewise.
545 * cpu-v850_rh850.c: Likewise.
546 * cpu-vax.c: Likewise.
547 * cpu-visium.c: Likewise.
548 * cpu-wasm32.c: Likewise.
549 * cpu-xc16x.c: Likewise.
550 * cpu-xgate.c: Likewise.
551 * cpu-xstormy16.c: Likewise.
552 * cpu-xtensa.c: Likewise.
553 * cpu-z80.c: Likewise.
554 * cpu-z8k.c: Likewise.
556 2019-09-09 Phil Blundell <pb@pbcl.net>
558 binutils 2.33 branch created.
560 2019-09-06 Alan Modra <amodra@gmail.com>
562 * aout-target.h (object_p): Formatting.
563 * bfd-in.h (bfd_get_filename): Don't cast to char*.
564 * corefile.c (generic_core_file_matches_executable_p): Constify
565 variables and remove cast.
566 * bfd-in2.h: Regenerate.
568 2019-09-05 Alan Modra <amodra@gmail.com>
570 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
571 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
572 in the GOT/PLT entry rather than affecting the offset to that
574 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
576 2019-09-05 Alan Modra <amodra@gmail.com>
578 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
579 in second instruction.
580 (ppc64_elf_relocate_section): Likewise.
582 2019-09-05 Alan Modra <amodra@gmail.com>
585 * libbfd-in.h (bfd_strdup): New inline function.
586 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
588 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
589 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
591 (bfd_openstreamr): Use bfd_strdup.
592 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
593 * plugin.c (try_load_plugin): Use bfd_malloc.
594 * libbfd.h: Regenerate.
596 2019-09-02 Alan Modra <amodra@gmail.com>
599 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
601 (read_alt_indirect_string): Likewise.
602 (read_alt_indirect_ref): Likewise.
604 2019-08-31 Jim Wilson <jimw@sifive.com>
607 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
608 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
610 2019-08-30 Jim Wilson <jimw@sifive.com>
612 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
613 error, call bfd_set_error, set ret to FALSE, and goto out label.
615 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
618 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
619 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
621 2019-08-29 Alan Modra <amodra@gmail.com>
624 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
625 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
626 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
629 2019-08-29 Alan Modra <amodra@gmail.com>
631 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
632 on second insn, return it in poff.
633 (ppc64_elf_relocate_section): Add offset to paddi addend for
636 2019-08-28 Jim Wilson <jimw@sifive.com>
638 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
639 section when setting max_alignment. Update comment.
640 (_bfd_riscv_relax_pc): Likewise.
642 2019-08-29 Alan Modra <amodra@gmail.com>
645 * bfd.c (struct bfd): Add no_element_cache.
646 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
647 archive cache when no_element_cache.
648 (bfd_generic_archive_p): Set no_element_cache when opening first
649 element to check format. Close first element too.
650 (do_slurp_bsd_armap): Don't zero ardata->cache here.
651 * bfd-in2.h: Regenerate.
653 2019-08-24 Alan Modra <amodra@gmail.com>
655 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
656 symbols from GOT optimisation.
658 2019-08-23 Stafford Horne <shorne@gmail.com>
660 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
663 2019-08-23 Nick Clifton <nickc@redhat.com>
666 * elf.c (bfd_section_from_shdr): Issue an informative warning
667 message and continue processing other sections after encountering
668 a reloc section for a section which already has other relocs
671 2019-08-23 Alan Modra <amodra@gmail.com>
674 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
675 on error without freeing plts[] contents.
677 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
679 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
681 2019-08-22 Nick Clifton <nickc@redhat.com>
684 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
685 reading data from extra records.
687 2019-08-22 Tamar Christina <tamar.christina@arm.com>
690 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
691 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
692 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
693 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
696 2019-08-22 Alan Modra <amodra@gmail.com>
698 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
699 instead recognize CMSE_PREFIX in symbol name.
700 (elf32_arm_gc_mark_extra_sections): Likewise.
701 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
702 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
704 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
706 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
707 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
709 2019-08-20 Tamar Christina <tamar.christina@arm.com>
711 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
712 elf32_arm_stub_long_branch_v4t_thumb_thumb,
713 elf32_arm_stub_long_branch_v4t_thumb_arm,
714 elf32_arm_stub_short_branch_v4t_thumb_arm,
715 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
716 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
717 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
718 previous instruction.
720 2019-08-19 Tom Tromey <tromey@adacore.com>
722 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
725 2019-08-19 Alan Modra <amodra@gmail.com>
727 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
729 (struct _ppc64_elf_section_data): Likewise.
730 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
731 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
732 than TOC loop. Check PLT16 insns too.
734 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
737 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
738 PC-relative relocations back to ...
739 (elf_x86_64_relocate_section): Here.
741 2019-08-16 Martin Liska <mliska@suse.cz>
744 * elflink.c: Report error only for not relocatable.
745 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
746 here lto_slim_object as it's handled in caller.
748 2019-08-16 Alan Modra <amodra@gmail.com>
750 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
752 2019-08-15 Jim Wilson <jimw@sifive.com>
754 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
755 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
756 to c.li instruction, and use ENCODE_RVC_IMM to set value.
758 2019-08-15 Tom Tromey <tromey@adacore.com>
760 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
763 2019-08-14 Alan Modra <amodra@gmail.com>
766 * dwarf2.c (stash_comp_unit): New function, extracted from..
767 (_bfd_dwarf2_find_nearest_line): ..here.
768 (find_abstract_instance): Parse comp units and decode line info
771 2019-08-14 Alan Modra <amodra@gmail.com>
773 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
774 (comp_unit_find_nearest_line): Use it here..
775 (_bfd_dwarf2_find_symbol_bias): ..and here.
777 2019-08-14 Alan Modra <amodra@gmail.com>
779 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
780 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
781 * coffgen.c (coff_find_nearest_line_with_names): Adjust
782 _bfd_dwarf2_find_nearest_line calls.
783 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
784 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
785 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
786 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
787 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
788 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
789 * libbfd.h: Regenerate.
791 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
793 * elf-bfd.h (struct elf_backend_data): New members.
794 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
795 .gnu.hash section if necessary.
796 (struct collect_gnu_hash_codes): New member.
797 (elf_gnu_hash_process_symidx): New function name.
798 (elf_renumber_gnu_hash_syms): Ignore local and undefined
799 symbols. Record xlat location for every symbol which should have
801 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
802 dynamic section if necessary.
803 (GNU_HASH_SECTION_NAME): New define.
804 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
805 Update the section size info.
806 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
807 (struct mips_elf_link_hash_entry): New member.
808 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
810 (mips_elf_sort_hash_table): Initialize the pointer to the
812 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
813 translation table entry with the symbol dynindx.
814 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
815 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
817 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
819 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
821 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
822 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
824 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
825 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
826 (_bfd_mips_post_process_headers): Mark the ABI version as
827 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
828 but not a .hash section.
829 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
830 position in the translation table, associated with the hash
832 * elfxx-mips.h (literal_reloc_p): Define
833 elf_backend_record_xhash_symbol backend hook.
834 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
837 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
839 * elf64-bpf.c (bpf_elf_relocate_section): New function.
840 (bpf_elf_insn_disp_reloc): Delete function.
841 (elf_backend_relocate_section): Define.
843 2019-08-07 Alan Modra <amodra@gmail.com>
846 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
847 for overflow in expressions involving nsymz.
849 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
851 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
852 two pages in relro presence.
854 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
856 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
857 (get_wsr_lbeg_opcode): New functions.
858 (check_loop_aligned): Detect relaxed loops and adjust loop_len
859 and insn_len for the first actual instruction of the loop.
861 2019-07-30 Alan Modra <amodra@gmail.com>
864 * bfd.c (struct bfd): Add lto_slim_object flag.
865 * bfd-in2.h: Regenerate.
867 2019-07-29 Martin Liska <mliska@suse.cz>
870 * archive.c (_bfd_compute_and_write_armap): Come up with
871 report_plugin_err variable.
872 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
873 * elf.c (struct lto_section): New.
874 (_bfd_elf_make_section_from_shdr): Parse content of
875 .gnu_lto_.lto section.
876 * elflink.c: Report error for a missing LTO plugin.
877 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
879 2019-07-28 Alan Modra <amodra@gmail.com>
883 * elflink.c (elf_link_add_object_symbols): Report an informative
884 error on finding local symbols with index equal or greater than
885 symbol table sh_info. Correct comment. Allow such symbols in
886 dynamic objects. Abort on NULL section for symbol.
888 2019-07-26 Alan Modra <amodra@gmail.com>
890 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
891 (elf_linker): Don't define.
892 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
894 2019-07-25 YunQiang Su <syq@debian.org>
897 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
900 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
902 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
904 (reloc_type_to_name): Fix formating.
905 (arc_elf_object_p): Likewise.
906 (debug_arc_reloc): Likewise.
907 (arc_do_relocation): Likewise.
909 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
911 * elf32-arc.c (bfd_get_32_me): New function.
912 (bfd_put_32_me): Likewise.
913 (arc_elf_relax_section): Likewise.
914 (bfd_elf32_bfd_relax_section): Define.
916 2019-07-24 Alan Modra <amodra@gmail.com>
918 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
919 elf_backend_final_write_processing, don't pass linker arg.
920 (_bfd_elf_final_write_processing): Update prototype.
921 * elf.c (_bfd_elf_write_object_contents): Adjust call.
922 (_bfd_elf_final_write_processing): Return error on incompatible
923 OSABI and has_gnu_osabi. Remove linker arg.
924 * elf-nacl.h (nacl_final_write_processing): Update prototype.
925 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
926 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
927 (_bfd_mips_elf_final_write_processing): Likewise.
928 * elf-hppa.h (elf_hppa_final_write_processing): Return status
929 and remove linker arg.
930 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
931 * elf-nacl.c (nacl_final_write_processing): Likewise.
932 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
933 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
934 * elf32-arm.c (arm_final_write_processing): Likewise.
935 (elf32_arm_final_write_processing): Likewise.
936 (elf32_arm_nacl_final_write_processing): Likewise.
937 (elf32_arm_vxworks_final_write_processing): Likewise.
938 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
939 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
940 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
941 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
942 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
943 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
944 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
945 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
946 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
947 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
948 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
949 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
950 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
951 * elf32-ppc.c (ppc_final_write_processing): Likewise.
952 (ppc_elf_final_write_processing): Likewise.
953 (ppc_elf_vxworks_final_write_processing): Likewise.
954 * elf32-sparc.c (sparc_final_write_processing): Likewise.
955 (elf32_sparc_final_write_processing): Likewise.
956 (elf32_sparc_vxworks_final_write_processing): Likewise.
957 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
958 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
959 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
960 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
961 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
962 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
963 (_bfd_mips_elf_final_write_processing): Likewise.
965 2019-07-24 Alan Modra <amodra@gmail.com>
967 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
969 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
970 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
972 2019-07-24 Alan Modra <amodra@gmail.com>
974 * elf32-visium.c (visium_elf_post_process_headers): Don't set
975 EI_OSABI header byte here.
978 2019-07-23 Alan Modra <amodra@gmail.com>
980 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
981 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
982 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
983 when elf_gnu_osabi_mbind is set.
984 (_bfd_elf_map_sections_to_segments): Likewise.
985 (_bfd_elf_init_private_section_data): Likewise.
986 (_bfd_elf_final_write_processing): Update comment.
987 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
988 (elf_backend_special_sections): Define without .tbss for linux.
990 2019-07-23 Alan Modra <amodra@gmail.com>
992 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
993 Remove none, any, all enums.
994 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
995 (_bfd_elf_final_write_processing): Declare.
996 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
997 elf_backend_final_write_processing.
998 (_bfd_elf_post_process_headers): Move body of function to..
999 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
1000 only when not already set. Adjust for rename.
1001 * elfxx-target.h (elf_backend_final_write_processing): Default to
1002 _bfd_elf_final_write_processing.
1003 * elf-hppa.h (elf_hppa_final_write_processing): Call
1004 _bfd_elf_final_write_processing.
1005 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
1006 * elf-nacl.c (nacl_final_write_processing): Likewise.
1007 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
1008 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1009 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1010 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
1011 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
1012 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
1013 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
1014 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
1015 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
1016 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
1017 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
1018 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
1019 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
1020 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
1021 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
1022 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
1023 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1024 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
1025 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
1026 * elf32-arm.c (arm_final_write_processing): Split out from..
1027 (elf32_arm_final_write_processing): ..here. Call
1028 _bfd_elf_final_write_processing.
1029 (elf32_arm_nacl_final_write_processing): Adjust.
1030 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
1031 (_bfd_mips_elf_final_write_processing): ..here. Call
1032 _bfd_elf_final_write_processing.
1033 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
1034 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
1035 * elf32-ppc.c (ppc_final_write_processing): Split out from..
1036 (ppc_elf_final_write_processing): ..here. Call
1037 _bfd_elf_final_write_processing.
1038 (ppc_elf_vxworks_final_write_processing): Adjust.
1039 * elf32-sparc.c (sparc_final_write_processing): Split out from..
1040 (elf32_sparc_final_write_processing): ..here. Call
1041 _bfd_elf_final_write_processing.
1042 (elf32_sparc_vxworks_final_write_processing): Adjust.
1043 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
1044 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
1045 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
1046 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
1047 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
1048 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
1049 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1050 * elflink.c (elf_link_add_object_symbols): Likewise.
1051 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
1054 2019-07-23 Omar Majid <omajid@redhat.com>
1056 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
1057 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
1058 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
1060 * peXXigen.c: Add comment about source of .NET magic numbers.
1062 2019-07-19 Alan Modra <amodra@gmail.com>
1064 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
1065 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
1066 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
1067 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
1068 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
1069 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
1070 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
1071 (ppc64_elf_check_relocs): Support pcrel tls relocs.
1072 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
1073 * bfd-in2.h: Regenerate.
1074 * libbfd.h: Regenerate.
1076 2019-07-18 Alan Modra <amodra@gmail.com>
1078 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
1079 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
1082 2019-07-18 Alan Modra <amodra@gmail.com>
1084 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
1085 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
1086 is more than 8 bits.
1087 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
1088 tls_type vars unsigned int.
1089 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
1090 to select r_type edit.
1092 2019-07-18 Alan Modra <amodra@gmail.com>
1094 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
1096 * elf64-ppc.c (TLS_GDIE): Likewise.
1098 2019-07-18 Alan Modra <amodra@gmail.com>
1100 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
1101 range of tp-relative offsets.
1103 2019-07-15 Alan Modra <amodra@gmail.com>
1105 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
1106 alias is no longer bfd_link_hash_defined, clear the alias.
1108 2019-07-13 Alan Modra <amodra@gmail.com>
1110 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
1112 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
1113 (_bfd_elf_init_2_index_sections): Likewise.
1114 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
1115 relocations for local TLS symbols, use STN_UNDEF as the relocation
1117 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
1118 leave TLS symbol value in the addend.
1120 2019-07-08 Alan Modra <amodra@gmail.com>
1123 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
1124 size before reading first word.
1126 2019-07-02 Nick Clifton <nickc@redhat.com>
1129 * elf.c (is_debuginfo_file): New function.
1130 (assign_file_positions_for_non_load_sections): Do not warn about
1131 allocated sections outside of loadable segments if they are found
1132 in a debuginfo file.
1133 * elf-bfd.h (is_debuginfo_file): Prototype.
1135 2019-07-02 Nick Clifton <nickc@redhat.com>
1138 * compress.c (bfd_get_full_section_contents): Do not complain
1139 about linker created sections that are larger than the file size.
1141 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
1143 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
1144 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
1146 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
1148 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
1150 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
1151 sections when .text section contain secure entry functions
1154 2019-07-01 Nick Clifton <nickc@redhat.com>
1157 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
1158 section VMA in the offset used to update exidx relocs.
1160 2019-06-28 Nick Clifton <nickc@redhat.com>
1163 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
1164 large version reference section.
1165 * compress.c (bfd_get_full_section_contents): Check for an
1166 uncompressed section whose size is larger than the file size.
1168 2019-06-28 Alan Modra <amodra@gmail.com>
1170 * format.c (bfd_check_format_matches): Don't match plugin target
1171 if another target matches. Expand comment.
1172 * targets.c (_bfd_target_vector): Move plugin_vec after all other
1173 non-corefile targets, outside !SELECT_VECS.
1174 * config.bfd: Don't handle targ=plugin here.
1175 * configure.ac: Don't add plugin to enable_targets or handle in
1176 target loop setting selvecs and other target vars.
1177 * configure: Regenerate.
1179 2019-06-26 Nick Clifton <nickc@redhat.com>
1182 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
1183 messages for failures.
1184 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
1185 if returning an error value.
1187 2019-06-25 Jan Beulich <jbeulich@suse.com>
1189 * elf-properties.c (elf_find_and_remove_property): Rename last
1190 parameter. Mention it in comment.
1192 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
1194 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
1195 SEC_MERGE or SEC_CODE flags are set.
1196 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
1197 symtype consistently. Don't include sec_addr (sym_sec) in symval.
1198 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
1199 Add sec_addr (sym_sec) after handling merge sections.
1201 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
1204 * elf-properties.c (elf_merge_gnu_property_list): Remove the
1205 property after reporting property removal.
1207 2019-06-23 Alan Modra <amodra@gmail.com>
1210 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
1211 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
1212 Reduce range of offsets allowed for other GOT relocs.
1214 2019-06-23 Alan Modra <amodra@gmail.com>
1217 * elfcode.h (elf_object_p): Warning fix.
1219 2019-06-21 Alan Modra <amodra@gmail.com>
1222 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
1224 2019-06-19 Alan Modra <amodra@gmail.com>
1227 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
1228 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
1230 2019-06-19 Alan Modra <amodra@gmail.com>
1232 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
1233 functions that require r2 valid to use local entry.
1234 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
1236 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1238 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
1239 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
1240 with elfNN_aarch64_allocate_local_dynrelocs.
1242 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
1244 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
1246 2019-06-14 Alan Modra <amodra@gmail.com>
1248 * Makefile.in: Regenerate.
1249 * configure: Regenerate.
1251 2019-06-14 Alan Modra <amodra@gmail.com>
1253 * elf64-ppc.c: Fix comments involving paddi.
1255 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
1258 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
1259 absent, or the bfd is not in the ELF formart.
1260 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
1262 2019-06-10 Christos Zoulas <christos@zoulas.com>
1265 * elf.c (elfcore_make_auxv_note_section): New function.
1266 (elfcore_grok_note): Use it.
1267 (elfcore_grok_freebsd_note): Likewise.
1268 (elfcore_grok_openbsd_note): Likewise.
1269 (elfcore_grok_netbsd_note): Likewise. Plus add support for
1270 NT_NETBSDCORE_AUXV notes.
1272 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1274 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
1275 alignment of the new gnu property section.
1277 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1279 * bfd-in.h: Change comment.
1280 * bfd-in2.h: Regenerate.
1281 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
1282 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
1285 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
1287 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
1288 Remove overflow check.
1290 2019-05-28 Alan Modra <amodra@gmail.com>
1293 * cofflink.c (coff_link_check_archive_element): Don't assume
1294 element is a coff object file after calling add_archive_element.
1296 2019-05-28 Alan Modra <amodra@gmail.com>
1299 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
1300 attempt to set sh_entsize for excluded PLT section.
1302 2019-05-28 Alan Modra <amodra@gmail.com>
1305 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
1306 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
1307 allocated in alpha_dynamic_entries_for_reloc.
1309 2019-05-28 Alan Modra <amodra@gmail.com>
1312 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
1313 on NULL output_section.
1314 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
1316 2019-05-28 Alan Modra <amodra@gmail.com>
1319 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
1320 entry when MUST_FIND. Abort when MUST_FIND not found.
1321 (elf_m68k_get_bfd2got_entry): Likewise.
1322 (elf_m68k_relocate_section): Remove now useless assert.
1324 2019-05-28 Alan Modra <amodra@gmail.com>
1327 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
1328 from bfd_link_info, not an output section owner.
1329 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
1330 (elf_hppa_final_link_relocate): Likewise.
1332 2019-05-28 Alan Modra <amodra@gmail.com>
1335 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
1336 create_object_symbols_section, obj_textsec, obj_datasec or
1337 obj_bsssec. Fix other errors in placement.
1338 * config.bfd: Obsolete tic30-aout.
1340 2019-05-28 Alan Modra <amodra@gmail.com>
1343 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
1344 end of section list as well as section_count.
1345 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
1346 section list before returning error.
1348 2019-05-27 Alan Modra <amodra@gmail.com>
1350 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
1352 2019-05-27 Alan Modra <amodra@gmail.com>
1355 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
1357 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
1359 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
1360 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
1361 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
1362 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
1363 (elf_backend_merge_symbol_attribute): Define.
1365 2019-05-24 Alan Modra <amodra@gmail.com>
1367 * po/SRC-POTFILES.in: Regenerate.
1369 2019-05-24 Alan Modra <amodra@gmail.com>
1371 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
1372 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
1373 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
1374 (struct ppc_link_hash_table): Add powerxx_stubs.
1375 (ppc64_elf_check_relocs): Set powerxx_stubs.
1376 (build_powerxx_offset, size_powerxx_offset),
1377 (num_relocs_for_powerxx_offset),
1378 (emit_relocs_for_powerxx_offset): New functions.
1379 (plt_stub_size): Size powerxx stubs.
1380 (ppc_build_one_stub): Emit powerxx stubs.
1381 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
1384 2019-05-24 Alan Modra <amodra@gmail.com>
1386 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
1387 R_PPC64_GOT_PCREL34.
1388 (xlate_pcrel_opt): New function.
1389 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
1390 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1391 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
1393 2019-05-24 Alan Modra <amodra@gmail.com>
1395 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
1396 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
1397 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
1398 (BFD_RELOC_PPC64_PLT_PCREL34),
1399 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
1400 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
1401 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
1402 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
1403 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
1404 * elf64-ppc.c (PNOP): Define.
1405 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
1406 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
1407 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
1409 (ppc64_elf_prefix_reloc): New function.
1410 (struct ppc_link_hash_table): Add notoc_plt.
1411 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
1412 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
1413 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
1414 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
1415 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
1416 possible need for dynamic relocs on non-pcrel powerxx relocs.
1417 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
1418 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
1419 (toc_adjusting_stub_needed): Likewise.
1420 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
1421 (ppc64_elf_relocate_section): Handle new powerxx relocs.
1422 * bfd-in2.h: Regenerate.
1423 * libbfd.h: Regenerate.
1425 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1427 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
1428 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
1430 * configure: Regenerate.
1432 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1434 * configure: Regenerated.
1435 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
1436 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
1437 (BFD64_BACKENDS): Add elf64-bpf.lo.
1438 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
1439 * Makefile.in (SOURCE_HFILES): Regenerate.
1440 * config.bfd (targ_cpu): Handle bpf-*-* targets.
1441 * cpu-bpf.c: New file.
1442 * elf64-bpf.c: Likewise.
1443 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
1445 * archures.c: Define architecture bfd_arch_bpf and machine
1447 * reloc.c: Define BFD relocations used by the BPF target.
1448 * bfd-in2.h: Regenerated.
1449 * libbfd.h: Likewise.
1451 2019-05-22 Alan Modra <amodra@gmail.com>
1453 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
1456 2019-05-22 Alan Modra <amodra@gmail.com>
1458 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
1459 processing on "size error in section".
1461 2019-05-22 Alan Modra <amodra@gmail.com>
1463 * som.c (som_bfd_free_cached_info): Call
1464 _bfd_generic_close_and_cleanup.
1466 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1468 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
1469 for TLS_TPREL_HI16(/LO16) relocations in shared library.
1471 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1473 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
1474 checks. Search the RELA table for n64 relocations.
1476 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
1477 Faraz Shahbazker <fshahbazker@wavecomp.com>
1479 * elfxx-mips.c (LA25_BC): New macro.
1480 (mips_elf_link_hash_table)<compact_branches>: New field.
1481 (STUB_JALRC): New macro.
1482 (mipsr6_o32_exec_plt0_entry_compact): New array.
1483 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
1484 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
1485 (mipsr6_exec_plt_entry_compact): Likewise.
1486 (mips_elf_create_la25_stub): Use BC instead of J for stubs
1487 when compact_branches is true.
1488 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
1489 PLT for MIPSR6 with compact_branches. Do not reorder the
1490 compact branches PLT. Switch the lazy stub for MIPSR6
1491 with compact_branches to use JALRC.
1492 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
1493 when compact_branches is true.
1494 (_bfd_mips_elf_compact_branches): New function.
1495 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
1497 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1500 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
1501 Fix print formatter.
1503 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1506 * elf32-arm.c (get_value_helper): Remove.
1507 (elf32_arm_final_link_relocate): Fix branch future relocations.
1509 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1512 * bfd-in.h (enum erratum_84319_opts): New
1513 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1514 int to enum erratum_84319_opts.
1515 * bfd-in2.h: Regenerate.
1516 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
1517 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
1518 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
1519 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
1520 (_bfd_aarch64_resize_stubs): Amend comment.
1521 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
1523 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
1524 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
1526 (clear_erratum_843419_entry): Update erratum conditional.
1528 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1531 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
1532 when computing distance_short_enough.
1534 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1537 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1538 Wrap around even if distance equals avr_pc_wrap_around.
1540 2019-05-20 Nick Clifton <nickc@redhat.com>
1542 * po/fr.po: Updated French translation.
1544 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1546 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1548 2019-05-16 Alan Modra <amodra@gmail.com>
1550 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1552 2019-05-15 Alan Modra <amodra@gmail.com>
1554 * elf32-arm.c (elf32_arm_write_section): Don't leave
1555 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1556 unitialised section contents.
1558 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1561 * verilog.c: (VerilogDataWidth): New variable.
1562 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1564 2019-05-08 Nick Clifton <nickc@redhat.com>
1567 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1568 rather than FALSE if encountering a non-ELF file.
1570 2019-05-06 Alan Modra <amodra@gmail.com>
1572 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1574 2019-05-06 Alan Modra <amodra@gmail.com>
1576 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1577 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1578 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1579 * libbfd.h: Regenerate.
1580 * bfd-in2.h: Regenerate.
1582 2019-05-04 Alan Modra <amodra@gmail.com>
1585 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1586 following the standard section names.
1587 (bfd_decode_symclass): Prioritize section flag tests in
1588 decode_section_type before name tests in coff_section_type.
1589 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1590 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1591 their names and choose standard .text section flags for
1594 2019-05-02 Nick Clifton <nickc@redhat.com>
1597 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1598 .gnu.debugaltlink sections as debugging sections.
1600 2019-04-30 Alan Modra <amodra@gmail.com>
1602 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1603 (struct _ppc64_elf_section_data): Likewise.
1604 (ppc64_elf_check_relocs): Set above fields.
1605 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1606 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1609 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1612 * elflink.c (elf_link_output_extsym): Don't complain undefined
1613 weak dynamic reference.
1615 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1617 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1618 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1619 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1620 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1621 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1622 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1623 (elfNN_aarch64_small_plt0_bti_entry): Update.
1624 (elfNN_aarch64_small_plt_bti_entry): Update.
1625 (elfNN_aarch64_small_plt_pac_entry): Update.
1626 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1627 (setup_plt_values): Setup new entries.
1628 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1629 (elfNN_aarch64_plt_sym_val): Likewise.
1631 2019-04-22 Jim Wilson <jimw@sifive.com>
1633 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1635 2019-04-19 Alan Modra <amodra@gmail.com>
1637 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1639 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1641 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1642 building shared object.
1643 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1645 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1648 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1651 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1653 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1655 * bfd-in2.h: Regenerate.
1656 * libbfd.h: Likewise.
1658 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1660 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1661 * bfd-in2.h: Regenerated.
1662 * libbfd.h: Regenerated.
1664 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1666 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1667 * bfd-in2.h: Regenerated.
1668 * libbfd.h: Likewise.
1670 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1672 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1673 * bfd-in2.h: Regenerated.
1674 * libbfd.h: Regenerated.
1675 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1676 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1677 and R_ARM_THM_BF12 together.
1678 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1680 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1682 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1683 * libbfd.h: Regenerated.
1684 * bfd-in2.h: Regenerated.
1685 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1686 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1687 and R_ARM_THM_BF18 together.
1688 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1690 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1692 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1693 * bfd-in2.h: Regenerated.
1694 * libbfd.h: Regenerated.
1695 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1696 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1697 and R_ARM_THM_BF16 together.
1698 (get_value_helper): New reloc helper.
1699 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1701 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1703 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1704 * bfd-in2.h: Regenerate.
1705 * libbfd.h: Regenerate.
1707 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1709 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1710 * bfd-in2.h: Regenerate.
1711 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1712 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1714 (using_thumb2): Likewise.
1715 (using_thumb2_bl): Update assert.
1716 (arch_has_arm_nop): Likewise.
1717 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1718 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1720 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1722 * elf-linker-x86.h (elf_x86_cet_report): New.
1723 (elf_linker_x86_params): Add cet_report.
1724 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1725 missing IBT and SHSTK properties if needed.
1727 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1730 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1731 "h != NULL". Don't check "h != NULL" before calling.
1732 bfd_elf_gc_record_vtentry.
1733 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1734 * elf32-bfin.c (bfin_check_relocs): Likewise.
1735 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1736 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1737 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1738 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1739 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1740 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1741 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1742 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1743 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1744 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1745 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1746 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1747 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1748 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1749 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1750 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1751 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1752 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1753 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1754 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1755 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1756 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1757 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1758 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1759 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1760 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1761 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1762 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1763 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1766 2019-04-11 Alan Modra <amodra@gmail.com>
1769 * elflink.c (elf_link_add_object_symbols): Don't read partial
1770 dynamic entries from fuzzed objects.
1772 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1775 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1776 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1777 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1779 2019-04-10 Michael Forney <mforney@mforney.org>
1782 * doc/chew.c (free_words): Correctly free "push_text" strings.
1784 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1786 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1788 2019-04-08 Alan Modra <amodra@gmail.com>
1790 * configure.ac (elfxx_x86): Define and use.
1791 * configure: Regenerate.
1793 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1795 * elf-linker-x86.h: New file.
1796 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1797 to get x86-specific linker options.
1798 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1799 (elf_x86_64_check_relocs): Likewise.
1800 (elf_x86_64_relocate_section): Likewise.
1801 (elf_x86_64_link_setup_gnu_properties): Likewise.
1802 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1803 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1804 (_bfd_elf_linker_x86_set_options): New function.
1805 * elfxx-x86.h: Include "elf-linker-x86.h".
1806 (elf_x86_link_hash_table): Add params.
1808 2019-04-03 Alan Modra <amodra@gmail.com>
1810 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1811 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1812 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1813 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1814 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1815 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1817 2019-04-02 Jim Wilson <jimw@sifive.com>
1820 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1821 ELF header flags to after check for ELF object file. Loop through
1822 sections looking for code sections, if none, then skip ABI checks.
1824 2019-03-30 Andrew Waterman <andrew@sifive.com>
1826 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1829 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1831 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1832 info->export_dynamic to the conditional.
1834 2019-03-28 Alan Modra <amodra@gmail.com>
1837 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1838 * configure: Regenerate.
1839 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1840 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1841 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1842 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1843 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1845 2019-03-21 Jim Wilson <jimw@sifive.com>
1848 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1849 verify sym non-NULL before using. Add identical check using h.
1851 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1853 * elf-bfd.h (struct elf_backend_data): Add argument to
1854 merge_gnu_properties.
1855 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1856 itself and while calling bed->merge_gnu_properties.
1857 (elf_merge_gnu_property_list): Update the calls for
1858 elf_merge_gnu_properties.
1859 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1860 of --force-bti warning and add argument.
1861 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1863 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1864 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1867 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1869 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1870 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1871 (elf_backend_fixup_gnu_properties): Define for AArch64.
1873 2019-03-18 Alan Modra <amodra@gmail.com>
1876 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1877 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1878 attempt at writing glink stubs only once.
1880 2019-03-16 Alan Modra <amodra@gmail.com>
1883 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1884 (_bfd_elf_rel_local_sym): Likewise.
1885 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1886 section of symbols with unrecognized shndx.
1888 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1891 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1893 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1894 in discarded section.
1896 2019-03-15 Alan Modra <amodra@gmail.com>
1899 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1900 symbol after globals if elf_bad_symtab is not set.
1902 2019-03-15 Alan Modra <amodra@gmail.com>
1905 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1906 (_bfd_elf_rel_local_sym): Likewise.
1908 2019-03-15 Alan Modra <amodra@gmail.com>
1911 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1912 object files with sh_size not a multiple of sh_entsize.
1914 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1917 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1918 input with bad relocation.
1920 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1922 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1924 2019-03-14 Nick Clifton <nickc@redhat.com>
1927 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1928 (save_section_vma): Initialise field to the number of entries in
1930 (section_vma_same): Check that the number of entries in the
1931 sec_vma table matches the number of sections in the bfd.
1933 2019-03-14 Nick Clifton <nickc@redhat.com>
1936 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1937 section owner pointer when adding the default symbol.
1939 2019-03-14 Nick Clifton <nickc@redhat.com>
1942 * elflink.c (elf_link_add_object_symbols): Add new local variable
1943 extversym_end. Initialise it to point to the end of the version
1944 symbol table, if present. Check it when initialising and updating
1947 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1949 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1950 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1951 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1952 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1954 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1955 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1956 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1958 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1959 Szabolcs Nagy <szabolcs.nagy@arm.com>
1961 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1962 (aarch64_bti_pac_info): New.
1963 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1964 (bfd_elf32_aarch64_set_options): Likewise.
1965 * bfd-in2.h: Regenerate
1966 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1967 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1968 (elfNN_aarch64_small_plt0_bti_entry): New.
1969 (elfNN_aarch64_small_plt_bti_entry): New.
1970 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1971 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1972 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1973 tlsdesc_plt_entry_size fields.
1974 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1975 (setup_plt_values): New helper function.
1976 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1978 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1980 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1981 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1982 to plt stubs instead of fixed ones and update filling them according
1983 to the need for bti.
1984 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1985 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1986 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1987 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1988 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1990 (bfd_elfNN_get_synthetic_symtab): Define.
1991 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1992 and mising BTI NOTE SECTION.
1995 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1997 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1998 linker created inputs from merge.
1999 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
2000 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
2001 (elfNN_aarch64_link_setup_gnu_properties): New.
2002 (elfNN_aarch64_merge_gnu_properties): New.
2003 (elf_backend_setup_gnu_properties): Define for AArch64.
2004 (elf_backend_merge_gnu_properties): Likewise.
2005 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
2006 (_bfd_aarch64_elf_parse_gnu_properties): Define.
2007 (_bfd_aarch64_elf_merge_gnu_properties): Define.
2008 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
2009 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
2010 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
2011 (elf_backend_parse_gnu_properties): Define for AArch64.
2013 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
2016 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
2017 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
2019 2019-03-12 Alan Modra <amodra@gmail.com>
2021 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
2022 nmemb parameter. Use bfd_alloc2.
2023 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
2025 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
2026 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
2027 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
2029 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
2030 (assign_section_numbers): Style fix.
2031 (swap_out_syms): Use bfd_malloc2.
2032 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
2034 (_bfd_elf_make_empty_symbol): Style fix.
2035 (elfobj_grok_stapsdt_note_1): Formatting.
2036 * elfcode.h (elf_object_p): Use bfd_alloc2.
2037 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
2038 (elf_slurp_symbol_table): Use bfd_zalloc2.
2039 (elf_slurp_reloc_table): Use bfd_alloc2.
2040 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
2041 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
2042 size calculation doesn't overflow.
2043 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
2044 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
2045 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
2047 2019-03-08 Alan Modra <amodra@gmail.com>
2050 * merge.c (merge_strings): Return secinfo. Don't pad section
2052 (_bfd_merge_sections): Pad section to alignment here, if input
2053 sections contributing to merged output all pad to alignment.
2056 2019-03-06 Nick Clifton <nickc@redhat.com>
2058 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
2060 * coffgen.c (coff_find_nearest_line_with_names): Do not call
2061 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
2063 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
2065 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
2066 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2069 * elf32-s390.c (allocate_dynrelocs): Update comment.
2071 2019-02-28 Tamar Christina <tamar.christina@arm.com>
2073 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
2075 2019-02-28 Nick Clifton <nickc@redhat.com>
2078 * elf.c (bfd_elf_string_from_elf_section): Check for a string
2079 section that is not NUL terminated.
2081 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
2084 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
2085 by linker when checking copy reloc on protected symbol.
2087 2019-02-24 Alan Modra <amodra@gmail.com>
2090 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
2092 2019-02-20 Eric Tsai <erictsai@cadence.com>
2094 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
2095 sections between the call site and call destination and adjust
2096 call distance by the largest alignment.
2098 2019-02-20 Alan Hayward <alan.hayward@arm.com>
2100 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
2101 * elf.c (elfcore_grok_aarch_pauth): New function.
2102 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
2103 (elfcore_write_aarch_pauth): New function.
2104 (elfcore_write_register_note): Check for AArch64 pauth section.
2106 2019-02-20 Alan Modra <amodra@gmail.com>
2109 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
2112 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
2114 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
2115 Darwin hosts, not just or1k.
2116 * configure: Regenerate.
2118 2019-02-20 Alan Modra <amodra@gmail.com>
2121 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
2122 sentinel NUL to string buffer nearer to loop where it is used.
2123 Don't go past sentinel when scanning strings, and don't write
2125 * archive.c (do_slurp_coff_armap): Simplify string handling to
2128 2019-02-19 Alan Modra <amodra@gmail.com>
2131 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
2132 attempting to prevent read past end of section.
2134 2019-02-18 Alan Modra <amodra@gmail.com>
2137 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
2138 PRIx64 to generate warning messages. Print local sym names too.
2140 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
2142 * elf32-arc (INIT_SYM_STRING): Delete.
2143 (FINI_SYM_STRING): Likewise.
2144 (init_str): Likewise.
2145 (fini_str): Likewise.
2147 2019-02-08 Alan Modra <amodra@gmail.com>
2149 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
2150 for bss-plt" warning to make it an error.
2152 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2155 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
2156 reloc_class_ifunc for ifunc symbols.
2157 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
2159 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2161 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
2162 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
2164 2019-02-07 Nick Clifton <nickc@redhat.com>
2166 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
2167 into the definitely obsolete list.
2169 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
2172 * elf64-x86-64.c (elf_x86_64_need_pic): Check
2173 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
2174 (elf_x86_64_relocate_section): Move PIC check for PC-relative
2176 (elf_x86_64_check_relocs): Here.
2177 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
2178 to check if a symbol is defined in a non-shared object.
2179 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
2181 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
2183 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
2184 of 'labs' (and fix GCC warning).
2186 2019-01-25 Nick Clifton <nickc@redhat.com>
2188 * po/ru.po: Updated Russian translation.
2190 2019-01-23 Nick Clifton <nickc@redhat.com>
2192 * po/fr.po: Updated French translation.
2194 2019-01-21 Nick Clifton <nickc@redhat.com>
2196 * po/pt.po: Updated Portuguese translation.
2197 * po/uk.po: Updated Ukranian translation.
2199 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
2202 * elf32-nds32.c (nds32_relocate_section): Add space between words
2204 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
2206 (riscv_i_or_e_p): Likewise.
2207 (riscv_merge_arch_attr_info): Likewise.
2209 2019-01-19 Nick Clifton <nickc@redhat.com>
2211 * version.m4: Reset to 2.32.51
2212 * configure: Regenerate.
2213 * po/bfd.pot: Regenerate.
2215 2018-06-24 Nick Clifton <nickc@redhat.com>
2217 2.32 branch created.
2219 2019-01-16 Kito Cheng <kito@andestech.com>
2221 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
2224 2019-01-16 Kito Cheng <kito@andestech.com>
2225 Nelson Chu <nelson@andestech.com>
2227 * elfnn-riscv.c (in_subsets): New.
2228 (out_subsets): Likewise.
2229 (merged_subsets): Likewise.
2230 (riscv_std_ext_p): Likewise.
2231 (riscv_non_std_ext_p): Likewise.
2232 (riscv_std_sv_ext_p): Likewise.
2233 (riscv_non_std_sv_ext_p): Likewise.
2234 (riscv_version_mismatch): Likewise.
2235 (riscv_i_or_e_p): Likewise.
2236 (riscv_merge_std_ext): Likewise.
2237 (riscv_merge_non_std_and_sv_ext): Likewise.
2238 (riscv_merge_arch_attr_info): Likewise.
2239 (riscv_merge_attributes): Likewise.
2240 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
2242 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
2243 (elf_backend_obj_attrs_vendor): Define.
2244 (elf_backend_obj_attrs_section_type): Likewise.
2245 (elf_backend_obj_attrs_section): Likewise.
2246 (elf_backend_obj_attrs_arg_type): Define as
2247 riscv_elf_obj_attrs_arg_type.
2248 * elfxx-riscv.c (riscv_estimate_digit): New.
2249 (riscv_estimate_arch_strlen1): Likewise.
2250 (riscv_estimate_arch_strlen): Likewise.
2251 (riscv_arch_str1): Likewise.
2252 (riscv_arch_str): Likewise.
2253 * elfxx-riscv.h (riscv_arch_str): Declare.
2255 2019-01-14 John Darrington <john@darrington.wattle.id.au>
2257 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
2259 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
2260 source field. (md_apply_fix): Apply final fix
2261 to BFD_RELOC_S12Z_OPR.
2262 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
2264 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2267 * elf32-s390.c (allocate_dynrelocs): Update comment.
2269 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
2271 * warning.m4: Adjust egrep pattern for non-GNU compilers.
2272 * configure: Regenerate.
2274 2019-01-08 Alan Modra <amodra@gmail.com>
2278 * ihex.c (ihex_write_object_contents): Properly check 32-bit
2281 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
2283 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
2284 * bfd/bfd-in2.h: Regenerate.
2285 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
2286 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
2288 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
2290 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
2291 default target, little endian target is more suitable.
2293 2019-01-04 Alan Modra <amodra@gmail.com>
2297 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
2299 (EQ_VALUE_IN_FIELD): Likewise.
2300 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
2302 2019-01-01 Alan Modra <amodra@gmail.com>
2304 Update year range in copyright notice of all files.
2306 For older changes see ChangeLog-2018
2308 Copyright (C) 2019 Free Software Foundation, Inc.
2310 Copying and distribution of this file, with or without modification,
2311 are permitted in any medium without royalty provided the copyright
2312 notice and this notice are preserved.
2318 version-control: never