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