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