1 2019-09-23 Alan Modra <amodra@gmail.com>
3 * bfd-in.h: Delete ticoff function declarations.
4 * coff-tic54x.c (bfd_ticoff_set_section_load_page),
5 (bfd_ticoff_get_section_load_page): Make static.
6 * bfd-in2.h: Regenerate.
8 2019-09-23 Alan Modra <amodra@gmail.com>
10 * bfd-in.h: Move h8300 function declaration to..
11 * cpu-h8300.h: ..here, new file.
12 * cpu-h8300.c: Include cpu-h8300.h.
13 * elf32-h8300.c: Likewise.
14 * bfd-in2.h: Regenerate.
16 2019-09-23 Alan Modra <amodra@gmail.com>
18 * bfd-in.h: Move ia64 function declarations..
19 * elfxx-ia64.h: ..to here.
20 * bfd-in2.h: Regenerate.
22 2019-09-23 Alan Modra <amodra@gmail.com>
24 * bfd-in.h: Move v850 function declarations..
25 * elf32-v850.h: ..to here, new file.
26 * elf32-v850.c: Include elf32-v850.h.
27 * bfd-in2.h: Regenerate.
29 2019-09-23 Alan Modra <amodra@gmail.com>
31 * bfd-in.h: Move mips function declaration to..
32 * elfxx-mips.h: ..here.
33 * bfd-in2.h: Regenerate.
35 2019-09-23 Alan Modra <amodra@gmail.com>
37 * bfd-in.h: Move csky function declarations to..
38 * elf32-csky.h: ..here, new file.
39 * elf32-csky.c: Include elf32-csky.h.
40 * bfd-in2.h: Regenerate.
42 2019-09-20 Nelson Chu <nelson.chu@sifive.com>
44 * elfnn-riscv.c (riscv_pcgp_hi_reloc): Add new field undefined_weak.
45 (riscv_record_pcgp_hi_reloc): New parameter undefined_weak.
46 Set undefined_weak field from it.
47 (relax_func_t): New parameter undefined_weak.
48 (_bfd_riscv_relax_call): New ignored parameter undefined_weak.
49 (_bfd_riscv_relax_tls_le): Likewise.
50 (_bfd_riscv_relax_align): Likewise.
51 (_bfd_riscv_relax_delete): Likewise.
52 (_bfd_riscv_relax_lui): New parameter undefined_weak. If true,
53 allow relaxing. For LO12* relocs, set rs1 to x0 when undefined_weak.
54 (_bfd_riscv_relax_pc): New parameter undefined_weak. For LO12* relocs,
55 set undefined_weak from hi_reloc. If true, allow relaxing. For LO12*
56 relocs, set rs1 to x0 when undefined_weak and change to non-pcrel
58 (_bfd_riscv_relax_section): New local undefined_weak. Set for
59 undef weak relocs that can be relaxed. Pass to relax_func call.
61 2019-09-20 Alan Modra <amodra@gmail.com>
63 * bfd-in.h (bfd_section_name, bfd_section_size, bfd_section_vma),
64 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
65 (bfd_section_userdata, bfd_is_com_section, discarded_section),
66 (bfd_get_section_limit_octets, bfd_get_section_limit): Delete macros.
67 * bfd.c (bfd_get_section_limit_octets, bfd_get_section_limit),
68 (bfd_section_list_remove, bfd_section_list_append),
69 (bfd_section_list_prepend, bfd_section_list_insert_after),
70 (bfd_section_list_insert_before, bfd_section_removed_from_list):
72 * section.c (bfd_is_und_section, bfd_is_abs_section),
73 (bfd_is_ind_section, bfd_is_const_section, bfd_section_list_remove),
74 (bfd_section_list_append, bfd_section_list_prepend),
75 (bfd_section_list_insert_after, bfd_section_list_insert_before),
76 (bfd_section_removed_from_list): Delete macros.
77 (bfd_section_name, bfd_section_size, bfd_section_vma),
78 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
79 (bfd_section_userdata, bfd_is_com_section, bfd_is_und_section),
80 (bfd_is_abs_section, bfd_is_ind_section, bfd_is_const_section),
81 (discarded_section): New inline functions.
82 * bfd-in2.h: Regenerate.
84 2019-09-20 Alan Modra <amodra@gmail.com>
86 * bfd-in.h (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
87 (bfd_asymbol_bfd, bfd_asymbol_flavour, bfd_set_asymbol_name): Delete.
88 * bfd.c (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
89 (bfd_asymbol_bfd, bfd_set_asymbol_name): New inline functions.
90 * targets.c (bfd_asymbol_flavour): Likewise.
91 * bfd-in2.h: Regenerate.
93 2019-09-20 Alan Modra <amodra@gmail.com>
95 * archive.c (bfd_generic_archive_p): Use bfd_set_thin_archive.
96 * bfd-in.h (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
97 (bfd_get_target, bfd_get_flavour, bfd_family_coff, bfd_big_endian),
98 (bfd_little_endian, bfd_header_big_endian, bfd_header_little_endian),
99 (bfd_get_file_flags, bfd_applicable_file_flags),
100 (bfd_applicable_section_flags, bfd_has_map, bfd_is_thin_archive),
101 (bfd_valid_reloc_types, bfd_usrdata, bfd_get_start_address),
102 (bfd_get_symcount, bfd_get_outsymbols, bfd_count_sections),
103 (bfd_get_dynamic_symcount, bfd_get_symbol_leading_char): Delete.
104 * bfd/bfd.c (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
105 (bfd_get_file_flags, bfd_get_start_address, bfd_get_symcount),
106 (bfd_get_dynamic_symcount, bfd_get_outsymbols, bfd_count_sections),
107 (bfd_has_map, bfd_is_thin_archive, bfd_set_thin_archive),
108 (bfd_usrdata, bfd_set_usrdata): New inline functions.
109 * targets.c (bfd_get_target, bfd_get_flavour),
110 (bfd_applicable_file_flags, bfd_family_coff, bfd_big_endian),
111 (bfd_little_endian, bfd_header_big_endian),
112 (bfd_header_little_endian, bfd_applicable_section_flags),
113 (bfd_get_symbol_leading_char): New inline functions.
114 * bfd-in2.h: Regenerate.
116 2019-09-20 Alan Modra <amodra@gmail.com>
118 * elf64-ppc.c (ppc64_glibc_dynamic_reloc): New function.
119 (ppc64_elf_relocate_section): Warn if emitting unsupported dynamic
122 2019-09-18 Alan Modra <amodra@gmail.com>
124 * bfd-in.h (bfd_get_section_name, bfd_get_section_vma),
125 (bfd_get_section_lma, bfd_get_section_alignment),
126 (bfd_get_section_size, bfd_get_section_flags),
127 (bfd_get_section_userdata): Delete.
128 (bfd_section_name, bfd_section_size, bfd_section_vma),
129 (bfd_section_lma, bfd_section_alignment): Lose bfd parameter.
130 (bfd_section_flags, bfd_section_userdata): New.
131 (bfd_is_com_section): Rename parameter.
132 * section.c (bfd_set_section_userdata, bfd_set_section_vma),
133 (bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section),
134 (bfd_set_section_size): Delete bfd parameter, rename section parameter.
135 (bfd_set_section_lma): New.
136 * bfd-in2.h: Regenerate.
137 * mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param,
139 * aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c,
140 * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
141 * compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h,
142 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c,
143 * elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c,
144 * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
145 * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c,
146 * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c,
147 * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c,
148 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
149 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
150 * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
151 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
152 * elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c,
153 * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
154 * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
155 * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c,
156 * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
157 * elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
158 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
159 * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c,
160 * elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
161 * elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c,
162 * mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c,
163 * peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c,
164 * xcofflink.c: Update throughout for bfd section macro and function
167 2019-09-18 Alan Modra <amodra@gmail.com>
169 * bfd-in.h (bfd_asymbol_section): Rename from bfd_get_section.
170 (bfd_get_output_section): Delete.
171 (bfd_asymbol_base): Delete.
172 (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
173 (bfd_asymbol_bfd, bfd_asymbol_flavour): Tidy.
174 (bfd_set_asymbol_name): New macro.
175 * bfd-in2.h: Regenerate.
176 * aout-cris.c: Update throughout to use bfd_asymbol_section.
178 * cofflink.c: Likewise.
179 * dwarf2.c: Likewise.
182 * elf32-arm.c: Likewise.
183 * elf32-mips.c: Likewise.
184 * elf32-score.c: Likewise.
185 * elf32-score7.c: Likewise.
186 * elfn32-mips.c: Likewise.
187 * elfnn-aarch64.c: Likewise.
188 * elfxx-mips.c: Likewise.
189 * linker.c: Likewise.
191 * elf64-mmix.c (mmix_elf_reloc): Part expand bfd_get_output_section.
193 2019-09-18 Simon Marchi <simon.marchi@polymtl.ca>
195 * Makefile.in: Re-generate.
196 * configure: Re-generate.
197 * doc/Makefile.in: Re-generate.
199 2019-09-18 Alan Modra <amodra@gmail.com>
201 * aoutx.h (slurp_symbol_table): Don't set symcount using bfd_get
203 * pdp11.c (slurp_symbol_table): Likewise.
204 * som.c (som_slurp_symbol_table): Likewise.
205 * coff-ppc.c (ppc_bfd_coff_final_link): Likewise.
206 * coffcode.h (coff_slurp_symbol_table): Likewise.
207 * cofflink.c (_bfd_coff_final_link): Likewise.
208 * ecoff.c (ecoff_slurp_symbolic_header): Likewise.
209 (_bfd_ecoff_slurp_symbolic_info): Likewise.
210 (_bfd_ecoff_slurp_symbol_table): Likewise.
211 (_bfd_ecoff_bfd_final_link): Likewise.
212 * elf.c (_bfd_elf_canonicalize_symtab): Likewise.
213 * elflink.c (elf_link_output_symstrtab): Likewise.
214 (bfd_elf_final_link): Likewise.
215 * peicode.h (pe_ILF_build_a_bfd): Likewise.
216 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
217 * aoutx.h (some_aout_object_p, slurp_symbol_table): Don't set
218 start_address or symcount using bfd_get macros.
219 * coffgen.c (coff_real_object_p): Likewise.
220 * pdp11.c (some_aout_object_p, slurp_symbol_table): Likewise.
221 * som.c (som_object_setup, som_slurp_symbol_table): Likewise.
222 * elfcore.h (elf_core_file_p): Don't set start_address using
224 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Don't set dynsymcount
226 * bfd.c (bfd_set_file_flags): Don't set flags using bfd_get macro.
227 * linker.c (bfd_generic_link_read_symbols): Don't set outsymbols
228 or symcount using bfd_get macros.
229 (_bfd_generic_final_link, generic_add_output_symbol): Likewise.
230 * syms.c (bfd_set_symtab): Likewise.
231 * vms-alpha.c (alpha_vms_bfd_final_link): Likewise.
232 * archive.c (do_slurp_bsd_armap): Don't set has_armap using
234 (do_slurp_coff_armap, bfd_slurp_armap): Likewise.
235 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
236 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
237 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
238 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
239 * som.c (som_slurp_armap): Likewise.
241 2019-09-18 Alan Modra <amodra@gmail.com>
243 * archures.c (bfd_get_arch): Make param const.
244 (bfd_get_mach, bfd_arch_bits_per_byte): Likewise.
245 (bfd_arch_bits_per_address, bfd_octets_per_byte): Likewise.
246 * bfd-in2.h: Regenerate.
248 2019-09-18 Alan Modra <amodra@gmail.com>
250 * bfd-in.h (carsym.name): Make const.
251 * reloc.c (struct reloc_howto_struct.name): Likewise.
252 * targets.c (bfd_target.name): Likewise.!
253 * bfd.c (bfd_get_sign_extend_vma): Make variable const.
254 * som.c (som_bfd_fill_in_ar_symbols): Use an intermediary variable
255 when setting carsym.name.
256 * bfd-in2.h: Regenerate.
258 2019-09-18 Alan Modra <amodra@gmail.com>
260 * mach-o.c (bfd_mach_o_fat_member_init): Likewise. Replace
261 xstrdup and xmalloc with bfd_strdup and bfd_malloc. Return an
262 error status. Adjust calls.
263 * vms-lib.c (_bfd_vms_lib_get_module): Test mhd->id earlier.
264 Close bfd on failure. Replace xstrdup/bfd_alloc use with
265 bfd_malloc. Use bfd_set_filename.
267 2019-09-18 Alan Modra <amodra@gmail.com>
269 * elf64-ppc.c (must_be_dyn_reloc): Return 0 for TOC16 relocs.
270 (ppc64_elf_check_relocs): Support dynamic/copy relocs for TOC16.
271 (ppc64_elf_adjust_dynamic_symbol): Don't keep dynamic reloc when
272 needs_copy even if all relocs are in rw sections.
273 (dec_dynrel_count): Handle TOC16 relocs.
274 (ppc64_elf_relocate_section): Support dynamic relocs for TOC16.
275 (ppc64_elf_finish_dynamic_symbol): Adjust to handle needs_copy
278 2019-09-16 Phil Blundell <pb@pbcl.net>
280 * version.m4: Set version to 2.33.50.
281 * Makefile.in, configure, doc/Makefile.in: Regenerated.
283 2019-09-11 Tom Tromey <tom@tromey.com>
285 * opncls.c (bfd_set_filename): New function.
286 * bfd-in2.h: Regenerate.
288 2019-09-11 Alan Modra <amodra@gmail.com>
290 * targets.c (struct bfd_target): Add _bfd_group_name.
291 (BFD_JUMP_TABLE): Likewise.
292 * coffgen.c (bfd_coff_group_name): New function.
293 * elf.c (bfd_elf_group_name): New function.
294 * linker.c (_bfd_nolink_bfd_group_name): New function.
295 * section.c (bfd_generic_group_name): New function.
296 * elf-bfd.h (bfd_elf_group_name): Declare.
297 * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
298 * libcoff-in.h (bfd_coff_group_name): Declare.
299 * aout-target.h (MY_bfd_group_name): Define.
300 * aout-tic30.c (MY_bfd_group_name): Define.
301 * bfd.c (bfd_group_name): Define.
302 * binary.c (binary_bfd_group_name): Define.
303 * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
304 * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
305 * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
306 * coffcode.h (coff_bfd_group_name): Define.
307 * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
308 * i386msdos.c (msdos_bfd_group_name): Define.
309 * ihex.c (ihex_bfd_group_name): Define.
310 * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
311 * mmo.c (mmo_bfd_group_name): Define.
312 * pef.c (bfd_pef_bfd_group_name): Define.
313 * plugin.c (bfd_plugin_bfd_group_name): Define.
314 * ppcboot.c (ppcboot_bfd_group_name): Define.
315 * som.c (som_bfd_group_name): Define.
316 * srec.c (srec_bfd_group_name): Define.
317 * tekhex.c (tekhex_bfd_group_name): Define.
318 * verilog.c (verilog_bfd_group_name): Define.
319 * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
320 * xsym.c (bfd_sym_bfd_group_name): Define.
321 * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
322 (rs6000_xcoff64_aix_vec): Likewise.
323 * bfd-in2.h: Regenerate.
324 * libbfd.h: Regenerate.
325 * libcoff.h: Regenerate.
327 2019-09-10 Nick Clifton <nickc@redhat.com>
330 * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
332 (bfd_default_arch_struct): Initialise the new field.
333 * bfd-in2.h: Regenerate.
334 * cpu-aarch64.c: Initialise the new field.
335 * cpu-alpha.c: Likewise.
336 * cpu-arc.c: Likewise.
337 * cpu-arm.c: Likewise.
338 * cpu-avr.c: Likewise.
339 * cpu-bfin.c: Likewise.
340 * cpu-bpf.c: Likewise.
341 * cpu-cr16.c: Likewise.
342 * cpu-cr16c.c: Likewise.
343 * cpu-cris.c: Likewise.
344 * cpu-crx.c: Likewise.
345 * cpu-csky.c: Likewise.
346 * cpu-d10v.c: Likewise.
347 * cpu-d30v.c: Likewise.
348 * cpu-dlx.c: Likewise.
349 * cpu-epiphany.c: Likewise.
350 * cpu-fr30.c: Likewise.
351 * cpu-frv.c: Likewise.
352 * cpu-ft32.c: Likewise.
353 * cpu-h8300.c: Likewise.
354 * cpu-hppa.c: Likewise.
355 * cpu-i386.c: Likewise.
356 * cpu-ia64.c: Likewise.
357 * cpu-iamcu.c: Likewise.
358 * cpu-ip2k.c: Likewise.
359 * cpu-iq2000.c: Likewise.
360 * cpu-k1om.c: Likewise.
361 * cpu-l1om.c: Likewise.
362 * cpu-lm32.c: Likewise.
363 * cpu-m10200.c: Likewise.
364 * cpu-m10300.c: Likewise.
365 * cpu-m32c.c: Likewise.
366 * cpu-m32r.c: Likewise.
367 * cpu-m68hc11.c: Likewise.
368 * cpu-m68hc12.c: Likewise.
369 * cpu-m68k.c: Likewise.
370 * cpu-m9s12x.c: Likewise.
371 * cpu-m9s12xg.c: Likewise.
372 * cpu-mcore.c: Likewise.
373 * cpu-mep.c: Likewise.
374 * cpu-metag.c: Likewise.
375 * cpu-microblaze.c: Likewise.
376 * cpu-mips.c: Likewise.
377 * cpu-mmix.c: Likewise.
378 * cpu-moxie.c: Likewise.
379 * cpu-msp430.c: Likewise.
380 * cpu-mt.c: Likewise.
381 * cpu-nds32.c: Likewise.
382 * cpu-nfp.c: Likewise.
383 * cpu-nios2.c: Likewise.
384 * cpu-ns32k.c: Likewise.
385 * cpu-or1k.c: Likewise.
386 * cpu-pdp11.c: Likewise.
387 * cpu-pj.c: Likewise.
388 * cpu-plugin.c: Likewise.
389 * cpu-powerpc.c: Likewise.
390 * cpu-pru.c: Likewise.
391 * cpu-riscv.c: Likewise.
392 * cpu-rl78.c: Likewise.
393 * cpu-rs6000.c: Likewise.
394 * cpu-rx.c: Likewise.
395 * cpu-s12z.c: Likewise.
396 * cpu-s390.c: Likewise.
397 * cpu-score.c: Likewise.
398 * cpu-sh.c: Likewise.
399 * cpu-sparc.c: Likewise.
400 * cpu-spu.c: Likewise.
401 * cpu-tic30.c: Likewise.
402 * cpu-tic4x.c: Likewise.
403 * cpu-tic54x.c: Likewise.
404 * cpu-tic6x.c: Likewise.
405 * cpu-tic80.c: Likewise.
406 * cpu-tilegx.c: Likewise.
407 * cpu-tilepro.c: Likewise.
408 * cpu-v850.c: Likewise.
409 * cpu-v850_rh850.c: Likewise.
410 * cpu-vax.c: Likewise.
411 * cpu-visium.c: Likewise.
412 * cpu-wasm32.c: Likewise.
413 * cpu-xc16x.c: Likewise.
414 * cpu-xgate.c: Likewise.
415 * cpu-xstormy16.c: Likewise.
416 * cpu-xtensa.c: Likewise.
417 * cpu-z80.c: Likewise.
418 * cpu-z8k.c: Likewise.
420 2019-09-09 Phil Blundell <pb@pbcl.net>
422 binutils 2.33 branch created.
424 2019-09-06 Alan Modra <amodra@gmail.com>
426 * aout-target.h (object_p): Formatting.
427 * bfd-in.h (bfd_get_filename): Don't cast to char*.
428 * corefile.c (generic_core_file_matches_executable_p): Constify
429 variables and remove cast.
430 * bfd-in2.h: Regenerate.
432 2019-09-05 Alan Modra <amodra@gmail.com>
434 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
435 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
436 in the GOT/PLT entry rather than affecting the offset to that
438 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
440 2019-09-05 Alan Modra <amodra@gmail.com>
442 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
443 in second instruction.
444 (ppc64_elf_relocate_section): Likewise.
446 2019-09-05 Alan Modra <amodra@gmail.com>
449 * libbfd-in.h (bfd_strdup): New inline function.
450 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
452 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
453 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
455 (bfd_openstreamr): Use bfd_strdup.
456 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
457 * plugin.c (try_load_plugin): Use bfd_malloc.
458 * libbfd.h: Regenerate.
460 2019-09-02 Alan Modra <amodra@gmail.com>
463 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
465 (read_alt_indirect_string): Likewise.
466 (read_alt_indirect_ref): Likewise.
468 2019-08-31 Jim Wilson <jimw@sifive.com>
471 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
472 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
474 2019-08-30 Jim Wilson <jimw@sifive.com>
476 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
477 error, call bfd_set_error, set ret to FALSE, and goto out label.
479 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
482 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
483 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
485 2019-08-29 Alan Modra <amodra@gmail.com>
488 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
489 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
490 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
493 2019-08-29 Alan Modra <amodra@gmail.com>
495 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
496 on second insn, return it in poff.
497 (ppc64_elf_relocate_section): Add offset to paddi addend for
500 2019-08-28 Jim Wilson <jimw@sifive.com>
502 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
503 section when setting max_alignment. Update comment.
504 (_bfd_riscv_relax_pc): Likewise.
506 2019-08-29 Alan Modra <amodra@gmail.com>
509 * bfd.c (struct bfd): Add no_element_cache.
510 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
511 archive cache when no_element_cache.
512 (bfd_generic_archive_p): Set no_element_cache when opening first
513 element to check format. Close first element too.
514 (do_slurp_bsd_armap): Don't zero ardata->cache here.
515 * bfd-in2.h: Regenerate.
517 2019-08-24 Alan Modra <amodra@gmail.com>
519 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
520 symbols from GOT optimisation.
522 2019-08-23 Stafford Horne <shorne@gmail.com>
524 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
527 2019-08-23 Nick Clifton <nickc@redhat.com>
530 * elf.c (bfd_section_from_shdr): Issue an informative warning
531 message and continue processing other sections after encountering
532 a reloc section for a section which already has other relocs
535 2019-08-23 Alan Modra <amodra@gmail.com>
538 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
539 on error without freeing plts[] contents.
541 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
543 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
545 2019-08-22 Nick Clifton <nickc@redhat.com>
548 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
549 reading data from extra records.
551 2019-08-22 Tamar Christina <tamar.christina@arm.com>
554 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
555 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
556 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
557 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
560 2019-08-22 Alan Modra <amodra@gmail.com>
562 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
563 instead recognize CMSE_PREFIX in symbol name.
564 (elf32_arm_gc_mark_extra_sections): Likewise.
565 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
566 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
568 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
570 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
571 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
573 2019-08-20 Tamar Christina <tamar.christina@arm.com>
575 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
576 elf32_arm_stub_long_branch_v4t_thumb_thumb,
577 elf32_arm_stub_long_branch_v4t_thumb_arm,
578 elf32_arm_stub_short_branch_v4t_thumb_arm,
579 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
580 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
581 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
582 previous instruction.
584 2019-08-19 Tom Tromey <tromey@adacore.com>
586 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
589 2019-08-19 Alan Modra <amodra@gmail.com>
591 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
593 (struct _ppc64_elf_section_data): Likewise.
594 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
595 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
596 than TOC loop. Check PLT16 insns too.
598 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
601 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
602 PC-relative relocations back to ...
603 (elf_x86_64_relocate_section): Here.
605 2019-08-16 Martin Liska <mliska@suse.cz>
608 * elflink.c: Report error only for not relocatable.
609 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
610 here lto_slim_object as it's handled in caller.
612 2019-08-16 Alan Modra <amodra@gmail.com>
614 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
616 2019-08-15 Jim Wilson <jimw@sifive.com>
618 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
619 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
620 to c.li instruction, and use ENCODE_RVC_IMM to set value.
622 2019-08-15 Tom Tromey <tromey@adacore.com>
624 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
627 2019-08-14 Alan Modra <amodra@gmail.com>
630 * dwarf2.c (stash_comp_unit): New function, extracted from..
631 (_bfd_dwarf2_find_nearest_line): ..here.
632 (find_abstract_instance): Parse comp units and decode line info
635 2019-08-14 Alan Modra <amodra@gmail.com>
637 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
638 (comp_unit_find_nearest_line): Use it here..
639 (_bfd_dwarf2_find_symbol_bias): ..and here.
641 2019-08-14 Alan Modra <amodra@gmail.com>
643 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
644 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
645 * coffgen.c (coff_find_nearest_line_with_names): Adjust
646 _bfd_dwarf2_find_nearest_line calls.
647 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
648 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
649 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
650 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
651 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
652 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
653 * libbfd.h: Regenerate.
655 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
657 * elf-bfd.h (struct elf_backend_data): New members.
658 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
659 .gnu.hash section if necessary.
660 (struct collect_gnu_hash_codes): New member.
661 (elf_gnu_hash_process_symidx): New function name.
662 (elf_renumber_gnu_hash_syms): Ignore local and undefined
663 symbols. Record xlat location for every symbol which should have
665 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
666 dynamic section if necessary.
667 (GNU_HASH_SECTION_NAME): New define.
668 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
669 Update the section size info.
670 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
671 (struct mips_elf_link_hash_entry): New member.
672 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
674 (mips_elf_sort_hash_table): Initialize the pointer to the
676 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
677 translation table entry with the symbol dynindx.
678 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
679 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
681 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
683 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
685 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
686 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
688 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
689 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
690 (_bfd_mips_post_process_headers): Mark the ABI version as
691 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
692 but not a .hash section.
693 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
694 position in the translation table, associated with the hash
696 * elfxx-mips.h (literal_reloc_p): Define
697 elf_backend_record_xhash_symbol backend hook.
698 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
701 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
703 * elf64-bpf.c (bpf_elf_relocate_section): New function.
704 (bpf_elf_insn_disp_reloc): Delete function.
705 (elf_backend_relocate_section): Define.
707 2019-08-07 Alan Modra <amodra@gmail.com>
710 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
711 for overflow in expressions involving nsymz.
713 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
715 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
716 two pages in relro presence.
718 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
720 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
721 (get_wsr_lbeg_opcode): New functions.
722 (check_loop_aligned): Detect relaxed loops and adjust loop_len
723 and insn_len for the first actual instruction of the loop.
725 2019-07-30 Alan Modra <amodra@gmail.com>
728 * bfd.c (struct bfd): Add lto_slim_object flag.
729 * bfd-in2.h: Regenerate.
731 2019-07-29 Martin Liska <mliska@suse.cz>
734 * archive.c (_bfd_compute_and_write_armap): Come up with
735 report_plugin_err variable.
736 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
737 * elf.c (struct lto_section): New.
738 (_bfd_elf_make_section_from_shdr): Parse content of
739 .gnu_lto_.lto section.
740 * elflink.c: Report error for a missing LTO plugin.
741 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
743 2019-07-28 Alan Modra <amodra@gmail.com>
747 * elflink.c (elf_link_add_object_symbols): Report an informative
748 error on finding local symbols with index equal or greater than
749 symbol table sh_info. Correct comment. Allow such symbols in
750 dynamic objects. Abort on NULL section for symbol.
752 2019-07-26 Alan Modra <amodra@gmail.com>
754 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
755 (elf_linker): Don't define.
756 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
758 2019-07-25 YunQiang Su <syq@debian.org>
761 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
764 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
766 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
768 (reloc_type_to_name): Fix formating.
769 (arc_elf_object_p): Likewise.
770 (debug_arc_reloc): Likewise.
771 (arc_do_relocation): Likewise.
773 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
775 * elf32-arc.c (bfd_get_32_me): New function.
776 (bfd_put_32_me): Likewise.
777 (arc_elf_relax_section): Likewise.
778 (bfd_elf32_bfd_relax_section): Define.
780 2019-07-24 Alan Modra <amodra@gmail.com>
782 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
783 elf_backend_final_write_processing, don't pass linker arg.
784 (_bfd_elf_final_write_processing): Update prototype.
785 * elf.c (_bfd_elf_write_object_contents): Adjust call.
786 (_bfd_elf_final_write_processing): Return error on incompatible
787 OSABI and has_gnu_osabi. Remove linker arg.
788 * elf-nacl.h (nacl_final_write_processing): Update prototype.
789 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
790 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
791 (_bfd_mips_elf_final_write_processing): Likewise.
792 * elf-hppa.h (elf_hppa_final_write_processing): Return status
793 and remove linker arg.
794 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
795 * elf-nacl.c (nacl_final_write_processing): Likewise.
796 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
797 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
798 * elf32-arm.c (arm_final_write_processing): Likewise.
799 (elf32_arm_final_write_processing): Likewise.
800 (elf32_arm_nacl_final_write_processing): Likewise.
801 (elf32_arm_vxworks_final_write_processing): Likewise.
802 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
803 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
804 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
805 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
806 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
807 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
808 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
809 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
810 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
811 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
812 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
813 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
814 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
815 * elf32-ppc.c (ppc_final_write_processing): Likewise.
816 (ppc_elf_final_write_processing): Likewise.
817 (ppc_elf_vxworks_final_write_processing): Likewise.
818 * elf32-sparc.c (sparc_final_write_processing): Likewise.
819 (elf32_sparc_final_write_processing): Likewise.
820 (elf32_sparc_vxworks_final_write_processing): Likewise.
821 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
822 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
823 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
824 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
825 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
826 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
827 (_bfd_mips_elf_final_write_processing): Likewise.
829 2019-07-24 Alan Modra <amodra@gmail.com>
831 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
833 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
834 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
836 2019-07-24 Alan Modra <amodra@gmail.com>
838 * elf32-visium.c (visium_elf_post_process_headers): Don't set
839 EI_OSABI header byte here.
842 2019-07-23 Alan Modra <amodra@gmail.com>
844 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
845 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
846 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
847 when elf_gnu_osabi_mbind is set.
848 (_bfd_elf_map_sections_to_segments): Likewise.
849 (_bfd_elf_init_private_section_data): Likewise.
850 (_bfd_elf_final_write_processing): Update comment.
851 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
852 (elf_backend_special_sections): Define without .tbss for linux.
854 2019-07-23 Alan Modra <amodra@gmail.com>
856 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
857 Remove none, any, all enums.
858 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
859 (_bfd_elf_final_write_processing): Declare.
860 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
861 elf_backend_final_write_processing.
862 (_bfd_elf_post_process_headers): Move body of function to..
863 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
864 only when not already set. Adjust for rename.
865 * elfxx-target.h (elf_backend_final_write_processing): Default to
866 _bfd_elf_final_write_processing.
867 * elf-hppa.h (elf_hppa_final_write_processing): Call
868 _bfd_elf_final_write_processing.
869 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
870 * elf-nacl.c (nacl_final_write_processing): Likewise.
871 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
872 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
873 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
874 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
875 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
876 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
877 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
878 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
879 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
880 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
881 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
882 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
883 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
884 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
885 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
886 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
887 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
888 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
889 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
890 * elf32-arm.c (arm_final_write_processing): Split out from..
891 (elf32_arm_final_write_processing): ..here. Call
892 _bfd_elf_final_write_processing.
893 (elf32_arm_nacl_final_write_processing): Adjust.
894 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
895 (_bfd_mips_elf_final_write_processing): ..here. Call
896 _bfd_elf_final_write_processing.
897 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
898 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
899 * elf32-ppc.c (ppc_final_write_processing): Split out from..
900 (ppc_elf_final_write_processing): ..here. Call
901 _bfd_elf_final_write_processing.
902 (ppc_elf_vxworks_final_write_processing): Adjust.
903 * elf32-sparc.c (sparc_final_write_processing): Split out from..
904 (elf32_sparc_final_write_processing): ..here. Call
905 _bfd_elf_final_write_processing.
906 (elf32_sparc_vxworks_final_write_processing): Adjust.
907 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
908 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
909 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
910 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
911 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
912 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
913 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
914 * elflink.c (elf_link_add_object_symbols): Likewise.
915 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
918 2019-07-23 Omar Majid <omajid@redhat.com>
920 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
921 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
922 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
924 * peXXigen.c: Add comment about source of .NET magic numbers.
926 2019-07-19 Alan Modra <amodra@gmail.com>
928 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
929 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
930 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
931 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
932 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
933 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
934 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
935 (ppc64_elf_check_relocs): Support pcrel tls relocs.
936 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
937 * bfd-in2.h: Regenerate.
938 * libbfd.h: Regenerate.
940 2019-07-18 Alan Modra <amodra@gmail.com>
942 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
943 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
946 2019-07-18 Alan Modra <amodra@gmail.com>
948 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
949 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
951 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
952 tls_type vars unsigned int.
953 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
954 to select r_type edit.
956 2019-07-18 Alan Modra <amodra@gmail.com>
958 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
960 * elf64-ppc.c (TLS_GDIE): Likewise.
962 2019-07-18 Alan Modra <amodra@gmail.com>
964 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
965 range of tp-relative offsets.
967 2019-07-15 Alan Modra <amodra@gmail.com>
969 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
970 alias is no longer bfd_link_hash_defined, clear the alias.
972 2019-07-13 Alan Modra <amodra@gmail.com>
974 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
976 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
977 (_bfd_elf_init_2_index_sections): Likewise.
978 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
979 relocations for local TLS symbols, use STN_UNDEF as the relocation
981 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
982 leave TLS symbol value in the addend.
984 2019-07-08 Alan Modra <amodra@gmail.com>
987 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
988 size before reading first word.
990 2019-07-02 Nick Clifton <nickc@redhat.com>
993 * elf.c (is_debuginfo_file): New function.
994 (assign_file_positions_for_non_load_sections): Do not warn about
995 allocated sections outside of loadable segments if they are found
997 * elf-bfd.h (is_debuginfo_file): Prototype.
999 2019-07-02 Nick Clifton <nickc@redhat.com>
1002 * compress.c (bfd_get_full_section_contents): Do not complain
1003 about linker created sections that are larger than the file size.
1005 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
1007 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
1008 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
1010 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
1012 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
1014 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
1015 sections when .text section contain secure entry functions
1018 2019-07-01 Nick Clifton <nickc@redhat.com>
1021 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
1022 section VMA in the offset used to update exidx relocs.
1024 2019-06-28 Nick Clifton <nickc@redhat.com>
1027 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
1028 large version reference section.
1029 * compress.c (bfd_get_full_section_contents): Check for an
1030 uncompressed section whose size is larger than the file size.
1032 2019-06-28 Alan Modra <amodra@gmail.com>
1034 * format.c (bfd_check_format_matches): Don't match plugin target
1035 if another target matches. Expand comment.
1036 * targets.c (_bfd_target_vector): Move plugin_vec after all other
1037 non-corefile targets, outside !SELECT_VECS.
1038 * config.bfd: Don't handle targ=plugin here.
1039 * configure.ac: Don't add plugin to enable_targets or handle in
1040 target loop setting selvecs and other target vars.
1041 * configure: Regenerate.
1043 2019-06-26 Nick Clifton <nickc@redhat.com>
1046 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
1047 messages for failures.
1048 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
1049 if returning an error value.
1051 2019-06-25 Jan Beulich <jbeulich@suse.com>
1053 * elf-properties.c (elf_find_and_remove_property): Rename last
1054 parameter. Mention it in comment.
1056 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
1058 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
1059 SEC_MERGE or SEC_CODE flags are set.
1060 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
1061 symtype consistently. Don't include sec_addr (sym_sec) in symval.
1062 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
1063 Add sec_addr (sym_sec) after handling merge sections.
1065 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
1068 * elf-properties.c (elf_merge_gnu_property_list): Remove the
1069 property after reporting property removal.
1071 2019-06-23 Alan Modra <amodra@gmail.com>
1074 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
1075 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
1076 Reduce range of offsets allowed for other GOT relocs.
1078 2019-06-23 Alan Modra <amodra@gmail.com>
1081 * elfcode.h (elf_object_p): Warning fix.
1083 2019-06-21 Alan Modra <amodra@gmail.com>
1086 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
1088 2019-06-19 Alan Modra <amodra@gmail.com>
1091 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
1092 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
1094 2019-06-19 Alan Modra <amodra@gmail.com>
1096 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
1097 functions that require r2 valid to use local entry.
1098 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
1100 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1102 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
1103 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
1104 with elfNN_aarch64_allocate_local_dynrelocs.
1106 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
1108 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
1110 2019-06-14 Alan Modra <amodra@gmail.com>
1112 * Makefile.in: Regenerate.
1113 * configure: Regenerate.
1115 2019-06-14 Alan Modra <amodra@gmail.com>
1117 * elf64-ppc.c: Fix comments involving paddi.
1119 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
1122 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
1123 absent, or the bfd is not in the ELF formart.
1124 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
1126 2019-06-10 Christos Zoulas <christos@zoulas.com>
1129 * elf.c (elfcore_make_auxv_note_section): New function.
1130 (elfcore_grok_note): Use it.
1131 (elfcore_grok_freebsd_note): Likewise.
1132 (elfcore_grok_openbsd_note): Likewise.
1133 (elfcore_grok_netbsd_note): Likewise. Plus add support for
1134 NT_NETBSDCORE_AUXV notes.
1136 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1138 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
1139 alignment of the new gnu property section.
1141 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1143 * bfd-in.h: Change comment.
1144 * bfd-in2.h: Regenerate.
1145 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
1146 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
1149 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
1151 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
1152 Remove overflow check.
1154 2019-05-28 Alan Modra <amodra@gmail.com>
1157 * cofflink.c (coff_link_check_archive_element): Don't assume
1158 element is a coff object file after calling add_archive_element.
1160 2019-05-28 Alan Modra <amodra@gmail.com>
1163 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
1164 attempt to set sh_entsize for excluded PLT section.
1166 2019-05-28 Alan Modra <amodra@gmail.com>
1169 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
1170 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
1171 allocated in alpha_dynamic_entries_for_reloc.
1173 2019-05-28 Alan Modra <amodra@gmail.com>
1176 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
1177 on NULL output_section.
1178 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
1180 2019-05-28 Alan Modra <amodra@gmail.com>
1183 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
1184 entry when MUST_FIND. Abort when MUST_FIND not found.
1185 (elf_m68k_get_bfd2got_entry): Likewise.
1186 (elf_m68k_relocate_section): Remove now useless assert.
1188 2019-05-28 Alan Modra <amodra@gmail.com>
1191 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
1192 from bfd_link_info, not an output section owner.
1193 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
1194 (elf_hppa_final_link_relocate): Likewise.
1196 2019-05-28 Alan Modra <amodra@gmail.com>
1199 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
1200 create_object_symbols_section, obj_textsec, obj_datasec or
1201 obj_bsssec. Fix other errors in placement.
1202 * config.bfd: Obsolete tic30-aout.
1204 2019-05-28 Alan Modra <amodra@gmail.com>
1207 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
1208 end of section list as well as section_count.
1209 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
1210 section list before returning error.
1212 2019-05-27 Alan Modra <amodra@gmail.com>
1214 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
1216 2019-05-27 Alan Modra <amodra@gmail.com>
1219 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
1221 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
1223 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
1224 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
1225 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
1226 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
1227 (elf_backend_merge_symbol_attribute): Define.
1229 2019-05-24 Alan Modra <amodra@gmail.com>
1231 * po/SRC-POTFILES.in: Regenerate.
1233 2019-05-24 Alan Modra <amodra@gmail.com>
1235 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
1236 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
1237 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
1238 (struct ppc_link_hash_table): Add powerxx_stubs.
1239 (ppc64_elf_check_relocs): Set powerxx_stubs.
1240 (build_powerxx_offset, size_powerxx_offset),
1241 (num_relocs_for_powerxx_offset),
1242 (emit_relocs_for_powerxx_offset): New functions.
1243 (plt_stub_size): Size powerxx stubs.
1244 (ppc_build_one_stub): Emit powerxx stubs.
1245 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
1248 2019-05-24 Alan Modra <amodra@gmail.com>
1250 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
1251 R_PPC64_GOT_PCREL34.
1252 (xlate_pcrel_opt): New function.
1253 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
1254 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1255 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
1257 2019-05-24 Alan Modra <amodra@gmail.com>
1259 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
1260 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
1261 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
1262 (BFD_RELOC_PPC64_PLT_PCREL34),
1263 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
1264 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
1265 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
1266 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
1267 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
1268 * elf64-ppc.c (PNOP): Define.
1269 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
1270 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
1271 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
1273 (ppc64_elf_prefix_reloc): New function.
1274 (struct ppc_link_hash_table): Add notoc_plt.
1275 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
1276 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
1277 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
1278 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
1279 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
1280 possible need for dynamic relocs on non-pcrel powerxx relocs.
1281 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
1282 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
1283 (toc_adjusting_stub_needed): Likewise.
1284 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
1285 (ppc64_elf_relocate_section): Handle new powerxx relocs.
1286 * bfd-in2.h: Regenerate.
1287 * libbfd.h: Regenerate.
1289 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1291 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
1292 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
1294 * configure: Regenerate.
1296 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1298 * configure: Regenerated.
1299 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
1300 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
1301 (BFD64_BACKENDS): Add elf64-bpf.lo.
1302 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
1303 * Makefile.in (SOURCE_HFILES): Regenerate.
1304 * config.bfd (targ_cpu): Handle bpf-*-* targets.
1305 * cpu-bpf.c: New file.
1306 * elf64-bpf.c: Likewise.
1307 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
1309 * archures.c: Define architecture bfd_arch_bpf and machine
1311 * reloc.c: Define BFD relocations used by the BPF target.
1312 * bfd-in2.h: Regenerated.
1313 * libbfd.h: Likewise.
1315 2019-05-22 Alan Modra <amodra@gmail.com>
1317 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
1320 2019-05-22 Alan Modra <amodra@gmail.com>
1322 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
1323 processing on "size error in section".
1325 2019-05-22 Alan Modra <amodra@gmail.com>
1327 * som.c (som_bfd_free_cached_info): Call
1328 _bfd_generic_close_and_cleanup.
1330 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1332 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
1333 for TLS_TPREL_HI16(/LO16) relocations in shared library.
1335 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1337 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
1338 checks. Search the RELA table for n64 relocations.
1340 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
1341 Faraz Shahbazker <fshahbazker@wavecomp.com>
1343 * elfxx-mips.c (LA25_BC): New macro.
1344 (mips_elf_link_hash_table)<compact_branches>: New field.
1345 (STUB_JALRC): New macro.
1346 (mipsr6_o32_exec_plt0_entry_compact): New array.
1347 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
1348 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
1349 (mipsr6_exec_plt_entry_compact): Likewise.
1350 (mips_elf_create_la25_stub): Use BC instead of J for stubs
1351 when compact_branches is true.
1352 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
1353 PLT for MIPSR6 with compact_branches. Do not reorder the
1354 compact branches PLT. Switch the lazy stub for MIPSR6
1355 with compact_branches to use JALRC.
1356 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
1357 when compact_branches is true.
1358 (_bfd_mips_elf_compact_branches): New function.
1359 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
1361 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1364 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
1365 Fix print formatter.
1367 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1370 * elf32-arm.c (get_value_helper): Remove.
1371 (elf32_arm_final_link_relocate): Fix branch future relocations.
1373 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1376 * bfd-in.h (enum erratum_84319_opts): New
1377 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1378 int to enum erratum_84319_opts.
1379 * bfd-in2.h: Regenerate.
1380 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
1381 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
1382 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
1383 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
1384 (_bfd_aarch64_resize_stubs): Amend comment.
1385 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
1387 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
1388 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
1390 (clear_erratum_843419_entry): Update erratum conditional.
1392 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1395 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
1396 when computing distance_short_enough.
1398 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1401 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1402 Wrap around even if distance equals avr_pc_wrap_around.
1404 2019-05-20 Nick Clifton <nickc@redhat.com>
1406 * po/fr.po: Updated French translation.
1408 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1410 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1412 2019-05-16 Alan Modra <amodra@gmail.com>
1414 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1416 2019-05-15 Alan Modra <amodra@gmail.com>
1418 * elf32-arm.c (elf32_arm_write_section): Don't leave
1419 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1420 unitialised section contents.
1422 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1425 * verilog.c: (VerilogDataWidth): New variable.
1426 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1428 2019-05-08 Nick Clifton <nickc@redhat.com>
1431 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1432 rather than FALSE if encountering a non-ELF file.
1434 2019-05-06 Alan Modra <amodra@gmail.com>
1436 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1438 2019-05-06 Alan Modra <amodra@gmail.com>
1440 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1441 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1442 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1443 * libbfd.h: Regenerate.
1444 * bfd-in2.h: Regenerate.
1446 2019-05-04 Alan Modra <amodra@gmail.com>
1449 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1450 following the standard section names.
1451 (bfd_decode_symclass): Prioritize section flag tests in
1452 decode_section_type before name tests in coff_section_type.
1453 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1454 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1455 their names and choose standard .text section flags for
1458 2019-05-02 Nick Clifton <nickc@redhat.com>
1461 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1462 .gnu.debugaltlink sections as debugging sections.
1464 2019-04-30 Alan Modra <amodra@gmail.com>
1466 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1467 (struct _ppc64_elf_section_data): Likewise.
1468 (ppc64_elf_check_relocs): Set above fields.
1469 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1470 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1473 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1476 * elflink.c (elf_link_output_extsym): Don't complain undefined
1477 weak dynamic reference.
1479 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1481 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1482 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1483 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1484 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1485 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1486 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1487 (elfNN_aarch64_small_plt0_bti_entry): Update.
1488 (elfNN_aarch64_small_plt_bti_entry): Update.
1489 (elfNN_aarch64_small_plt_pac_entry): Update.
1490 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1491 (setup_plt_values): Setup new entries.
1492 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1493 (elfNN_aarch64_plt_sym_val): Likewise.
1495 2019-04-22 Jim Wilson <jimw@sifive.com>
1497 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1499 2019-04-19 Alan Modra <amodra@gmail.com>
1501 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1503 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1505 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1506 building shared object.
1507 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1509 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1512 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1515 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1517 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1519 * bfd-in2.h: Regenerate.
1520 * libbfd.h: Likewise.
1522 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1524 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1525 * bfd-in2.h: Regenerated.
1526 * libbfd.h: Regenerated.
1528 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1530 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1531 * bfd-in2.h: Regenerated.
1532 * libbfd.h: Likewise.
1534 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1536 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1537 * bfd-in2.h: Regenerated.
1538 * libbfd.h: Regenerated.
1539 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1540 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1541 and R_ARM_THM_BF12 together.
1542 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1544 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1546 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1547 * libbfd.h: Regenerated.
1548 * bfd-in2.h: Regenerated.
1549 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1550 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1551 and R_ARM_THM_BF18 together.
1552 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1554 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1556 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1557 * bfd-in2.h: Regenerated.
1558 * libbfd.h: Regenerated.
1559 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1560 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1561 and R_ARM_THM_BF16 together.
1562 (get_value_helper): New reloc helper.
1563 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1565 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1567 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1568 * bfd-in2.h: Regenerate.
1569 * libbfd.h: Regenerate.
1571 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1573 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1574 * bfd-in2.h: Regenerate.
1575 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1576 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1578 (using_thumb2): Likewise.
1579 (using_thumb2_bl): Update assert.
1580 (arch_has_arm_nop): Likewise.
1581 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1582 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1584 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1586 * elf-linker-x86.h (elf_x86_cet_report): New.
1587 (elf_linker_x86_params): Add cet_report.
1588 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1589 missing IBT and SHSTK properties if needed.
1591 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1594 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1595 "h != NULL". Don't check "h != NULL" before calling.
1596 bfd_elf_gc_record_vtentry.
1597 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1598 * elf32-bfin.c (bfin_check_relocs): Likewise.
1599 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1600 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1601 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1602 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1603 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1604 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1605 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1606 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1607 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1608 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1609 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1610 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1611 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1612 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1613 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1614 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1615 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1616 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1617 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1618 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1619 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1620 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1621 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1622 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1623 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1624 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1625 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1626 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1627 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1630 2019-04-11 Alan Modra <amodra@gmail.com>
1633 * elflink.c (elf_link_add_object_symbols): Don't read partial
1634 dynamic entries from fuzzed objects.
1636 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1639 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1640 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1641 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1643 2019-04-10 Michael Forney <mforney@mforney.org>
1646 * doc/chew.c (free_words): Correctly free "push_text" strings.
1648 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1650 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1652 2019-04-08 Alan Modra <amodra@gmail.com>
1654 * configure.ac (elfxx_x86): Define and use.
1655 * configure: Regenerate.
1657 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1659 * elf-linker-x86.h: New file.
1660 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1661 to get x86-specific linker options.
1662 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1663 (elf_x86_64_check_relocs): Likewise.
1664 (elf_x86_64_relocate_section): Likewise.
1665 (elf_x86_64_link_setup_gnu_properties): Likewise.
1666 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1667 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1668 (_bfd_elf_linker_x86_set_options): New function.
1669 * elfxx-x86.h: Include "elf-linker-x86.h".
1670 (elf_x86_link_hash_table): Add params.
1672 2019-04-03 Alan Modra <amodra@gmail.com>
1674 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1675 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1676 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1677 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1678 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1679 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1681 2019-04-02 Jim Wilson <jimw@sifive.com>
1684 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1685 ELF header flags to after check for ELF object file. Loop through
1686 sections looking for code sections, if none, then skip ABI checks.
1688 2019-03-30 Andrew Waterman <andrew@sifive.com>
1690 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1693 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1695 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1696 info->export_dynamic to the conditional.
1698 2019-03-28 Alan Modra <amodra@gmail.com>
1701 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1702 * configure: Regenerate.
1703 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1704 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1705 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1706 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1707 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1709 2019-03-21 Jim Wilson <jimw@sifive.com>
1712 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1713 verify sym non-NULL before using. Add identical check using h.
1715 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1717 * elf-bfd.h (struct elf_backend_data): Add argument to
1718 merge_gnu_properties.
1719 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1720 itself and while calling bed->merge_gnu_properties.
1721 (elf_merge_gnu_property_list): Update the calls for
1722 elf_merge_gnu_properties.
1723 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1724 of --force-bti warning and add argument.
1725 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1727 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1728 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1731 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1733 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1734 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1735 (elf_backend_fixup_gnu_properties): Define for AArch64.
1737 2019-03-18 Alan Modra <amodra@gmail.com>
1740 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1741 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1742 attempt at writing glink stubs only once.
1744 2019-03-16 Alan Modra <amodra@gmail.com>
1747 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1748 (_bfd_elf_rel_local_sym): Likewise.
1749 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1750 section of symbols with unrecognized shndx.
1752 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1755 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1757 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1758 in discarded section.
1760 2019-03-15 Alan Modra <amodra@gmail.com>
1763 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1764 symbol after globals if elf_bad_symtab is not set.
1766 2019-03-15 Alan Modra <amodra@gmail.com>
1769 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1770 (_bfd_elf_rel_local_sym): Likewise.
1772 2019-03-15 Alan Modra <amodra@gmail.com>
1775 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1776 object files with sh_size not a multiple of sh_entsize.
1778 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1781 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1782 input with bad relocation.
1784 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1786 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1788 2019-03-14 Nick Clifton <nickc@redhat.com>
1791 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1792 (save_section_vma): Initialise field to the number of entries in
1794 (section_vma_same): Check that the number of entries in the
1795 sec_vma table matches the number of sections in the bfd.
1797 2019-03-14 Nick Clifton <nickc@redhat.com>
1800 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1801 section owner pointer when adding the default symbol.
1803 2019-03-14 Nick Clifton <nickc@redhat.com>
1806 * elflink.c (elf_link_add_object_symbols): Add new local variable
1807 extversym_end. Initialise it to point to the end of the version
1808 symbol table, if present. Check it when initialising and updating
1811 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1813 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1814 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1815 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1816 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1818 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1819 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1820 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1822 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1823 Szabolcs Nagy <szabolcs.nagy@arm.com>
1825 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1826 (aarch64_bti_pac_info): New.
1827 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1828 (bfd_elf32_aarch64_set_options): Likewise.
1829 * bfd-in2.h: Regenerate
1830 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1831 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1832 (elfNN_aarch64_small_plt0_bti_entry): New.
1833 (elfNN_aarch64_small_plt_bti_entry): New.
1834 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1835 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1836 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1837 tlsdesc_plt_entry_size fields.
1838 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1839 (setup_plt_values): New helper function.
1840 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1842 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1844 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1845 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1846 to plt stubs instead of fixed ones and update filling them according
1847 to the need for bti.
1848 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1849 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1850 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1851 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1852 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1854 (bfd_elfNN_get_synthetic_symtab): Define.
1855 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1856 and mising BTI NOTE SECTION.
1859 2019-03-13 Sudakshina Das <sudi.das@arm.com>
1861 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1862 linker created inputs from merge.
1863 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1864 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1865 (elfNN_aarch64_link_setup_gnu_properties): New.
1866 (elfNN_aarch64_merge_gnu_properties): New.
1867 (elf_backend_setup_gnu_properties): Define for AArch64.
1868 (elf_backend_merge_gnu_properties): Likewise.
1869 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1870 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1871 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1872 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1873 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1874 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1875 (elf_backend_parse_gnu_properties): Define for AArch64.
1877 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1880 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1881 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1883 2019-03-12 Alan Modra <amodra@gmail.com>
1885 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1886 nmemb parameter. Use bfd_alloc2.
1887 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1889 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1890 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1891 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1893 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1894 (assign_section_numbers): Style fix.
1895 (swap_out_syms): Use bfd_malloc2.
1896 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1898 (_bfd_elf_make_empty_symbol): Style fix.
1899 (elfobj_grok_stapsdt_note_1): Formatting.
1900 * elfcode.h (elf_object_p): Use bfd_alloc2.
1901 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1902 (elf_slurp_symbol_table): Use bfd_zalloc2.
1903 (elf_slurp_reloc_table): Use bfd_alloc2.
1904 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1905 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1906 size calculation doesn't overflow.
1907 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1908 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1909 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1911 2019-03-08 Alan Modra <amodra@gmail.com>
1914 * merge.c (merge_strings): Return secinfo. Don't pad section
1916 (_bfd_merge_sections): Pad section to alignment here, if input
1917 sections contributing to merged output all pad to alignment.
1920 2019-03-06 Nick Clifton <nickc@redhat.com>
1922 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1924 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1925 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1927 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1929 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1930 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1933 * elf32-s390.c (allocate_dynrelocs): Update comment.
1935 2019-02-28 Tamar Christina <tamar.christina@arm.com>
1937 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1939 2019-02-28 Nick Clifton <nickc@redhat.com>
1942 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1943 section that is not NUL terminated.
1945 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1948 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1949 by linker when checking copy reloc on protected symbol.
1951 2019-02-24 Alan Modra <amodra@gmail.com>
1954 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1956 2019-02-20 Eric Tsai <erictsai@cadence.com>
1958 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1959 sections between the call site and call destination and adjust
1960 call distance by the largest alignment.
1962 2019-02-20 Alan Hayward <alan.hayward@arm.com>
1964 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1965 * elf.c (elfcore_grok_aarch_pauth): New function.
1966 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1967 (elfcore_write_aarch_pauth): New function.
1968 (elfcore_write_register_note): Check for AArch64 pauth section.
1970 2019-02-20 Alan Modra <amodra@gmail.com>
1973 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1976 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1978 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1979 Darwin hosts, not just or1k.
1980 * configure: Regenerate.
1982 2019-02-20 Alan Modra <amodra@gmail.com>
1985 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1986 sentinel NUL to string buffer nearer to loop where it is used.
1987 Don't go past sentinel when scanning strings, and don't write
1989 * archive.c (do_slurp_coff_armap): Simplify string handling to
1992 2019-02-19 Alan Modra <amodra@gmail.com>
1995 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1996 attempting to prevent read past end of section.
1998 2019-02-18 Alan Modra <amodra@gmail.com>
2001 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
2002 PRIx64 to generate warning messages. Print local sym names too.
2004 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
2006 * elf32-arc (INIT_SYM_STRING): Delete.
2007 (FINI_SYM_STRING): Likewise.
2008 (init_str): Likewise.
2009 (fini_str): Likewise.
2011 2019-02-08 Alan Modra <amodra@gmail.com>
2013 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
2014 for bss-plt" warning to make it an error.
2016 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2019 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
2020 reloc_class_ifunc for ifunc symbols.
2021 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
2023 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2025 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
2026 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
2028 2019-02-07 Nick Clifton <nickc@redhat.com>
2030 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
2031 into the definitely obsolete list.
2033 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
2036 * elf64-x86-64.c (elf_x86_64_need_pic): Check
2037 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
2038 (elf_x86_64_relocate_section): Move PIC check for PC-relative
2040 (elf_x86_64_check_relocs): Here.
2041 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
2042 to check if a symbol is defined in a non-shared object.
2043 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
2045 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
2047 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
2048 of 'labs' (and fix GCC warning).
2050 2019-01-25 Nick Clifton <nickc@redhat.com>
2052 * po/ru.po: Updated Russian translation.
2054 2019-01-23 Nick Clifton <nickc@redhat.com>
2056 * po/fr.po: Updated French translation.
2058 2019-01-21 Nick Clifton <nickc@redhat.com>
2060 * po/pt.po: Updated Portuguese translation.
2061 * po/uk.po: Updated Ukranian translation.
2063 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
2066 * elf32-nds32.c (nds32_relocate_section): Add space between words
2068 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
2070 (riscv_i_or_e_p): Likewise.
2071 (riscv_merge_arch_attr_info): Likewise.
2073 2019-01-19 Nick Clifton <nickc@redhat.com>
2075 * version.m4: Reset to 2.32.51
2076 * configure: Regenerate.
2077 * po/bfd.pot: Regenerate.
2079 2018-06-24 Nick Clifton <nickc@redhat.com>
2081 2.32 branch created.
2083 2019-01-16 Kito Cheng <kito@andestech.com>
2085 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
2088 2019-01-16 Kito Cheng <kito@andestech.com>
2089 Nelson Chu <nelson@andestech.com>
2091 * elfnn-riscv.c (in_subsets): New.
2092 (out_subsets): Likewise.
2093 (merged_subsets): Likewise.
2094 (riscv_std_ext_p): Likewise.
2095 (riscv_non_std_ext_p): Likewise.
2096 (riscv_std_sv_ext_p): Likewise.
2097 (riscv_non_std_sv_ext_p): Likewise.
2098 (riscv_version_mismatch): Likewise.
2099 (riscv_i_or_e_p): Likewise.
2100 (riscv_merge_std_ext): Likewise.
2101 (riscv_merge_non_std_and_sv_ext): Likewise.
2102 (riscv_merge_arch_attr_info): Likewise.
2103 (riscv_merge_attributes): Likewise.
2104 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
2106 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
2107 (elf_backend_obj_attrs_vendor): Define.
2108 (elf_backend_obj_attrs_section_type): Likewise.
2109 (elf_backend_obj_attrs_section): Likewise.
2110 (elf_backend_obj_attrs_arg_type): Define as
2111 riscv_elf_obj_attrs_arg_type.
2112 * elfxx-riscv.c (riscv_estimate_digit): New.
2113 (riscv_estimate_arch_strlen1): Likewise.
2114 (riscv_estimate_arch_strlen): Likewise.
2115 (riscv_arch_str1): Likewise.
2116 (riscv_arch_str): Likewise.
2117 * elfxx-riscv.h (riscv_arch_str): Declare.
2119 2019-01-14 John Darrington <john@darrington.wattle.id.au>
2121 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
2123 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
2124 source field. (md_apply_fix): Apply final fix
2125 to BFD_RELOC_S12Z_OPR.
2126 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
2128 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2131 * elf32-s390.c (allocate_dynrelocs): Update comment.
2133 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
2135 * warning.m4: Adjust egrep pattern for non-GNU compilers.
2136 * configure: Regenerate.
2138 2019-01-08 Alan Modra <amodra@gmail.com>
2142 * ihex.c (ihex_write_object_contents): Properly check 32-bit
2145 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
2147 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
2148 * bfd/bfd-in2.h: Regenerate.
2149 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
2150 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
2152 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
2154 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
2155 default target, little endian target is more suitable.
2157 2019-01-04 Alan Modra <amodra@gmail.com>
2161 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
2163 (EQ_VALUE_IN_FIELD): Likewise.
2164 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
2166 2019-01-01 Alan Modra <amodra@gmail.com>
2168 Update year range in copyright notice of all files.
2170 For older changes see ChangeLog-2018
2172 Copyright (C) 2019 Free Software Foundation, Inc.
2174 Copying and distribution of this file, with or without modification,
2175 are permitted in any medium without royalty provided the copyright
2176 notice and this notice are preserved.
2182 version-control: never