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