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