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