PR27844, Unstable symbol name in objdump outputs
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2021-05-11 Alan Modra <amodra@gmail.com>
2
3 PR 27844
4 * pdp11.c (aout_get_external_symbols): Clear first four bytes of
5 strings array, not just the first byte.
6 * aoutx.h (aout_get_external_symbols): Likewise.
7
8 2021-05-10 H.J. Lu <hongjiu.lu@intel.com>
9
10 PR binutils/27839
11 * simple.c (bfd_simple_get_relocated_section_contents): Remove
12 strayed fprintf.
13
14 2021-05-10 Nick Clifton <nickc@redhat.com>
15
16 PR 27839
17 * simple.c (simple_dummy_add_to_set): New function.
18 (simple_dummy_constructor): New function.
19 (simple_dummy_multiple_common): New function.
20 (bfd_simple_get_relocated_section_contents): Zero out the
21 callbacks structure, and then set the add_to_set, constructor and
22 multiple_common fields.
23
24 2021-05-10 Dimitar Dimitrov <dimitar@dinux.eu>
25
26 * elf32-pru.c (elf_backend_can_gc_sections): Define as 1.
27
28 2021-05-08 Mike Frysinger <vapier@gentoo.org>
29
30 * doc/Makefile.am (html-local, bfd/index.html): New targets.
31 * doc/Makefile.in: Regenerate.
32
33 2021-05-08 Mike Frysinger <vapier@gentoo.org>
34
35 * doc/Makefile.am (AM_MAKEINFOFLAGS): Define.
36 * doc/Makefile.in: Regenerate.
37
38 2021-05-07 Clément Chigot <clement.chigot@atos.net>
39
40 * coff-rs6000.c (xcoff_dwsect_names): Add new DWARF
41 sections.
42 * coffgen.c (coff_pointerize_aux): Handle C_DWARF.
43 (coff_print_symbol): Likewise.
44 * libxcoff.h (XCOFF_DWSECT_NBR_NAMES): Update.
45
46 2021-05-07 Jan Beulich <jbeulich@suse.com>
47
48 * elf64-x86-64.c (x86_64_elf_howto_table): Set src_mask fields
49 to zero.
50
51 2021-05-07 Alan Modra <amodra@gmail.com>
52
53 * bfd-in2.h: Regenerate.
54 * libbfd.h: Regenerate.
55
56 2021-05-06 Stafford Horne <shorne@gmail.com>
57
58 PR 27746
59 * elf32-or1k.c (PLT_ENTRY_SIZE_LARGE, PLT_MAX_INSN_COUNT,
60 OR1K_ADD, OR1K_ORI): New macros to help with plt creation.
61 (elf_or1k_link_hash_table): New field plt_count.
62 (elf_or1k_link_hash_entry): New field plt_index.
63 (elf_or1k_plt_entry_size): New function.
64 (or1k_write_plt_entry): Update to support variable size PLTs.
65 (or1k_elf_finish_dynamic_sections): Use new or1k_write_plt_entry
66 API.
67 (or1k_elf_finish_dynamic_symbol): Update to write large PLTs
68 when needed.
69 (allocate_dynrelocs): Use elf_or1k_plt_entry_size to account for
70 PLT size.
71
72 2021-05-06 Stafford Horne <shorne@gmail.com>
73
74 PR 21464
75 * elf32-or1k.c (or1k_elf_relocate_section): Relax R_OR1K_GOT16
76 overflow check if we have R_OR1K_GOT_AHI16 followed by
77 R_OR1K_GOT16.
78
79 2021-05-06 Stafford Horne <shorne@gmail.com>
80
81 PR 21464
82 * bfd-in2.h: Add BFD_RELOC_OR1K_GOT_AHI16 relocation.
83 * elf32-or1k.c (or1k_elf_howto_table, or1k_reloc_map): Likewise.
84 (or1k_final_link_relocate, or1k_elf_relocate_section,
85 or1k_elf_check_relocs): Likewise.
86 * libbfd.h (bfd_reloc_code_real_names): Likewise.
87 * reloc.c: Likewise.
88
89 2021-05-06 Stafford Horne <shorne@gmail.com>
90
91 PR 27624
92 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Change
93 condition used to cleanup plt entries to cleanup forced local
94 entries.
95
96 2021-05-05 H.J. Lu <hongjiu.lu@intel.com>
97
98 PR ld/27825
99 * elflink.c (elf_link_output_symstrtab): Always append ".COUNT"
100 to local symbols.
101
102 2021-05-05 Alan Modra <amodra@gmail.com>
103
104 * vms-lib.c (vms_traverse_index): Account for vms_kbn size when
105 sanity checking keylen.
106
107 2021-05-04 Nick Clifton <nickc@redhat.com>
108
109 * libbfd.c (bfd_malloc): Provide some documenation. Treat a size
110 of 0 as 1.
111 (bfd_realloc): Likewise.
112 (bfd_zmalloc): Likewise.
113 (bfd_realloc_or_free): Provide some documentation. Treat a size
114 of 0 as a request to free.
115 * libbfd-in.h (bfd_realloc): Remove prototype.
116 (bfd_realloc_or_free): Remove prototype.
117 (bfd_zmalloc): Remove prototype.
118 * libbfd.h: Regenerate.
119
120 2021-05-03 Jan Beulich <jbeulich@suse.com>
121
122 * elf32-i386.c (elf_howto_table): Switch all 32-bit relocs to
123 complain_overflow_dont.
124 * elf64-x86-64.c (x86_64_elf_howto_table): Switch all 64-bit
125 relocs to complain_overflow_dont.
126
127 2021-05-03 Alan Modra <amodra@gmail.com>
128
129 * elf32-ppc.c (allocate_dynrelocs): Keep dyn_relocs for undefweak
130 symbols when -z dynamic-undefined-weak or when there are no
131 dynamic relocs in read-only sections and -z nodynamic-undefined-weak
132 is not given.
133 * elf64-ppc.c (allocate_dynrelocs): Likewise.
134
135 2021-05-03 Alan Modra <amodra@gmail.com>
136
137 * elf32-ppc.c (allocate_dynrelocs): Call ensure_undef_dynamic for
138 weak undefined symols that only appear on PLT relocs.
139 * elf64-ppc.c (allocate_dynrelocs): Likewise.
140
141 2021-05-03 Alan Modra <amodra@gmail.com>
142
143 PR 27755
144 * elf32-ppc.c (ppc_elf_inline_plt): Do increment rel in loop.
145
146 2021-05-03 Alan Modra <amodra@gmail.com>
147
148 * elf32-csky.c (is_mapping_symbol_name): New function.
149 (csky_elf_is_target_special_symbol): Likewise.
150 (csky_elf_maybe_function_sym): Likewise.
151 (bfd_elf32_bfd_is_target_special_symbol): Define.
152 (elf_backend_maybe_function_sym): Define.
153
154 2021-04-30 Nick Clifton <nickc@redhat.com>
155
156 PR 27801
157 * mach-o.c (bfd_mach_o_core_fetch_environment): Use bfd_get_32 to
158 read 32-bit value.
159
160 2021-04-30 Nick Clifton <nickc@redhat.com>
161
162 PR 27799
163 * elf32-xtensa.c (elf_xtensa_grok_prstatus): Check for core notes
164 that are too small.
165
166 2021-04-30 Nick Clifton <nickc@redhat.com>
167
168 PR 27797
169 * libbfd.c (bfd_realloc_or_free): Do not free a pointer than has
170 been realloc'ed to size 0.
171
172 2021-04-30 Nick Clifton <nickc@redhat.com>
173
174 PR 27795
175 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Check for invalid name
176 lengths.
177
178 2021-04-29 Nick Clifton <nickc@redhat.com>
179
180 PR 27793
181 * som.c (som_slurp_symbol_table): Assign symbols without any scope
182 to the undefined section.
183 (som_decode_symclass): Check for a missing symbol section.
184 * syms.c (bfd_decode_symclass): Likewise.
185
186 2021-04-29 Nick Clifton <nickc@redhat.com>
187
188 PR 27792
189 * som.c (som_slurp_string_table): Place a terminating NUL byte at
190 the end of the table.
191 (som_slurp_symbol_table): Check for an over-large offset into the
192 string string table.
193
194 2021-04-28 Nick Clifton <nickc@redhat.com>
195
196 * elf.c (_bfd_elf_maybe_function_sym): Do not accept annobin
197 symbols as potential function symbols.
198 * elfnn-aarch64.c (elfNN_aarch64_maybe_function_sym): Likewise.
199 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
200 * elf32-arm.c (elf32_arm_maybe_function_sym): Likewise.
201
202 2021-04-26 Mike Frysinger <vapier@gentoo.org>
203
204 * elf-bfd.h: Include stdlib.h.
205
206 2021-04-26 Jan Beulich <jbeulich@suse.com>
207
208 * elf32-i386.c (elf_howto_table): Switch R_386_PC16 to
209 complain_overflow_signed.
210 * elf64-x86-64.c (x86_64_elf_howto_table): Switch R_X86_64_PC16
211 to complain_overflow_signed.
212
213 2021-04-23 Eric Botcazou <ebotcazou@adacore.com>
214
215 * elf.c (special_sections_p): Add .persistent.bss.
216
217 2021-04-23 Jan Beulich <jbeulich@suse.com>
218
219 * elf32-i386.c (elf_howto_table): R_386_TLS_DESC_CALL has zero
220 size field.
221 * elf64-x86-64.c (x86_64_elf_howto_table): R_X86_64_TLSDESC_CALL
222 has zero size field.
223
224 2021-04-22 Clément Chigot <clement.chigot@atos.net>
225
226 * hash.c (struct bfd_strtab_hash): Remove xcoff field.
227 Add length_field_size field.
228 (_bfd_stringtab_init): Change prototype.
229 Adapt to new length_field_size.
230 (_bfd_xcoff_stringtab_init): Likewise.
231 (_bfd_stringtab_add): Likewise.
232 (_bfd_stringtab_emit): Likewise.
233 * libbfd-in.h (_bfd_xcoff_stringtab_init):
234 Change prototype.
235 * libbfd.h: Regenerate.
236 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create):
237 Call _bfd_xcoff_stringtab_init with isxcoff64 value.
238
239 2021-04-22 Clément Chigot <clement.chigot@atos.net>
240
241 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Add errors for
242 unsupported storage class or auxialiry entries.
243 Improve and adapt to new aux structures.
244 Add C_DWARF support.
245 (_bfd_xcoff_swap_aux_out): Likewise.
246 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Likewise.
247 (_bfd_xcoff64_swap_aux_out): Likewise.
248
249 2021-04-21 Eli Zaretskii <eliz@gnu.org>
250
251 PR 27760
252 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add display
253 of IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP,
254 IMAGE_FILE_NET_RUN_FROM_SWAP and IMAGE_FILE_UP_SYSTEM_ONLY flags.
255 Decode the contents of the DllCharacteristics field.
256
257 2021-04-21 Nick Clifton <nickc@redhat.com>
258
259 PR 27759
260 * srec.c (srec_read_section): Replace assertions with error
261 returns.
262
263 2021-04-20 Clément Chigot <clement.chigot@atos.net>
264
265 PR binutils/21700
266 * reloc.c (BFD_RELOC_PPC_NEG): New relocation.
267 * bfd-in2.h: Regenerate.
268 * libbfd.h: Regenerate.
269 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Add
270 BFD_RELOC_PPC_NEG handler.
271 (xcoff_reloc_type_neg): Correctly substract addend.
272 * coff64-rs6000.c (xcoff64_howto_table): Add R_NEG_32
273 howto.
274 (xcoff64_rtype2howto): Add handler for R_NEG_32.
275 (xcoff64_reloc_type_lookup): Add BFD_RELOC_PPC_NEG handler.
276 * xcofflink.c (xcoff_need_ldrel_p): Check output section
277 for R_POS-like relocations. New argument added.
278 (xcoff_mark): Adapt to new xcoff_need_ldrel_p argument.
279 (xcoff_link_input_bfd): Likewise.
280
281 2021-04-16 Alan Modra <amodra@gmail.com>
282
283 PR 27567
284 * coffcode.h (styp_to_sec_flags): Use an unsigned long styp_flags.
285 (coff_write_object_contents): Pass bfd to COFF_ENCODE_ALIGNMENT,
286 ignore alignment checks when return is false. Formatting.
287
288 2021-04-15 Nelson Chu <nelson.chu@sifive.com>
289
290 PR27584
291 * elfnn-riscv.c (riscv_elf_is_target_special_symbol): Added to
292 omit local and empty symbols since they usually generated to
293 mark the auipc instructions.
294
295 2021-04-15 Lifang Xia<lifang_xia@c-sky.com>
296
297 * elf32-csky.c (csky_elf_howto_table)
298 <R_CKCORE_PCREL_IMM16BY2>: Set special_function to
299 bfd_elf_generic_reloc.
300 <R_CKCORE_PCREL_IMM16BY4>: Likewise.
301 <R_CKCORE_PCREL_IMM10BY4>: Likewise.
302 <R_CKCORE_PCREL_IMM18BY2>: Likewise.
303 <R_CKCORE_PCREL_FLRW_IMM8BY4>: Likewise.
304
305 2021-04-14 H.J. Lu <hongjiu.lu@intel.com>
306
307 PR binutils/27708
308 * elf.c (assign_file_positions_for_non_load_sections): Set
309 p_memsz to p_filesz for the loadable PT_NOTE segment.
310
311 2021-04-14 Frederic Cambus <fred@statdns.com>
312
313 * elf.c (elfcore_grok_netbsd_note): Remove unneeded #ifdef
314 checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
315
316 2021-04-14 Alan Modra <amodra@gmail.com>
317
318 PR 27631
319 * elf32-metag.c (elf_metag_relocate_section): Don't use &hh->elf
320 when hh might be NULL, test for NULL first.
321
322 2021-04-14 Alan Modra <amodra@gmail.com>
323
324 PR 27630
325 * elf32-arm.c (elf32_arm_size_stubs): Don't use &hash->root when
326 hash might be NULL, cast instead.
327
328 2021-04-13 Clément Chigot <clement.chigot@atos.net>
329
330 * xcofflink.c (xcoff_link_check_ar_symbols): Update esym earlier.
331
332 2021-04-13 Nelson Chu <nelson.chu@sifive.com>
333
334 * elfnn-riscv.c (riscv_version_mismatch): Do not report the warning
335 when the version of input or output is RISCV_UNKNOWN_VERSION, since
336 the extension is added implicitly.
337 * elfxx-riscv.c: Updated the obsolete comments.
338 (RISCV_UNKNOWN_VERSION): Moved to elfxx-riscv.h.
339 * elfxx-riscv.h (RISCV_UNKNOWN_VERSION): Added.
340
341 2021-04-12 Alan Modra <amodra@gmail.com>
342
343 * elf-bfd.h (ENABLE_CHECKING): Define.
344 (elf_link_hash_lookup): Abort if wrong type of hash table.
345 * configure.ac (--enable-checking): Add support.
346 * config.in: Regenerate.
347 * configure: Regenerate.
348
349 2021-04-12 Alan Modra <amodra@gmail.com>
350
351 * elf-bfd.h (is_elf_hash_table): Convert macro to inline function.
352 (elf_link_hash_lookup, elf_link_hash_traverse): Likewise.
353 (elf_hash_table, elf_hash_table_id): Likewise.
354 * elf32-arm.c (elf32_arm_setup_section_lists): Delete redundant
355 is_elf_hash_table check.
356 * elf32-csky.c (elf32_csky_setup_section_lists): Likewise.
357 * elf32-hppa.c (clobber_millicode_symbols): Correct param types.
358 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
359 * elfnn-ia64.c (elfNN_ia64_global_dyn_info_free: Likewise.
360 (elfNN_ia64_global_dyn_sym_thunk: Likewise.
361 * elf64-ia64-vms.c (elf64_ia64_global_dyn_info_free): Likewise.
362 (elf64_ia64_global_dyn_sym_thunk): Likewise.
363 (elf64_vms_link_add_object_symbols): Pass base type of hash table
364 to is_elf_hash_table.
365 * elflink.c (_bfd_elf_dynamic_symbol_p): Likewise.
366 (_bfd_elf_symbol_refs_local_p, _bfd_elf_add_dynamic_entry): Likewise.
367 (_bfd_elf_strip_zero_sized_dynamic_sections): Likewise.
368 (_bfd_elf_link_check_relocs, elf_link_add_object_symbols): Likewise.
369 (bfd_elf_final_link): Likewise.
370 * elfnn-aarch64.c (elfNN_aarch64_setup_section_lists): Likewise.
371 * elf64-ppc.c (ppc64_elf_set_toc): Likewise. Use bfd_link_hash_lookup.
372
373 2021-04-12 Alan Modra <amodra@gmail.com>
374
375 * elf-bfd.h (struct elf_backend_data): Return bfd_link_hash_entry*
376 from elf_backend_archive_symbol_lookup.
377 (_bfd_elf_archive_symbol_lookup): Return bfd_link_hash_entry*.
378 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Likewise. Check
379 we have a ppc_hash_table before accessing ppc_link_hash_entry
380 fields.
381 * elflink.c (_bfd_elf_archive_symbol_lookup): Return
382 bfd_link_hash_entry*.
383 (elf_link_add_archive_symbols): Adjust to suit.
384
385 2021-04-12 Nelson Chu <nelson.chu@sifive.com>
386
387 * elfxx-riscv.c (riscv_parse_std_ext): Fixed the wrong versions of
388 i-ext when expanding g-ext.
389
390 2021-04-12 Nelson Chu <nelson.chu@sifive.com>
391
392 * elfxx-riscv.c (riscv_ext_dont_care_version): Removed.
393 (riscv_parse_add_subset): Always add the implicit extensions, even if
394 their versions are RISCV_UNKNOWN_VERSION.
395 (riscv_parse_std_ext): Delay to add i-ext as the implicit extension
396 in the riscv_parse_add_implicit_subsets. Besides, add g-ext as the
397 implicit extension after it has been expanded.
398 (riscv_parse_add_implicit_subsets): Updated.
399
400 2021-04-12 Nelson Chu <nelson.chu@sifive.com>
401
402 * elfxx-riscv.c (riscv_std_z_ext_strtab): Moved forward.
403 (riscv_std_s_ext_strtab): Likewise.
404 (riscv_std_h_ext_strtab): Likewise.
405 (riscv_std_zxm_ext_strtab): Added for the zxm prefix.
406 (enum riscv_prefix_ext_class): Moved forward and renamed from
407 riscv_isa_ext_class. Reorder them according to the parsing order,
408 since the enum values are used to check the orders in the
409 riscv_compare_subsets.
410 (struct riscv_parse_prefix_config): Moved forward and renamed from
411 riscv_parse_config_t. Also removed the ext_valid_p field, the
412 related functions are replaced by riscv_valid_prefixed_ext.
413 (parse_config): Moved forward and updated. The more letters of the
414 prefix string, the more forward it must be defined. Otherwise, we
415 will get the wrong mapping when using strncmp in riscv_get_prefix_class.
416 (riscv_get_prefix_class): Moved forward. Support to parse the
417 multi-letter prefix, like zxm.
418 (riscv_known_prefixed_ext): New function, check if the prefixed
419 extension is supported according to the right riscv_std_*_ext_strtab.
420 (riscv_valid_prefixed_ext): New function, used to replace the
421 riscv_ext_*_valid_p functions.
422 (riscv_init_ext_order): Do not set the values for prefix keywords
423 since they may have multiple letters for now.
424 (riscv_compare_subsets): Set the order values of prefix keywords
425 to negative numbers according to the riscv_prefix_ext_class.
426 (riscv_parse_std_ext): Call riscv_get_prefix_class to see if we
427 have parsed the prefixed extensions.
428 (riscv_parse_prefixed_ext): Updated and removed the parameter config.
429 Report error when the prefix is unknown.
430 (riscv_parse_subset): Do not parse the prefixed extensions according
431 to the orders in the parse_config. Remove the confused message and
432 let riscv_parse_prefixed_ext to report the details.
433 * elfxx-riscv.h (enum riscv_isa_ext_class): Moved to elfxx-riscv.c.
434 (riscv_get_prefix_class): Removed to static.
435
436 2021-04-08 Mike Frysinger <vapier@gentoo.org>
437
438 * configure.ac (ACX_BUGURL): Use https://.
439 * configure.com (COPY_TEXT): Likewise.
440 * configure: Regenerate.
441
442 2021-04-05 Alan Modra <amodra@gmail.com>
443
444 * configure.ac: Don't check for long long or long double type.
445 Don't check for alloca.h, limits.h, stddef.h, stdlib.h, string.h,
446 strings.h, time.h, wchar.h, wctype.h or sys/time.h. Don't check
447 for strtoull, free, malloc, realloc, getenv, strstr, snprintf,
448 vsnprintf, strlen or setitimer. Sort AC_CHECK_DECLS.
449 (AC_ISC_POSIX): Don't invoke.
450 (AC_HEADER_TIME, AC_HEADER_DIRENT, ACX_HEADER_STRING): Likewise.
451 * sysdep.h: Remove many HAVE_*_H checks and fallback declarations.
452 Do test HAVE_SYS_TYPES_H. Don't include sys/time.h. Reorder
453 header order as per automake AC_INCLUDES_DEFAULT.
454 * bfd-in.h: Include inttypes.h unconditionally.
455 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Assume long long and
456 long double are available.
457 (bfd_scan_vma): Assume long long and strtoull are available.
458 * elflink.c: Include limits.h unconditionally.
459 * elfnn-riscv.c: Likewise.
460 * wasm-module.c: Likewise.
461 * hpux-core.c: Include dirent.h unconditionally.
462 * trad-core.c: Likewise.
463 * hosts/x86-64linux.h: Include stdlib.h unconditionally.
464 * peXXigen.c: Remove HAVE_WCHAR_H and HAVE_WCTYPE_H checks.
465 * elf32-m68hc1x.c: Don't include alloca-conf.h.
466 * elf64-hppa.c: Likewise.
467 * som.c: Likewise.
468 * wasm-module.c: Likewise.
469 * xsym.c: Likewise.
470 * bfd-in2.h: Regenerate.
471 * config.in: Regenerate.
472 * configure: Regenerate.
473
474 2021-04-01 Tamar Christina <tamar.christina@arm.com>
475
476 PR ld/26659
477 * cofflink.c (_bfd_coff_generic_relocate_section): Ignore overflow.
478
479 2021-04-01 Martin Liska <mliska@suse.cz>
480
481 * ecoff.c (strneq): Remove strneq and use startswith.
482 (_bfd_ecoff_slurp_armap): Likewise.
483
484 2021-04-01 Martin Liska <mliska@suse.cz>
485
486 * elf-bfd.h (bfd_section_is_ctf): Use startswith function.
487 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
488 (elf_get_reloc_section): Likewise.
489 * elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
490 * elf32-m32r.c (m32r_elf_section_flags): Likewise.
491 * elf32-microblaze.c (microblaze_elf_size_dynamic_sections): Likewise.
492 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
493 (nds32_elf_relocate_section): Likewise.
494 (nds32_elf_action_discarded): Likewise.
495 (nds32_elf_check_relocs): Likewise.
496 (nds32_elf_section_flags): Likewise.
497 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
498 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
499 * elf32-rx.c (rx_table_find): Likewise.
500 (rx_table_map): Likewise.
501 * elf32-spu.c (spu_elf_backend_symbol_processing): Likewise.
502 (spu_elf_find_overlays): Likewise.
503 (needs_ovl_stub): Likewise.
504 (allocate_spuear_stubs): Likewise.
505 (build_spuear_stubs): Likewise.
506 (mark_overlay_section): Likewise.
507 (spu_elf_auto_overlay): Likewise.
508 (spu_elf_output_symbol_hook): Likewise.
509 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
510 * elf32-xtensa.c (xtensa_property_section_name): Likewise.
511 * elf64-ppc.c (ppc64_elf_section_flags): Likewise.
512 (ppc64_elf_relocate_section): Likewise.
513 * elflink.c (resolve_section): Likewise.
514 (UNARY_OP): Likewise.
515 (BINARY_OP_HEAD): Likewise.
516 (elf_link_input_bfd): Likewise.
517 * elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise.
518 * elfxx-riscv.c (riscv_parse_subset): Likewise.
519 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
520 * opncls.c (get_build_id): Likewise.
521
522 2021-03-31 Alan Modra <amodra@gmail.com>
523
524 PR 27671
525 * bfd-in.h: Don't poison FALSE or TRUE.
526 * bfd-in2.h: Regenerate.
527
528 2021-03-31 Alan Modra <amodra@gmail.com>
529
530 * sysdep.h: POISON_BFD_BOOLEAN: Define.
531 * aix5ppc-core.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h,
532 * aoutx.h, * arc-got.h, * archive.c, * archive64.c, * archures.c,
533 * bfd-in.h, * bfd.c, * bfdwin.c, * binary.c, * cache.c,
534 * coff-alpha.c, * coff-arm.c, * coff-arm.h, * coff-bfd.c,
535 * coff-bfd.h, * coff-go32.c, * coff-i386.c, * coff-ia64.c,
536 * coff-mcore.c, * coff-mips.c, * coff-rs6000.c, * coff-sh.c,
537 * coff-stgo32.c, * coff-tic30.c, * coff-tic4x.c, * coff-tic54x.c,
538 * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c,
539 * coffcode.h, * coffgen.c, * cofflink.c, * compress.c,
540 * corefile.c, * cpu-aarch64.c, * cpu-aarch64.h, * cpu-alpha.c,
541 * cpu-arc.c, * cpu-arm.c, * cpu-arm.h, * cpu-avr.c, * cpu-bfin.c,
542 * cpu-bpf.c, * cpu-cr16.c, * cpu-cris.c, * cpu-crx.c,
543 * cpu-csky.c, * cpu-d10v.c, * cpu-d30v.c, * cpu-dlx.c,
544 * cpu-epiphany.c, * cpu-fr30.c, * cpu-frv.c, * cpu-ft32.c,
545 * cpu-h8300.c, * cpu-hppa.c, * cpu-i386.c, * cpu-ia64.c,
546 * cpu-iamcu.c, * cpu-ip2k.c, * cpu-iq2000.c, * cpu-k1om.c,
547 * cpu-l1om.c, * cpu-lm32.c, * cpu-m10200.c, * cpu-m10300.c,
548 * cpu-m32c.c, * cpu-m32r.c, * cpu-m68hc11.c, * cpu-m68hc12.c,
549 * cpu-m68k.c, * cpu-m9s12x.c, * cpu-m9s12xg.c, * cpu-mcore.c,
550 * cpu-mep.c, * cpu-metag.c, * cpu-microblaze.c, * cpu-mips.c,
551 * cpu-mmix.c, * cpu-moxie.c, * cpu-msp430.c, * cpu-mt.c,
552 * cpu-nds32.c, * cpu-nfp.c, * cpu-nios2.c, * cpu-ns32k.c,
553 * cpu-or1k.c, * cpu-pdp11.c, * cpu-pj.c, * cpu-powerpc.c,
554 * cpu-pru.c, * cpu-riscv.c, * cpu-rl78.c, * cpu-rs6000.c,
555 * cpu-rx.c, * cpu-s12z.c, * cpu-s390.c, * cpu-score.c,
556 * cpu-sh.c, * cpu-sparc.c, * cpu-spu.c, * cpu-tic30.c,
557 * cpu-tic4x.c, * cpu-tic54x.c, * cpu-tic6x.c, * cpu-tilegx.c,
558 * cpu-tilepro.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-vax.c,
559 * cpu-visium.c, * cpu-wasm32.c, * cpu-xc16x.c, * cpu-xgate.c,
560 * cpu-xstormy16.c, * cpu-xtensa.c, * cpu-z80.c, * cpu-z8k.c,
561 * dwarf1.c, * dwarf2.c, * ecoff-bfd.h, * ecoff.c, * ecofflink.c,
562 * elf-attrs.c, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h,
563 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-nacl.c,
564 * elf-nacl.h, * elf-properties.c, * elf-s390-common.c,
565 * elf-s390.h, * elf-strtab.c, * elf-vxworks.c, * elf-vxworks.h,
566 * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c,
567 * elf32-arm.h, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c,
568 * elf32-bfin.h, * elf32-cr16.c, * elf32-cr16.h, * elf32-cris.c,
569 * elf32-crx.c, * elf32-csky.c, * elf32-csky.h, * elf32-d10v.c,
570 * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
571 * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-gen.c,
572 * elf32-h8300.c, * elf32-hppa.c, * elf32-hppa.h, * elf32-i386.c,
573 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
574 * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
575 * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c,
576 * elf32-m68k.h, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
577 * elf32-metag.h, * elf32-microblaze.c, * elf32-mips.c,
578 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
579 * elf32-nios2.c, * elf32-nios2.h, * elf32-or1k.c, * elf32-pj.c,
580 * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c,
581 * elf32-rx.c, * elf32-s12z.c, * elf32-s390.c, * elf32-score.c,
582 * elf32-score.h, * elf32-score7.c, * elf32-sh-relocs.h,
583 * elf32-sh.c, * elf32-sparc.c, * elf32-spu.c, * elf32-spu.h,
584 * elf32-tic6x.c, * elf32-tic6x.h, * elf32-tilegx.c,
585 * elf32-tilepro.c, * elf32-v850.c, * elf32-v850.h,
586 * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
587 * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c,
588 * elf32-xtensa.c, * elf32-z80.c, * elf64-alpha.c, * elf64-bpf.c,
589 * elf64-gen.c, * elf64-hppa.c, * elf64-ia64-vms.c,
590 * elf64-mips.c, * elf64-mmix.c, * elf64-nfp.c, * elf64-ppc.c,
591 * elf64-ppc.h, * elf64-s390.c, * elf64-sparc.c,
592 * elf64-tilegx.c, * elf64-x86-64.c, * elfcode.h,
593 * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c,
594 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c,
595 * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h,
596 * elfxx-mips.c, * elfxx-mips.h, * elfxx-riscv.c, * elfxx-riscv.h,
597 * elfxx-sparc.c, * elfxx-sparc.h, * elfxx-target.h,
598 * elfxx-tilegx.c, * elfxx-tilegx.h, * elfxx-x86.c, * elfxx-x86.h,
599 * format.c, * genlink.h, * hash.c, * i386aout.c, * i386lynx.c,
600 * i386msdos.c, * ihex.c, * libaout.h, * libbfd-in.h,
601 * libbfd.c, * libcoff-in.h, * libecoff.h, * libpei.h,
602 * libxcoff.h, * linker.c, * mach-o-aarch64.c, * mach-o-arm.c,
603 * mach-o-i386.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h,
604 * merge.c, * mmo.c, * netbsd.h, * opncls.c, * pc532-mach.c,
605 * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-sh.c,
606 * pe-x86_64.c, * peXXigen.c, * pef.c, * pei-arm.c, * pei-i386.c,
607 * pei-ia64.c, * pei-mcore.c, * pei-sh.c, * pei-x86_64.c,
608 * peicode.h, * plugin.c, * plugin.h, * ppcboot.c, * reloc.c,
609 * reloc16.c, * rs6000-core.c, * section.c, * simple.c, * som.c,
610 * som.h, * srec.c, * stabs.c, * syms.c, * targets.c, * tekhex.c,
611 * verilog.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * vms.h,
612 * wasm-module.c, * xcofflink.c, * xcofflink.h, * xsym.c,
613 * xsym.h: Replace bfd_boolean with bool, FALSE with false, and
614 TRUE with true throughout.
615 * bfd-in2.h: Regenerate.
616 * libbfd.h: Regenerate.
617 * libcoff.h: Regenerate.
618
619 2021-03-31 Alan Modra <amodra@gmail.com>
620
621 * bfd-in.h: Include stdbool.h.
622 (bfd_boolean): Define as bool
623 * bfd-in2.h: Regenerate.
624
625 2021-03-31 Alan Modra <amodra@gmail.com>
626
627 * .gitignore: Delete bfd_stdint.h entry.
628 * Makefile.am (bfdinclude_HEADERS): Delete bfd_stdint.h.
629 (BUILD_HFILES, LOCAL_H_DEPS): Likewise.
630 * bfd-in.h: Include stdint.h in place of bfd_stdint.h.
631 * configure.ac: Don't invoke GCC_HEADER_STDINT.
632 * configure.com: Don't create bfd_stdint.h.
633 * Makefile.in: Regenerate.
634 * aclocal.m4: Regenerate.
635 * bfd-in2.h: Regenerate.
636 * config.in: Regenerate.
637 * configure: Regenerate.
638 * doc/Makefile.in: Regenerate.
639 * po/BLD-POTFILES.in: Regenerate.
640
641 2021-03-31 Alan Modra <amodra@gmail.com>
642
643 * bfd-in.h: Include string.h.
644 (LITMEMCPY, LITSTRCPY): Delete.
645 * bfd-in2.h: Regenerate.
646
647 2021-03-30 Alan Modra <amodra@gmail.com>
648
649 * elflink.c (elf_link_add_object_symbols): Don't set h->indx
650 unless is_elf_hash_table.
651
652 2021-03-29 Alan Modra <amodra@gmail.com>
653
654 * aoutx.h (aout_link_write_symbols): Don't cast boolean expression
655 to bfd_boolean.
656 * elf32-or1k.c (or1k_set_got_and_rela_sizes): Dont compare booleans
657 against FALSE.
658 * elf32-arc.c (name_for_global_symbol): Don't compare boolean to TRUE.
659 (is_reloc_PC_relative): Don't use "boolean_condition ? TRUE : FALSE".
660 (is_reloc_SDA_relative, is_reloc_for_GOT): Likewise.
661 (is_reloc_for_PLT, is_reloc_for_TLS): Likewise.
662 * elf32-arm.c (stm32l4xx_need_create_replacing_stub): Likewise.
663 * elf32-nds32.c (insert_nds32_elf_blank): Likewise.
664 * elf32-rx.c (rx_set_section_contents): Likewise.
665 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
666 * elfxx-mips.c (_bfd_mips_elf_ignore_undef_symbol): Likewise.
667 * mach-o.c (bfd_mach_o_read_command): Likewise.
668 * targets.c (bfd_get_target_info): Likewise.
669
670 2021-03-29 Alan Modra <amodra@gmail.com>
671
672 * coff-z80.c (z80_is_local_label_name): Return bfd_boolean.
673 * elf32-z80.c (z80_is_local_label_name): Likewise.
674 * elf32-spu.c (spu_elf_modify_headers): Likewise.
675 * elf32-nds32.h (struct elf_nds32_link_hash_table <hyper_relax>):
676 Change type to int.
677 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Correct test
678 for error return from vms_write_data_block.
679
680 2021-03-29 Alan Modra <amodra@gmail.com>
681
682 * elf32-i386.c (elf_i386_finish_local_dynamic_symbol): Return int.
683 * elf64-ia64-vms.c (elf64_ia64_local_dyn_info_free): Likewise.
684 (elf64_ia64_local_dyn_sym_thunk): Likewise.
685 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol): Likewise.
686 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_ifunc_dynrelocs),
687 (elfNN_aarch64_finish_local_dynamic_symbol): Likewise.
688 * elfnn-ia64.c (elfNN_ia64_local_dyn_info_free): Likewise.
689 (elfNN_ia64_local_dyn_sym_thunk): Likewise.
690 * elfnn-riscv.c (allocate_local_ifunc_dynrelocs): Likewise.
691 (riscv_pcrel_reloc_eq): Likewise.
692 (riscv_elf_finish_local_dynamic_symbol): Likewise.
693 * elfxx-sparc.c (allocate_local_dynrelocs): Likewise.
694 (finish_local_dynamic_symbol): Likewise.
695 * elfxx-x86.c (elf_x86_allocate_local_dynreloc): Likewise.
696 * elfxx-mips.c (mips_elf_resolve_got_page_ref): Likewise.
697 (mips_elf_count_got_symbols): Change return type to bfd_boolean.
698
699 2021-03-29 Alan Modra <amodra@gmail.com>
700
701 * elflink.c (elf_link_output_symstrtab): Make flinfo parameter
702 a void pointer.
703 (bfd_elf_final_link): Delete out_sym_func typedef and don't cast
704 elf_link_output_symstrtab when calling output_arch_syms and
705 output_arch_local_syms.
706 * elf-bfd.h (struct elf_backend_data <elf_backend_output_arch_syms,
707 elf_backend_output_arch_local_syms>): Change return type of func
708 arg to match elf_link_output_symstrtab.
709 * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Correct
710 return type.
711 * elf32-nds32.c (nds32_elf_output_symbol_hook): Correct return type.
712 (nds32_elf_output_arch_syms): Correct func return type.
713
714 2021-03-29 Alan Modra <amodra@gmail.com>
715
716 * elf-m10200.c (mn10200_elf_relocate_section): Return int.
717 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
718 * elf32-arc.c (elf_arc_relocate_section): Likewise.
719 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
720 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
721 * elf32-bfin.c (bfin_relocate_section): Likewise.
722 (bfinfdpic_relocate_section): Likewise.
723 * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
724 * elf32-cris.c (cris_elf_relocate_section): Likewise.
725 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
726 * elf32-csky.c (csky_elf_relocate_section): Likewise.
727 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
728 * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
729 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
730 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
731 * elf32-ft32.c (ft32_elf_relocate_section): Likewise.
732 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
733 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
734 * elf32-i386.c (elf_i386_relocate_section): Likewise.
735 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
736 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
737 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
738 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
739 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
740 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
741 * elf32-m68hc1x.h (elf32_m68hc11_relocate_section): Likewise.
742 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
743 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
744 * elf32-mep.c (mep_elf_relocate_section): Likewise.
745 * elf32-metag.c (elf_metag_relocate_section): Likewise.
746 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
747 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
748 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
749 * elf32-mt.c (mt_elf_relocate_section): Likewise.
750 * elf32-nds32.c (nds32_elf_relocate_section): Likewise.
751 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
752 * elf32-or1k.c (or1k_elf_relocate_section): Likewise.
753 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
754 * elf32-pru.c (pru_elf32_relocate_section): Likewise.
755 * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
756 * elf32-rx.c (rx_elf_relocate_section): Likewise.
757 * elf32-s390.c (elf_s390_relocate_section): Likewise.
758 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
759 (_bfd_score_elf_relocate_section): Likewise.
760 * elf32-score.h (s7_bfd_score_elf_relocate_section): Likewise.
761 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
762 * elf32-sh.c (sh_elf_relocate_section): Likewise.
763 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
764 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
765 * elf32-v850.c (v850_elf_relocate_section): Likewise.
766 * elf32-vax.c (elf_vax_relocate_section): Likewise.
767 * elf32-visium.c (visium_elf_relocate_section): Likewise.
768 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
769 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
770 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
771 * elf32-z80.c (z80_elf_relocate_section): Likewise.
772 * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
773 (elf64_alpha_relocate_section): Likewise.
774 * elf64-bpf.c (bpf_elf_relocate_section): Likewise.
775 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
776 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
777 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
778 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
779 * elf64-s390.c (elf_s390_relocate_section): Likewise.
780 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
781 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
782 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
783 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
784 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
785 * elfxx-mips.h (_bfd_mips_elf_relocate_section): Likewise.
786 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
787 * elfxx-sparc.h (_bfd_sparc_elf_relocate_section): Likewise.
788 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
789 * elfxx-tilegx.h (tilegx_elf_relocate_section): Likewise.
790
791 2021-03-26 Keith Seitz <keiths@redhat.com>
792
793 * elfcore.h (_bfd_elf_core_find_build_id): Seek file
794 offset of program headers after calling elf_read_notes.
795
796 2021-03-23 Jan Beulich <jbeulich@suse.com>
797
798 * dwarf2.c (read_indexed_string): Rename index to idx.
799
800 2021-03-22 Martin Liska <mliska@suse.cz>
801
802 * bfd-in.h (startswith): Add startswith function.
803 (CONST_STRNEQ): Remove.
804 * bfd-in2.h (startswith): Regenerate with make headers.
805 * archive.c (bfd_slurp_armap): Replace usage of CONST_STRNEQ with startswith.
806 (_bfd_slurp_extended_name_table): Likewise.
807 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
808 * bfd.c (bfd_get_sign_extend_vma): Likewise.
809 (bfd_convert_section_size): Likewise.
810 (bfd_convert_section_contents): Likewise.
811 * coff-stgo32.c (go32exe_create_stub): Likewise.
812 (go32exe_check_format): Likewise.
813 * coffcode.h (styp_to_sec_flags): Likewise.
814 (GNU_DEBUGALTLINK): Likewise.
815 * coffgen.c (_bfd_coff_section_already_linked): Likewise.
816 (coff_gc_sweep): Likewise.
817 (bfd_coff_gc_sections): Likewise.
818 * cofflink.c (coff_link_add_symbols): Likewise.
819 (process_embedded_commands): Likewise.
820 * compress.c (bfd_is_section_compressed_with_header): Likewise.
821 (bfd_init_section_decompress_status): Likewise.
822 * dwarf2.c (find_debug_info): Likewise.
823 (place_sections): Likewise.
824 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
825 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
826 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
827 (assign_section_numbers): Likewise.
828 (elfcore_grok_win32pstatus): Likewise.
829 * elf32-arm.c (cmse_scan): Likewise.
830 (elf32_arm_gc_mark_extra_sections): Likewise.
831 (elf32_arm_size_dynamic_sections): Likewise.
832 (is_arm_elf_unwind_section_name): Likewise.
833 * elf32-bfin.c (bfin_size_dynamic_sections): Likewise.
834 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
835 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
836 * elf32-csky.c (csky_elf_size_dynamic_sections): Likewise.
837 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
838 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
839 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
840 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
841 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
842 * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
843 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise.
844 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
845 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
846 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
847 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
848 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
849 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
850 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
851 * elf32-tic6x.c (is_tic6x_elf_unwind_section_name): Likewise.
852 (elf32_tic6x_size_dynamic_sections): Likewise.
853 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
854 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
855 (xtensa_is_insntable_section): Likewise.
856 (xtensa_is_littable_section): Likewise.
857 (xtensa_is_proptable_section): Likewise.
858 (xtensa_property_section_name): Likewise.
859 (xtensa_callback_required_dependence): Likewise.
860 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
861 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
862 * elf64-ia64-vms.c (is_unwind_section_name): Likewise.
863 (get_reloc_section): Likewise.
864 (elf64_ia64_size_dynamic_sections): Likewise.
865 (elf64_ia64_object_p): Likewise.
866 * elf64-mmix.c (mmix_elf_add_symbol_hook): Likewise.
867 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
868 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
869 * elflink.c (elf_link_add_object_symbols): Likewise.
870 (_bfd_elf_gc_mark_extra_sections): Likewise.
871 (bfd_elf_parse_eh_frame_entries): Likewise.
872 (_bfd_elf_section_already_linked): Likewise.
873 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
874 * elfnn-ia64.c (is_unwind_section_name): Likewise.
875 (elfNN_ia64_size_dynamic_sections): Likewise.
876 (elfNN_ia64_object_p): Likewise.
877 * elfxx-mips.c (FN_STUB_P): Likewise.
878 (CALL_STUB_P): Likewise.
879 (CALL_FP_STUB_P): Likewise.
880 (_bfd_mips_elf_section_from_shdr): Likewise.
881 (_bfd_mips_elf_fake_sections): Likewise.
882 (_bfd_mips_elf_size_dynamic_sections): Likewise.
883 (_bfd_mips_final_write_processing): Likewise.
884 (_bfd_mips_elf_final_link): Likewise.
885 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
886 * elfxx-x86.c (elf_i386_is_reloc_section): Likewise.
887 (elf_x86_64_is_reloc_section): Likewise.
888 * hpux-core.c (thread_section_p): Likewise.
889 * libcoff.h (bfd_pei_p): Likewise.
890 * linker.c (REAL): Likewise.
891 (unwrap_hash_lookup): Likewise.
892 (_bfd_generic_link_add_one_symbol): Likewise.
893 * mmo.c (mmo_internal_write_section): Likewise.
894 * osf-core.c (osf_core_core_file_p): Likewise.
895 * pef.c (bfd_pef_print_symbol): Likewise.
896 * pei-x86_64.c (pex64_print_all_pdata_sections): Likewise.
897 * som.c (som_slurp_symbol_table): Likewise.
898 (som_slurp_armap): Likewise.
899 * wasm-module.c (wasm_compute_custom_section_file_position): Likewise.
900
901 2021-03-22 Jan Beulich <jbeulich@suse.com>
902
903 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Add missing
904 language translation wrapping to _bfd_error_handler()
905 invocations.
906
907 2021-03-21 Alan Modra <amodra@gmail.com>
908
909 * bfd-in.h (startswith): New inline.
910 (CONST_STRNEQ): Use startswith.
911 * bfd-in2.h: Regenerate.
912
913 2021-03-20 Alan Modra <amodra@gmail.com>
914
915 PR 27590
916 * elf.c (_bfd_elf_make_section_from_shdr): Remove SHF_EXCLUDE
917 test for .gnu.debuglto*.
918
919 2021-03-18 H.J. Lu <hongjiu.lu@intel.com>
920
921 PR ld/27590
922 * elf.c (_bfd_elf_make_section_from_shdr): Treat
923 .gnu.debuglto_.debug_ section as debugging section unless it is
924 marked with SHF_EXCLUDE.
925 * elflink.c (elf_create_symbuf): Revert commit 994b2513281.
926 (bfd_elf_match_symbols_in_sections): Ignore section symbols when
927 matching non-debugging sections or linkonce section with comdat
928 section.
929
930 2021-03-18 H.J. Lu <hongjiu.lu@intel.com>
931
932 PR ld/27587
933 * dwarf2.c (read_attribute_value): Check version >= 3 for
934 DW_FORM_ref_addr.
935
936 2021-03-16 Nick Clifton <nickc@redhat.com>
937
938 * peXXigen.c (_bfd_XXi_swap_aux_out): Avoid potential buffer
939 overrun by using sizeof of the destination x_fname field as the
940 limit for a memcpy.
941
942 2021-03-16 Kuan-Lin Chen <kuanlinchentw@gmail.com>
943
944 * elfxx-riscv.c (riscv_std_z_ext_strtab): Add zba, zbb and zbc.
945
946 2021-03-12 Clément Chigot <clement.chigot@atos.net>
947
948 * reloc.c (BFD_RELOC_PPC_TLS_LE, BFD_RELOC_PPC_TLS_IE,
949 BFD_RELOC_PPC_TLS_M, BFD_RELOC_PPC_TLS_ML, BFD_RELOC_PPC64_TLS_GD,
950 BFD_RELOC_PPC64_TLS_LD, BFD_RELOC_PPC64_TLS_LE,
951 BFD_RELOC_PPC64_TLS_IE, BFD_RELOC_PPC64_TLS_M,
952 BFD_RELOC_PPC64_TLS_ML): New relocations.
953 * bfd-in2.h: Regenerate.
954 * libbfd.h: Regenerate.
955 * coff-rs6000.c (xcoff_calculate_relocation): Call
956 xcoff_reloc_type_tls for TLS relocations.
957 (xcoff_howto_table): Implement TLS relocations.
958 (_bfd_xcoff_reloc_type_lookup): Add cases TLS relocations.
959 (xcoff_reloc_type_tls): New function.
960 * coff64-rs6000.c (xcoff_calculate_relocation): Likewise.
961 (xcoff_howto_table): Likewise.
962 (_bfd_xcoff_reloc_type_lookup): Likewise.
963 * coffcode.h (sec_to_styp_flags): Handle TLS sections.
964 (styp_to_sec_flags): Likewise.
965 (coff_compute_section_file_positions): Avoid file offset
966 optimisation for .data when the previous section is .tdata.
967 (coff_write_object_contents): Handle TLS sections.
968 * coffswap.h (coff_swap_aouthdr_out): Add support for
969 new fields in aouthdr.
970 * libxcoff.h (xcoff_reloc_type_tls): Add prototype.
971 * xcofflink.c (xcoff_link_add_symbols): Handle XMC_UL.
972 (xcoff_need_ldrel_p): Add cases for TLS relocations.
973 (xcoff_create_ldrel): Add l_symndx for TLS sections.
974
975 2021-03-12 Clément Chigot <clement.chigot@atos.net>
976
977 * reloc.c (BFD_RELOC_PPC_TOC16_HI, BFD_RELOC_PPC_TOC16_LO):
978 New relocations.
979 * bfd-in2.h: Regenerate.
980 * libbfd.h: Regenerate.
981 * coff-rs6000.c (xcoff_calculate_relocation): Call
982 xcoff_reloc_type_toc for R_TOCU and R_TOCL.
983 (xcoff_howto_table): Remove src_mask for TOC relocations.
984 Add R_TOCU and R_TOCL howtos.
985 (_bfd_xcoff_reloc_type_lookup): Add cases for
986 BFD_RELOC_PPC_TOC16_HI and BFD_RELOC_PPC_TOC16_LO.
987 (xcoff_reloc_type_toc): Compute the whole offset.
988 Implement R_TOCU and R_TOCL.
989 * coff64-rs6000.c (xcoff64_calculate_relocation):
990 Likewise.
991 (xcoff64_howto_table): Likewise.
992 (xcoff64_reloc_type_lookup): Likewise.
993
994 2021-03-12 Clément Chigot <clement.chigot@atos.net>
995
996 * coff-rs6000.c (xcoff_calculate_relocation): Correct and
997 add new relocations.
998 (xcoff_howto_table): Likewise.
999 (xcoff_rtype2howto): Increase r_type maximum value.
1000 (xcoff_ppc_relocate_section): Reuse predefined HOWTOs instead
1001 of create a new one from scratch. Enable only some relocations
1002 to have a changing r_size.
1003 * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise.
1004 (xcoff64_howto_table): Likewise.
1005 (xcoff64_rtype2howto): Likewise.
1006 (xcoff64_ppc_relocate_section): Likewise.
1007 * libxcoff.h (XCOFF_MAX_CALCULATE_RELOCATION): Fix value.
1008
1009 2021-03-12 Clément Chigot <clement.chigot@atos.net>
1010
1011 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Move.
1012
1013 2021-03-12 Clément Chigot <clement.chigot@atos.net>
1014
1015 * coff64-rs6000.c (xcoff64_write_object_contents): Remove.
1016 * coffcode.h (coff_write_object_contents): Add bfd_mach_ppc_620
1017 support for o_cputype field. Avoid creating an empty a.out header
1018 for XCOFF64.
1019
1020 2021-03-12 Clément Chigot <clement.chigot@atos.net>
1021
1022 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): Add
1023 missing smclass.
1024
1025 2021-03-11 Nelson Chu <nelson.chu@sifive.com>
1026
1027 * elfnn-riscv.c (riscv_elf_link_hash_table): New boolean
1028 restart_relax, used to check if we need to run the whole
1029 relaxations from relax pass 0 to 2 again.
1030 (riscv_elf_link_hash_table_create): Init restart_relax to FALSE.
1031 (_bfd_riscv_relax_align): Remove obsolete sec_flg0 set.
1032 (_bfd_riscv_relax_delete): Set again to TRUE if we do delete the code.
1033 (bfd_elfNN_riscv_restart_relax_sections): New function. Called by
1034 after_allocation to check if we need to run the whole relaxations again.
1035 (_bfd_riscv_relax_section): We will only enter into the relax pass 3
1036 when the restart_relax is FALSE; At last set restart_relax to TRUE if
1037 again is TRUE, too.
1038 * elfxx-riscv.h (bfd_elf32_riscv_restart_relax_sections): Declaration.
1039 (bfd_elf64_riscv_restart_relax_sections): Likewise.
1040
1041 2021-03-10 Jan Beulich <jbeulich@suse.com>
1042
1043 * cofflink.c (_bfd_coff_write_global_sym): Range-check symbol
1044 offset.
1045
1046 2021-03-10 Alan Modra <amodra@gmail.com>
1047 Jan Beulich <jbeulich@suse.com>
1048
1049 * elf.c (bfd_elf_generic_reloc): Make references between debug
1050 sections use section relative values.
1051
1052 2021-03-09 Jan Beulich <jbeulich@suse.com>
1053
1054 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Diagnose out of range RVA.
1055
1056 2021-03-05 H.J. Lu <hongjiu.lu@intel.com>
1057
1058 PR ld/27425
1059 PR ld/27432
1060 * bfd.c (_bfd_get_link_info): New function.
1061 * elf-bfd.h (output_elf_obj_tdata): Add link_info.
1062 (elf_link_info): New.
1063 * libbfd-in.h (_bfd_get_link_info): New prototype.
1064 * coff-x86_64.c (coff_amd64_reloc): Also subtract __ImageBase for
1065 R_AMD64_IMAGEBASE when generating x86-64 ELF executable.
1066 * pe-x86_64.c: Include "coff/internal.h" and "libcoff.h".
1067 (pex64_link_add_symbols): New function.
1068 (coff_bfd_link_add_symbols): New macro.
1069 * libbfd.h: Regenerated.
1070
1071 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1072 Andrew Burgess <andrew.burgess@embecosm.com>
1073
1074 * elf-bfd.h (elfcore_write_riscv_csr): Declare.
1075 * elf.c (elfcore_grok_riscv_csr): New function.
1076 (elfcore_grok_note): Handle NT_RISCV_CSR.
1077 (elfcore_write_riscv_csr): New function.
1078 (elfcore_write_register_note): Handle '.reg-riscv-csr'.
1079
1080 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1081 Andrew Burgess <andrew.burgess@embecosm.com>
1082
1083 * elfnn-riscv.c (PRPSINFO_PR_FNAME_LENGTH): Define.
1084 (PRPSINFO_PR_PSARGS_LENGTH): Define.
1085 (riscv_write_core_note): New function.
1086 (riscv_elf_grok_psinfo): Make use of two new length defines.
1087 (elf_backend_write_core_note): Define.
1088
1089 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1090 Andrew Burgess <andrew.burgess@embecosm.com>
1091
1092 * elf-bfd.h (elfcore_write_gdb_tdesc): Declare new function.
1093 * elf.c (elfcore_grok_gdb_tdesc): New function.
1094 (elfcore_grok_note): Handle NT_GDB_TDESC.
1095 (elfcore_write_gdb_tdesc): New function.
1096 (elfcore_write_register_note): Handle NT_GDB_TDESC.
1097
1098 2021-03-05 Nick Clifton <nickc@redhat.com>
1099
1100 PR 27521
1101 * dwarf2.c (is_str_attr): Add DW_FORM_strx* forms.
1102 (read_indexed_string): Placeholder function.
1103 (read_attribute_value): Handle DW_FORM_strx* and DW_FORM_addrx*
1104 forms.
1105
1106 2021-03-05 Alan Modra <amodra@gmail.com>
1107
1108 * reloc.c (bfd_perform_relocation): Revert 2021-01-12 and
1109 2020-09-16 changes.
1110 * coff-x86_64.c (coff_amd64_reloc): Do more or less the same
1111 adjustments here instead. Separate pc-relative adjustments
1112 from symbol related adjustments. Tidy comments and formatting.
1113
1114 2021-03-04 Jan Beulich <jbeulich@suse.com>
1115
1116 * coffcode.h (sec_to_styp_flags): Don't set IMAGE_SCN_LNK_* in
1117 final PE images.
1118
1119 2021-03-04 Alan Modra <amodra@gmail.com>
1120
1121 * rs6000-core.c (rs6000coff_core_p): Correct prototype.
1122
1123 2021-03-03 Alan Modra <amodra@gmail.com>
1124
1125 PR 27500
1126 * elflink.c (_bfd_elf_gc_mark_rsec): Do special start/stop
1127 processing not when start/stop symbol section is unmarked but
1128 on first time a start/stop symbol is processed.
1129
1130 2021-03-03 Alan Modra <amodra@gmail.com>
1131
1132 * reloc.c: Include x86_64.h rather than internal.h.
1133
1134 2021-03-02 Nick Clifton <nickc@redhat.com>
1135
1136 PR 27484
1137 * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate
1138 function and variable tags and a second time to resolve their
1139 attributes.
1140
1141 2021-03-02 Nick Alcock <nick.alcock@oracle.com>
1142
1143 * elf-strtab.c (_bfd_elf_strtab_str): Skip strings with zero refcount.
1144
1145 2021-03-02 Alan Modra <amodra@gmail.com>
1146
1147 PR 27451
1148 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore synthesized
1149 linker defined start/stop symbols when start_stop_gc.
1150
1151 2021-03-02 Alan Modra <amodra@gmail.com>
1152
1153 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got
1154 indirect to pc-relative or toc-relative for undefined symbols.
1155
1156 2021-03-01 Alan Modra <amodra@gmail.com>
1157 Fangrui Song <maskray@google.com>
1158
1159 * elflink.c (_bfd_elf_gc_mark_rsec): Ignore synthesized linker
1160 defined start/stop symbols when start_stop_gc.
1161 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
1162 (bfd_elf_define_start_stop): Don't modify ldscript_def syms.
1163 * linker.c (bfd_generic_define_start_stop): Likewise.
1164
1165 2021-02-25 Alan Modra <amodra@gmail.com>
1166
1167 PR 27441
1168 * elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak.
1169 * elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and
1170 use when deciding an as-needed library should be loaded instead
1171 of using the binding of the library definition.
1172
1173 2021-02-24 Alan Modra <amodra@gmail.com>
1174
1175 PR 27459
1176 * coff-stgo32.c (go32exe_check_format): Sanity check size of
1177 header to avoid a buffer overflow.
1178
1179 2021-02-22 Alan Modra <amodra@gmail.com>
1180
1181 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16.
1182 * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
1183
1184 2021-02-19 Nelson Chu <nelson.chu@sifive.com>
1185
1186 PR 27158
1187 * elfnn-riscv.c (perform_relocation): Updated encoding macros.
1188 (_bfd_riscv_relax_call): Likewise.
1189 (_bfd_riscv_relax_lui): Likewise.
1190 * elfxx-riscv.c (howto_table): Likewise.
1191
1192 2021-02-18 Nelson Chu <nelson.chu@sifive.com>
1193
1194 * Makefile.am: Added cpu-riscv.h.
1195 * Makefile.in: Regenerated.
1196 * po/SRC-POTFILES.in: Regenerated.
1197 * cpu-riscv.h: Added to support spec versions controlling.
1198 Also added extern arrays and functions for cpu-riscv.c.
1199 (enum riscv_spec_class): Define all spec classes here uniformly.
1200 (struct riscv_spec): Added for all specs.
1201 (RISCV_GET_SPEC_CLASS): Added to reduce repeated code.
1202 (RISCV_GET_SPEC_NAME): Likewise.
1203 (RISCV_GET_ISA_SPEC_CLASS): Added to get ISA spec class.
1204 (RISCV_GET_PRIV_SPEC_CLASS): Added to get privileged spec class.
1205 (RISCV_GET_PRIV_SPEC_NAME): Added to get privileged spec name.
1206 * cpu-riscv.c (struct priv_spec_t): Replaced with struct riscv_spec.
1207 (riscv_get_priv_spec_class): Replaced with RISCV_GET_PRIV_SPEC_CLASS.
1208 (riscv_get_priv_spec_name): Replaced with RISCV_GET_PRIV_SPEC_NAME.
1209 (riscv_priv_specs): Moved below.
1210 (riscv_get_priv_spec_class_from_numbers): Likewise, updated.
1211 (riscv_isa_specs): Moved from include/opcode/riscv.h.
1212 * elfnn-riscv.c: Included cpu-riscv.h.
1213 (riscv_merge_attributes): Initialize in_priv_spec and out_priv_spec.
1214 * elfxx-riscv.c: Included cpu-riscv.h and opcode/riscv.h.
1215 (RISCV_UNKNOWN_VERSION): Moved from include/opcode/riscv.h.
1216 * elfxx-riscv.h: Removed extern functions to cpu-riscv.h.
1217
1218 2021-02-17 Alan Modra <amodra@gmail.com>
1219
1220 * wasm-module.c: Guard include of limits.h.
1221 (CHAR_BIT): Provide backup define.
1222 (wasm_read_leb128): Use CHAR_BIT to size "result" in bits.
1223 Correct signed overflow checking.
1224
1225 2021-02-17 Nelson Chu <nelson.chu@sifive.com>
1226
1227 PR 27200
1228 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Delay
1229 copying the elf flags from input BFD to output BFD, until we have
1230 checked if the input BFD has no code section or not. Also fix the
1231 problem that we only check the first section rather than the entire
1232 sections for input BFD.
1233
1234 2021-02-16 Alan Modra <amodra@gmail.com>
1235
1236 * libbfd.c (_bfd_read_unsigned_leb128): Avoid excessive shift.
1237 (_bfd_safe_read_leb128, _bfd_read_signed_leb128): Likewise.
1238
1239 2021-02-15 Jan Beulich <jbeulich@suse.com>
1240
1241 * doc/Makefile.am: Replace "cp -p" by "$(LN_S)".
1242 * doc/Makefile.in: Re-generate.
1243
1244 2021-02-15 Alan Modra <amodra@gmail.com>
1245
1246 * elf32-nds32.c (nds32_get_section_contents): Replace
1247 bfd_malloc_and_get_section with bfd_get_full_section_contents.
1248 (nds32_elf_relax_delete_blanks): Init contents.
1249 (nds32_elf_relax_section, nds32_relax_fp_as_gp): Likewise.
1250
1251 2021-02-15 Alan Modra <amodra@gmail.com>
1252
1253 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
1254 bfd_get_full_section_contents.
1255
1256 2021-02-14 Alan Modra <amodra@gmail.com>
1257
1258 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Apply
1259 all fixes to bfd_generic_get_relocated_section_contents since this
1260 function was split out.
1261
1262 2021-02-11 Alan Modra <amodra@gmail.com>
1263
1264 * config.bfd: Remove ia64 from obsolete list.
1265
1266 2021-02-11 Alan Modra <amodra@gmail.com>
1267
1268 PR ld/22269
1269 * elfnn-ia64.c: Revert 2017-10-14 git commit db41f6eb5234.
1270
1271 2021-02-11 Alan Modra <amodra@gmail.com>
1272
1273 PR 27294
1274 * elf32-avr.c (avr_elf32_load_records_from_section): Use
1275 bfd_malloc_and_get_section. Use bfd_byte* vars and remove then
1276 unnecessary casts.
1277
1278 2021-02-11 Alan Modra <amodra@gmail.com>
1279
1280 PR 27291
1281 * section.c (bfd_get_section_contents): Avoid possible overflow
1282 when range checking offset and count.
1283 (bfd_set_section_contents): Likewise.
1284
1285 2021-02-03 Nick Alcock <nick.alcock@oracle.com>
1286
1287 * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in
1288 favour of LIBINTL.
1289 * configure: Regenerated.
1290
1291 2021-02-09 Alan Modra <amodra@gmail.com>
1292
1293 * config.bfd (arm*-*-symbianelf*): Move from obsolete to removed.
1294 * configure.ac: Delete symbian entries.
1295 * elf-bfd.h (enum elf_target_os): Delete is_symbian.
1296 * elf32-arm.c: Remove symbian support. Formatting.
1297 * targets.c: Delete symbian entries.
1298 * configure: Regenerate.
1299
1300 2021-02-04 H.J. Lu <hongjiu.lu@intel.com>
1301
1302 PR ld/19609
1303 * elf64-x86-64.c (elf_x86_64_relocate_section): Provide more
1304 info when failed to convert GOTPCREL relocation.
1305
1306 2021-02-04 Nelson Chu <nelson.chu@sifive.com>
1307
1308 * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
1309
1310 2021-02-04 Alan Modra <amodra@gmail.com>
1311
1312 PR 27311
1313 * elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
1314 libraries for IR references on pass over libraries after LTO
1315 recompilation.
1316
1317 2021-02-03 Alan Modra <amodra@gmail.com>
1318
1319 PR 27311
1320 * elflink.c (_bfd_elf_add_default_symbol): Revert last two changes.
1321 (elf_link_add_object_symbols): Here too. Don't pull in as-needed
1322 libraries when H is an indirect symbol after calling
1323 _bfd_elf_add_default_symbol.
1324
1325 2021-02-03 Alan Modra <amodra@gmail.com>
1326
1327 PR 27311
1328 * elflink.c (_bfd_elf_add_default_symbol): Clear override when
1329 undecorated symbol will have a different version.
1330
1331 2021-02-02 Alan Modra <amodra@gmail.com>
1332
1333 PR 27311
1334 * elflink.c (_bfd_elf_add_default_symbol): Add override parameter.
1335 Use when handling default versioned symbol. Rename existing
1336 override variable to nondef_override and use for non-default
1337 versioned symbol.
1338 (elf_link_add_object_symbols): Adjust call to suit. Don't
1339 pull in as-needed libraries when override is set.
1340
1341 2021-02-01 Emery Hemingway <ehmry@posteo.net>
1342
1343 * config.bfd: Add *-*-genode* as a target for AArch64 and x86.
1344
1345 2021-02-01 Egor Vishnyakov <lenvampir@yandex.ru>
1346
1347 PR 27254
1348 * elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of
1349 offset for the R_RL78_RH_SADDR relocation.
1350
1351 2021-01-29 Alan Modra <amodra@gmail.com>
1352
1353 PR 27271
1354 * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault
1355 on symbols defined in absolute or other special sections.
1356
1357 2021-01-28 Alan Modra <amodra@gmail.com>
1358
1359 PR 27259
1360 * elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to
1361 prevent endless looping of linked-to sections.
1362
1363 2020-12-17 Mihails Strasuns <mihails.strasuns@intel.com>
1364
1365 * bfd-elf.h (elfcore_write_file_note): New function.
1366 * elf.c (elfcore_write_file_note): New function.
1367
1368 2021-01-26 Alan Modra <amodra@gmail.com>
1369
1370 * elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
1371
1372 2021-01-24 H.J. Lu <hongjiu.lu@intel.com>
1373
1374 PR binutils/27231
1375 * dwarf2.c (read_rnglists): Ignore empty range when parsing line
1376 number tables.
1377
1378 2021-01-23 H.J. Lu <hongjiu.lu@intel.com>
1379
1380 PR binutils/27231
1381 * dwarf2.c (read_rnglists): Advance rngs_ptr after
1382 _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
1383
1384 2021-01-20 Alan Modra <amodra@gmail.com>
1385
1386 * elf32-ppc.c: Delete outdated comment.
1387 (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
1388 * elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
1389
1390 2021-01-20 Alan Modra <amodra@gmail.com>
1391
1392 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume
1393 section symbols are present.
1394
1395 2021-01-19 Alan Modra <amodra@gmail.com>
1396
1397 * elf64-ppc.c (elf_hash_entry): New inline function. Use
1398 throughout to replace casts.
1399 (branch_reloc_hash_match): Remove const from params.
1400 (use_local_plt): New function.
1401 (allocate_dynrelocs, ppc_build_one_stub, ppc_size_one_stub),
1402 (build_global_entry_stubs_and_plt, ppc64_elf_relocate_section):
1403 Use use_local_plt.
1404 * elf32-ppc.c (use_local_plt): New function.
1405 (allocate_dynrelocs, ppc_elf_relocate_section),
1406 (write_global_sym_plt): Use use_local_plt.
1407
1408 2021-01-17 H.J. Lu <hongjiu.lu@intel.com>
1409
1410 PR ld/27193
1411 * elflink.c (elf_create_symbuf): Also ignore section symbols.
1412
1413 2021-01-16 H.J. Lu <hongjiu.lu@intel.com>
1414
1415 PR ld/23169
1416 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): Don't
1417 check pointer_equality_needed.
1418
1419 2021-01-15 H.J. Lu <hongjiu.lu@intel.com>
1420
1421 * elf-linker-x86.h (elf_linker_x86_params): Add
1422 report_relative_reloc.
1423 * elf32-i386.c (elf_i386_relocate_section): Call
1424 _bfd_x86_elf_link_report_relative_reloc to report relative
1425 relocations for -z report-relative-reloc.
1426 (elf_i386_finish_dynamic_symbol): Likewse.
1427 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewse.
1428 (elf_x86_64_finish_dynamic_symbol): Likewse.
1429 * elfxx-x86.c (_bfd_x86_elf_link_report_relative_reloc): New
1430 function.
1431 * elfxx-x86.h (_bfd_x86_elf_link_report_relative_reloc): New
1432 prototype.
1433
1434 2021-01-16 Alan Modra <amodra@gmail.com>
1435
1436 * compress.c (decompress_contents): Tidy inflateEnd result test.
1437
1438 2021-01-16 Alan Modra <amodra@gmail.com>
1439
1440 PR 26002
1441 * elflink.c (elf_link_output_extsym): Use version 1 in
1442 .gnu.version for undefined unversioned symbols.
1443
1444 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
1445
1446 * elfnn-riscv.c (riscv_relax_delete_bytes): Fixed the indent that
1447 caused the by previous commit accidentally.
1448
1449 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
1450
1451 * elfnn-riscv.c: Indent, labels and GNU coding standards tidy,
1452 also aligned the code.
1453
1454 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
1455
1456 * elfnn-riscv.c (riscv_merge_attributes): Fix typos of messages.
1457
1458 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
1459
1460 * elfnn-riscv.c: Comments tidy and improvement.
1461 * elfxx-riscv.c: Likewise.
1462 * elfxx-riscv.h: Likewise.
1463
1464 2021-01-14 H.J. Lu <hongjiu.lu@intel.com>
1465
1466 PR ld/26688
1467 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
1468 section for R_BFIN_FUNCDESC.
1469
1470 2021-01-14 Nick Clifton <nickc@redhat.com>
1471
1472 * elf.c (elfcore_grok_win32pstatus): Check for a note type of 0.
1473
1474 2021-01-13 Alan Modra <amodra@gmail.com>
1475
1476 * Makefile.in: Regenerate.
1477 * doc/Makefile.in: Regenerate.
1478
1479 2021-01-13 Alan Modra <amodra@gmail.com>
1480
1481 PR 27160
1482 * section.c (struct bfd_section): Remove pattern field.
1483 (BFD_FAKE_SECTION): Adjust to suit.
1484 * bfd-in2.h: Regenerate.
1485 * elflink.c (compare_link_order, elf_fixup_link_order): Delete.
1486 (bfd_elf_final_link): Don't call elf_fixup_link_order.
1487
1488 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
1489
1490 PR binutils/26792
1491 * configure.ac: Use GNU_MAKE_JOBSERVER.
1492 * aclocal.m4: Regenerated.
1493 * configure: Likewise.
1494
1495 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
1496
1497 PR ld/27171
1498 * reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and
1499 R_AMD64_DIR32 relocations for PE/x86-64 inputs.
1500
1501 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
1502
1503 PR ld/27173
1504 * configure: Regenerated.
1505
1506 2021-01-11 Nick Clifton <nickc@redhat.com>
1507
1508 * po/fr.po: Updated French translation.
1509 * po/pt.po: Updated Portuguese translation.
1510 * po/sr.po: Updated Serbian translation.
1511 * po/uk.po: Updated Ukranian translation.
1512
1513 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
1514
1515 * configure: Regenerated.
1516
1517 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
1518
1519 PR ld/27166
1520 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Handle
1521 -z lam-u48 and -z lam-u57.
1522
1523 2021-01-09 Nick Clifton <nickc@redhat.com>
1524
1525 * version.m4: Change to 2.36.50.
1526 * configure: Regenerate.
1527 * po/bfd.pot: Regenerate.
1528
1529 2021-01-09 Nick Clifton <nickc@redhat.com>
1530
1531 * 2.36 release branch crated.
1532
1533 2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
1534
1535 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set
1536 LAM_U57 when setting LAM_U48.
1537
1538 2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
1539
1540 PR ld/26256
1541 PR ld/27160
1542 * elflink.c (elf_fixup_link_order): Verify that fixing up
1543 SHF_LINK_ORDER doesn't increase the output section size.
1544
1545 2021-01-09 Alan Modra <amodra@gmail.com>
1546
1547 * configure: Regenerate.
1548
1549 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
1550
1551 * configure: Regenerate.
1552
1553 2021-01-07 H.J. Lu <hongjiu.lu@intel.com>
1554
1555 PR 27109
1556 * aix386-core.c (core_aix386_vec): Initialize
1557 keep_unused_section_symbol to TARGET_KEEP_UNUSED_SECTION_SYMBOLS.
1558 * aout-target.h (MY (vec)): Likewise.
1559 * binary.c (binary_vec): Likewise.
1560 * cisco-core.c (core_cisco_be_vec): Likewise.
1561 (core_cisco_le_vec): Likewise.
1562 * coff-alpha.c (alpha_ecoff_le_vec): Likewise.
1563 * coff-i386.c (TARGET_SYM): Likewise.
1564 (TARGET_SYM_BIG): Likewise.
1565 * coff-ia64.c (TARGET_SYM): Likewise.
1566 * coff-mips.c (mips_ecoff_le_vec): Likewise.
1567 (mips_ecoff_be_vec): Likewise.
1568 (mips_ecoff_bele_vec): Likewise.
1569 * coff-rs6000.c (rs6000_xcoff_vec): Likewise.
1570 (powerpc_xcoff_vec): Likewise.
1571 * coff-sh.c (sh_coff_small_vec): Likewise.
1572 (sh_coff_small_le_vec): Likewise.
1573 * coff-tic30.c (tic30_coff_vec): Likewise.
1574 * coff-tic54x.c (tic54x_coff0_vec): Likewise.
1575 (tic54x_coff0_beh_vec): Likewise.
1576 (tic54x_coff1_vec): Likewise.
1577 (tic54x_coff1_beh_vec): Likewise.
1578 (tic54x_coff2_vec): Likewise.
1579 (tic54x_coff2_beh_vec): Likewise.
1580 * coff-x86_64.c (TARGET_SYM): Likewise.
1581 (TARGET_SYM_BIG): Likewise.
1582 * coff64-rs6000.c (rs6000_xcoff64_vec): Likewise.
1583 (rs6000_xcoff64_aix_vec): Likewise.
1584 * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): Likewise.
1585 (CREATE_BIGHDR_COFF_TARGET_VEC): Likewise.
1586 (CREATE_LITTLE_COFF_TARGET_VEC): Likewise.
1587 * elfxx-target.h (TARGET_BIG_SYM): Likewise.
1588 (TARGET_LITTLE_SYM): Likewise.
1589 * hppabsd-core.c (core_hppabsd_vec): Likewise.
1590 * hpux-core.c (core_hpux_vec): Likewise.
1591 * i386msdos.c (i386_msdos_vec): Likewise.
1592 * ihex.c (ihex_vec): Likewise.
1593 * irix-core.c (core_irix_vec): Likewise.
1594 * mach-o-target.c (TARGET_NAME): Likewise.
1595 * mmo.c (mmix_mmo_vec): Likewise.
1596 * netbsd-core.c (core_netbsd_vec): Likewise.
1597 * osf-core.c (core_osf_vec): Likewise.
1598 * pdp11.c (MY (vec)): Likewise.
1599 * pef.c (pef_vec): Likewise.
1600 (pef_xlib_vec): Likewise.
1601 * plugin.c (plugin_vec): Likewise.
1602 * ppcboot.c (powerpc_boot_vec): Likewise.
1603 * ptrace-core.c (core_ptrace_vec): Likewise.
1604 * sco5-core.c (core_sco5_vec): Likewise.
1605 * som.c (hppa_som_vec): Likewise.
1606 * srec.c (srec_vec): Likewise.
1607 (symbolsrec_vec): Likewise.
1608 * tekhex.c (tekhex_vec): Likewise.
1609 * trad-core.c (core_trad_vec): Likewise.
1610 * verilog.c (verilog_vec): Likewise.
1611 * vms-alpha.c (alpha_vms_vec): Likewise.
1612 * vms-lib.c (alpha_vms_lib_txt_vec): Likewise.
1613 * wasm-module.c (wasm_vec): Likewise.
1614 * xsym.c (sym_vec): Likewise.
1615 * elf.c (ignore_section_sym): Return TRUE if BSF_SECTION_SYM_USED
1616 isn't set.
1617 (elf_map_symbols): Don't include ignored section symbols.
1618 * elfcode.h (elf_slurp_symbol_table): Also set
1619 BSF_SECTION_SYM_USED on STT_SECTION symbols.
1620 * elflink.c (bfd_elf_final_link): Generated section symbols only
1621 when emitting relocations or reqired.
1622 * elfxx-x86.h (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
1623 * syms.c (BSF_SECTION_SYM_USED): New.
1624 * targets.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
1625 (bfd_target): Add keep_unused_section_symbols.
1626 (bfd_keep_unused_section_symbols): New.
1627 * bfd-in2.h: Regenerated.
1628
1629 2021-01-07 Nick Clifton <nickc@redhat.com>
1630
1631 PR 25713
1632 * bfdio.c (_bfd_real_fopen): For Win32 convert relative paths to
1633 absolute paths and check to see if they are longer than MAX_PATH.
1634
1635 2021-01-07 Philipp Tomsich <prt@gnu.org>
1636
1637 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zihintpause.
1638
1639 2021-01-07 Claire Xenia Wolf <claire@symbioticeda.com>
1640 Jim Wilson <jimw@sifive.com>
1641 Andrew Waterman <andrew@sifive.com>
1642 Maxim Blinov <maxim.blinov@embecosm.com>
1643 Kito Cheng <kito.cheng@sifive.com>
1644 Nelson Chu <nelson.chu@sifive.com>
1645
1646 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zba, zbb and zbc.
1647
1648 2021-01-06 H.J. Lu <hongjiu.lu@intel.com>
1649
1650 * elf32-bfin.c (bfin_check_relocs): Check bfd_link_hash_indirect.
1651 (bfinfdpic_check_relocs): Likewise.
1652
1653 2021-01-06 Alan Modra <amodra@gmail.com>
1654
1655 * elf32-score.c (s3_bfd_score_info_to_howto): Report an error
1656 on unknown r_type.
1657 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
1658
1659 2021-01-06 Alan Modra <amodra@gmail.com>
1660
1661 * config.bfd (sparc-*-solaris2*): Add sparc_elf32_vec.
1662 (sparc64-*-solaris2*): Add sparc_elf64_vec and
1663 sparc_elf32_vec.
1664
1665 2021-01-06 Marcus Comstedt <marcus@mc.pp.se>
1666
1667 * config.bfd: Added targets riscv64be*-*-*, riscv32be*-*-* and
1668 riscvbe*-*-*. Also added riscv_elf[32|64]_be_vec.
1669 * configure.ac: Handle riscv_elf[32|64]_be_vec.
1670 * configure: Regenerate.
1671 * elfnn-riscv.c: Include <limits.h> and define CHAR_BIT for
1672 riscv_is_insn_reloc.
1673 (riscv_get_insn): RISC-V instructions are always little endian, but
1674 bfd_get may be used for big-endian, so add new riscv_get_insn to handle
1675 the insturctions.
1676 (riscv_put_insn): Likewsie.
1677 (riscv_is_insn_reloc): Check if we are relocaing an instruction.
1678 (perform_relocation): Call riscv_is_insn_reloc to decide if we should
1679 use riscv_[get|put]_insn or bfd_[get|put].
1680 (riscv_zero_pcrel_hi_reloc): Use riscv_[get|put]_insn, bfd_[get|put]l32
1681 or bfd_[get|put]l16 for code.
1682 (riscv_elf_relocate_section): Likewise.
1683 (riscv_elf_finish_dynamic_symbol): Likewise.
1684 (riscv_elf_finish_dynamic_sections): Likewise.
1685 (_bfd_riscv_relax_call): Likewise.
1686 (_bfd_riscv_relax_lui): Likewise.
1687 (_bfd_riscv_relax_align): Likewise.
1688 (_bfd_riscv_relax_pc): Likewise.
1689 (riscv_elf_object_p): Handled for big endian.
1690 (TARGET_BIG_SYM, TARGET_BIG_NAME): Defined.
1691 * targets.c: Add riscv_elf[32|64]_be_vec.
1692 (_bfd_target_vector): Likewise.
1693
1694 2021-01-05 Alan Modra <amodra@gmail.com>
1695
1696 * elflink.c (bfd_elf_link_record_dynamic_symbol): Handle no_export
1697 for relocatable executable.
1698
1699 2021-01-05 Alan Modra <amodra@gmail.com>
1700
1701 * vms-alpha.c (_bfd_vms_slurp_egsd): Read flags after size check.
1702
1703 2021-01-05 Nelson Chu <nelson.chu@sifive.com>
1704
1705 * elfnn-riscv.c (allocate_dynrelocs): When we are generating pde,
1706 make sure gp symbol is output as a dynamic symbol.
1707
1708 2021-01-04 H.J. Lu <hongjiu.lu@intel.com>
1709
1710 PR ld/26256
1711 * elflink.c (compare_link_order): Place unordered sections before
1712 ordered sections.
1713 (elf_fixup_link_order): Add a link info argument. Allow mixed
1714 ordered and unordered input sections for non-relocatable link.
1715 Sort the consecutive bfd_indirect_link_order sections with the
1716 same pattern. Change the offsets of the bfd_indirect_link_order
1717 sections only.
1718 (bfd_elf_final_link): Pass info to elf_fixup_link_order.
1719 * section.c (bfd_section): Add pattern.
1720 (BFD_FAKE_SECTION): Initialize pattern to NULL.
1721 * bfd-in2.h: Regenerated.
1722
1723 2021-01-04 Alexander Fedotov <alfedotov@gmail.com>
1724
1725 * elf32-arm.c (elf32_arm_print_private_bfd_data): Prefix hex value
1726 of private flags with 0x.
1727 * elfnn-aarch64.c (elfNN_aarch64_print_private_bfd_data): Likewise.
1728
1729 2021-01-04 Alan Modra <amodra@gmail.com>
1730
1731 PR 26822
1732 * elflink.c (elf_link_input_bfd): Use the file base name in
1733 linker generated STT_FILE symbols.
1734
1735 2021-01-04 Nelson Chu <nelson.chu@sifive.com>
1736
1737 * elfxx-riscv.c (riscv_compare_subsets): Removed static.
1738 * elfxx-riscv.h: Add declaration.
1739 * elfnn-riscv.c (riscv_merge_multi_letter_ext): Use
1740 riscv_compare_subsets to check the orders.
1741 (riscv_skip_prefix): Removed.
1742 (riscv_prefix_cmp): Removed.
1743
1744 2021-01-04 Alan Modra <amodra@gmail.com>
1745
1746 PR 26741
1747 * elfxx-riscv.c (riscv_parse_prefixed_ext): Free subset after
1748 calculating subset version length.
1749
1750 2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
1751
1752 * xcofflink.c: Correct spelling in comments.
1753
1754 2021-01-01 Alan Modra <amodra@gmail.com>
1755
1756 Update year range in copyright notice of all files.
1757
1758 For older changes see ChangeLog-2020
1759 \f
1760 Copyright (C) 2021 Free Software Foundation, Inc.
1761
1762 Copying and distribution of this file, with or without modification,
1763 are permitted in any medium without royalty provided the copyright
1764 notice and this notice are preserved.
1765
1766 Local Variables:
1767 mode: change-log
1768 left-margin: 8
1769 fill-column: 74
1770 version-control: never
1771 End:
This page took 0.063405 seconds and 5 git commands to generate.