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