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