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