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