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