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