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