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