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