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