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