1 2019-11-25 Christian Eggers <ceggers@gmx.de>
3 * section.c (struct bfd_section): New flag SEC_ELF_OCTETS.
4 * archures.c (bfd_octets_per_byte): New parameter sec.
5 If section is not NULL and SEC_ELF_OCTETS is set, one octet es
6 returned [ELF targets only].
7 * bfd.c (bfd_get_section_limit): Provide section parameter to
9 * bfd-in2.h: regenerate.
10 * binary.c (binary_set_section_contents): Move call to
11 bfd_octets_per_byte into section loop. Provide section parameter
12 to bfd_octets_per_byte.
13 * coff-arm.c (coff_arm_reloc): Provide section parameter
14 to bfd_octets_per_byte.
15 * coff-i386.c (coff_i386_reloc): likewise.
16 * coff-mips.c (mips_reflo_reloc): likewise.
17 * coff-x86_64.c (coff_amd64_reloc): likewise.
18 * cofflink.c (_bfd_coff_link_input_bfd): likewise.
19 (_bfd_coff_reloc_link_order): likewise.
20 * elf.c (_bfd_elf_section_offset): likewise.
21 (_bfd_elf_make_section_from_shdr): likewise.
22 Set SEC_ELF_OCTETS for sections with names .gnu.build.attributes,
23 .debug*, .zdebug* and .note.gnu*.
24 * elf32-msp430.c (rl78_sym_diff_handler): Provide section parameter
25 to bfd_octets_per_byte.
26 * elf32-nds.c (nds32_elf_get_relocated_section_contents): likewise.
27 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): likewise.
28 * elf32-pru.c (pru_elf32_do_ldi32_relocate): likewise.
29 * elf32-s12z.c (opru18_reloc): likewise.
30 * elf32-sh.c (sh_elf_reloc): likewise.
31 * elf32-spu.c (spu_elf_rel9): likewise.
32 * elf32-xtensa.c (bfd_elf_xtensa_reloc): likewise
33 * elf64-ppc.c (ppc64_elf_brtaken_reloc): likewise.
34 (ppc64_elf_addr16_ha_reloc): likewise.
35 (ppc64_elf_toc64_reloc): likewise.
36 * elflink.c (bfd_elf_final_link): likewise.
37 (bfd_elf_perform_complex_relocation): likewise.
38 (elf_fixup_link_order): likewise.
39 (elf_link_input_bfd): likewise.
40 (elf_link_sort_relocs): likewise.
41 (elf_reloc_link_order): likewise.
42 (resolve_section): likewise.
43 * linker.c (_bfd_generic_reloc_link_order): likewise.
44 (bfd_generic_define_common_symbol): likewise.
45 (default_data_link_order): likewise.
46 (default_indirect_link_order): likewise.
47 * srec.c (srec_set_section_contents): likewise.
48 (srec_write_section): likewise.
49 * syms.c (_bfd_stab_section_find_nearest_line): likewise.
50 * reloc.c (_bfd_final_link_relocate): likewise.
51 (bfd_generic_get_relocated_section_contents): likewise.
52 (bfd_install_relocation): likewise.
53 For section which have SEC_ELF_OCTETS set, multiply output_base
54 and output_offset with bfd_octets_per_byte.
55 (bfd_perform_relocation): likewise.
57 2019-11-21 Alan Modra <amodra@gmail.com>
59 * elf32-arm.c (elf32_arm_size_stubs): Exclude dynamic library
60 BFDs that have not been loaded.
62 2019-11-19 Alan Modra <amodra@gmail.com>
65 * coffgen.c (coff_find_nearest_line_with_names): Check that C_FILE
66 u.syment.n_value does point at another C_FILE sym and not into
67 some auxent that happens to look like a C_FILE. Properly check
68 for integer overflow and avoid possible pointer wrap-around.
69 Simplify pr17512 checks.
71 2019-11-19 Alan Modra <amodra@gmail.com>
74 * reloc.c (bfd_default_reloc_type_lookup): Don't BFD_FAIL.
75 * elf.c (_bfd_elf_validate_reloc): Don't segfault on NULL howto.
77 2019-11-18 Alan Modra <amodra@gmail.com>
79 * elf-bfd.h (struct elf_backend_data <elf_backend_init_file_header>):
80 Rename from elf_backend_post_process_headers.
81 (_bfd_elf_post_process_headers): Delete.
82 (_bfd_elf_init_file_header): Declare.
83 * elf.c (_bfd_elf_compute_section_file_positions): Call new function
84 in place of prep_headers and elf_backend_post_process_headers.
85 (_bfd_elf_init_file_header): Renamed from prep_headers with
86 updated args and made global. Delete dead code.
87 (_bfd_elf_post_process_headers): Delete.
88 * elf32-arm.c (elf32_arm_init_file_header): Rename from
89 elf32_arm_post_process_headers and call _bfd_elf_init_file_header.
91 (elf_backend_init_file_header): Define.
92 (elf_backend_post_process_headers): Don't define.
93 * elf32-i386.c (elf_i386_fbsd_init_file_header): Similarly.
94 * elf32-m68hc1x.c (elf32_m68hc11_init_file_header): Similarly.
95 * elf32-metag.c (elf_metag_init_file_header): Similarly.
96 * elf32-spu.c (spu_elf_init_file_header
97 * elf32-visium.c (visium_elf_init_file_header
98 * elf64-alpha.c (elf64_alpha_fbsd_init_file_header
99 * elf64-hppa.c (elf64_hppa_init_file_header
100 * elf64-ia64-vms.c (elf64_vms_init_file_header
101 * elfnn-aarch64.c (elfNN_aarch64_init_file_header
102 * elfnn-ia64.c (elfNN_hpux_init_file_header
103 * elfxx-mips.c (_bfd_mips_init_file_header
104 * elfxx-mips.h (_bfd_mips_post_process_headers): Delete.
105 (_bfd_mips_init_file_header): Declare.
106 (elf_backend_post_process_headers): Delete.
107 (elf_backend_init_file_header): Define.
108 * elfxx-target.h (elf_backend_post_process_headers): Delete.
109 (elf_backend_init_file_header): Define and use.
110 * elf32-m68hc12.c (elf_backend_init_file_header): Define.
111 (elf_backend_post_process_headers): Don't define.
112 * elf32-m68hc1x.h (elf32_m68hc11_post_process_headers): Delete.
113 (elf32_m68hc11_init_file_header): Declare.
114 * elf32-ppc.c (elf_backend_post_process_headers): Remove
117 2019-11-18 Alan Modra <amodra@gmail.com>
119 * elf-bfd.h (struct elf_backend_data <elf_backend_modify_headers>):
120 Rename from elf_backend_modify_program_headers.
121 (_bfd_elf_modify_headers): Declare.
122 * elf.c (assign_file_positions_except_relocs): Set
123 elf_program_header_size. Always call elf_backend_modify_headers.
124 Extract code modifying file header..
125 (_bfd_elf_modify_headers): ..to here. New function.
126 * elf32-arm.c (elf_backend_modify_headers): Renamed from
127 elf_backend_modify_program_headers.
128 * elf32-i386.c: Similarly.
129 * elf64-x86-64.c: Similarly.
130 * elfxx-target.h: Similarly. Default elf_backend_modify_headers
131 to _bfd_elf_modify_headers.
132 * elf-nacl.h (nacl_modify_headers): Rename from
133 nacl_modify_program_headers.
134 * elf-nacl.c (nacl_modify_headers): Rename from
135 nacl_modify_program_headers and call _bfd_elf_modify_headers.
136 * elf32-rx.c (elf32_rx_modify_headers): Similarly.
137 * elf32-spu.c (spu_elf_modify_headers): Similarly.
138 * elfnn-ia64.c (elfNN_ia64_modify_headers): Similarly.
139 * elf32-sh.c (elf_backend_modify_program_headers): Don't undef.
141 2019-11-18 Alan Modra <amodra@gmail.com>
144 * bfd.c (bfd_error_type): Add bfd_error_sorry.
145 (bfd_errmsgs): Likewise.
146 * elf.c (rewrite_elf_program_header): Don't abort on confused
147 lma/alignment. Replace bfd_error_bad_value with bfd_error_sorry.
148 (_bfd_elf_validate_reloc): Use bfd_error_sorry.
149 (_bfd_elf_final_write_processing): Likewise.
150 * bfd-in2.h: Regenerate.
152 2019-11-12 Jim Wilson <jimw@sifive.com>
155 * elfnn-riscv.c (_bfd_riscv_relax_call): Always add max_alignment to
156 foff. If sym_sec->output_section and sec->output_section are the same
157 and not *ABS* then set max_alignment to that section's alignment.
159 2019-11-07 Alan Modra <amodra@gmail.com>
161 * cpu-cr16c.c: Delete.
162 * elf32-cr16c.c: Delete.
168 * targets.c: Remove cr16c support.
173 * po/SRC-POTFILES.in: Regenerate.
175 2019-11-05 Tim Rühsen <tim.ruehsen@gmx.de>
177 * doc/chew.c (add_to_definition): Use correct type when
178 calculating size of array reallocation.
179 (nextword): Always initialise the word return parameter.
180 (compile): Check return value of nextword().
182 2019-10-30 Keith Seitz <keiths@redhat.com>
184 * elf-bfd.h (elf_backend_data) <elf_backend_core_find_build_id>:
186 (_bfd_elf32_core_find_build_id, _bfd_elf64_core_find_build_id):
188 (elf_read_notes): Add declaration.
189 * elf.c (elf_read_notes): Move elf-bfd.h.
190 (_bfd_elf_core_find_build_id): New function.
191 (bfd_section_from_phdr): Scan core file PT_LOAD segments for
192 build-id if none is known.
193 (elf_parse_notes): For core files, scan for notes.
194 * elfcore.h (elf_core_file_matches_executable_p): If both
195 BFDs have identical build-ids, then they match.
196 (_bfd_elf_core_find_build_id): New function.
197 * elfxx-target.h (elf_backend_core_find_build_id): Define.
198 (elfNN_bed): Add elf_backend_core_find_build_id.
200 2019-10-29 Andrew Eikum <aeikum@codeweavers.com>
202 * libcoff-in.h (struct pe_tdata): Add dos_message field.
203 * libcoff.h: Regenerate.
204 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Copy the
205 dos_message field rather than initialising it.
206 (_bfd_XX_bfd_copy_private_bfd_data_common): Copy the dos_message
208 * peicode.h (pe_mkobject): Initialise the dos_message field.
209 (pe_mkobject_hook): Copy the dos_message field.
210 (pe_bfd_object_p): Copy the dos_message field.
212 2019-10-25 Alan Modra <amodra@gmail.com>
215 * elf-nacl.c (nacl_modify_segment_map): Set no_sort_lma for all
217 * elf32-spu.c (spu_elf_modify_segment_map): Likewise on overlay
219 * elf.c (elf_sort_segments): New function.
220 (assign_file_positions_except_relocs): Use shortcuts to elfheader
221 and elf_tdata. Seek to e_phoff not sizeof_ehdr to write program
222 headers. Move PT_PHDR check..
223 (assign_file_positions_for_non_load_sections): ..and code setting
224 PT_PHDR p_vaddr and p_paddr, and code setting __ehdr_start value..
225 (assign_file_positions_for_load_sections): ..to here. Sort
226 PT_LOAD headers. Delete header_pad code. Use actual number of
227 headers rather than allocated in calculating size for program
228 headers. Don't assume program headers follow ELF file header.
229 Simplify pt_load_count code. Only set "off" for PT_LOAD or
231 (rewrite_elf_program_header): Set p_vaddr_offset for segments
232 that include file and program headers.
233 (copy_elf_program_header): Likewise, replacing header_size code.
235 2019-10-21 Alan Modra <amodra@gmail.com>
238 * archive.c (normalize): Return file unchanged when
239 BFD_ARCHIVE_FULL_PATH.
240 (_bfd_construct_extended_name_table): Pass abfd, the output
242 (_bfd_archive_bsd44_construct_extended_name_table): Likewise.
243 * bfd.c (struct bfd): Make flags a full flagword.
244 (BFD_ARCHIVE_FULL_PATH): Define.
245 * bfd-in2.h: Regenerate.
247 2019-10-20 John David Anglin <danglin@gcc.gnu.org>
249 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Provide 8-byte
250 minimum alignment for .plt section.
252 2019-10-19 John David Anglin <danglin@gcc.gnu.org>
254 * elf32-hppa.c: Revise import stub sequences.
255 (LONG_BRANCH_STUB_SIZE): Define.
256 (LONG_BRANCH_SHARED_STUB_SIZE): Define.
257 (IMPORT_STUB_SIZE): Define.
258 (IMPORT_SHARED_STUB_SIZE): Define.
259 (EXPORT_STUB_SIZE): Define.
260 (plt_stub): Revise to not use register %r22.
261 (LDO_R1_R22): Define.
262 (LDW_R22_R21): Define.
263 (LDW_R22_R19): Define.
264 (hppa_build_one_stub): Update stub generation and use new defines.
265 (hppa_size_one_stub): Likewise.
267 2019-10-17 Nelson Chu <nelson.chu@sifive.com>
269 * elfnn-riscv.c (riscv_elf_relocate_section): Report the error message
270 that user should recompile their code with `fPIC` when linking non-pic
271 code into shared library.
273 * elfnn-riscv.c (riscv_elf_relocate_section): Use asprintf to extend
274 the error message if needed, and then store the result into the
275 `msg_buf`. Finally, remember to free the unused `msg_buf`. All error
276 message for the dangerous relocation should be set before we call the
277 callback function. If we miss the error message since linker runs out
278 of memory, we should set the default error message for the error.
280 2019-10-16 Alan Modra <amodra@gmail.com>
283 * cpu-powerpc.c (bfd_arch_ppc_nop_fill): New function, use it
284 for all ppc arch info.
285 * linker.c (default_data_link_order): Pass info->big_endian to
286 arch_info->fill function.
288 2019-10-15 Alan Modra <amodra@gmail.com>
290 * elf32-m68hc1x.c (reloc_warning): Add printf attribute.
291 (elf32_m68hc11_relocate_section): Don't use a variable for format
292 strings. Delete some unnecessary xgettext:c-format comments.
294 2019-10-15 Alan Modra <amodra@gmail.com>
297 * elf32-arm.c (set_cmse_veneer_addr_from_implib): Use bfd_malloc
299 * elf32-m68hc1x.c (reloc_warning): New function.
300 (elf32_m68hc11_relocate_section): Use it here. Cast bfd_vma values
301 corresponding to %lx in format strings.
302 * elf32-nds32.c (nds32_insertion_sort): Use a stack temporary.
304 2019-10-15 Alan Modra <amodra@gmail.com>
307 * elf64-ppc.c (sfpr_define): Delete dead code that triggered a warning.
309 2019-10-15 Alan Modra <amodra@gmail.com>
311 * bfd.c (bfd_check_compression_header): Check for powers of two
314 2019-10-14 Alan Modra <amodra@gmail.com>
316 * syms.c (struct indexentry): Add idx field.
317 (cmpindexentry): Final sort on idx.
318 (_bfd_stab_section_find_nearest_line): Set idx.
320 2019-10-14 Alan Modra <amodra@gmail.com>
322 * dwarf2.c (struct lookup_funcinfo): Add idx field.
323 (compare_lookup_funcinfos): Perform final sort on idx.
324 (build_lookup_funcinfo_table): Set idx.
325 (compare_sequences): Perform final sort on num_lines.
326 (build_line_info_table): Set num_lines and line_info_lookup earlier.
327 (sort_line_sequences): Set num_lines for sort.
329 2019-10-14 Alan Modra <amodra@gmail.com>
331 * elflink.c (elf_sort_symbol): Sort on type and name as well.
332 (elf_link_add_object_symbols): Style fix.
334 2019-10-14 Alan Modra <amodra@gmail.com>
336 * elf.c (_bfd_elf_map_sections_to_segments): Init target_index
337 for sections about to be sorted.
338 (assign_file_positions_for_load_sections): Likewise.
339 (elf_sort_sections): Don't bother optimising both TOEND case.
340 * elflink.c (bfd_elf_final_link): Reset target_index.
342 2019-10-14 Alan Modra <amodra@gmail.com>
344 * elflink.c (elf_get_linked_section_vma): Delete.
345 (compare_link_order): Use elf_linked_to_section and sort by lma,
347 (elf_fixup_link_order): Use size_t variables where appropriate.
348 Make use of elf_linked_to_section. Formatting. Properly align
351 2019-10-14 Alan Modra <amodra@gmail.com>
353 * elf-strtab.c (strrevcmp): Comment.
354 * merge.c (strrevcmp): Likewise.
355 * elf64-ppc.c (compare_symbols): Correct final pointer comparison.
356 Comment on why comparing pointers ensures a stable sort.
357 * elflink.c (struct elf_symbol): Add void* to union.
358 (elf_sort_elf_symbol): Ensure a stable sort with pointer comparison.
359 (elf_sym_name_compare): Likewise.
360 (bfd_elf_match_symbols_in_sections): Style fix.
361 (elf_link_sort_cmp1): Comment.
363 2019-10-14 Alan Modra <amodra@gmail.com>
366 * elflink.c (elf_output_implib): Don't use xmalloc. Don't ignore
367 return value of bfd_alloc2.
368 * peXXigen.c (_bfd_XXi_write_codeview_record): Don't use xmalloc.
369 * pef.c (bfd_pef_print_symbol): Likewise. Don't ignore return
370 value of bfd_get_section_contents.
371 * som.c (som_write_space_strings): Don't use xmalloc.
372 (som_write_symbol_strings): Likewise.
374 2019-10-11 Max Filippov <jcmvbkbc@gmail.com>
376 * dwarf2.c (stash_maybe_enable_info_hash_tables): Only set
377 stash->info_hash_status = STASH_INFO_HASH_ON when
378 stash_maybe_update_info_hash_tables succeeds.
380 2019-10-09 Alan Modra <amodra@gmail.com>
383 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Catch overflow of
384 total_size calculation.
386 2019-10-08 Alan Modra <amodra@gmail.com>
389 * dwarf2.c (find_abstract_instance): Delete orig_info_ptr, add
390 recur_count. Error on recur_count reaching 100 rather than
391 info_ptr matching orig_info_ptr. Adjust calls.
393 2019-10-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
395 * elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Rename to..
396 (elf32_msp430_merge_msp430_attributes): Add support for merging
397 the GNU object attribute for data region.
399 2019-10-07 Alan Modra <amodra@gmail.com>
401 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Do allocate
402 space for local got non-tls relocs when PIE.
404 2019-10-07 Alan Modra <amodra@gmail.com>
406 * elflink.c (elf_fixup_link_order): Don't attempt to find
407 an elf_section for linker created bfd sections.
409 2019-10-07 Alan Modra <amodra@gmail.com>
411 * elf32-ppc.c (ppc_elf_tls_optimize): Don't process R_PPC_TLSLD
412 with non-local symbol. Don't double count __tls_get_addr calls
414 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
416 2019-10-07 Alan Modra <amodra@gmail.com>
418 * elf32-ppc.c (nomark_tls_get_addr): Rename from has_tls_get_addr_call
420 * elf64-ppc.c (nomark_tls_get_addr): Likewise.
422 2019-10-04 Alan Modra <amodra@gmail.com>
424 * elf64-ppc.c (ppc64_elf_check_relocs): Move initialisation of vars.
425 (ppc64_elf_tls_optimize): Correct is_local condition.
426 (allocate_got): Don't reserve dynamic relocations for any of the
427 tls got relocs in PIEs when the symbol is local.
428 (allocate_dynrelocs): Correct validity test for local sym using
430 (ppc64_elf_size_dynamic_sections): Don't reserve dynamic relocations
431 for any of the tls got relocs in PIEs.
432 (ppc64_elf_layout_multitoc): Likewise.
433 (ppc64_elf_relocate_section): Correct validity test for local sym
434 using tlsld_got slot. Don't emit dynamic relocations for any of
435 the tls got relocs in PIEs when the symbol is local.
436 * elf32-ppc.c (ppc_elf_tls_optimize): Correct is_local condition.
437 (got_relocs_needed): Delete.
438 (allocate_dynrelocs): Correct validity test for local sym using
439 tlsld_got slot. Don't reserve dynamic relocations for any of the
440 tls got relocs in PIEs when the symbol is local.
441 (ppc_elf_size_dynamic_sections): Don't reserve dynamic relocations
442 for any of the tls got relocs in PIEs.
443 (ppc_elf_relocate_section): Correct validity test for local sym
444 using tlsld_got slot. Don't emit dynamic relocations for any of
445 the tls got relocs in PIEs when the symbol is local.
447 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
451 * elf32-arm.c (elf32_arm_tls_transition): Use bfd_link_dll instead of
452 bfd_link_pic for TLS checks.
453 (elf32_arm_final_link_relocate): Likewise.
454 (allocate_dynrelocs_for_symbol): Likewise.
456 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
459 * elf32-arm.c (elf32_arm_final_link_relocate): Sign extend data.
461 2019-09-30 Nick Alcock <nick.alcock@oracle.com>
463 * elf-bfd.h (bfd_section_is_ctf): New inline function.
464 * elf.c (special_sections_c): Add ".ctf".
465 (assign_file_positions_for_non_load_sections): Note that
466 compressed debugging sections etc are not assigned here. Treat
467 CTF sections like SEC_ELF_COMPRESS sections when is_linker_output:
469 (assign_file_positions_except_relocs): Likewise.
470 (find_section_in_list): Note that debugging and CTF sections, as
471 well as reloc sections, are assigned later.
472 (_bfd_elf_assign_file_positions_for_non_load): CTF sections get
473 their size and contents updated.
474 (_bfd_elf_set_section_contents): Skip CTF sections: unlike
475 compressed sections, they have no uncompressed content to copy at
477 * elflink.c (elf_link_swap_symbols_out): Call the examine_strtab
478 callback right before the strtab is written out.
479 (bfd_elf_final_link): Don't cache the section contents of CTF
480 sections: they are not populated yet. Call the emit_ctf callback
481 right at the end, after all the symbols and strings are flushed
484 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
486 * elf-strtab.c (_bfd_elf_strtab_len): New.
487 (_bfd_elf_strtab_str): Likewise.
488 * bfd-elf.h: Declare them.
490 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
492 * elf-bfd.h (bfd_elf_get_str_section): Add.
493 * elf.c (bfd_elf_get_str_section): No longer static.
495 2019-09-26 Alan Modra <amodra@gmail.com>
498 * Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
499 * plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
500 ${bindir}/../lib/bfd-plugins if different.
501 * Makefile.in: Regenerate.
503 2019-09-23 Alan Modra <amodra@gmail.com>
505 * elf64-ppc.c (ppc64_elf_check_relocs): Use bfd_link_executable
506 in choosing between different actions for shared library and
507 non-shared library cases. Delete ELIMINATE_COPY_RELOCS test.
508 (dec_dynrel_count): Likewise. Account for ifunc special case.
509 (ppc64_elf_adjust_dynamic_symbol): Copy relocs are for executables,
511 (allocate_dynrelocs): Comment fixes. Delete ELIMINATE_COPY_RELOCS
514 2019-09-23 Alan Modra <amodra@gmail.com>
516 * Makefile.am (SOURCE_HFILES): Add many missing .h files.
517 * Makefile.in: Regenerate.
518 * po/SRC-POTFILES.in: Regenerate.
520 2019-09-23 Alan Modra <amodra@gmail.com>
522 * bfd-in.h (bfd_symbol, bfd_section_already_linked),
523 (bfd_elf_version_tree): Delete forward declarations.
524 Move other forward decls and remaining elf function decl later.
525 (bfd_section_already_linked_table_init),
526 (bfd_section_already_linked_table_free),
527 (_bfd_handle_already_linked, _bfd_nearby_section),
528 (_bfd_fix_excluded_sec_syms): Move to bfdlink.h.
530 2019-09-23 Alan Modra <amodra@gmail.com>
532 * bfd-in.h: Move ecoff function declarations..
533 * ecoff-bfd.h: ..to here, new file.
534 * ecoff.c: Include ecoff-bfd.h.
535 * ecofflink.c: Likewise.
536 * elf64-alpha.c: Likewise.
537 * elfxx-mips.c: Likewise.
538 * bfd-in2.h: Regenerate.
540 2019-09-23 Alan Modra <amodra@gmail.com>
542 * bfd-in.h (enum notice_asneeded_action): Move to bfdlink.h.
543 Move most other elf declarations..
544 * elf-bfd.h: ..to here.
545 * bfd-in2.h: Regenerate.
547 2019-09-23 Alan Modra <amodra@gmail.com>
549 * bfd-in.h: Move m68k function declaration..
550 * cpu-m68k.h: ..to here, new file..
551 * elf32-m68k.h: ..and here, new file.
552 * elf32-m68k.c: Include cpu-m68k.h and elf32-m68k.h.
553 * bfd-in2.h: Regenerate.
555 2019-09-23 Alan Modra <amodra@gmail.com>
557 * bfd-in.h: Move bfin function declaration..
558 * elf32-bfin.h: ..to here, new file.
559 * elf32-bfin.c: Include elf32-bfin.h.
560 * bfd-in2.h: Regenerate.
562 2019-09-23 Alan Modra <amodra@gmail.com>
564 * bfd-in.h: Move cr16 function declaration..
565 * elf32-cr16.h: ..to here, new file.
566 * elf32-cr16.c: Include elf32-cr16.h.
567 * bfd-in2.h: Regenerate.
569 2019-09-23 Alan Modra <amodra@gmail.com>
571 * bfd-in.h (bfd_sunos_get_needed_list),
572 (bfd_sunos_record_link_assignment),
573 (bfd_sunos_size_dynamic_sections),
574 (bfd_i386linux_size_dynamic_sections),
575 (bfd_sparclinux_size_dynamic_sections): Delete obsolete decls.
576 * bfd-in2.h: Regenerate.
578 2019-09-23 Alan Modra <amodra@gmail.com>
580 * bfd-in.h: Move xcoff function declarations..
581 * xcofflink.h: ..to here, new file.
582 * xcofflink.c: Include xcofflink.h.
583 * coff-rs6000.c (bfd_xcoff_ar_archive_set_magic): Delete unused func.
584 * bfd-in2.h: Regenerate.
586 2019-09-23 Alan Modra <amodra@gmail.com>
588 * bfd-in.h: Delete coff forward refs and move coff declaration..
589 * coff-bfd.h: ..to here.
590 * bfd-in2.h: Regenerate.
592 2019-09-23 Alan Modra <amodra@gmail.com>
594 * bfd-in.h: Move arm declaraions..
595 * cpu-arm.h: ..to here, new file..
596 * coff-arm.h: ..and here, new file..
597 * elf32-arm.h: ..and here, new file.
598 * cpu-arm.c: Include cpu-arm.h.
599 * coff-arm.c: Include cpu-arm.h and coff-arm.h.
600 * elf32-arm.c: Include cpu-arm.h and elf32-arm.h.
601 * pe-arm.c: Move function rename defines later.
602 * pe-arm-wince.c: Likewise and include sysdep.h and bfd.h early.
603 * bfd-in2.h: Regenerate.
605 2019-09-23 Alan Modra <amodra@gmail.com>
607 * bfd-in.h: Move tic6x function declaration..
608 * elf32-tic6x.h: ..to here.
609 * bfd-in2.h: Regenerate.
611 2019-09-23 Alan Modra <amodra@gmail.com>
613 * bfd-in.h: Move aarch64 declarations and defines..
614 * cpu-aarch64.h: ..to here, new file..
615 * elfxx-aarch64.h: ..and here.
616 * cpu-aarch64.c: Include cpu-aarch64.h.
617 * elfnn-aarch64.c: Likewise.
618 * bfd-in2.h: Regenerate.
620 2019-09-23 Alan Modra <amodra@gmail.com>
622 * bfd-in.h: Delete ticoff function declarations.
623 * coff-tic54x.c (bfd_ticoff_set_section_load_page),
624 (bfd_ticoff_get_section_load_page): Make static.
625 * bfd-in2.h: Regenerate.
627 2019-09-23 Alan Modra <amodra@gmail.com>
629 * bfd-in.h: Move h8300 function declaration to..
630 * cpu-h8300.h: ..here, new file.
631 * cpu-h8300.c: Include cpu-h8300.h.
632 * elf32-h8300.c: Likewise.
633 * bfd-in2.h: Regenerate.
635 2019-09-23 Alan Modra <amodra@gmail.com>
637 * bfd-in.h: Move ia64 function declarations..
638 * elfxx-ia64.h: ..to here.
639 * bfd-in2.h: Regenerate.
641 2019-09-23 Alan Modra <amodra@gmail.com>
643 * bfd-in.h: Move v850 function declarations..
644 * elf32-v850.h: ..to here, new file.
645 * elf32-v850.c: Include elf32-v850.h.
646 * bfd-in2.h: Regenerate.
648 2019-09-23 Alan Modra <amodra@gmail.com>
650 * bfd-in.h: Move mips function declaration to..
651 * elfxx-mips.h: ..here.
652 * bfd-in2.h: Regenerate.
654 2019-09-23 Alan Modra <amodra@gmail.com>
656 * bfd-in.h: Move csky function declarations to..
657 * elf32-csky.h: ..here, new file.
658 * elf32-csky.c: Include elf32-csky.h.
659 * bfd-in2.h: Regenerate.
661 2019-09-20 Nelson Chu <nelson.chu@sifive.com>
663 * elfnn-riscv.c (riscv_pcgp_hi_reloc): Add new field undefined_weak.
664 (riscv_record_pcgp_hi_reloc): New parameter undefined_weak.
665 Set undefined_weak field from it.
666 (relax_func_t): New parameter undefined_weak.
667 (_bfd_riscv_relax_call): New ignored parameter undefined_weak.
668 (_bfd_riscv_relax_tls_le): Likewise.
669 (_bfd_riscv_relax_align): Likewise.
670 (_bfd_riscv_relax_delete): Likewise.
671 (_bfd_riscv_relax_lui): New parameter undefined_weak. If true,
672 allow relaxing. For LO12* relocs, set rs1 to x0 when undefined_weak.
673 (_bfd_riscv_relax_pc): New parameter undefined_weak. For LO12* relocs,
674 set undefined_weak from hi_reloc. If true, allow relaxing. For LO12*
675 relocs, set rs1 to x0 when undefined_weak and change to non-pcrel
677 (_bfd_riscv_relax_section): New local undefined_weak. Set for
678 undef weak relocs that can be relaxed. Pass to relax_func call.
680 2019-09-20 Alan Modra <amodra@gmail.com>
682 * bfd-in.h (bfd_section_name, bfd_section_size, bfd_section_vma),
683 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
684 (bfd_section_userdata, bfd_is_com_section, discarded_section),
685 (bfd_get_section_limit_octets, bfd_get_section_limit): Delete macros.
686 * bfd.c (bfd_get_section_limit_octets, bfd_get_section_limit),
687 (bfd_section_list_remove, bfd_section_list_append),
688 (bfd_section_list_prepend, bfd_section_list_insert_after),
689 (bfd_section_list_insert_before, bfd_section_removed_from_list):
690 New inline functions.
691 * section.c (bfd_is_und_section, bfd_is_abs_section),
692 (bfd_is_ind_section, bfd_is_const_section, bfd_section_list_remove),
693 (bfd_section_list_append, bfd_section_list_prepend),
694 (bfd_section_list_insert_after, bfd_section_list_insert_before),
695 (bfd_section_removed_from_list): Delete macros.
696 (bfd_section_name, bfd_section_size, bfd_section_vma),
697 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
698 (bfd_section_userdata, bfd_is_com_section, bfd_is_und_section),
699 (bfd_is_abs_section, bfd_is_ind_section, bfd_is_const_section),
700 (discarded_section): New inline functions.
701 * bfd-in2.h: Regenerate.
703 2019-09-20 Alan Modra <amodra@gmail.com>
705 * bfd-in.h (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
706 (bfd_asymbol_bfd, bfd_asymbol_flavour, bfd_set_asymbol_name): Delete.
707 * bfd.c (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
708 (bfd_asymbol_bfd, bfd_set_asymbol_name): New inline functions.
709 * targets.c (bfd_asymbol_flavour): Likewise.
710 * bfd-in2.h: Regenerate.
712 2019-09-20 Alan Modra <amodra@gmail.com>
714 * archive.c (bfd_generic_archive_p): Use bfd_set_thin_archive.
715 * bfd-in.h (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
716 (bfd_get_target, bfd_get_flavour, bfd_family_coff, bfd_big_endian),
717 (bfd_little_endian, bfd_header_big_endian, bfd_header_little_endian),
718 (bfd_get_file_flags, bfd_applicable_file_flags),
719 (bfd_applicable_section_flags, bfd_has_map, bfd_is_thin_archive),
720 (bfd_valid_reloc_types, bfd_usrdata, bfd_get_start_address),
721 (bfd_get_symcount, bfd_get_outsymbols, bfd_count_sections),
722 (bfd_get_dynamic_symcount, bfd_get_symbol_leading_char): Delete.
723 * bfd/bfd.c (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
724 (bfd_get_file_flags, bfd_get_start_address, bfd_get_symcount),
725 (bfd_get_dynamic_symcount, bfd_get_outsymbols, bfd_count_sections),
726 (bfd_has_map, bfd_is_thin_archive, bfd_set_thin_archive),
727 (bfd_usrdata, bfd_set_usrdata): New inline functions.
728 * targets.c (bfd_get_target, bfd_get_flavour),
729 (bfd_applicable_file_flags, bfd_family_coff, bfd_big_endian),
730 (bfd_little_endian, bfd_header_big_endian),
731 (bfd_header_little_endian, bfd_applicable_section_flags),
732 (bfd_get_symbol_leading_char): New inline functions.
733 * bfd-in2.h: Regenerate.
735 2019-09-20 Alan Modra <amodra@gmail.com>
737 * elf64-ppc.c (ppc64_glibc_dynamic_reloc): New function.
738 (ppc64_elf_relocate_section): Warn if emitting unsupported dynamic
741 2019-09-18 Alan Modra <amodra@gmail.com>
743 * bfd-in.h (bfd_get_section_name, bfd_get_section_vma),
744 (bfd_get_section_lma, bfd_get_section_alignment),
745 (bfd_get_section_size, bfd_get_section_flags),
746 (bfd_get_section_userdata): Delete.
747 (bfd_section_name, bfd_section_size, bfd_section_vma),
748 (bfd_section_lma, bfd_section_alignment): Lose bfd parameter.
749 (bfd_section_flags, bfd_section_userdata): New.
750 (bfd_is_com_section): Rename parameter.
751 * section.c (bfd_set_section_userdata, bfd_set_section_vma),
752 (bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section),
753 (bfd_set_section_size): Delete bfd parameter, rename section parameter.
754 (bfd_set_section_lma): New.
755 * bfd-in2.h: Regenerate.
756 * mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param,
758 * aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c,
759 * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
760 * compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h,
761 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c,
762 * elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c,
763 * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
764 * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c,
765 * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c,
766 * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c,
767 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
768 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
769 * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
770 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
771 * elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c,
772 * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
773 * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
774 * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c,
775 * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
776 * elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
777 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
778 * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c,
779 * elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
780 * elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c,
781 * mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c,
782 * peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c,
783 * xcofflink.c: Update throughout for bfd section macro and function
786 2019-09-18 Alan Modra <amodra@gmail.com>
788 * bfd-in.h (bfd_asymbol_section): Rename from bfd_get_section.
789 (bfd_get_output_section): Delete.
790 (bfd_asymbol_base): Delete.
791 (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
792 (bfd_asymbol_bfd, bfd_asymbol_flavour): Tidy.
793 (bfd_set_asymbol_name): New macro.
794 * bfd-in2.h: Regenerate.
795 * aout-cris.c: Update throughout to use bfd_asymbol_section.
797 * cofflink.c: Likewise.
798 * dwarf2.c: Likewise.
801 * elf32-arm.c: Likewise.
802 * elf32-mips.c: Likewise.
803 * elf32-score.c: Likewise.
804 * elf32-score7.c: Likewise.
805 * elfn32-mips.c: Likewise.
806 * elfnn-aarch64.c: Likewise.
807 * elfxx-mips.c: Likewise.
808 * linker.c: Likewise.
810 * elf64-mmix.c (mmix_elf_reloc): Part expand bfd_get_output_section.
812 2019-09-18 Simon Marchi <simon.marchi@polymtl.ca>
814 * Makefile.in: Re-generate.
815 * configure: Re-generate.
816 * doc/Makefile.in: Re-generate.
818 2019-09-18 Alan Modra <amodra@gmail.com>
820 * aoutx.h (slurp_symbol_table): Don't set symcount using bfd_get
822 * pdp11.c (slurp_symbol_table): Likewise.
823 * som.c (som_slurp_symbol_table): Likewise.
824 * coff-ppc.c (ppc_bfd_coff_final_link): Likewise.
825 * coffcode.h (coff_slurp_symbol_table): Likewise.
826 * cofflink.c (_bfd_coff_final_link): Likewise.
827 * ecoff.c (ecoff_slurp_symbolic_header): Likewise.
828 (_bfd_ecoff_slurp_symbolic_info): Likewise.
829 (_bfd_ecoff_slurp_symbol_table): Likewise.
830 (_bfd_ecoff_bfd_final_link): Likewise.
831 * elf.c (_bfd_elf_canonicalize_symtab): Likewise.
832 * elflink.c (elf_link_output_symstrtab): Likewise.
833 (bfd_elf_final_link): Likewise.
834 * peicode.h (pe_ILF_build_a_bfd): Likewise.
835 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
836 * aoutx.h (some_aout_object_p, slurp_symbol_table): Don't set
837 start_address or symcount using bfd_get macros.
838 * coffgen.c (coff_real_object_p): Likewise.
839 * pdp11.c (some_aout_object_p, slurp_symbol_table): Likewise.
840 * som.c (som_object_setup, som_slurp_symbol_table): Likewise.
841 * elfcore.h (elf_core_file_p): Don't set start_address using
843 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Don't set dynsymcount
845 * bfd.c (bfd_set_file_flags): Don't set flags using bfd_get macro.
846 * linker.c (bfd_generic_link_read_symbols): Don't set outsymbols
847 or symcount using bfd_get macros.
848 (_bfd_generic_final_link, generic_add_output_symbol): Likewise.
849 * syms.c (bfd_set_symtab): Likewise.
850 * vms-alpha.c (alpha_vms_bfd_final_link): Likewise.
851 * archive.c (do_slurp_bsd_armap): Don't set has_armap using
853 (do_slurp_coff_armap, bfd_slurp_armap): Likewise.
854 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
855 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
856 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
857 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
858 * som.c (som_slurp_armap): Likewise.
860 2019-09-18 Alan Modra <amodra@gmail.com>
862 * archures.c (bfd_get_arch): Make param const.
863 (bfd_get_mach, bfd_arch_bits_per_byte): Likewise.
864 (bfd_arch_bits_per_address, bfd_octets_per_byte): Likewise.
865 * bfd-in2.h: Regenerate.
867 2019-09-18 Alan Modra <amodra@gmail.com>
869 * bfd-in.h (carsym.name): Make const.
870 * reloc.c (struct reloc_howto_struct.name): Likewise.
871 * targets.c (bfd_target.name): Likewise.!
872 * bfd.c (bfd_get_sign_extend_vma): Make variable const.
873 * som.c (som_bfd_fill_in_ar_symbols): Use an intermediary variable
874 when setting carsym.name.
875 * bfd-in2.h: Regenerate.
877 2019-09-18 Alan Modra <amodra@gmail.com>
879 * mach-o.c (bfd_mach_o_fat_member_init): Likewise. Replace
880 xstrdup and xmalloc with bfd_strdup and bfd_malloc. Return an
881 error status. Adjust calls.
882 * vms-lib.c (_bfd_vms_lib_get_module): Test mhd->id earlier.
883 Close bfd on failure. Replace xstrdup/bfd_alloc use with
884 bfd_malloc. Use bfd_set_filename.
886 2019-09-18 Alan Modra <amodra@gmail.com>
888 * elf64-ppc.c (must_be_dyn_reloc): Return 0 for TOC16 relocs.
889 (ppc64_elf_check_relocs): Support dynamic/copy relocs for TOC16.
890 (ppc64_elf_adjust_dynamic_symbol): Don't keep dynamic reloc when
891 needs_copy even if all relocs are in rw sections.
892 (dec_dynrel_count): Handle TOC16 relocs.
893 (ppc64_elf_relocate_section): Support dynamic relocs for TOC16.
894 (ppc64_elf_finish_dynamic_symbol): Adjust to handle needs_copy
897 2019-09-16 Phil Blundell <pb@pbcl.net>
899 * version.m4: Set version to 2.33.50.
900 * Makefile.in, configure, doc/Makefile.in: Regenerated.
902 2019-09-11 Tom Tromey <tom@tromey.com>
904 * opncls.c (bfd_set_filename): New function.
905 * bfd-in2.h: Regenerate.
907 2019-09-11 Alan Modra <amodra@gmail.com>
909 * targets.c (struct bfd_target): Add _bfd_group_name.
910 (BFD_JUMP_TABLE): Likewise.
911 * coffgen.c (bfd_coff_group_name): New function.
912 * elf.c (bfd_elf_group_name): New function.
913 * linker.c (_bfd_nolink_bfd_group_name): New function.
914 * section.c (bfd_generic_group_name): New function.
915 * elf-bfd.h (bfd_elf_group_name): Declare.
916 * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
917 * libcoff-in.h (bfd_coff_group_name): Declare.
918 * aout-target.h (MY_bfd_group_name): Define.
919 * aout-tic30.c (MY_bfd_group_name): Define.
920 * bfd.c (bfd_group_name): Define.
921 * binary.c (binary_bfd_group_name): Define.
922 * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
923 * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
924 * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
925 * coffcode.h (coff_bfd_group_name): Define.
926 * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
927 * i386msdos.c (msdos_bfd_group_name): Define.
928 * ihex.c (ihex_bfd_group_name): Define.
929 * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
930 * mmo.c (mmo_bfd_group_name): Define.
931 * pef.c (bfd_pef_bfd_group_name): Define.
932 * plugin.c (bfd_plugin_bfd_group_name): Define.
933 * ppcboot.c (ppcboot_bfd_group_name): Define.
934 * som.c (som_bfd_group_name): Define.
935 * srec.c (srec_bfd_group_name): Define.
936 * tekhex.c (tekhex_bfd_group_name): Define.
937 * verilog.c (verilog_bfd_group_name): Define.
938 * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
939 * xsym.c (bfd_sym_bfd_group_name): Define.
940 * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
941 (rs6000_xcoff64_aix_vec): Likewise.
942 * bfd-in2.h: Regenerate.
943 * libbfd.h: Regenerate.
944 * libcoff.h: Regenerate.
946 2019-09-10 Nick Clifton <nickc@redhat.com>
949 * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
951 (bfd_default_arch_struct): Initialise the new field.
952 * bfd-in2.h: Regenerate.
953 * cpu-aarch64.c: Initialise the new field.
954 * cpu-alpha.c: Likewise.
955 * cpu-arc.c: Likewise.
956 * cpu-arm.c: Likewise.
957 * cpu-avr.c: Likewise.
958 * cpu-bfin.c: Likewise.
959 * cpu-bpf.c: Likewise.
960 * cpu-cr16.c: Likewise.
961 * cpu-cr16c.c: Likewise.
962 * cpu-cris.c: Likewise.
963 * cpu-crx.c: Likewise.
964 * cpu-csky.c: Likewise.
965 * cpu-d10v.c: Likewise.
966 * cpu-d30v.c: Likewise.
967 * cpu-dlx.c: Likewise.
968 * cpu-epiphany.c: Likewise.
969 * cpu-fr30.c: Likewise.
970 * cpu-frv.c: Likewise.
971 * cpu-ft32.c: Likewise.
972 * cpu-h8300.c: Likewise.
973 * cpu-hppa.c: Likewise.
974 * cpu-i386.c: Likewise.
975 * cpu-ia64.c: Likewise.
976 * cpu-iamcu.c: Likewise.
977 * cpu-ip2k.c: Likewise.
978 * cpu-iq2000.c: Likewise.
979 * cpu-k1om.c: Likewise.
980 * cpu-l1om.c: Likewise.
981 * cpu-lm32.c: Likewise.
982 * cpu-m10200.c: Likewise.
983 * cpu-m10300.c: Likewise.
984 * cpu-m32c.c: Likewise.
985 * cpu-m32r.c: Likewise.
986 * cpu-m68hc11.c: Likewise.
987 * cpu-m68hc12.c: Likewise.
988 * cpu-m68k.c: Likewise.
989 * cpu-m9s12x.c: Likewise.
990 * cpu-m9s12xg.c: Likewise.
991 * cpu-mcore.c: Likewise.
992 * cpu-mep.c: Likewise.
993 * cpu-metag.c: Likewise.
994 * cpu-microblaze.c: Likewise.
995 * cpu-mips.c: Likewise.
996 * cpu-mmix.c: Likewise.
997 * cpu-moxie.c: Likewise.
998 * cpu-msp430.c: Likewise.
999 * cpu-mt.c: Likewise.
1000 * cpu-nds32.c: Likewise.
1001 * cpu-nfp.c: Likewise.
1002 * cpu-nios2.c: Likewise.
1003 * cpu-ns32k.c: Likewise.
1004 * cpu-or1k.c: Likewise.
1005 * cpu-pdp11.c: Likewise.
1006 * cpu-pj.c: Likewise.
1007 * cpu-plugin.c: Likewise.
1008 * cpu-powerpc.c: Likewise.
1009 * cpu-pru.c: Likewise.
1010 * cpu-riscv.c: Likewise.
1011 * cpu-rl78.c: Likewise.
1012 * cpu-rs6000.c: Likewise.
1013 * cpu-rx.c: Likewise.
1014 * cpu-s12z.c: Likewise.
1015 * cpu-s390.c: Likewise.
1016 * cpu-score.c: Likewise.
1017 * cpu-sh.c: Likewise.
1018 * cpu-sparc.c: Likewise.
1019 * cpu-spu.c: Likewise.
1020 * cpu-tic30.c: Likewise.
1021 * cpu-tic4x.c: Likewise.
1022 * cpu-tic54x.c: Likewise.
1023 * cpu-tic6x.c: Likewise.
1024 * cpu-tic80.c: Likewise.
1025 * cpu-tilegx.c: Likewise.
1026 * cpu-tilepro.c: Likewise.
1027 * cpu-v850.c: Likewise.
1028 * cpu-v850_rh850.c: Likewise.
1029 * cpu-vax.c: Likewise.
1030 * cpu-visium.c: Likewise.
1031 * cpu-wasm32.c: Likewise.
1032 * cpu-xc16x.c: Likewise.
1033 * cpu-xgate.c: Likewise.
1034 * cpu-xstormy16.c: Likewise.
1035 * cpu-xtensa.c: Likewise.
1036 * cpu-z80.c: Likewise.
1037 * cpu-z8k.c: Likewise.
1039 2019-09-09 Phil Blundell <pb@pbcl.net>
1041 binutils 2.33 branch created.
1043 2019-09-06 Alan Modra <amodra@gmail.com>
1045 * aout-target.h (object_p): Formatting.
1046 * bfd-in.h (bfd_get_filename): Don't cast to char*.
1047 * corefile.c (generic_core_file_matches_executable_p): Constify
1048 variables and remove cast.
1049 * bfd-in2.h: Regenerate.
1051 2019-09-05 Alan Modra <amodra@gmail.com>
1053 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
1054 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
1055 in the GOT/PLT entry rather than affecting the offset to that
1057 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
1059 2019-09-05 Alan Modra <amodra@gmail.com>
1061 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
1062 in second instruction.
1063 (ppc64_elf_relocate_section): Likewise.
1065 2019-09-05 Alan Modra <amodra@gmail.com>
1068 * libbfd-in.h (bfd_strdup): New inline function.
1069 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
1071 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
1072 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
1074 (bfd_openstreamr): Use bfd_strdup.
1075 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
1076 * plugin.c (try_load_plugin): Use bfd_malloc.
1077 * libbfd.h: Regenerate.
1079 2019-09-02 Alan Modra <amodra@gmail.com>
1082 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
1084 (read_alt_indirect_string): Likewise.
1085 (read_alt_indirect_ref): Likewise.
1087 2019-08-31 Jim Wilson <jimw@sifive.com>
1090 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
1091 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
1093 2019-08-30 Jim Wilson <jimw@sifive.com>
1095 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
1096 error, call bfd_set_error, set ret to FALSE, and goto out label.
1098 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
1101 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
1102 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
1104 2019-08-29 Alan Modra <amodra@gmail.com>
1107 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
1108 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
1109 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
1112 2019-08-29 Alan Modra <amodra@gmail.com>
1114 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
1115 on second insn, return it in poff.
1116 (ppc64_elf_relocate_section): Add offset to paddi addend for
1119 2019-08-28 Jim Wilson <jimw@sifive.com>
1121 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
1122 section when setting max_alignment. Update comment.
1123 (_bfd_riscv_relax_pc): Likewise.
1125 2019-08-29 Alan Modra <amodra@gmail.com>
1128 * bfd.c (struct bfd): Add no_element_cache.
1129 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
1130 archive cache when no_element_cache.
1131 (bfd_generic_archive_p): Set no_element_cache when opening first
1132 element to check format. Close first element too.
1133 (do_slurp_bsd_armap): Don't zero ardata->cache here.
1134 * bfd-in2.h: Regenerate.
1136 2019-08-24 Alan Modra <amodra@gmail.com>
1138 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
1139 symbols from GOT optimisation.
1141 2019-08-23 Stafford Horne <shorne@gmail.com>
1143 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
1146 2019-08-23 Nick Clifton <nickc@redhat.com>
1149 * elf.c (bfd_section_from_shdr): Issue an informative warning
1150 message and continue processing other sections after encountering
1151 a reloc section for a section which already has other relocs
1154 2019-08-23 Alan Modra <amodra@gmail.com>
1157 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
1158 on error without freeing plts[] contents.
1160 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
1162 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
1164 2019-08-22 Nick Clifton <nickc@redhat.com>
1167 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
1168 reading data from extra records.
1170 2019-08-22 Tamar Christina <tamar.christina@arm.com>
1173 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
1174 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
1175 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
1176 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
1179 2019-08-22 Alan Modra <amodra@gmail.com>
1181 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
1182 instead recognize CMSE_PREFIX in symbol name.
1183 (elf32_arm_gc_mark_extra_sections): Likewise.
1184 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
1185 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
1187 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
1189 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
1190 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
1192 2019-08-20 Tamar Christina <tamar.christina@arm.com>
1194 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
1195 elf32_arm_stub_long_branch_v4t_thumb_thumb,
1196 elf32_arm_stub_long_branch_v4t_thumb_arm,
1197 elf32_arm_stub_short_branch_v4t_thumb_arm,
1198 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
1199 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
1200 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
1201 previous instruction.
1203 2019-08-19 Tom Tromey <tromey@adacore.com>
1205 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
1208 2019-08-19 Alan Modra <amodra@gmail.com>
1210 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
1212 (struct _ppc64_elf_section_data): Likewise.
1213 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
1214 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
1215 than TOC loop. Check PLT16 insns too.
1217 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
1220 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
1221 PC-relative relocations back to ...
1222 (elf_x86_64_relocate_section): Here.
1224 2019-08-16 Martin Liska <mliska@suse.cz>
1227 * elflink.c: Report error only for not relocatable.
1228 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
1229 here lto_slim_object as it's handled in caller.
1231 2019-08-16 Alan Modra <amodra@gmail.com>
1233 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
1235 2019-08-15 Jim Wilson <jimw@sifive.com>
1237 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
1238 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
1239 to c.li instruction, and use ENCODE_RVC_IMM to set value.
1241 2019-08-15 Tom Tromey <tromey@adacore.com>
1243 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
1246 2019-08-14 Alan Modra <amodra@gmail.com>
1249 * dwarf2.c (stash_comp_unit): New function, extracted from..
1250 (_bfd_dwarf2_find_nearest_line): ..here.
1251 (find_abstract_instance): Parse comp units and decode line info
1254 2019-08-14 Alan Modra <amodra@gmail.com>
1256 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
1257 (comp_unit_find_nearest_line): Use it here..
1258 (_bfd_dwarf2_find_symbol_bias): ..and here.
1260 2019-08-14 Alan Modra <amodra@gmail.com>
1262 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
1263 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
1264 * coffgen.c (coff_find_nearest_line_with_names): Adjust
1265 _bfd_dwarf2_find_nearest_line calls.
1266 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
1267 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
1268 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
1269 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
1270 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
1271 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
1272 * libbfd.h: Regenerate.
1274 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
1276 * elf-bfd.h (struct elf_backend_data): New members.
1277 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
1278 .gnu.hash section if necessary.
1279 (struct collect_gnu_hash_codes): New member.
1280 (elf_gnu_hash_process_symidx): New function name.
1281 (elf_renumber_gnu_hash_syms): Ignore local and undefined
1282 symbols. Record xlat location for every symbol which should have
1283 a .MIPS.xhash entry.
1284 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
1285 dynamic section if necessary.
1286 (GNU_HASH_SECTION_NAME): New define.
1287 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
1288 Update the section size info.
1289 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
1290 (struct mips_elf_link_hash_entry): New member.
1291 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
1293 (mips_elf_sort_hash_table): Initialize the pointer to the
1294 .MIPS.xhash section.
1295 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
1296 translation table entry with the symbol dynindx.
1297 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
1298 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
1300 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
1302 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
1304 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
1305 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
1307 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
1308 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
1309 (_bfd_mips_post_process_headers): Mark the ABI version as
1310 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
1311 but not a .hash section.
1312 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
1313 position in the translation table, associated with the hash
1315 * elfxx-mips.h (literal_reloc_p): Define
1316 elf_backend_record_xhash_symbol backend hook.
1317 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
1320 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
1322 * elf64-bpf.c (bpf_elf_relocate_section): New function.
1323 (bpf_elf_insn_disp_reloc): Delete function.
1324 (elf_backend_relocate_section): Define.
1326 2019-08-07 Alan Modra <amodra@gmail.com>
1329 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
1330 for overflow in expressions involving nsymz.
1332 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
1334 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
1335 two pages in relro presence.
1337 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
1339 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
1340 (get_wsr_lbeg_opcode): New functions.
1341 (check_loop_aligned): Detect relaxed loops and adjust loop_len
1342 and insn_len for the first actual instruction of the loop.
1344 2019-07-30 Alan Modra <amodra@gmail.com>
1347 * bfd.c (struct bfd): Add lto_slim_object flag.
1348 * bfd-in2.h: Regenerate.
1350 2019-07-29 Martin Liska <mliska@suse.cz>
1353 * archive.c (_bfd_compute_and_write_armap): Come up with
1354 report_plugin_err variable.
1355 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
1356 * elf.c (struct lto_section): New.
1357 (_bfd_elf_make_section_from_shdr): Parse content of
1358 .gnu_lto_.lto section.
1359 * elflink.c: Report error for a missing LTO plugin.
1360 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1362 2019-07-28 Alan Modra <amodra@gmail.com>
1366 * elflink.c (elf_link_add_object_symbols): Report an informative
1367 error on finding local symbols with index equal or greater than
1368 symbol table sh_info. Correct comment. Allow such symbols in
1369 dynamic objects. Abort on NULL section for symbol.
1371 2019-07-26 Alan Modra <amodra@gmail.com>
1373 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
1374 (elf_linker): Don't define.
1375 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
1377 2019-07-25 YunQiang Su <syq@debian.org>
1380 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
1383 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
1385 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
1387 (reloc_type_to_name): Fix formating.
1388 (arc_elf_object_p): Likewise.
1389 (debug_arc_reloc): Likewise.
1390 (arc_do_relocation): Likewise.
1392 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
1394 * elf32-arc.c (bfd_get_32_me): New function.
1395 (bfd_put_32_me): Likewise.
1396 (arc_elf_relax_section): Likewise.
1397 (bfd_elf32_bfd_relax_section): Define.
1399 2019-07-24 Alan Modra <amodra@gmail.com>
1401 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
1402 elf_backend_final_write_processing, don't pass linker arg.
1403 (_bfd_elf_final_write_processing): Update prototype.
1404 * elf.c (_bfd_elf_write_object_contents): Adjust call.
1405 (_bfd_elf_final_write_processing): Return error on incompatible
1406 OSABI and has_gnu_osabi. Remove linker arg.
1407 * elf-nacl.h (nacl_final_write_processing): Update prototype.
1408 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
1409 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
1410 (_bfd_mips_elf_final_write_processing): Likewise.
1411 * elf-hppa.h (elf_hppa_final_write_processing): Return status
1412 and remove linker arg.
1413 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
1414 * elf-nacl.c (nacl_final_write_processing): Likewise.
1415 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
1416 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1417 * elf32-arm.c (arm_final_write_processing): Likewise.
1418 (elf32_arm_final_write_processing): Likewise.
1419 (elf32_arm_nacl_final_write_processing): Likewise.
1420 (elf32_arm_vxworks_final_write_processing): Likewise.
1421 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1422 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
1423 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
1424 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
1425 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
1426 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
1427 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
1428 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
1429 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
1430 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
1431 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
1432 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
1433 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
1434 * elf32-ppc.c (ppc_final_write_processing): Likewise.
1435 (ppc_elf_final_write_processing): Likewise.
1436 (ppc_elf_vxworks_final_write_processing): Likewise.
1437 * elf32-sparc.c (sparc_final_write_processing): Likewise.
1438 (elf32_sparc_final_write_processing): Likewise.
1439 (elf32_sparc_vxworks_final_write_processing): Likewise.
1440 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
1441 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
1442 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1443 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
1444 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
1445 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
1446 (_bfd_mips_elf_final_write_processing): Likewise.
1448 2019-07-24 Alan Modra <amodra@gmail.com>
1450 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
1452 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1453 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1455 2019-07-24 Alan Modra <amodra@gmail.com>
1457 * elf32-visium.c (visium_elf_post_process_headers): Don't set
1458 EI_OSABI header byte here.
1459 (ELF_OSABI): Define.
1461 2019-07-23 Alan Modra <amodra@gmail.com>
1463 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
1464 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
1465 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
1466 when elf_gnu_osabi_mbind is set.
1467 (_bfd_elf_map_sections_to_segments): Likewise.
1468 (_bfd_elf_init_private_section_data): Likewise.
1469 (_bfd_elf_final_write_processing): Update comment.
1470 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
1471 (elf_backend_special_sections): Define without .tbss for linux.
1473 2019-07-23 Alan Modra <amodra@gmail.com>
1475 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
1476 Remove none, any, all enums.
1477 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
1478 (_bfd_elf_final_write_processing): Declare.
1479 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
1480 elf_backend_final_write_processing.
1481 (_bfd_elf_post_process_headers): Move body of function to..
1482 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
1483 only when not already set. Adjust for rename.
1484 * elfxx-target.h (elf_backend_final_write_processing): Default to
1485 _bfd_elf_final_write_processing.
1486 * elf-hppa.h (elf_hppa_final_write_processing): Call
1487 _bfd_elf_final_write_processing.
1488 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
1489 * elf-nacl.c (nacl_final_write_processing): Likewise.
1490 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
1491 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1492 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1493 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
1494 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
1495 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
1496 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
1497 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
1498 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
1499 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
1500 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
1501 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
1502 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
1503 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
1504 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
1505 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
1506 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1507 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
1508 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
1509 * elf32-arm.c (arm_final_write_processing): Split out from..
1510 (elf32_arm_final_write_processing): ..here. Call
1511 _bfd_elf_final_write_processing.
1512 (elf32_arm_nacl_final_write_processing): Adjust.
1513 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
1514 (_bfd_mips_elf_final_write_processing): ..here. Call
1515 _bfd_elf_final_write_processing.
1516 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
1517 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
1518 * elf32-ppc.c (ppc_final_write_processing): Split out from..
1519 (ppc_elf_final_write_processing): ..here. Call
1520 _bfd_elf_final_write_processing.
1521 (ppc_elf_vxworks_final_write_processing): Adjust.
1522 * elf32-sparc.c (sparc_final_write_processing): Split out from..
1523 (elf32_sparc_final_write_processing): ..here. Call
1524 _bfd_elf_final_write_processing.
1525 (elf32_sparc_vxworks_final_write_processing): Adjust.
1526 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
1527 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
1528 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
1529 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
1530 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
1531 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
1532 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1533 * elflink.c (elf_link_add_object_symbols): Likewise.
1534 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
1537 2019-07-23 Omar Majid <omajid@redhat.com>
1539 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
1540 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
1541 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
1543 * peXXigen.c: Add comment about source of .NET magic numbers.
1545 2019-07-19 Alan Modra <amodra@gmail.com>
1547 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
1548 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
1549 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
1550 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
1551 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
1552 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
1553 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
1554 (ppc64_elf_check_relocs): Support pcrel tls relocs.
1555 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
1556 * bfd-in2.h: Regenerate.
1557 * libbfd.h: Regenerate.
1559 2019-07-18 Alan Modra <amodra@gmail.com>
1561 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
1562 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
1565 2019-07-18 Alan Modra <amodra@gmail.com>
1567 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
1568 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
1569 is more than 8 bits.
1570 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
1571 tls_type vars unsigned int.
1572 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
1573 to select r_type edit.
1575 2019-07-18 Alan Modra <amodra@gmail.com>
1577 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
1579 * elf64-ppc.c (TLS_GDIE): Likewise.
1581 2019-07-18 Alan Modra <amodra@gmail.com>
1583 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
1584 range of tp-relative offsets.
1586 2019-07-15 Alan Modra <amodra@gmail.com>
1588 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
1589 alias is no longer bfd_link_hash_defined, clear the alias.
1591 2019-07-13 Alan Modra <amodra@gmail.com>
1593 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
1595 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
1596 (_bfd_elf_init_2_index_sections): Likewise.
1597 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
1598 relocations for local TLS symbols, use STN_UNDEF as the relocation
1600 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
1601 leave TLS symbol value in the addend.
1603 2019-07-08 Alan Modra <amodra@gmail.com>
1606 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
1607 size before reading first word.
1609 2019-07-02 Nick Clifton <nickc@redhat.com>
1612 * elf.c (is_debuginfo_file): New function.
1613 (assign_file_positions_for_non_load_sections): Do not warn about
1614 allocated sections outside of loadable segments if they are found
1615 in a debuginfo file.
1616 * elf-bfd.h (is_debuginfo_file): Prototype.
1618 2019-07-02 Nick Clifton <nickc@redhat.com>
1621 * compress.c (bfd_get_full_section_contents): Do not complain
1622 about linker created sections that are larger than the file size.
1624 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
1626 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
1627 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
1629 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
1631 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
1633 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
1634 sections when .text section contain secure entry functions
1637 2019-07-01 Nick Clifton <nickc@redhat.com>
1640 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
1641 section VMA in the offset used to update exidx relocs.
1643 2019-06-28 Nick Clifton <nickc@redhat.com>
1646 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
1647 large version reference section.
1648 * compress.c (bfd_get_full_section_contents): Check for an
1649 uncompressed section whose size is larger than the file size.
1651 2019-06-28 Alan Modra <amodra@gmail.com>
1653 * format.c (bfd_check_format_matches): Don't match plugin target
1654 if another target matches. Expand comment.
1655 * targets.c (_bfd_target_vector): Move plugin_vec after all other
1656 non-corefile targets, outside !SELECT_VECS.
1657 * config.bfd: Don't handle targ=plugin here.
1658 * configure.ac: Don't add plugin to enable_targets or handle in
1659 target loop setting selvecs and other target vars.
1660 * configure: Regenerate.
1662 2019-06-26 Nick Clifton <nickc@redhat.com>
1665 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
1666 messages for failures.
1667 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
1668 if returning an error value.
1670 2019-06-25 Jan Beulich <jbeulich@suse.com>
1672 * elf-properties.c (elf_find_and_remove_property): Rename last
1673 parameter. Mention it in comment.
1675 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
1677 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
1678 SEC_MERGE or SEC_CODE flags are set.
1679 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
1680 symtype consistently. Don't include sec_addr (sym_sec) in symval.
1681 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
1682 Add sec_addr (sym_sec) after handling merge sections.
1684 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
1687 * elf-properties.c (elf_merge_gnu_property_list): Remove the
1688 property after reporting property removal.
1690 2019-06-23 Alan Modra <amodra@gmail.com>
1693 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
1694 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
1695 Reduce range of offsets allowed for other GOT relocs.
1697 2019-06-23 Alan Modra <amodra@gmail.com>
1700 * elfcode.h (elf_object_p): Warning fix.
1702 2019-06-21 Alan Modra <amodra@gmail.com>
1705 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
1707 2019-06-19 Alan Modra <amodra@gmail.com>
1710 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
1711 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
1713 2019-06-19 Alan Modra <amodra@gmail.com>
1715 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
1716 functions that require r2 valid to use local entry.
1717 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
1719 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1721 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
1722 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
1723 with elfNN_aarch64_allocate_local_dynrelocs.
1725 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
1727 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
1729 2019-06-14 Alan Modra <amodra@gmail.com>
1731 * Makefile.in: Regenerate.
1732 * configure: Regenerate.
1734 2019-06-14 Alan Modra <amodra@gmail.com>
1736 * elf64-ppc.c: Fix comments involving paddi.
1738 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
1741 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
1742 absent, or the bfd is not in the ELF formart.
1743 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
1745 2019-06-10 Christos Zoulas <christos@zoulas.com>
1748 * elf.c (elfcore_make_auxv_note_section): New function.
1749 (elfcore_grok_note): Use it.
1750 (elfcore_grok_freebsd_note): Likewise.
1751 (elfcore_grok_openbsd_note): Likewise.
1752 (elfcore_grok_netbsd_note): Likewise. Plus add support for
1753 NT_NETBSDCORE_AUXV notes.
1755 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1757 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
1758 alignment of the new gnu property section.
1760 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1762 * bfd-in.h: Change comment.
1763 * bfd-in2.h: Regenerate.
1764 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
1765 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
1768 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
1770 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
1771 Remove overflow check.
1773 2019-05-28 Alan Modra <amodra@gmail.com>
1776 * cofflink.c (coff_link_check_archive_element): Don't assume
1777 element is a coff object file after calling add_archive_element.
1779 2019-05-28 Alan Modra <amodra@gmail.com>
1782 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
1783 attempt to set sh_entsize for excluded PLT section.
1785 2019-05-28 Alan Modra <amodra@gmail.com>
1788 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
1789 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
1790 allocated in alpha_dynamic_entries_for_reloc.
1792 2019-05-28 Alan Modra <amodra@gmail.com>
1795 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
1796 on NULL output_section.
1797 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
1799 2019-05-28 Alan Modra <amodra@gmail.com>
1802 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
1803 entry when MUST_FIND. Abort when MUST_FIND not found.
1804 (elf_m68k_get_bfd2got_entry): Likewise.
1805 (elf_m68k_relocate_section): Remove now useless assert.
1807 2019-05-28 Alan Modra <amodra@gmail.com>
1810 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
1811 from bfd_link_info, not an output section owner.
1812 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
1813 (elf_hppa_final_link_relocate): Likewise.
1815 2019-05-28 Alan Modra <amodra@gmail.com>
1818 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
1819 create_object_symbols_section, obj_textsec, obj_datasec or
1820 obj_bsssec. Fix other errors in placement.
1821 * config.bfd: Obsolete tic30-aout.
1823 2019-05-28 Alan Modra <amodra@gmail.com>
1826 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
1827 end of section list as well as section_count.
1828 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
1829 section list before returning error.
1831 2019-05-27 Alan Modra <amodra@gmail.com>
1833 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
1835 2019-05-27 Alan Modra <amodra@gmail.com>
1838 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
1840 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
1842 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
1843 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
1844 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
1845 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
1846 (elf_backend_merge_symbol_attribute): Define.
1848 2019-05-24 Alan Modra <amodra@gmail.com>
1850 * po/SRC-POTFILES.in: Regenerate.
1852 2019-05-24 Alan Modra <amodra@gmail.com>
1854 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
1855 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
1856 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
1857 (struct ppc_link_hash_table): Add powerxx_stubs.
1858 (ppc64_elf_check_relocs): Set powerxx_stubs.
1859 (build_powerxx_offset, size_powerxx_offset),
1860 (num_relocs_for_powerxx_offset),
1861 (emit_relocs_for_powerxx_offset): New functions.
1862 (plt_stub_size): Size powerxx stubs.
1863 (ppc_build_one_stub): Emit powerxx stubs.
1864 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
1867 2019-05-24 Alan Modra <amodra@gmail.com>
1869 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
1870 R_PPC64_GOT_PCREL34.
1871 (xlate_pcrel_opt): New function.
1872 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
1873 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1874 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
1876 2019-05-24 Alan Modra <amodra@gmail.com>
1878 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
1879 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
1880 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
1881 (BFD_RELOC_PPC64_PLT_PCREL34),
1882 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
1883 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
1884 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
1885 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
1886 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
1887 * elf64-ppc.c (PNOP): Define.
1888 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
1889 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
1890 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
1892 (ppc64_elf_prefix_reloc): New function.
1893 (struct ppc_link_hash_table): Add notoc_plt.
1894 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
1895 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
1896 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
1897 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
1898 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
1899 possible need for dynamic relocs on non-pcrel powerxx relocs.
1900 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
1901 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
1902 (toc_adjusting_stub_needed): Likewise.
1903 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
1904 (ppc64_elf_relocate_section): Handle new powerxx relocs.
1905 * bfd-in2.h: Regenerate.
1906 * libbfd.h: Regenerate.
1908 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1910 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
1911 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
1913 * configure: Regenerate.
1915 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1917 * configure: Regenerated.
1918 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
1919 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
1920 (BFD64_BACKENDS): Add elf64-bpf.lo.
1921 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
1922 * Makefile.in (SOURCE_HFILES): Regenerate.
1923 * config.bfd (targ_cpu): Handle bpf-*-* targets.
1924 * cpu-bpf.c: New file.
1925 * elf64-bpf.c: Likewise.
1926 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
1928 * archures.c: Define architecture bfd_arch_bpf and machine
1930 * reloc.c: Define BFD relocations used by the BPF target.
1931 * bfd-in2.h: Regenerated.
1932 * libbfd.h: Likewise.
1934 2019-05-22 Alan Modra <amodra@gmail.com>
1936 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
1939 2019-05-22 Alan Modra <amodra@gmail.com>
1941 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
1942 processing on "size error in section".
1944 2019-05-22 Alan Modra <amodra@gmail.com>
1946 * som.c (som_bfd_free_cached_info): Call
1947 _bfd_generic_close_and_cleanup.
1949 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1951 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
1952 for TLS_TPREL_HI16(/LO16) relocations in shared library.
1954 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1956 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
1957 checks. Search the RELA table for n64 relocations.
1959 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
1960 Faraz Shahbazker <fshahbazker@wavecomp.com>
1962 * elfxx-mips.c (LA25_BC): New macro.
1963 (mips_elf_link_hash_table)<compact_branches>: New field.
1964 (STUB_JALRC): New macro.
1965 (mipsr6_o32_exec_plt0_entry_compact): New array.
1966 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
1967 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
1968 (mipsr6_exec_plt_entry_compact): Likewise.
1969 (mips_elf_create_la25_stub): Use BC instead of J for stubs
1970 when compact_branches is true.
1971 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
1972 PLT for MIPSR6 with compact_branches. Do not reorder the
1973 compact branches PLT. Switch the lazy stub for MIPSR6
1974 with compact_branches to use JALRC.
1975 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
1976 when compact_branches is true.
1977 (_bfd_mips_elf_compact_branches): New function.
1978 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
1980 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1983 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
1984 Fix print formatter.
1986 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1989 * elf32-arm.c (get_value_helper): Remove.
1990 (elf32_arm_final_link_relocate): Fix branch future relocations.
1992 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1995 * bfd-in.h (enum erratum_84319_opts): New
1996 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1997 int to enum erratum_84319_opts.
1998 * bfd-in2.h: Regenerate.
1999 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
2000 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
2001 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
2002 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
2003 (_bfd_aarch64_resize_stubs): Amend comment.
2004 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
2006 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
2007 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
2009 (clear_erratum_843419_entry): Update erratum conditional.
2011 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
2014 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
2015 when computing distance_short_enough.
2017 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
2020 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
2021 Wrap around even if distance equals avr_pc_wrap_around.
2023 2019-05-20 Nick Clifton <nickc@redhat.com>
2025 * po/fr.po: Updated French translation.
2027 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
2029 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
2031 2019-05-16 Alan Modra <amodra@gmail.com>
2033 * elf32-arm.c (elf32_arm_write_section): Revert last change.
2035 2019-05-15 Alan Modra <amodra@gmail.com>
2037 * elf32-arm.c (elf32_arm_write_section): Don't leave
2038 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
2039 unitialised section contents.
2041 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
2044 * verilog.c: (VerilogDataWidth): New variable.
2045 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
2047 2019-05-08 Nick Clifton <nickc@redhat.com>
2050 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
2051 rather than FALSE if encountering a non-ELF file.
2053 2019-05-06 Alan Modra <amodra@gmail.com>
2055 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
2057 2019-05-06 Alan Modra <amodra@gmail.com>
2059 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
2060 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
2061 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
2062 * libbfd.h: Regenerate.
2063 * bfd-in2.h: Regenerate.
2065 2019-05-04 Alan Modra <amodra@gmail.com>
2068 * syms.c (coff_section_type): Only allow '.', '$' and numeric
2069 following the standard section names.
2070 (bfd_decode_symclass): Prioritize section flag tests in
2071 decode_section_type before name tests in coff_section_type.
2072 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
2073 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
2074 their names and choose standard .text section flags for
2077 2019-05-02 Nick Clifton <nickc@redhat.com>
2080 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
2081 .gnu.debugaltlink sections as debugging sections.
2083 2019-04-30 Alan Modra <amodra@gmail.com>
2085 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
2086 (struct _ppc64_elf_section_data): Likewise.
2087 (ppc64_elf_check_relocs): Set above fields.
2088 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
2089 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
2092 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2095 * elflink.c (elf_link_output_extsym): Don't complain undefined
2096 weak dynamic reference.
2098 2019-04-25 Sudakshina Das <sudi.das@arm.com>
2100 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
2101 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
2102 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
2103 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
2104 (elfNN_aarch64_small_plt0_pac_entry): Remove.
2105 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
2106 (elfNN_aarch64_small_plt0_bti_entry): Update.
2107 (elfNN_aarch64_small_plt_bti_entry): Update.
2108 (elfNN_aarch64_small_plt_pac_entry): Update.
2109 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
2110 (setup_plt_values): Setup new entries.
2111 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
2112 (elfNN_aarch64_plt_sym_val): Likewise.
2114 2019-04-22 Jim Wilson <jimw@sifive.com>
2116 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
2118 2019-04-19 Alan Modra <amodra@gmail.com>
2120 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
2122 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
2124 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
2125 building shared object.
2126 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
2128 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
2131 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
2134 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
2136 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
2138 * bfd-in2.h: Regenerate.
2139 * libbfd.h: Likewise.
2141 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2143 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
2144 * bfd-in2.h: Regenerated.
2145 * libbfd.h: Regenerated.
2147 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2149 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
2150 * bfd-in2.h: Regenerated.
2151 * libbfd.h: Likewise.
2153 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2155 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
2156 * bfd-in2.h: Regenerated.
2157 * libbfd.h: Regenerated.
2158 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
2159 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
2160 and R_ARM_THM_BF12 together.
2161 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
2163 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2165 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
2166 * libbfd.h: Regenerated.
2167 * bfd-in2.h: Regenerated.
2168 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
2169 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
2170 and R_ARM_THM_BF18 together.
2171 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
2173 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2175 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
2176 * bfd-in2.h: Regenerated.
2177 * libbfd.h: Regenerated.
2178 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
2179 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
2180 and R_ARM_THM_BF16 together.
2181 (get_value_helper): New reloc helper.
2182 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
2184 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2186 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
2187 * bfd-in2.h: Regenerate.
2188 * libbfd.h: Regenerate.
2190 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
2192 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
2193 * bfd-in2.h: Regenerate.
2194 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
2195 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
2197 (using_thumb2): Likewise.
2198 (using_thumb2_bl): Update assert.
2199 (arch_has_arm_nop): Likewise.
2200 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
2201 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
2203 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
2205 * elf-linker-x86.h (elf_x86_cet_report): New.
2206 (elf_linker_x86_params): Add cet_report.
2207 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
2208 missing IBT and SHSTK properties if needed.
2210 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
2213 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
2214 "h != NULL". Don't check "h != NULL" before calling.
2215 bfd_elf_gc_record_vtentry.
2216 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
2217 * elf32-bfin.c (bfin_check_relocs): Likewise.
2218 * elf32-cris.c (cris_elf_check_relocs): Likewise.
2219 * elf32-csky.c (csky_elf_check_relocs): Likewise.
2220 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
2221 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
2222 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
2223 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
2224 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
2225 * elf32-i386.c (elf_i386_check_relocs): Likewise.
2226 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
2227 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
2228 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
2229 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
2230 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
2231 * elf32-metag.c (elf_metag_check_relocs): Likewise.
2232 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
2233 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
2234 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2235 * elf32-sh.c (sh_elf_check_relocs): Likewise.
2236 * elf32-v850.c (v850_elf_check_relocs): Likewise.
2237 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2238 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
2239 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2240 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
2241 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
2242 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2243 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
2244 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2245 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2246 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
2249 2019-04-11 Alan Modra <amodra@gmail.com>
2252 * elflink.c (elf_link_add_object_symbols): Don't read partial
2253 dynamic entries from fuzzed objects.
2255 2019-04-11 Tamar Christina <tamar.christina@arm.com>
2258 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
2259 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
2260 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
2262 2019-04-10 Michael Forney <mforney@mforney.org>
2265 * doc/chew.c (free_words): Correctly free "push_text" strings.
2267 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
2269 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
2271 2019-04-08 Alan Modra <amodra@gmail.com>
2273 * configure.ac (elfxx_x86): Define and use.
2274 * configure: Regenerate.
2276 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
2278 * elf-linker-x86.h: New file.
2279 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
2280 to get x86-specific linker options.
2281 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2282 (elf_x86_64_check_relocs): Likewise.
2283 (elf_x86_64_relocate_section): Likewise.
2284 (elf_x86_64_link_setup_gnu_properties): Likewise.
2285 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
2286 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
2287 (_bfd_elf_linker_x86_set_options): New function.
2288 * elfxx-x86.h: Include "elf-linker-x86.h".
2289 (elf_x86_link_hash_table): Add params.
2291 2019-04-03 Alan Modra <amodra@gmail.com>
2293 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
2294 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
2295 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
2296 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
2297 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
2298 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
2300 2019-04-02 Jim Wilson <jimw@sifive.com>
2303 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
2304 ELF header flags to after check for ELF object file. Loop through
2305 sections looking for code sections, if none, then skip ABI checks.
2307 2019-03-30 Andrew Waterman <andrew@sifive.com>
2309 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
2312 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
2314 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
2315 info->export_dynamic to the conditional.
2317 2019-03-28 Alan Modra <amodra@gmail.com>
2320 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
2321 * configure: Regenerate.
2322 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
2323 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
2324 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
2325 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
2326 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
2328 2019-03-21 Jim Wilson <jimw@sifive.com>
2331 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
2332 verify sym non-NULL before using. Add identical check using h.
2334 2019-03-21 Sudakshina Das <sudi.das@arm.com>
2336 * elf-bfd.h (struct elf_backend_data): Add argument to
2337 merge_gnu_properties.
2338 * elf-properties.c (elf_merge_gnu_properties): Add argument to
2339 itself and while calling bed->merge_gnu_properties.
2340 (elf_merge_gnu_property_list): Update the calls for
2341 elf_merge_gnu_properties.
2342 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
2343 of --force-bti warning and add argument.
2344 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
2346 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
2347 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
2350 2019-03-20 Sudakshina Das <sudi.das@arm.com>
2352 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
2353 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
2354 (elf_backend_fixup_gnu_properties): Define for AArch64.
2356 2019-03-18 Alan Modra <amodra@gmail.com>
2359 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
2360 for local iplt syms with ent->plt.offset == -1. Remove ineffective
2361 attempt at writing glink stubs only once.
2363 2019-03-16 Alan Modra <amodra@gmail.com>
2366 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
2367 (_bfd_elf_rel_local_sym): Likewise.
2368 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
2369 section of symbols with unrecognized shndx.
2371 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2374 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
2376 * cofflink.c (coff_link_add_symbols): Check for symbols defined
2377 in discarded section.
2379 2019-03-15 Alan Modra <amodra@gmail.com>
2382 * elflink.c (elf_link_add_object_symbols): Bail out on a local
2383 symbol after globals if elf_bad_symtab is not set.
2385 2019-03-15 Alan Modra <amodra@gmail.com>
2388 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
2389 (_bfd_elf_rel_local_sym): Likewise.
2391 2019-03-15 Alan Modra <amodra@gmail.com>
2394 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
2395 object files with sh_size not a multiple of sh_entsize.
2397 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2400 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
2401 input with bad relocation.
2403 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2405 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2407 2019-03-14 Nick Clifton <nickc@redhat.com>
2410 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
2411 (save_section_vma): Initialise field to the number of entries in
2413 (section_vma_same): Check that the number of entries in the
2414 sec_vma table matches the number of sections in the bfd.
2416 2019-03-14 Nick Clifton <nickc@redhat.com>
2419 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
2420 section owner pointer when adding the default symbol.
2422 2019-03-14 Nick Clifton <nickc@redhat.com>
2425 * elflink.c (elf_link_add_object_symbols): Add new local variable
2426 extversym_end. Initialise it to point to the end of the version
2427 symbol table, if present. Check it when initialising and updating
2430 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2432 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
2433 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
2434 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
2435 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
2437 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
2438 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
2439 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
2441 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2442 Szabolcs Nagy <szabolcs.nagy@arm.com>
2444 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
2445 (aarch64_bti_pac_info): New.
2446 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
2447 (bfd_elf32_aarch64_set_options): Likewise.
2448 * bfd-in2.h: Regenerate
2449 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
2450 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
2451 (elfNN_aarch64_small_plt0_bti_entry): New.
2452 (elfNN_aarch64_small_plt_bti_entry): New.
2453 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
2454 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
2455 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
2456 tlsdesc_plt_entry_size fields.
2457 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
2458 (setup_plt_values): New helper function.
2459 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
2461 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
2463 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
2464 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
2465 to plt stubs instead of fixed ones and update filling them according
2466 to the need for bti.
2467 (elfNN_aarch64_init_small_plt0_entry): Likewise.
2468 (elfNN_aarch64_finish_dynamic_sections): Likewise.
2469 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
2470 (elfNN_aarch64_plt_sym_val): Update size accordingly.
2471 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
2473 (bfd_elfNN_get_synthetic_symtab): Define.
2474 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
2475 and mising BTI NOTE SECTION.
2478 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2480 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
2481 linker created inputs from merge.
2482 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
2483 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
2484 (elfNN_aarch64_link_setup_gnu_properties): New.
2485 (elfNN_aarch64_merge_gnu_properties): New.
2486 (elf_backend_setup_gnu_properties): Define for AArch64.
2487 (elf_backend_merge_gnu_properties): Likewise.
2488 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
2489 (_bfd_aarch64_elf_parse_gnu_properties): Define.
2490 (_bfd_aarch64_elf_merge_gnu_properties): Define.
2491 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
2492 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
2493 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
2494 (elf_backend_parse_gnu_properties): Define for AArch64.
2496 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
2499 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
2500 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
2502 2019-03-12 Alan Modra <amodra@gmail.com>
2504 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
2505 nmemb parameter. Use bfd_alloc2.
2506 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
2508 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
2509 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
2510 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
2512 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
2513 (assign_section_numbers): Style fix.
2514 (swap_out_syms): Use bfd_malloc2.
2515 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
2517 (_bfd_elf_make_empty_symbol): Style fix.
2518 (elfobj_grok_stapsdt_note_1): Formatting.
2519 * elfcode.h (elf_object_p): Use bfd_alloc2.
2520 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
2521 (elf_slurp_symbol_table): Use bfd_zalloc2.
2522 (elf_slurp_reloc_table): Use bfd_alloc2.
2523 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
2524 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
2525 size calculation doesn't overflow.
2526 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
2527 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
2528 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
2530 2019-03-08 Alan Modra <amodra@gmail.com>
2533 * merge.c (merge_strings): Return secinfo. Don't pad section
2535 (_bfd_merge_sections): Pad section to alignment here, if input
2536 sections contributing to merged output all pad to alignment.
2539 2019-03-06 Nick Clifton <nickc@redhat.com>
2541 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
2543 * coffgen.c (coff_find_nearest_line_with_names): Do not call
2544 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
2546 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
2548 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
2549 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2552 * elf32-s390.c (allocate_dynrelocs): Update comment.
2554 2019-02-28 Tamar Christina <tamar.christina@arm.com>
2556 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
2558 2019-02-28 Nick Clifton <nickc@redhat.com>
2561 * elf.c (bfd_elf_string_from_elf_section): Check for a string
2562 section that is not NUL terminated.
2564 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
2567 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
2568 by linker when checking copy reloc on protected symbol.
2570 2019-02-24 Alan Modra <amodra@gmail.com>
2573 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
2575 2019-02-20 Eric Tsai <erictsai@cadence.com>
2577 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
2578 sections between the call site and call destination and adjust
2579 call distance by the largest alignment.
2581 2019-02-20 Alan Hayward <alan.hayward@arm.com>
2583 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
2584 * elf.c (elfcore_grok_aarch_pauth): New function.
2585 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
2586 (elfcore_write_aarch_pauth): New function.
2587 (elfcore_write_register_note): Check for AArch64 pauth section.
2589 2019-02-20 Alan Modra <amodra@gmail.com>
2592 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
2595 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
2597 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
2598 Darwin hosts, not just or1k.
2599 * configure: Regenerate.
2601 2019-02-20 Alan Modra <amodra@gmail.com>
2604 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
2605 sentinel NUL to string buffer nearer to loop where it is used.
2606 Don't go past sentinel when scanning strings, and don't write
2608 * archive.c (do_slurp_coff_armap): Simplify string handling to
2611 2019-02-19 Alan Modra <amodra@gmail.com>
2614 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
2615 attempting to prevent read past end of section.
2617 2019-02-18 Alan Modra <amodra@gmail.com>
2620 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
2621 PRIx64 to generate warning messages. Print local sym names too.
2623 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
2625 * elf32-arc (INIT_SYM_STRING): Delete.
2626 (FINI_SYM_STRING): Likewise.
2627 (init_str): Likewise.
2628 (fini_str): Likewise.
2630 2019-02-08 Alan Modra <amodra@gmail.com>
2632 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
2633 for bss-plt" warning to make it an error.
2635 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2638 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
2639 reloc_class_ifunc for ifunc symbols.
2640 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
2642 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2644 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
2645 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
2647 2019-02-07 Nick Clifton <nickc@redhat.com>
2649 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
2650 into the definitely obsolete list.
2652 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
2655 * elf64-x86-64.c (elf_x86_64_need_pic): Check
2656 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
2657 (elf_x86_64_relocate_section): Move PIC check for PC-relative
2659 (elf_x86_64_check_relocs): Here.
2660 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
2661 to check if a symbol is defined in a non-shared object.
2662 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
2664 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
2666 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
2667 of 'labs' (and fix GCC warning).
2669 2019-01-25 Nick Clifton <nickc@redhat.com>
2671 * po/ru.po: Updated Russian translation.
2673 2019-01-23 Nick Clifton <nickc@redhat.com>
2675 * po/fr.po: Updated French translation.
2677 2019-01-21 Nick Clifton <nickc@redhat.com>
2679 * po/pt.po: Updated Portuguese translation.
2680 * po/uk.po: Updated Ukranian translation.
2682 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
2685 * elf32-nds32.c (nds32_relocate_section): Add space between words
2687 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
2689 (riscv_i_or_e_p): Likewise.
2690 (riscv_merge_arch_attr_info): Likewise.
2692 2019-01-19 Nick Clifton <nickc@redhat.com>
2694 * version.m4: Reset to 2.32.51
2695 * configure: Regenerate.
2696 * po/bfd.pot: Regenerate.
2698 2018-06-24 Nick Clifton <nickc@redhat.com>
2700 2.32 branch created.
2702 2019-01-16 Kito Cheng <kito@andestech.com>
2704 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
2707 2019-01-16 Kito Cheng <kito@andestech.com>
2708 Nelson Chu <nelson@andestech.com>
2710 * elfnn-riscv.c (in_subsets): New.
2711 (out_subsets): Likewise.
2712 (merged_subsets): Likewise.
2713 (riscv_std_ext_p): Likewise.
2714 (riscv_non_std_ext_p): Likewise.
2715 (riscv_std_sv_ext_p): Likewise.
2716 (riscv_non_std_sv_ext_p): Likewise.
2717 (riscv_version_mismatch): Likewise.
2718 (riscv_i_or_e_p): Likewise.
2719 (riscv_merge_std_ext): Likewise.
2720 (riscv_merge_non_std_and_sv_ext): Likewise.
2721 (riscv_merge_arch_attr_info): Likewise.
2722 (riscv_merge_attributes): Likewise.
2723 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
2725 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
2726 (elf_backend_obj_attrs_vendor): Define.
2727 (elf_backend_obj_attrs_section_type): Likewise.
2728 (elf_backend_obj_attrs_section): Likewise.
2729 (elf_backend_obj_attrs_arg_type): Define as
2730 riscv_elf_obj_attrs_arg_type.
2731 * elfxx-riscv.c (riscv_estimate_digit): New.
2732 (riscv_estimate_arch_strlen1): Likewise.
2733 (riscv_estimate_arch_strlen): Likewise.
2734 (riscv_arch_str1): Likewise.
2735 (riscv_arch_str): Likewise.
2736 * elfxx-riscv.h (riscv_arch_str): Declare.
2738 2019-01-14 John Darrington <john@darrington.wattle.id.au>
2740 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
2742 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
2743 source field. (md_apply_fix): Apply final fix
2744 to BFD_RELOC_S12Z_OPR.
2745 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
2747 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2750 * elf32-s390.c (allocate_dynrelocs): Update comment.
2752 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
2754 * warning.m4: Adjust egrep pattern for non-GNU compilers.
2755 * configure: Regenerate.
2757 2019-01-08 Alan Modra <amodra@gmail.com>
2761 * ihex.c (ihex_write_object_contents): Properly check 32-bit
2764 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
2766 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
2767 * bfd/bfd-in2.h: Regenerate.
2768 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
2769 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
2771 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
2773 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
2774 default target, little endian target is more suitable.
2776 2019-01-04 Alan Modra <amodra@gmail.com>
2780 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
2782 (EQ_VALUE_IN_FIELD): Likewise.
2783 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
2785 2019-01-01 Alan Modra <amodra@gmail.com>
2787 Update year range in copyright notice of all files.
2789 For older changes see ChangeLog-2018
2791 Copyright (C) 2019 Free Software Foundation, Inc.
2793 Copying and distribution of this file, with or without modification,
2794 are permitted in any medium without royalty provided the copyright
2795 notice and this notice are preserved.
2801 version-control: never