]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
Automatic date update in version.in
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
133a1f60
AM
12019-09-05 Alan Modra <amodra@gmail.com>
2
3 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
4 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
5 in the GOT/PLT entry rather than affecting the offset to that
6 GOI/PLT entry.
7 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
8
77486630
AM
92019-09-05 Alan Modra <amodra@gmail.com>
10
11 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
12 in second instruction.
13 (ppc64_elf_relocate_section): Likewise.
14
89bdc77e
AM
152019-09-05 Alan Modra <amodra@gmail.com>
16
17 PR 24955
18 * libbfd-in.h (bfd_strdup): New inline function.
19 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
20 bfd on error.
21 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
22 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
23 on error.
24 (bfd_openstreamr): Use bfd_strdup.
25 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
26 * plugin.c (try_load_plugin): Use bfd_malloc.
27 * libbfd.h: Regenerate.
28
22b31fea
AM
292019-09-02 Alan Modra <amodra@gmail.com>
30
31 PR 11983
32 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
33 on success. Tidy.
217d2eaa
AM
34 (read_alt_indirect_string): Likewise.
35 (read_alt_indirect_ref): Likewise.
22b31fea 36
3e7bd7f2
JW
372019-08-31 Jim Wilson <jimw@sifive.com>
38
39 PR 23825
40 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
41 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
42
fdd50269
JW
432019-08-30 Jim Wilson <jimw@sifive.com>
44
45 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
46 error, call bfd_set_error, set ret to FALSE, and goto out label.
47
6744bcad
L
482019-08-30 H.J. Lu <hongjiu.lu@intel.com>
49
50 PR ld/24951
51 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
52 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
53
c0d9f31d
AM
542019-08-29 Alan Modra <amodra@gmail.com>
55
56 PR 24697
57 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
58 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
59 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
60 reloc.
61
dd9b12c2
AM
622019-08-29 Alan Modra <amodra@gmail.com>
63
64 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
65 on second insn, return it in poff.
66 (ppc64_elf_relocate_section): Add offset to paddi addend for
67 PCREL_OPT.
68
507685a3
JW
692019-08-28 Jim Wilson <jimw@sifive.com>
70
71 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
72 section when setting max_alignment. Update comment.
73 (_bfd_riscv_relax_pc): Likewise.
74
83cf0d04
AM
752019-08-29 Alan Modra <amodra@gmail.com>
76
77 PR 24891
78 * bfd.c (struct bfd): Add no_element_cache.
79 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
80 archive cache when no_element_cache.
81 (bfd_generic_archive_p): Set no_element_cache when opening first
82 element to check format. Close first element too.
83 (do_slurp_bsd_armap): Don't zero ardata->cache here.
84 * bfd-in2.h: Regenerate.
85
6d5554a6
AM
862019-08-24 Alan Modra <amodra@gmail.com>
87
88 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
89 symbols from GOT optimisation.
90
09f7b0de
SH
912019-08-23 Stafford Horne <shorne@gmail.com>
92
93 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
94 PLT GOT entries.
95
a7ba3896
NC
962019-08-23 Nick Clifton <nickc@redhat.com>
97
98 PR 24456
99 * elf.c (bfd_section_from_shdr): Issue an informative warning
100 message and continue processing other sections after encountering
101 a reloc section for a section which already has other relocs
102 associated with it.
103
2600d80c
AM
1042019-08-23 Alan Modra <amodra@gmail.com>
105
106 PR 24933
107 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
108 on error without freeing plts[] contents.
109
0535e5d7
DZ
1102019-08-22 Dennis Zhang <dennis.zhang@arm.com>
111
112 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
113
03da31c6
NC
1142019-08-22 Nick Clifton <nickc@redhat.com>
115
116 PR 24922
117 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
118 reading data from extra records.
119
652afeef
TC
1202019-08-22 Tamar Christina <tamar.christina@arm.com>
121
122 PR ld/24601
123 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
124 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
125 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
126 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
127 for weak TLS.
128
baf46cd7
AM
1292019-08-22 Alan Modra <amodra@gmail.com>
130
131 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
132 instead recognize CMSE_PREFIX in symbol name.
133 (elf32_arm_gc_mark_extra_sections): Likewise.
134 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
135 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
136
546053ac
DZ
1372019-08-20 Dennis Zhang <dennis.zhang@arm.com>
138
139 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
140 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
141
b4e87f2c
TC
1422019-08-20 Tamar Christina <tamar.christina@arm.com>
143
144 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
145 elf32_arm_stub_long_branch_v4t_thumb_thumb,
146 elf32_arm_stub_long_branch_v4t_thumb_arm,
147 elf32_arm_stub_short_branch_v4t_thumb_arm,
148 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
149 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
150 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
151 previous instruction.
152
3eb185c9
TT
1532019-08-19 Tom Tromey <tromey@adacore.com>
154
155 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
156 holding symbols.
157
903b777d
AM
1582019-08-19 Alan Modra <amodra@gmail.com>
159
160 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
161 to has_optrel.
162 (struct _ppc64_elf_section_data): Likewise.
163 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
164 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
165 than TOC loop. Check PLT16 insns too.
166
81e8046d
L
1672019-08-16 H.J. Lu <hongjiu.lu@intel.com>
168
169 PR ld/24905
170 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
171 PC-relative relocations back to ...
172 (elf_x86_64_relocate_section): Here.
173
b4c555cf
ML
1742019-08-16 Martin Liska <mliska@suse.cz>
175
176 PR ld/24912
177 * elflink.c: Report error only for not relocatable.
178 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
179 here lto_slim_object as it's handled in caller.
180
63f6e94f
AM
1812019-08-16 Alan Modra <amodra@gmail.com>
182
183 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
184
080a4883
JW
1852019-08-15 Jim Wilson <jimw@sifive.com>
186
187 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
188 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
189 to c.li instruction, and use ENCODE_RVC_IMM to set value.
190
05192282
TT
1912019-08-15 Tom Tromey <tromey@adacore.com>
192
193 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
194 of section.
195
dfc19da6
AM
1962019-08-14 Alan Modra <amodra@gmail.com>
197
198 PR 24623
199 * dwarf2.c (stash_comp_unit): New function, extracted from..
200 (_bfd_dwarf2_find_nearest_line): ..here.
201 (find_abstract_instance): Parse comp units and decode line info
202 as needed.
203
c327a44f
AM
2042019-08-14 Alan Modra <amodra@gmail.com>
205
206 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
207 (comp_unit_find_nearest_line): Use it here..
208 (_bfd_dwarf2_find_symbol_bias): ..and here.
209
9defd221
AM
2102019-08-14 Alan Modra <amodra@gmail.com>
211
212 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
213 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
214 * coffgen.c (coff_find_nearest_line_with_names): Adjust
215 _bfd_dwarf2_find_nearest_line calls.
216 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
217 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
218 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
219 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
220 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
221 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
222 * libbfd.h: Regenerate.
223
f16a9783
MS
2242019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
225
226 * elf-bfd.h (struct elf_backend_data): New members.
227 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
228 .gnu.hash section if necessary.
229 (struct collect_gnu_hash_codes): New member.
230 (elf_gnu_hash_process_symidx): New function name.
231 (elf_renumber_gnu_hash_syms): Ignore local and undefined
232 symbols. Record xlat location for every symbol which should have
233 a .MIPS.xhash entry.
234 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
235 dynamic section if necessary.
236 (GNU_HASH_SECTION_NAME): New define.
237 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
238 Update the section size info.
239 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
240 (struct mips_elf_link_hash_entry): New member.
241 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
242 table location.
243 (mips_elf_sort_hash_table): Initialize the pointer to the
244 .MIPS.xhash section.
245 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
246 translation table entry with the symbol dynindx.
247 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
248 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
249 info.
250 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
251 section.
252 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
253 dynamic section.
254 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
255 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
256 sh_link info.
257 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
258 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
259 (_bfd_mips_post_process_headers): Mark the ABI version as
260 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
261 but not a .hash section.
262 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
263 position in the translation table, associated with the hash
264 entry.
265 * elfxx-mips.h (literal_reloc_p): Define
266 elf_backend_record_xhash_symbol backend hook.
267 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
268 backend hook.
269
fc8de8e2
JM
2702019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
271
272 * elf64-bpf.c (bpf_elf_relocate_section): New function.
273 (bpf_elf_insn_disp_reloc): Delete function.
274 (elf_backend_relocate_section): Define.
275
97b031c5
AM
2762019-08-07 Alan Modra <amodra@gmail.com>
277
278 PR 24644
279 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
280 for overflow in expressions involving nsymz.
281
0f52d45a
JW
2822019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
283
284 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
285 two pages in relro presence.
286
e0d0c518
MF
2872019-08-01 Max Filippov <jcmvbkbc@gmail.com>
288
289 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
290 (get_wsr_lbeg_opcode): New functions.
291 (check_loop_aligned): Detect relaxed loops and adjust loop_len
292 and insn_len for the first actual instruction of the loop.
293
34d5c40a
AM
2942019-07-30 Alan Modra <amodra@gmail.com>
295
296 PR 24768
297 * bfd.c (struct bfd): Add lto_slim_object flag.
298 * bfd-in2.h: Regenerate.
299
cc5277b1
ML
3002019-07-29 Martin Liska <mliska@suse.cz>
301
302 PR 24768
303 * archive.c (_bfd_compute_and_write_armap): Come up with
304 report_plugin_err variable.
305 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
306 * elf.c (struct lto_section): New.
307 (_bfd_elf_make_section_from_shdr): Parse content of
308 .gnu_lto_.lto section.
309 * elflink.c: Report error for a missing LTO plugin.
310 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
311
4538d1c7
AM
3122019-07-28 Alan Modra <amodra@gmail.com>
313
314 PR 24857
315 PR 24339
316 * elflink.c (elf_link_add_object_symbols): Report an informative
317 error on finding local symbols with index equal or greater than
318 symbol table sh_info. Correct comment. Allow such symbols in
319 dynamic objects. Abort on NULL section for symbol.
320
6dd17ae0
AM
3212019-07-26 Alan Modra <amodra@gmail.com>
322
323 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
324 (elf_linker): Don't define.
325 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
326
c7c860d2
YS
3272019-07-25 YunQiang Su <syq@debian.org>
328
329 PR 24832
330 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
331 mips inputs.
332
95967518
CZ
3332019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
334
335 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
336 formating.
337 (reloc_type_to_name): Fix formating.
338 (arc_elf_object_p): Likewise.
339 (debug_arc_reloc): Likewise.
340 (arc_do_relocation): Likewise.
341
ef551643
CZ
3422019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
343
344 * elf32-arc.c (bfd_get_32_me): New function.
345 (bfd_put_32_me): Likewise.
346 (arc_elf_relax_section): Likewise.
347 (bfd_elf32_bfd_relax_section): Define.
348
cc364be6
AM
3492019-07-24 Alan Modra <amodra@gmail.com>
350
351 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
352 elf_backend_final_write_processing, don't pass linker arg.
353 (_bfd_elf_final_write_processing): Update prototype.
354 * elf.c (_bfd_elf_write_object_contents): Adjust call.
355 (_bfd_elf_final_write_processing): Return error on incompatible
356 OSABI and has_gnu_osabi. Remove linker arg.
357 * elf-nacl.h (nacl_final_write_processing): Update prototype.
358 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
359 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
360 (_bfd_mips_elf_final_write_processing): Likewise.
361 * elf-hppa.h (elf_hppa_final_write_processing): Return status
362 and remove linker arg.
363 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
364 * elf-nacl.c (nacl_final_write_processing): Likewise.
365 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
366 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
367 * elf32-arm.c (arm_final_write_processing): Likewise.
368 (elf32_arm_final_write_processing): Likewise.
369 (elf32_arm_nacl_final_write_processing): Likewise.
370 (elf32_arm_vxworks_final_write_processing): Likewise.
371 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
372 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
373 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
374 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
375 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
376 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
377 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
378 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
379 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
380 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
381 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
382 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
383 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
384 * elf32-ppc.c (ppc_final_write_processing): Likewise.
385 (ppc_elf_final_write_processing): Likewise.
386 (ppc_elf_vxworks_final_write_processing): Likewise.
387 * elf32-sparc.c (sparc_final_write_processing): Likewise.
388 (elf32_sparc_final_write_processing): Likewise.
389 (elf32_sparc_vxworks_final_write_processing): Likewise.
390 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
391 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
392 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
393 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
394 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
395 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
396 (_bfd_mips_elf_final_write_processing): Likewise.
397
c5e20471
AM
3982019-07-24 Alan Modra <amodra@gmail.com>
399
400 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
401 early.
402 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
403 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
404
7613ca5e
AM
4052019-07-24 Alan Modra <amodra@gmail.com>
406
407 * elf32-visium.c (visium_elf_post_process_headers): Don't set
408 EI_OSABI header byte here.
409 (ELF_OSABI): Define.
410
df3a023b
AM
4112019-07-23 Alan Modra <amodra@gmail.com>
412
413 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
414 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
415 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
416 when elf_gnu_osabi_mbind is set.
417 (_bfd_elf_map_sections_to_segments): Likewise.
418 (_bfd_elf_init_private_section_data): Likewise.
419 (_bfd_elf_final_write_processing): Update comment.
420 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
421 (elf_backend_special_sections): Define without .tbss for linux.
422
06f44071
AM
4232019-07-23 Alan Modra <amodra@gmail.com>
424
425 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
426 Remove none, any, all enums.
427 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
428 (_bfd_elf_final_write_processing): Declare.
429 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
430 elf_backend_final_write_processing.
431 (_bfd_elf_post_process_headers): Move body of function to..
432 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
433 only when not already set. Adjust for rename.
434 * elfxx-target.h (elf_backend_final_write_processing): Default to
435 _bfd_elf_final_write_processing.
436 * elf-hppa.h (elf_hppa_final_write_processing): Call
437 _bfd_elf_final_write_processing.
438 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
439 * elf-nacl.c (nacl_final_write_processing): Likewise.
440 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
441 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
442 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
443 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
444 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
445 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
446 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
447 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
448 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
449 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
450 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
451 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
452 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
453 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
454 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
455 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
456 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
457 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
458 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
459 * elf32-arm.c (arm_final_write_processing): Split out from..
460 (elf32_arm_final_write_processing): ..here. Call
461 _bfd_elf_final_write_processing.
462 (elf32_arm_nacl_final_write_processing): Adjust.
463 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
464 (_bfd_mips_elf_final_write_processing): ..here. Call
465 _bfd_elf_final_write_processing.
466 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
467 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
468 * elf32-ppc.c (ppc_final_write_processing): Split out from..
469 (ppc_elf_final_write_processing): ..here. Call
470 _bfd_elf_final_write_processing.
471 (ppc_elf_vxworks_final_write_processing): Adjust.
472 * elf32-sparc.c (sparc_final_write_processing): Split out from..
473 (elf32_sparc_final_write_processing): ..here. Call
474 _bfd_elf_final_write_processing.
475 (elf32_sparc_vxworks_final_write_processing): Adjust.
476 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
477 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
478 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
479 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
480 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
481 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
482 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
483 * elflink.c (elf_link_add_object_symbols): Likewise.
484 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
485 instead.
486
1dd1bc4d
OM
4872019-07-23 Omar Majid <omajid@redhat.com>
488
489 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
490 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
491 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
492 AMD64_NETBSD_MAGIC.
493 * peXXigen.c: Add comment about source of .NET magic numbers.
494
c213164a
AM
4952019-07-19 Alan Modra <amodra@gmail.com>
496
497 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
498 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
499 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
500 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
501 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
502 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
503 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
504 (ppc64_elf_check_relocs): Support pcrel tls relocs.
505 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
506 * bfd-in2.h: Regenerate.
507 * libbfd.h: Regenerate.
508
71c4e95a
AM
5092019-07-18 Alan Modra <amodra@gmail.com>
510
511 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
512 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
513 match test.
514
46e9995a
AM
5152019-07-18 Alan Modra <amodra@gmail.com>
516
517 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
518 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
519 is more than 8 bits.
520 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
521 tls_type vars unsigned int.
522 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
523 to select r_type edit.
524
b00a0a86
AM
5252019-07-18 Alan Modra <amodra@gmail.com>
526
527 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
528 Correct comment.
529 * elf64-ppc.c (TLS_GDIE): Likewise.
530
0b147428
AM
5312019-07-18 Alan Modra <amodra@gmail.com>
532
533 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
534 range of tp-relative offsets.
535
5b9d7a9a
AM
5362019-07-15 Alan Modra <amodra@gmail.com>
537
538 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
539 alias is no longer bfd_link_hash_defined, clear the alias.
540
f26a3287
AM
5412019-07-13 Alan Modra <amodra@gmail.com>
542
543 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
544 tls_sec.
545 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
546 (_bfd_elf_init_2_index_sections): Likewise.
547 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
548 relocations for local TLS symbols, use STN_UNDEF as the relocation
549 symbol.
550 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
551 leave TLS symbol value in the addend.
552
62a47958
AM
5532019-07-08 Alan Modra <amodra@gmail.com>
554
555 PR 24785
556 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
557 size before reading first word.
558
1faa385f
NC
5592019-07-02 Nick Clifton <nickc@redhat.com>
560
561 PR 24717
562 * elf.c (is_debuginfo_file): New function.
563 (assign_file_positions_for_non_load_sections): Do not warn about
564 allocated sections outside of loadable segments if they are found
565 in a debuginfo file.
566 * elf-bfd.h (is_debuginfo_file): Prototype.
567
125f83f6
NC
5682019-07-02 Nick Clifton <nickc@redhat.com>
569
570 PR 24753
571 * compress.c (bfd_get_full_section_contents): Do not complain
572 about linker created sections that are larger than the file size.
573
4d83e8d9
CL
5742019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
575
576 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
577 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
578 for CMSE stubs.
579 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
580
bb32413f
SP
5812019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
582
583 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
584 sections when .text section contain secure entry functions
585 is marked.
586
539300fb
NC
5872019-07-01 Nick Clifton <nickc@redhat.com>
588
589 PR 23839
590 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
591 section VMA in the offset used to update exidx relocs.
592
7e56c51c
NC
5932019-06-28 Nick Clifton <nickc@redhat.com>
594
595 PR 24708
596 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
597 large version reference section.
598 * compress.c (bfd_get_full_section_contents): Check for an
599 uncompressed section whose size is larger than the file size.
600
999d6dff
AM
6012019-06-28 Alan Modra <amodra@gmail.com>
602
603 * format.c (bfd_check_format_matches): Don't match plugin target
604 if another target matches. Expand comment.
605 * targets.c (_bfd_target_vector): Move plugin_vec after all other
606 non-corefile targets, outside !SELECT_VECS.
607 * config.bfd: Don't handle targ=plugin here.
608 * configure.ac: Don't add plugin to enable_targets or handle in
609 target loop setting selvecs and other target vars.
610 * configure: Regenerate.
611
a68aa5d3
NC
6122019-06-26 Nick Clifton <nickc@redhat.com>
613
614 PR 24703
615 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
616 messages for failures.
617 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
618 if returning an error value.
619
ab9f654c
JB
6202019-06-25 Jan Beulich <jbeulich@suse.com>
621
622 * elf-properties.c (elf_find_and_remove_property): Rename last
623 parameter. Mention it in comment.
624
04b865dc
JW
6252019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
626
627 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
628 SEC_MERGE or SEC_CODE flags are set.
629 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
630 symtype consistently. Don't include sec_addr (sym_sec) in symval.
631 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
632 Add sec_addr (sym_sec) after handling merge sections.
633
f93ab3a0
L
6342019-06-24 H.J. Lu <hongjiu.lu@intel.com>
635
636 PR ld/24721
637 * elf-properties.c (elf_merge_gnu_property_list): Remove the
638 property after reporting property removal.
639
bb22a418
AM
6402019-06-23 Alan Modra <amodra@gmail.com>
641
642 PR 24704
643 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
644 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
645 Reduce range of offsets allowed for other GOT relocs.
646
14b2a8e4
AM
6472019-06-23 Alan Modra <amodra@gmail.com>
648
649 PR 24689
650 * elfcode.h (elf_object_p): Warning fix.
651
890f750a
AM
6522019-06-21 Alan Modra <amodra@gmail.com>
653
654 PR 24689
655 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
656
6f5601c4
AM
6572019-06-19 Alan Modra <amodra@gmail.com>
658
659 PR 24697
660 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
661 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
662
4a4e7361
AM
6632019-06-19 Alan Modra <amodra@gmail.com>
664
665 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
666 functions that require r2 valid to use local entry.
667 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
668
39c05d94
SN
6692019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
670
671 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
672 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
673 with elfNN_aarch64_allocate_local_dynrelocs.
674
e30d1fa1
SN
6752019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
676
677 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
678
3a3a077c
AM
6792019-06-14 Alan Modra <amodra@gmail.com>
680
681 * Makefile.in: Regenerate.
682 * configure: Regenerate.
683
d4b87b1e
AM
6842019-06-14 Alan Modra <amodra@gmail.com>
685
686 * elf64-ppc.c: Fix comments involving paddi.
687
62e0492f
AL
6882019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
689
690 PR 24643
691 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
692 absent, or the bfd is not in the ELF formart.
693 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
694
58e07198
CZ
6952019-06-10 Christos Zoulas <christos@zoulas.com>
696
697 PR 24650
698 * elf.c (elfcore_make_auxv_note_section): New function.
699 (elfcore_grok_note): Use it.
700 (elfcore_grok_freebsd_note): Likewise.
701 (elfcore_grok_openbsd_note): Likewise.
702 (elfcore_grok_netbsd_note): Likewise. Plus add support for
703 NT_NETBSDCORE_AUXV notes.
704
237df8fe
SD
7052019-06-06 Sudakshina Das <sudi.das@arm.com>
706
707 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
708 alignment of the new gnu property section.
709
8bf6d176
SD
7102019-06-06 Sudakshina Das <sudi.das@arm.com>
711
712 * bfd-in.h: Change comment.
713 * bfd-in2.h: Regenerate.
714 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
715 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
716 Likwise.
717
1e129bbe
FS
7182019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
719
720 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
721 Remove overflow check.
722
0f4a61b4
AM
7232019-05-28 Alan Modra <amodra@gmail.com>
724
725 PR 24596
726 * cofflink.c (coff_link_check_archive_element): Don't assume
727 element is a coff object file after calling add_archive_element.
728
94667ab1
AM
7292019-05-28 Alan Modra <amodra@gmail.com>
730
731 PR 24596
732 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
733 attempt to set sh_entsize for excluded PLT section.
734
28fbeab8
AM
7352019-05-28 Alan Modra <amodra@gmail.com>
736
737 PR 24596
738 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
739 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
740 allocated in alpha_dynamic_entries_for_reloc.
741
a0f6fd21
AM
7422019-05-28 Alan Modra <amodra@gmail.com>
743
744 PR 24596
745 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
746 on NULL output_section.
747 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
748
c83004d5
AM
7492019-05-28 Alan Modra <amodra@gmail.com>
750
751 PR 24596
752 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
753 entry when MUST_FIND. Abort when MUST_FIND not found.
754 (elf_m68k_get_bfd2got_entry): Likewise.
755 (elf_m68k_relocate_section): Remove now useless assert.
756
586338b8
AM
7572019-05-28 Alan Modra <amodra@gmail.com>
758
759 PR 24596
760 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
761 from bfd_link_info, not an output section owner.
762 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
763 (elf_hppa_final_link_relocate): Likewise.
764
a7b34aba
AM
7652019-05-28 Alan Modra <amodra@gmail.com>
766
767 PR 24596
768 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
769 create_object_symbols_section, obj_textsec, obj_datasec or
770 obj_bsssec. Fix other errors in placement.
771 * config.bfd: Obsolete tic30-aout.
772
0eb32b6e
AM
7732019-05-28 Alan Modra <amodra@gmail.com>
774
775 PR 24596
776 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
777 end of section list as well as section_count.
778 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
779 section list before returning error.
780
ce5aecf8
AM
7812019-05-27 Alan Modra <amodra@gmail.com>
782
783 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
784
3d7d6a6f
AM
7852019-05-27 Alan Modra <amodra@gmail.com>
786
787 PR 24596
788 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
789
823710d5
SN
7902019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
791
792 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
793 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
794 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
795 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
796 (elf_backend_merge_symbol_attribute): Define.
797
405b5bd8
AM
7982019-05-24 Alan Modra <amodra@gmail.com>
799
800 * po/SRC-POTFILES.in: Regenerate.
801
04bdff6a
AM
8022019-05-24 Alan Modra <amodra@gmail.com>
803
804 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
805 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
806 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
807 (struct ppc_link_hash_table): Add powerxx_stubs.
808 (ppc64_elf_check_relocs): Set powerxx_stubs.
809 (build_powerxx_offset, size_powerxx_offset),
810 (num_relocs_for_powerxx_offset),
811 (emit_relocs_for_powerxx_offset): New functions.
812 (plt_stub_size): Size powerxx stubs.
813 (ppc_build_one_stub): Emit powerxx stubs.
814 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
815 powerxx stubs.
816
4a421c53
AM
8172019-05-24 Alan Modra <amodra@gmail.com>
818
819 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
820 R_PPC64_GOT_PCREL34.
821 (xlate_pcrel_opt): New function.
822 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
823 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
824 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
825
5663e321
AM
8262019-05-24 Alan Modra <amodra@gmail.com>
827
828 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
829 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
830 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
831 (BFD_RELOC_PPC64_PLT_PCREL34),
832 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
833 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
834 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
835 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
836 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
837 * elf64-ppc.c (PNOP): Define.
838 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
839 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
840 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
841 relocs.
842 (ppc64_elf_prefix_reloc): New function.
843 (struct ppc_link_hash_table): Add notoc_plt.
844 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
845 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
846 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
847 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
848 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
849 possible need for dynamic relocs on non-pcrel powerxx relocs.
850 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
851 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
852 (toc_adjusting_stub_needed): Likewise.
853 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
854 (ppc64_elf_relocate_section): Handle new powerxx relocs.
855 * bfd-in2.h: Regenerate.
856 * libbfd.h: Regenerate.
857
fd0de36e
JM
8582019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
859
45d5293f
JM
860 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
861 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
862 bpf_elf64_be_vec.
863 * configure: Regenerate.
864
8652019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
866
fd0de36e
JM
867 * configure: Regenerated.
868 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
869 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
870 (BFD64_BACKENDS): Add elf64-bpf.lo.
871 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
872 * Makefile.in (SOURCE_HFILES): Regenerate.
873 * config.bfd (targ_cpu): Handle bpf-*-* targets.
874 * cpu-bpf.c: New file.
875 * elf64-bpf.c: Likewise.
876 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
877 bpf_elf64_le_vec.
878 * archures.c: Define architecture bfd_arch_bpf and machine
879 bfd_arch_bpf.
880 * reloc.c: Define BFD relocations used by the BPF target.
881 * bfd-in2.h: Regenerated.
882 * libbfd.h: Likewise.
883
b0f4fbf8
AM
8842019-05-22 Alan Modra <amodra@gmail.com>
885
886 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
887 contents.
888
9ec2f606
AM
8892019-05-22 Alan Modra <amodra@gmail.com>
890
891 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
892 processing on "size error in section".
893
4decd602
AM
8942019-05-22 Alan Modra <amodra@gmail.com>
895
896 * som.c (som_bfd_free_cached_info): Call
897 _bfd_generic_close_and_cleanup.
898
b474a202
FS
8992019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
900
901 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
902 for TLS_TPREL_HI16(/LO16) relocations in shared library.
903
304f09d0
FS
9042019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
905
906 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
907 checks. Search the RELA table for n64 relocations.
908
3734320d
MF
9092019-05-21 Matthew Fortune <matthew.fortune@mips.com>
910 Faraz Shahbazker <fshahbazker@wavecomp.com>
911
912 * elfxx-mips.c (LA25_BC): New macro.
913 (mips_elf_link_hash_table)<compact_branches>: New field.
914 (STUB_JALRC): New macro.
915 (mipsr6_o32_exec_plt0_entry_compact): New array.
916 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
917 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
918 (mipsr6_exec_plt_entry_compact): Likewise.
919 (mips_elf_create_la25_stub): Use BC instead of J for stubs
920 when compact_branches is true.
921 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
922 PLT for MIPSR6 with compact_branches. Do not reorder the
923 compact branches PLT. Switch the lazy stub for MIPSR6
924 with compact_branches to use JALRC.
925 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
926 when compact_branches is true.
927 (_bfd_mips_elf_compact_branches): New function.
928 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
929
64672071
TC
9302019-05-21 Tamar Christina <tamar.christina@arm.com>
931
932 PR ld/24373
933 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
934 Fix print formatter.
935
e6f65e75
AV
9362019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
937
938 PR 24460
939 * elf32-arm.c (get_value_helper): Remove.
940 (elf32_arm_final_link_relocate): Fix branch future relocations.
941
739b5c9c
TC
9422019-05-21 Tamar Christina <tamar.christina@arm.com>
943
944 PR ld/24373
945 * bfd-in.h (enum erratum_84319_opts): New
946 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
947 int to enum erratum_84319_opts.
948 * bfd-in2.h: Regenerate.
949 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
950 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
951 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
952 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
953 (_bfd_aarch64_resize_stubs): Amend comment.
954 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
955 requested.
956 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
957 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
958 erratum workaround.
959 (clear_erratum_843419_entry): Update erratum conditional.
960
7622049e
SKS
9612019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
962
963 PR ld/24571
964 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
965 when computing distance_short_enough.
966
338ba755
SKS
9672019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
968
969 PR ld/24564
970 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
971 Wrap around even if distance equals avr_pc_wrap_around.
972
999b073b
NC
9732019-05-20 Nick Clifton <nickc@redhat.com>
974
975 * po/fr.po: Updated French translation.
976
a7ad558c
AV
9772019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
978
979 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
980
a2699ef2
AM
9812019-05-16 Alan Modra <amodra@gmail.com>
982
983 * elf32-arm.c (elf32_arm_write_section): Revert last change.
984
3a1bb98c
AM
9852019-05-15 Alan Modra <amodra@gmail.com>
986
987 * elf32-arm.c (elf32_arm_write_section): Don't leave
988 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
989 unitialised section contents.
990
37d0d091
JH
9912019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
992
993 PR 19921
994 * verilog.c: (VerilogDataWidth): New variable.
995 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
996
79299211
NC
9972019-05-08 Nick Clifton <nickc@redhat.com>
998
999 PR 24523
1000 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1001 rather than FALSE if encountering a non-ELF file.
1002
e1cbf07a
AM
10032019-05-06 Alan Modra <amodra@gmail.com>
1004
1005 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1006
334d91b9
AM
10072019-05-06 Alan Modra <amodra@gmail.com>
1008
1009 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1010 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1011 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1012 * libbfd.h: Regenerate.
1013 * bfd-in2.h: Regenerate.
1014
a288c270
AM
10152019-05-04 Alan Modra <amodra@gmail.com>
1016
1017 PR 24511
1018 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1019 following the standard section names.
1020 (bfd_decode_symclass): Prioritize section flag tests in
1021 decode_section_type before name tests in coff_section_type.
1022 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1023 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1024 their names and choose standard .text section flags for
1025 fake_section.
1026
2cdc1a97
NC
10272019-05-02 Nick Clifton <nickc@redhat.com>
1028
1029 PR 24493
1030 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1031 .gnu.debugaltlink sections as debugging sections.
1032
066f4018
AM
10332019-04-30 Alan Modra <amodra@gmail.com>
1034
1035 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1036 (struct _ppc64_elf_section_data): Likewise.
1037 (ppc64_elf_check_relocs): Set above fields.
1038 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1039 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1040 when possible.
1041
c54f1524
L
10422019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1043
1044 PR ld/24486
1045 * elflink.c (elf_link_output_extsym): Don't complain undefined
1046 weak dynamic reference.
1047
68bb0359
SD
10482019-04-25 Sudakshina Das <sudi.das@arm.com>
1049
1050 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1051 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1052 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1053 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1054 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1055 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1056 (elfNN_aarch64_small_plt0_bti_entry): Update.
1057 (elfNN_aarch64_small_plt_bti_entry): Update.
1058 (elfNN_aarch64_small_plt_pac_entry): Update.
1059 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1060 (setup_plt_values): Setup new entries.
1061 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1062 (elfNN_aarch64_plt_sym_val): Likewise.
1063
79b8e8ab
JW
10642019-04-22 Jim Wilson <jimw@sifive.com>
1065
1066 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1067
fce97736
AM
10682019-04-19 Alan Modra <amodra@gmail.com>
1069
1070 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1071
9a7f0679
L
10722019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1073
1074 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1075 building shared object.
1076 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1077
4e84a8f8
L
10782019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1079
1080 PR ld/24458
1081 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1082 linker_def.
1083
32c36c3c
AV
10842019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1085
1086 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1087 relocation.
1088 * bfd-in2.h: Regenerate.
1089 * libbfd.h: Likewise.
1090
60f993ce
AV
10912019-04-15 Sudakshina Das <sudi.das@arm.com>
1092
1093 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1094 * bfd-in2.h: Regenerated.
1095 * libbfd.h: Regenerated.
1096
f6b2b12d
AV
10972019-04-15 Sudakshina Das <sudi.das@arm.com>
1098
1099 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1100 * bfd-in2.h: Regenerated.
1101 * libbfd.h: Likewise.
1102
1889da70
AV
11032019-04-15 Sudakshina Das <sudi.das@arm.com>
1104
1105 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1106 * bfd-in2.h: Regenerated.
1107 * libbfd.h: Regenerated.
1108 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1109 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1110 and R_ARM_THM_BF12 together.
1111 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1112
1caf72a5
AV
11132019-04-15 Sudakshina Das <sudi.das@arm.com>
1114
1115 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1116 * libbfd.h: Regenerated.
1117 * bfd-in2.h: Regenerated.
1118 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1119 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1120 and R_ARM_THM_BF18 together.
1121 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1122
e5d6e09e
AV
11232019-04-15 Sudakshina Das <sudi.das@arm.com>
1124
1125 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1126 * bfd-in2.h: Regenerated.
1127 * libbfd.h: Regenerated.
1128 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1129 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1130 and R_ARM_THM_BF16 together.
1131 (get_value_helper): New reloc helper.
1132 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1133
e12437dc
AV
11342019-04-15 Sudakshina Das <sudi.das@arm.com>
1135
1136 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1137 * bfd-in2.h: Regenerate.
1138 * libbfd.h: Regenerate.
1139
031254f2
AV
11402019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1141
1142 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1143 * bfd-in2.h: Regenerate.
1144 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1145 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1146 and update assert.
1147 (using_thumb2): Likewise.
1148 (using_thumb2_bl): Update assert.
1149 (arch_has_arm_nop): Likewise.
1150 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1151 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1152
233a0083
L
11532019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1154
1155 * elf-linker-x86.h (elf_x86_cet_report): New.
1156 (elf_linker_x86_params): Add cet_report.
1157 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1158 missing IBT and SHSTK properties if needed.
1159
a0ea3a14
L
11602019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1161
ca4e6331 1162 PR ld/24436
a0ea3a14
L
1163 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1164 "h != NULL". Don't check "h != NULL" before calling.
1165 bfd_elf_gc_record_vtentry.
1166 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1167 * elf32-bfin.c (bfin_check_relocs): Likewise.
1168 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1169 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1170 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1171 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1172 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1173 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1174 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1175 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1176 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1177 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1178 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1179 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1180 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1181 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1182 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1183 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1184 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1185 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1186 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1187 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1188 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1189 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1190 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1191 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1192 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1193 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1194 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1195 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1196 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1197 VTENTRY entry.
1198
9bff840e
AM
11992019-04-11 Alan Modra <amodra@gmail.com>
1200
1201 PR 24435
1202 * elflink.c (elf_link_add_object_symbols): Don't read partial
1203 dynamic entries from fuzzed objects.
1204
ce12121b
TC
12052019-04-11 Tamar Christina <tamar.christina@arm.com>
1206
1207 PR ld/24302
1208 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1209 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1210 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1211
b05971a6
MF
12122019-04-10 Michael Forney <mforney@mforney.org>
1213
1214 PR 24427
1215 * doc/chew.c (free_words): Correctly free "push_text" strings.
1216
3ae61bb6
L
12172019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1218
1219 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1220
5f2a6b85
AM
12212019-04-08 Alan Modra <amodra@gmail.com>
1222
1223 * configure.ac (elfxx_x86): Define and use.
1224 * configure: Regenerate.
1225
5b9c07b2
L
12262019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1227
1228 * elf-linker-x86.h: New file.
1229 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1230 to get x86-specific linker options.
1231 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1232 (elf_x86_64_check_relocs): Likewise.
1233 (elf_x86_64_relocate_section): Likewise.
1234 (elf_x86_64_link_setup_gnu_properties): Likewise.
1235 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1236 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1237 (_bfd_elf_linker_x86_set_options): New function.
1238 * elfxx-x86.h: Include "elf-linker-x86.h".
1239 (elf_x86_link_hash_table): Add params.
1240
4b24dd1a
AM
12412019-04-03 Alan Modra <amodra@gmail.com>
1242
1243 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1244 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1245 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1246 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1247 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1248 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1249
87f98bac
JW
12502019-04-02 Jim Wilson <jimw@sifive.com>
1251
1252 PR 24389
1253 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1254 ELF header flags to after check for ELF object file. Loop through
1255 sections looking for code sections, if none, then skip ABI checks.
1256
ae2b14c7
JW
12572019-03-30 Andrew Waterman <andrew@sifive.com>
1258
1259 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1260 rd == X_RA case.
1261
2487ef07
MF
12622019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1263
1264 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1265 info->export_dynamic to the conditional.
1266
242a1159
AM
12672019-03-28 Alan Modra <amodra@gmail.com>
1268
1269 PR 24392
1270 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1271 * configure: Regenerate.
1272 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1273 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1274 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1275 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1276 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1277
a9f5a551
JW
12782019-03-21 Jim Wilson <jimw@sifive.com>
1279
1280 PR 24365
1281 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1282 verify sym non-NULL before using. Add identical check using h.
1283
4e539114
SD
12842019-03-21 Sudakshina Das <sudi.das@arm.com>
1285
1286 * elf-bfd.h (struct elf_backend_data): Add argument to
1287 merge_gnu_properties.
1288 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1289 itself and while calling bed->merge_gnu_properties.
1290 (elf_merge_gnu_property_list): Update the calls for
1291 elf_merge_gnu_properties.
1292 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1293 of --force-bti warning and add argument.
1294 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1295 warning.
1296 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1297 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1298 declaration.
1299
acde6c6b
SD
13002019-03-20 Sudakshina Das <sudi.das@arm.com>
1301
1302 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1303 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1304 (elf_backend_fixup_gnu_properties): Define for AArch64.
1305
8cd1fe1b
AM
13062019-03-18 Alan Modra <amodra@gmail.com>
1307
1308 PR 24355
1309 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1310 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1311 attempt at writing glink stubs only once.
1312
6835821b
AM
13132019-03-16 Alan Modra <amodra@gmail.com>
1314
1315 PR 24337
1316 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1317 (_bfd_elf_rel_local_sym): Likewise.
1318 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1319 section of symbols with unrecognized shndx.
1320
2219ae0b
L
13212019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1322
1323 PR ld/24267
1324 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
1325 section.
1326 * cofflink.c (coff_link_add_symbols): Check for symbols defined
1327 in discarded section.
1328
fe3fef62
AM
13292019-03-15 Alan Modra <amodra@gmail.com>
1330
1331 PR 24339
1332 * elflink.c (elf_link_add_object_symbols): Bail out on a local
1333 symbol after globals if elf_bad_symtab is not set.
1334
1ff31e13
AM
13352019-03-15 Alan Modra <amodra@gmail.com>
1336
1337 PR 24337
1338 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
1339 (_bfd_elf_rel_local_sym): Likewise.
1340
f55b1e32
AM
13412019-03-15 Alan Modra <amodra@gmail.com>
1342
1343 PR 24336
1344 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
1345 object files with sh_size not a multiple of sh_entsize.
1346
da0d12d2
L
13472019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1348
418d4036
L
1349 PR ld/24338
1350 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
1351 input with bad relocation.
1352
135322019-03-15 H.J. Lu <hongjiu.lu@intel.com>
1354
da0d12d2
L
1355 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1356
d7f848c3
NC
13572019-03-14 Nick Clifton <nickc@redhat.com>
1358
1359 PR 24334
1360 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
1361 (save_section_vma): Initialise field to the number of entries in
1362 the sec_vma table.
1363 (section_vma_same): Check that the number of entries in the
1364 sec_vma table matches the number of sections in the bfd.
1365
6cc71b82
NC
13662019-03-14 Nick Clifton <nickc@redhat.com>
1367
1368 PR 24333
1369 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
1370 section owner pointer when adding the default symbol.
1371
be22c732
NC
13722019-03-14 Nick Clifton <nickc@redhat.com>
1373
1374 PR 24332
1375 * elflink.c (elf_link_add_object_symbols): Add new local variable
1376 extversym_end. Initialise it to point to the end of the version
1377 symbol table, if present. Check it when initialising and updating
1378 the ever pointer.
1379
1dbade74
SD
13802019-03-13 Sudakshina Das <sudi.das@arm.com>
1381
1382 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
1383 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
1384 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
1385 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
1386 and PLT_PAC_PLT.
1387 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
1388 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
1389 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
1390
37c18eed
SD
13912019-03-13 Sudakshina Das <sudi.das@arm.com>
1392 Szabolcs Nagy <szabolcs.nagy@arm.com>
1393
1394 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
1395 (aarch64_bti_pac_info): New.
1396 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
1397 (bfd_elf32_aarch64_set_options): Likewise.
1398 * bfd-in2.h: Regenerate
1399 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
1400 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
1401 (elfNN_aarch64_small_plt0_bti_entry): New.
1402 (elfNN_aarch64_small_plt_bti_entry): New.
1403 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
1404 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
1405 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
1406 tlsdesc_plt_entry_size fields.
1407 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
1408 (setup_plt_values): New helper function.
1409 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
1410 bti enable type.
1411 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
1412 fixed macros.
1413 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
1414 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
1415 to plt stubs instead of fixed ones and update filling them according
1416 to the need for bti.
1417 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1418 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1419 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
1420 (elfNN_aarch64_plt_sym_val): Update size accordingly.
1421 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
1422 is set.
1423 (bfd_elfNN_get_synthetic_symtab): Define.
1424 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
1425 and mising BTI NOTE SECTION.
1426
1427
cd702818
SD
14282019-03-13 Sudakshina Das <sudi.das@arm.com>
1429
1430 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
1431 linker created inputs from merge.
1432 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
1433 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
1434 (elfNN_aarch64_link_setup_gnu_properties): New.
1435 (elfNN_aarch64_merge_gnu_properties): New.
1436 (elf_backend_setup_gnu_properties): Define for AArch64.
1437 (elf_backend_merge_gnu_properties): Likewise.
1438 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
1439 (_bfd_aarch64_elf_parse_gnu_properties): Define.
1440 (_bfd_aarch64_elf_merge_gnu_properties): Define.
1441 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
1442 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
1443 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
1444 (elf_backend_parse_gnu_properties): Define for AArch64.
1445
44b27f95
L
14462019-03-13 H.J. Lu <hongjiu.lu@intel.com>
1447
1448 PR ld/24322
1449 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
1450 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
1451
7a6e0d89
AM
14522019-03-12 Alan Modra <amodra@gmail.com>
1453
1454 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
1455 nmemb parameter. Use bfd_alloc2.
1456 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
1457 Delete assertion.
1458 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
1459 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
1460 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
1461 doesn't overflow.
1462 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
1463 (assign_section_numbers): Style fix.
1464 (swap_out_syms): Use bfd_malloc2.
1465 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
1466 overflow.
1467 (_bfd_elf_make_empty_symbol): Style fix.
1468 (elfobj_grok_stapsdt_note_1): Formatting.
1469 * elfcode.h (elf_object_p): Use bfd_alloc2.
1470 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
1471 (elf_slurp_symbol_table): Use bfd_zalloc2.
1472 (elf_slurp_reloc_table): Use bfd_alloc2.
1473 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
1474 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
1475 size calculation doesn't overflow.
1476 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
1477 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1478 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
1479
ebd2263b
AM
14802019-03-08 Alan Modra <amodra@gmail.com>
1481
1482 PR 24311
1483 * merge.c (merge_strings): Return secinfo. Don't pad section
1484 to alignment here.
1485 (_bfd_merge_sections): Pad section to alignment here, if input
1486 sections contributing to merged output all pad to alignment.
1487 Formatting.
1488
219d6836
NC
14892019-03-06 Nick Clifton <nickc@redhat.com>
1490
1491 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
1492 table pointer.
1493 * coffgen.c (coff_find_nearest_line_with_names): Do not call
1494 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
1495
24801b15
AK
14962019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
1497
1498 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
1499 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1500
1501 PR 20113
1502 * elf32-s390.c (allocate_dynrelocs): Update comment.
1503
4ffd2909
TC
15042019-02-28 Tamar Christina <tamar.christina@arm.com>
1505
1506 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
1507
eed5def8
NC
15082019-02-28 Nick Clifton <nickc@redhat.com>
1509
1510 PR 24273
1511 * elf.c (bfd_elf_string_from_elf_section): Check for a string
1512 section that is not NUL terminated.
1513
5cfe428c
L
15142019-02-27 H.J. Lu <hongjiu.lu@intel.com>
1515
1516 PR ld/24276
1517 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
1518 by linker when checking copy reloc on protected symbol.
1519
f616c36b
AM
15202019-02-24 Alan Modra <amodra@gmail.com>
1521
1522 PR 24144
1523 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
1524
eed62915
MF
15252019-02-20 Eric Tsai <erictsai@cadence.com>
1526
1527 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
1528 sections between the call site and call destination and adjust
1529 call distance by the largest alignment.
1530
e6c3b5bf
AH
15312019-02-20 Alan Hayward <alan.hayward@arm.com>
1532
1533 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
1534 * elf.c (elfcore_grok_aarch_pauth): New function.
1535 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
1536 (elfcore_write_aarch_pauth): New function.
1537 (elfcore_write_register_note): Check for AArch64 pauth section.
1538
34d75fb5
AM
15392019-02-20 Alan Modra <amodra@gmail.com>
1540
1541 PR 24225
1542 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
1543 return value.
1544
edd01d07
MR
15452019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
1546
1547 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
1548 Darwin hosts, not just or1k.
1549 * configure: Regenerate.
1550
8abac803
AM
15512019-02-20 Alan Modra <amodra@gmail.com>
1552
1553 PR 24236
1554 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
1555 sentinel NUL to string buffer nearer to loop where it is used.
1556 Don't go past sentinel when scanning strings, and don't write
1557 NUL again.
1558 * archive.c (do_slurp_coff_armap): Simplify string handling to
1559 archive64.c style.
1560
179f2db0
AM
15612019-02-19 Alan Modra <amodra@gmail.com>
1562
1563 PR 24235
1564 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
1565 attempting to prevent read past end of section.
1566
a31b8bd9
AM
15672019-02-18 Alan Modra <amodra@gmail.com>
1568
1569 PR 24225
1570 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1571 PRIx64 to generate warning messages. Print local sym names too.
1572
a0e90a73
CZ
15732019-02-09 Vineet Gupta <vgupta@synopsys.com>
1574
1575 * elf32-arc (INIT_SYM_STRING): Delete.
1576 (FINI_SYM_STRING): Likewise.
1577 (init_str): Likewise.
1578 (fini_str): Likewise.
1579
482f3505
AM
15802019-02-08 Alan Modra <amodra@gmail.com>
1581
1582 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1583 for bss-plt" warning to make it an error.
1584
b2abe1bd
EB
15852019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1586
1587 PR ld/18841
1588 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1589 reloc_class_ifunc for ifunc symbols.
1590 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1591
68a09132
EB
15922019-02-07 Eric Botcazou <ebotcazou@adacore.com>
1593
1594 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1595 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1596
2012bf01
NC
15972019-02-07 Nick Clifton <nickc@redhat.com>
1598
1599 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1600 into the definitely obsolete list.
1601
83924b38
L
16022019-02-05 H.J. Lu <hongjiu.lu@intel.com>
1603
1604 PR ld/24151
1605 * elf64-x86-64.c (elf_x86_64_need_pic): Check
1606 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1607 (elf_x86_64_relocate_section): Move PIC check for PC-relative
1608 relocations to ...
1609 (elf_x86_64_check_relocs): Here.
1610 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1611 to check if a symbol is defined in a non-shared object.
1612 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1613
453f8e1e
SDJ
16142019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
1615
1616 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1617 of 'labs' (and fix GCC warning).
1618
9ed1348c
NC
16192019-01-25 Nick Clifton <nickc@redhat.com>
1620
1621 * po/ru.po: Updated Russian translation.
1622
d9938630
NC
16232019-01-23 Nick Clifton <nickc@redhat.com>
1624
1625 * po/fr.po: Updated French translation.
1626
375cd423
NC
16272019-01-21 Nick Clifton <nickc@redhat.com>
1628
1629 * po/pt.po: Updated Portuguese translation.
1630 * po/uk.po: Updated Ukranian translation.
1631
acef8081
YC
16322019-01-21 Yuri Chornoivan <yurchor@ukr.net>
1633
1634 PR 24108
1635 * elf32-nds32.c (nds32_relocate_section): Add space between words
1636 in error message.
1637 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1638 error message.
1639 (riscv_i_or_e_p): Likewise.
1640 (riscv_merge_arch_attr_info): Likewise.
1641
f48dfe41
NC
16422019-01-19 Nick Clifton <nickc@redhat.com>
1643
1644 * version.m4: Reset to 2.32.51
1645 * configure: Regenerate.
1646 * po/bfd.pot: Regenerate.
1647
f974f26c
NC
16482018-06-24 Nick Clifton <nickc@redhat.com>
1649
1650 2.32 branch created.
1651
a4bf3d07
JW
16522019-01-16 Kito Cheng <kito@andestech.com>
1653
1654 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1655 for OBJ_ATTR_PROC.
1656
2dc8dd17
JW
16572019-01-16 Kito Cheng <kito@andestech.com>
1658 Nelson Chu <nelson@andestech.com>
1659
7d7a7d7c
JW
1660 * elfnn-riscv.c (in_subsets): New.
1661 (out_subsets): Likewise.
1662 (merged_subsets): Likewise.
1663 (riscv_std_ext_p): Likewise.
1664 (riscv_non_std_ext_p): Likewise.
1665 (riscv_std_sv_ext_p): Likewise.
1666 (riscv_non_std_sv_ext_p): Likewise.
1667 (riscv_version_mismatch): Likewise.
1668 (riscv_i_or_e_p): Likewise.
1669 (riscv_merge_std_ext): Likewise.
1670 (riscv_merge_non_std_and_sv_ext): Likewise.
1671 (riscv_merge_arch_attr_info): Likewise.
1672 (riscv_merge_attributes): Likewise.
1673 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1674
2dc8dd17
JW
1675 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1676 (elf_backend_obj_attrs_vendor): Define.
1677 (elf_backend_obj_attrs_section_type): Likewise.
1678 (elf_backend_obj_attrs_section): Likewise.
1679 (elf_backend_obj_attrs_arg_type): Define as
1680 riscv_elf_obj_attrs_arg_type.
1681 * elfxx-riscv.c (riscv_estimate_digit): New.
1682 (riscv_estimate_arch_strlen1): Likewise.
1683 (riscv_estimate_arch_strlen): Likewise.
1684 (riscv_arch_str1): Likewise.
1685 (riscv_arch_str): Likewise.
1686 * elfxx-riscv.h (riscv_arch_str): Declare.
1687
d5dcaf1b
JD
16882019-01-14 John Darrington <john@darrington.wattle.id.au>
1689
1690 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1691 * libbfd.h: regen.
1692 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1693 source field. (md_apply_fix): Apply final fix
1694 to BFD_RELOC_S12Z_OPR.
1695 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1696
5a12586d
MT
16972019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
1698
f466c305 1699 PR 20113
5a12586d
MT
1700 * elf32-s390.c (allocate_dynrelocs): Update comment.
1701
3107326d
AP
17022019-01-09 Andrew Paprocki <andrew@ishiboo.com>
1703
1704 * warning.m4: Adjust egrep pattern for non-GNU compilers.
1705 * configure: Regenerate.
1706
a9859e01
AM
17072019-01-08 Alan Modra <amodra@gmail.com>
1708
1709 PR 23699
1710 PR 24065
1711 * ihex.c (ihex_write_object_contents): Properly check 32-bit
1712 address range.
1713
c8c89dac
YS
17142019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
1715
1716 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1717 * bfd/bfd-in2.h: Regenerate.
1718 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1719 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1720
d9858c37
LX
17212019-01-04 Lifang Xia <lifang_xia@c-sky.com>
1722
1723 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1724 default target, little endian target is more suitable.
1725
677bd4c6
AM
17262019-01-04 Alan Modra <amodra@gmail.com>
1727
1728 PR 24061
1729 PR 21786
1730 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1731 adjust all callers.
1732 (EQ_VALUE_IN_FIELD): Likewise.
1733 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1734
82704155
AM
17352019-01-01 Alan Modra <amodra@gmail.com>
1736
1737 Update year range in copyright notice of all files.
1738
d5c04e1b 1739For older changes see ChangeLog-2018
3499769a 1740\f
d5c04e1b 1741Copyright (C) 2019 Free Software Foundation, Inc.
3499769a
AM
1742
1743Copying and distribution of this file, with or without modification,
1744are permitted in any medium without royalty provided the copyright
1745notice and this notice are preserved.
1746
1747Local Variables:
1748mode: change-log
1749left-margin: 8
1750fill-column: 74
1751version-control: never
1752End: