676f4ad221b3fd1fde43bb0f3e126ff5cab42d66
[external/binutils.git] / bfd / ChangeLog
1 2019-05-02  Nick Clifton  <nickc@redhat.com>
2
3         PR 24493
4         * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
5         .gnu.debugaltlink sections as debugging sections.
6
7 2019-04-30  Alan Modra  <amodra@gmail.com>
8
9         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
10         (struct _ppc64_elf_section_data): Likewise.
11         (ppc64_elf_check_relocs): Set above fields.
12         (ppc64_elf_edit_toc): Add a pass over GOT relocs.
13         (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
14         when possible.
15
16 2019-04-26  H.J. Lu  <hongjiu.lu@intel.com>
17
18         PR ld/24486
19         * elflink.c (elf_link_output_extsym): Don't complain undefined
20         weak dynamic reference.
21
22 2019-04-25  Sudakshina Das  <sudi.das@arm.com>
23
24         * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
25         (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
26         (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
27         (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
28         (elfNN_aarch64_small_plt0_pac_entry): Remove.
29         (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
30         (elfNN_aarch64_small_plt0_bti_entry): Update.
31         (elfNN_aarch64_small_plt_bti_entry): Update.
32         (elfNN_aarch64_small_plt_pac_entry): Update.
33         (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
34         (setup_plt_values): Setup new entries.
35         (elfNN_aarch64_finish_dynamic_sections): Remove size change.
36         (elfNN_aarch64_plt_sym_val): Likewise.
37
38 2019-04-22  Jim Wilson  <jimw@sifive.com>
39
40         * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
41
42 2019-04-19  Alan Modra  <amodra@gmail.com>
43
44         * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
45
46 2019-04-17  H.J. Lu  <hongjiu.lu@intel.com>
47
48         * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
49         building shared object.
50         * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
51
52 2019-04-17  H.J. Lu  <hongjiu.lu@intel.com>
53
54         PR ld/24458
55         * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
56         linker_def.
57
58 2019-04-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
59
60         * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
61         relocation.
62         * bfd-in2.h: Regenerate.
63         * libbfd.h: Likewise.
64
65 2019-04-15  Sudakshina Das  <sudi.das@arm.com>
66
67         * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
68         * bfd-in2.h: Regenerated.
69         * libbfd.h: Regenerated.
70
71 2019-04-15  Sudakshina Das  <sudi.das@arm.com>
72
73         * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
74         * bfd-in2.h: Regenerated.
75         * libbfd.h: Likewise.
76
77 2019-04-15  Sudakshina Das  <sudi.das@arm.com>
78
79         * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
80         * bfd-in2.h: Regenerated.
81         * libbfd.h: Regenerated.
82         * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
83         (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
84         and R_ARM_THM_BF12 together.
85         (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
86
87 2019-04-15  Sudakshina Das  <sudi.das@arm.com>
88
89         * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
90         * libbfd.h: Regenerated.
91         * bfd-in2.h: Regenerated.
92         * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
93         (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
94         and R_ARM_THM_BF18 together.
95         (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
96
97 2019-04-15  Sudakshina Das  <sudi.das@arm.com>
98
99         * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
100         * bfd-in2.h: Regenerated.
101         * libbfd.h: Regenerated.
102         * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
103         (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
104         and R_ARM_THM_BF16 together.
105         (get_value_helper): New reloc helper.
106         (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
107
108 2019-04-15  Sudakshina Das  <sudi.das@arm.com>
109
110         * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
111         * bfd-in2.h: Regenerate.
112         * libbfd.h: Regenerate.
113
114 2019-04-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
115
116         * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
117         * bfd-in2.h: Regenerate.
118         * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
119         * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
120         and update assert.
121         (using_thumb2): Likewise.
122         (using_thumb2_bl): Update assert.
123         (arch_has_arm_nop): Likewise.
124         (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
125         (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
126
127 2019-04-11  H.J. Lu  <hongjiu.lu@intel.com>
128
129         * elf-linker-x86.h (elf_x86_cet_report): New.
130         (elf_linker_x86_params): Add cet_report.
131         * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
132         missing IBT and SHSTK properties if needed.
133
134 2019-04-11  H.J. Lu  <hongjiu.lu@intel.com>
135
136         PR ld/24436
137         * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
138         "h != NULL".  Don't check "h != NULL" before calling.
139         bfd_elf_gc_record_vtentry.
140         * elf32-arm.c (elf32_arm_check_relocs): Likewise.
141         * elf32-bfin.c (bfin_check_relocs): Likewise.
142         * elf32-cris.c (cris_elf_check_relocs): Likewise.
143         * elf32-csky.c (csky_elf_check_relocs): Likewise.
144         * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
145         * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
146         * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
147         * elf32-frv.c (elf32_frv_check_relocs): Likewise.
148         * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
149         * elf32-i386.c (elf_i386_check_relocs): Likewise.
150         * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
151         * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
152         * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
153         * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
154         * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
155         * elf32-metag.c (elf_metag_check_relocs): Likewise.
156         * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
157         * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
158         * elf32-s390.c (elf_s390_check_relocs): Likewise.
159         * elf32-sh.c (sh_elf_check_relocs): Likewise.
160         * elf32-v850.c (v850_elf_check_relocs): Likewise.
161         * elf32-vax.c (elf_vax_check_relocs): Likewise.
162         * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
163         * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
164         * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
165         * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
166         * elf64-s390.c (elf_s390_check_relocs): Likewise.
167         * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
168         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
169         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
170         * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
171         VTENTRY entry.
172
173 2019-04-11  Alan Modra  <amodra@gmail.com>
174
175         PR 24435
176         * elflink.c (elf_link_add_object_symbols): Don't read partial
177         dynamic entries from fuzzed objects.
178
179 2019-04-11  Tamar Christina  <tamar.christina@arm.com>
180
181         PR ld/24302
182         * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
183         DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
184         (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
185
186 2019-04-10  Michael Forney  <mforney@mforney.org>
187
188         PR 24427
189         * doc/chew.c (free_words): Correctly free "push_text" strings.
190
191 2019-04-08  H.J. Lu  <hongjiu.lu@intel.com>
192
193         * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
194
195 2019-04-08  Alan Modra  <amodra@gmail.com>
196
197         * configure.ac (elfxx_x86): Define and use.
198         * configure: Regenerate.
199
200 2019-04-06  H.J. Lu  <hongjiu.lu@intel.com>
201
202         * elf-linker-x86.h: New file.
203         * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
204         to get x86-specific linker options.
205         * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
206         (elf_x86_64_check_relocs): Likewise.
207         (elf_x86_64_relocate_section): Likewise.
208         (elf_x86_64_link_setup_gnu_properties): Likewise.
209         * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
210         (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
211         (_bfd_elf_linker_x86_set_options): New function.
212         * elfxx-x86.h: Include "elf-linker-x86.h".
213         (elf_x86_link_hash_table): Add params.
214
215 2019-04-03  Alan Modra  <amodra@gmail.com>
216
217         * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
218         * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
219         * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
220         * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
221         * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
222         * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
223
224 2019-04-02  Jim Wilson  <jimw@sifive.com>
225
226         PR 24389
227         * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
228         ELF header flags to after check for ELF object file.  Loop through
229         sections looking for code sections, if none, then skip ABI checks.
230
231 2019-03-30  Andrew Waterman  <andrew@sifive.com>
232
233         * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
234         rd == X_RA case.
235
236 2019-03-29  Max Filippov  <jcmvbkbc@gmail.com>
237
238         * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
239         info->export_dynamic to the conditional.
240
241 2019-03-28  Alan Modra  <amodra@gmail.com>
242
243         PR 24392
244         * configure.ac: Invoke AC_CHECK_SIZEOF(int).
245         * configure: Regenerate.
246         * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
247         workaround with SIZEOF_LONG vs. SIZEOF_INT check.
248         * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
249         * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
250         * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
251
252 2019-03-21  Jim Wilson  <jimw@sifive.com>
253
254         PR 24365
255         * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
256         verify sym non-NULL before using.  Add identical check using h.
257
258 2019-03-21  Sudakshina Das  <sudi.das@arm.com>
259
260         * elf-bfd.h (struct elf_backend_data): Add argument to
261         merge_gnu_properties.
262         * elf-properties.c (elf_merge_gnu_properties): Add argument to
263         itself and while calling bed->merge_gnu_properties.
264         (elf_merge_gnu_property_list): Update the calls for
265         elf_merge_gnu_properties.
266         * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
267         of --force-bti warning and add argument.
268         * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
269         warning.
270         * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
271         * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
272         declaration.
273
274 2019-03-20  Sudakshina Das  <sudi.das@arm.com>
275
276         * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
277         * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
278         (elf_backend_fixup_gnu_properties): Define for AArch64.
279
280 2019-03-18  Alan Modra  <amodra@gmail.com>
281
282         PR 24355
283         * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
284         for local iplt syms with ent->plt.offset == -1.  Remove ineffective
285         attempt at writing glink stubs only once.
286
287 2019-03-16  Alan Modra  <amodra@gmail.com>
288
289         PR 24337
290         * elf.c (_bfd_elf_rela_local_sym): Revert last change.
291         (_bfd_elf_rel_local_sym): Likewise.
292         * elflink.c (elf_link_input_bfd): Use bfd_und_section for
293         section of symbols with unrecognized shndx.
294
295 2019-03-15  H.J. Lu  <hongjiu.lu@intel.com>
296
297         PR ld/24267
298         * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
299         section.
300         * cofflink.c (coff_link_add_symbols): Check for symbols defined
301         in discarded section.
302
303 2019-03-15  Alan Modra  <amodra@gmail.com>
304
305         PR 24339
306         * elflink.c (elf_link_add_object_symbols): Bail out on a local
307         symbol after globals if elf_bad_symtab is not set.
308
309 2019-03-15  Alan Modra  <amodra@gmail.com>
310
311         PR 24337
312         * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
313         (_bfd_elf_rel_local_sym): Likewise.
314
315 2019-03-15  Alan Modra  <amodra@gmail.com>
316
317         PR 24336
318         * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
319         object files with sh_size not a multiple of sh_entsize.
320
321 2019-03-15  H.J. Lu  <hongjiu.lu@intel.com>
322
323         PR ld/24338
324         * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
325         input with bad relocation.
326
327 22019-03-15  H.J. Lu  <hongjiu.lu@intel.com>
328
329         * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
330
331 2019-03-14  Nick Clifton  <nickc@redhat.com>
332
333         PR 24334
334         * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
335         (save_section_vma): Initialise field to the number of entries in
336         the sec_vma table.
337         (section_vma_same): Check that the number of entries in the
338         sec_vma table matches the number of sections in the bfd.
339
340 2019-03-14  Nick Clifton  <nickc@redhat.com>
341
342         PR 24333
343         * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
344         section owner pointer when adding the default symbol.
345
346 2019-03-14  Nick Clifton  <nickc@redhat.com>
347
348         PR 24332
349         * elflink.c (elf_link_add_object_symbols): Add new local variable
350         extversym_end.  Initialise it to point to the end of the version
351         symbol table, if present.  Check it when initialising and updating
352         the ever pointer.
353
354 2019-03-13  Sudakshina Das  <sudi.das@arm.com>
355
356         * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
357         (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
358         (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
359         (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
360         and PLT_PAC_PLT.
361         (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
362         (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
363         (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
364
365 2019-03-13  Sudakshina Das  <sudi.das@arm.com>
366             Szabolcs Nagy  <szabolcs.nagy@arm.com>
367
368         * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
369         (aarch64_bti_pac_info): New.
370         (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
371         (bfd_elf32_aarch64_set_options): Likewise.
372         * bfd-in2.h: Regenerate
373         * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
374         (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
375         (elfNN_aarch64_small_plt0_bti_entry): New.
376         (elfNN_aarch64_small_plt_bti_entry): New.
377         (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
378         (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
379         (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
380         tlsdesc_plt_entry_size fields.
381         (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
382         (setup_plt_values): New helper function.
383         (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
384         bti enable type.
385         (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
386         fixed macros.
387         (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
388         (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
389         to plt stubs instead of fixed ones and update filling them according
390         to the need for bti.
391         (elfNN_aarch64_init_small_plt0_entry): Likewise.
392         (elfNN_aarch64_finish_dynamic_sections): Likewise.
393         (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
394         (elfNN_aarch64_plt_sym_val): Update size accordingly.
395         (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
396         is set.
397         (bfd_elfNN_get_synthetic_symtab): Define.
398         (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
399         and mising BTI NOTE SECTION.
400
401
402 2019-03-13  Sudakshina Das  <sudi.das@arm.com>
403
404         * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
405         linker created inputs from merge.
406         * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
407         GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
408         (elfNN_aarch64_link_setup_gnu_properties): New.
409         (elfNN_aarch64_merge_gnu_properties): New.
410         (elf_backend_setup_gnu_properties): Define for AArch64.
411         (elf_backend_merge_gnu_properties): Likewise.
412         * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
413         (_bfd_aarch64_elf_parse_gnu_properties): Define.
414         (_bfd_aarch64_elf_merge_gnu_properties): Define.
415         * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
416         (_bfd_aarch64_elf_parse_gnu_properties): Declare.
417         (_bfd_aarch64_elf_merge_gnu_properties): Declare.
418         (elf_backend_parse_gnu_properties): Define for AArch64.
419
420 2019-03-13  H.J. Lu  <hongjiu.lu@intel.com>
421
422         PR ld/24322
423         * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
424         merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
425
426 2019-03-12  Alan Modra  <amodra@gmail.com>
427
428         * coffcode.h (buy_and_read): Delete unnecessary forward decl.  Add
429         nmemb parameter.  Use bfd_alloc2.
430         (coff_slurp_line_table): Use bfd_alloc2.  Update buy_and_read calls.
431         Delete assertion.
432         (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
433         (coff_slurp_reloc_table): Use bfd_alloc2.  Update buy_and_read calls.
434         * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
435         doesn't overflow.
436         * elf.c (bfd_section_from_shdr): Use bfd_zalloc2.  Style fix.
437         (assign_section_numbers): Style fix.
438         (swap_out_syms): Use bfd_malloc2.
439         (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
440         overflow.
441         (_bfd_elf_make_empty_symbol): Style fix.
442         (elfobj_grok_stapsdt_note_1): Formatting.
443         * elfcode.h (elf_object_p): Use bfd_alloc2.
444         (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
445         (elf_slurp_symbol_table): Use bfd_zalloc2.
446         (elf_slurp_reloc_table): Use bfd_alloc2.
447         (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
448         * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
449         size calculation doesn't overflow.
450         (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
451         * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
452         * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
453
454 2019-03-08  Alan Modra  <amodra@gmail.com>
455
456         PR 24311
457         * merge.c (merge_strings): Return secinfo.  Don't pad section
458         to alignment here.
459         (_bfd_merge_sections): Pad section to alignment here, if input
460         sections contributing to merged output all pad to alignment.
461         Formatting.
462
463 2019-03-06  Nick Clifton  <nickc@redhat.com>
464
465         * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
466         table pointer.
467         * coffgen.c (coff_find_nearest_line_with_names): Do not call
468         _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
469
470 2019-03-01  Andreas Krebbel  <krebbel@linux.ibm.com>
471
472         This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
473         2019-01-14  Maamoun Tarsha  <maamountk@hotmail.com>
474
475         PR 20113
476         * elf32-s390.c (allocate_dynrelocs): Update comment.
477
478 2019-02-28  Tamar Christina  <tamar.christina@arm.com>
479
480         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
481
482 2019-02-28  Nick Clifton  <nickc@redhat.com>
483
484         PR 24273
485         * elf.c (bfd_elf_string_from_elf_section): Check for a string
486         section that is not NUL terminated.
487
488 2019-02-27  H.J. Lu  <hongjiu.lu@intel.com>
489
490         PR ld/24276
491         * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
492         by linker when checking copy reloc on protected symbol.
493
494 2019-02-24  Alan Modra  <amodra@gmail.com>
495
496         PR 24144
497         * pdp11.c (set_section_contents): Revert 2015-02-24 change.
498
499 2019-02-20  Eric Tsai  <erictsai@cadence.com>
500
501         * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
502         sections between the call site and call destination and adjust
503         call distance by the largest alignment.
504
505 2019-02-20  Alan Hayward  <alan.hayward@arm.com>
506
507         * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
508         * elf.c (elfcore_grok_aarch_pauth): New function.
509         (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
510         (elfcore_write_aarch_pauth): New function.
511         (elfcore_write_register_note): Check for AArch64 pauth section.
512
513 2019-02-20  Alan Modra  <amodra@gmail.com>
514
515         PR 24225
516         * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
517         return value.
518
519 2019-02-20  Michael Roitzsch  <reactorcontrol@icloud.com>
520
521         * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
522         Darwin hosts, not just or1k.
523         * configure: Regenerate.
524
525 2019-02-20  Alan Modra  <amodra@gmail.com>
526
527         PR 24236
528         * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
529         sentinel NUL to string buffer nearer to loop where it is used.
530         Don't go past sentinel when scanning strings, and don't write
531         NUL again.
532         * archive.c (do_slurp_coff_armap): Simplify string handling to
533         archive64.c style.
534
535 2019-02-19  Alan Modra  <amodra@gmail.com>
536
537         PR 24235
538         * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
539         attempting to prevent read past end of section.
540
541 2019-02-18  Alan Modra  <amodra@gmail.com>
542
543         PR 24225
544         * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
545         PRIx64 to generate warning messages.  Print local sym names too.
546
547 2019-02-09  Vineet Gupta  <vgupta@synopsys.com>
548
549         * elf32-arc (INIT_SYM_STRING): Delete.
550         (FINI_SYM_STRING): Likewise.
551         (init_str): Likewise.
552         (fini_str): Likewise.
553
554 2019-02-08  Alan Modra  <amodra@gmail.com>
555
556         * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
557         for bss-plt" warning to make it an error.
558
559 2019-02-07  Eric Botcazou  <ebotcazou@adacore.com>
560
561         PR ld/18841
562         * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
563         reloc_class_ifunc for ifunc symbols.
564         * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
565
566 2019-02-07  Eric Botcazou  <ebotcazou@adacore.com>
567
568         * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
569         <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
570
571 2019-02-07  Nick Clifton  <nickc@redhat.com>
572
573         * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
574         into the definitely obsolete list.
575
576 2019-02-05  H.J. Lu  <hongjiu.lu@intel.com>
577
578         PR ld/24151
579         * elf64-x86-64.c (elf_x86_64_need_pic): Check
580         SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
581         (elf_x86_64_relocate_section): Move PIC check for PC-relative
582         relocations to ...
583         (elf_x86_64_check_relocs): Here.
584         (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
585         to check if a symbol is defined in a non-shared object.
586         * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
587
588 2019-01-21  Sergio Durigan Junior  <sergiodj@redhat.com>
589
590         * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
591         of 'labs' (and fix GCC warning).
592
593 2019-01-25  Nick Clifton  <nickc@redhat.com>
594
595         * po/ru.po: Updated Russian translation.
596
597 2019-01-23  Nick Clifton  <nickc@redhat.com>
598
599         * po/fr.po: Updated French translation.
600
601 2019-01-21  Nick Clifton  <nickc@redhat.com>
602
603         * po/pt.po: Updated Portuguese translation.
604         * po/uk.po: Updated Ukranian translation.
605
606 2019-01-21  Yuri Chornoivan  <yurchor@ukr.net>
607
608         PR 24108
609         * elf32-nds32.c (nds32_relocate_section): Add space between words
610         in error message.
611         * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
612         error message.
613         (riscv_i_or_e_p): Likewise.
614         (riscv_merge_arch_attr_info): Likewise.
615
616 2019-01-19  Nick Clifton  <nickc@redhat.com>
617
618         * version.m4: Reset to 2.32.51
619         * configure: Regenerate.
620         * po/bfd.pot: Regenerate.
621
622 2018-06-24  Nick Clifton  <nickc@redhat.com>
623
624         2.32 branch created.
625
626 2019-01-16  Kito Cheng  <kito@andestech.com>
627
628         * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
629         for OBJ_ATTR_PROC.
630
631 2019-01-16  Kito Cheng  <kito@andestech.com>
632             Nelson Chu  <nelson@andestech.com>
633
634         * elfnn-riscv.c (in_subsets): New.
635         (out_subsets): Likewise.
636         (merged_subsets): Likewise.
637         (riscv_std_ext_p): Likewise.
638         (riscv_non_std_ext_p): Likewise.
639         (riscv_std_sv_ext_p): Likewise.
640         (riscv_non_std_sv_ext_p): Likewise.
641         (riscv_version_mismatch): Likewise.
642         (riscv_i_or_e_p): Likewise.
643         (riscv_merge_std_ext): Likewise.
644         (riscv_merge_non_std_and_sv_ext): Likewise.
645         (riscv_merge_arch_attr_info): Likewise.
646         (riscv_merge_attributes): Likewise.
647         (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
648
649         * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
650         (elf_backend_obj_attrs_vendor): Define.
651         (elf_backend_obj_attrs_section_type): Likewise.
652         (elf_backend_obj_attrs_section): Likewise.
653         (elf_backend_obj_attrs_arg_type): Define as
654         riscv_elf_obj_attrs_arg_type.
655         * elfxx-riscv.c (riscv_estimate_digit): New.
656         (riscv_estimate_arch_strlen1): Likewise.
657         (riscv_estimate_arch_strlen): Likewise.
658         (riscv_arch_str1): Likewise.
659         (riscv_arch_str): Likewise.
660         * elfxx-riscv.h (riscv_arch_str): Declare.
661
662 2019-01-14  John Darrington <john@darrington.wattle.id.au>
663
664         * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
665         * libbfd.h: regen.
666         * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
667         source field.  (md_apply_fix): Apply final fix
668         to BFD_RELOC_S12Z_OPR.
669         * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
670
671 2019-01-14  Maamoun Tarsha  <maamountk@hotmail.com>
672
673         PR 20113
674         * elf32-s390.c (allocate_dynrelocs): Update comment.
675
676 2019-01-09  Andrew Paprocki  <andrew@ishiboo.com>
677
678         * warning.m4: Adjust egrep pattern for non-GNU compilers.
679         * configure: Regenerate.
680
681 2019-01-08  Alan Modra  <amodra@gmail.com>
682
683         PR 23699
684         PR 24065
685         * ihex.c (ihex_write_object_contents): Properly check 32-bit
686         address range.
687
688 2019-01-05  Yoshinori Sato <ysato@users.sourceforge.jp>
689
690         * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
691         * bfd/bfd-in2.h: Regenerate.
692         * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
693         * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
694
695 2019-01-04  Lifang Xia  <lifang_xia@c-sky.com>
696
697         * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
698         default target, little endian target is more suitable.
699
700 2019-01-04  Alan Modra  <amodra@gmail.com>
701
702         PR 24061
703         PR 21786
704         * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
705         adjust all callers.
706         (EQ_VALUE_IN_FIELD): Likewise.
707         * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
708
709 2019-01-01  Alan Modra  <amodra@gmail.com>
710
711         Update year range in copyright notice of all files.
712
713 For older changes see ChangeLog-2018
714 \f
715 Copyright (C) 2019 Free Software Foundation, Inc.
716
717 Copying and distribution of this file, with or without modification,
718 are permitted in any medium without royalty provided the copyright
719 notice and this notice are preserved.
720
721 Local Variables:
722 mode: change-log
723 left-margin: 8
724 fill-column: 74
725 version-control: never
726 End: