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