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