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