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