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