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