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