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