1 2019-11-18 Alan Modra <amodra@gmail.com>
3 * elf-bfd.h (struct elf_backend_data <elf_backend_init_file_header>):
4 Rename from elf_backend_post_process_headers.
5 (_bfd_elf_post_process_headers): Delete.
6 (_bfd_elf_init_file_header): Declare.
7 * elf.c (_bfd_elf_compute_section_file_positions): Call new function
8 in place of prep_headers and elf_backend_post_process_headers.
9 (_bfd_elf_init_file_header): Renamed from prep_headers with
10 updated args and made global. Delete dead code.
11 (_bfd_elf_post_process_headers): Delete.
12 * elf32-arm.c (elf32_arm_init_file_header): Rename from
13 elf32_arm_post_process_headers and call _bfd_elf_init_file_header.
15 (elf_backend_init_file_header): Define.
16 (elf_backend_post_process_headers): Don't define.
17 * elf32-i386.c (elf_i386_fbsd_init_file_header): Similarly.
18 * elf32-m68hc1x.c (elf32_m68hc11_init_file_header): Similarly.
19 * elf32-metag.c (elf_metag_init_file_header): Similarly.
20 * elf32-spu.c (spu_elf_init_file_header
21 * elf32-visium.c (visium_elf_init_file_header
22 * elf64-alpha.c (elf64_alpha_fbsd_init_file_header
23 * elf64-hppa.c (elf64_hppa_init_file_header
24 * elf64-ia64-vms.c (elf64_vms_init_file_header
25 * elfnn-aarch64.c (elfNN_aarch64_init_file_header
26 * elfnn-ia64.c (elfNN_hpux_init_file_header
27 * elfxx-mips.c (_bfd_mips_init_file_header
28 * elfxx-mips.h (_bfd_mips_post_process_headers): Delete.
29 (_bfd_mips_init_file_header): Declare.
30 (elf_backend_post_process_headers): Delete.
31 (elf_backend_init_file_header): Define.
32 * elfxx-target.h (elf_backend_post_process_headers): Delete.
33 (elf_backend_init_file_header): Define and use.
34 * elf32-m68hc12.c (elf_backend_init_file_header): Define.
35 (elf_backend_post_process_headers): Don't define.
36 * elf32-m68hc1x.h (elf32_m68hc11_post_process_headers): Delete.
37 (elf32_m68hc11_init_file_header): Declare.
38 * elf32-ppc.c (elf_backend_post_process_headers): Remove
41 2019-11-18 Alan Modra <amodra@gmail.com>
43 * elf-bfd.h (struct elf_backend_data <elf_backend_modify_headers>):
44 Rename from elf_backend_modify_program_headers.
45 (_bfd_elf_modify_headers): Declare.
46 * elf.c (assign_file_positions_except_relocs): Set
47 elf_program_header_size. Always call elf_backend_modify_headers.
48 Extract code modifying file header..
49 (_bfd_elf_modify_headers): ..to here. New function.
50 * elf32-arm.c (elf_backend_modify_headers): Renamed from
51 elf_backend_modify_program_headers.
52 * elf32-i386.c: Similarly.
53 * elf64-x86-64.c: Similarly.
54 * elfxx-target.h: Similarly. Default elf_backend_modify_headers
55 to _bfd_elf_modify_headers.
56 * elf-nacl.h (nacl_modify_headers): Rename from
57 nacl_modify_program_headers.
58 * elf-nacl.c (nacl_modify_headers): Rename from
59 nacl_modify_program_headers and call _bfd_elf_modify_headers.
60 * elf32-rx.c (elf32_rx_modify_headers): Similarly.
61 * elf32-spu.c (spu_elf_modify_headers): Similarly.
62 * elfnn-ia64.c (elfNN_ia64_modify_headers): Similarly.
63 * elf32-sh.c (elf_backend_modify_program_headers): Don't undef.
65 2019-11-18 Alan Modra <amodra@gmail.com>
68 * bfd.c (bfd_error_type): Add bfd_error_sorry.
69 (bfd_errmsgs): Likewise.
70 * elf.c (rewrite_elf_program_header): Don't abort on confused
71 lma/alignment. Replace bfd_error_bad_value with bfd_error_sorry.
72 (_bfd_elf_validate_reloc): Use bfd_error_sorry.
73 (_bfd_elf_final_write_processing): Likewise.
74 * bfd-in2.h: Regenerate.
76 2019-11-12 Jim Wilson <jimw@sifive.com>
79 * elfnn-riscv.c (_bfd_riscv_relax_call): Always add max_alignment to
80 foff. If sym_sec->output_section and sec->output_section are the same
81 and not *ABS* then set max_alignment to that section's alignment.
83 2019-11-07 Alan Modra <amodra@gmail.com>
85 * cpu-cr16c.c: Delete.
86 * elf32-cr16c.c: Delete.
92 * targets.c: Remove cr16c support.
97 * po/SRC-POTFILES.in: Regenerate.
99 2019-11-05 Tim Rühsen <tim.ruehsen@gmx.de>
101 * doc/chew.c (add_to_definition): Use correct type when
102 calculating size of array reallocation.
103 (nextword): Always initialise the word return parameter.
104 (compile): Check return value of nextword().
106 2019-10-30 Keith Seitz <keiths@redhat.com>
108 * elf-bfd.h (elf_backend_data) <elf_backend_core_find_build_id>:
110 (_bfd_elf32_core_find_build_id, _bfd_elf64_core_find_build_id):
112 (elf_read_notes): Add declaration.
113 * elf.c (elf_read_notes): Move elf-bfd.h.
114 (_bfd_elf_core_find_build_id): New function.
115 (bfd_section_from_phdr): Scan core file PT_LOAD segments for
116 build-id if none is known.
117 (elf_parse_notes): For core files, scan for notes.
118 * elfcore.h (elf_core_file_matches_executable_p): If both
119 BFDs have identical build-ids, then they match.
120 (_bfd_elf_core_find_build_id): New function.
121 * elfxx-target.h (elf_backend_core_find_build_id): Define.
122 (elfNN_bed): Add elf_backend_core_find_build_id.
124 2019-10-29 Andrew Eikum <aeikum@codeweavers.com>
126 * libcoff-in.h (struct pe_tdata): Add dos_message field.
127 * libcoff.h: Regenerate.
128 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Copy the
129 dos_message field rather than initialising it.
130 (_bfd_XX_bfd_copy_private_bfd_data_common): Copy the dos_message
132 * peicode.h (pe_mkobject): Initialise the dos_message field.
133 (pe_mkobject_hook): Copy the dos_message field.
134 (pe_bfd_object_p): Copy the dos_message field.
136 2019-10-25 Alan Modra <amodra@gmail.com>
139 * elf-nacl.c (nacl_modify_segment_map): Set no_sort_lma for all
141 * elf32-spu.c (spu_elf_modify_segment_map): Likewise on overlay
143 * elf.c (elf_sort_segments): New function.
144 (assign_file_positions_except_relocs): Use shortcuts to elfheader
145 and elf_tdata. Seek to e_phoff not sizeof_ehdr to write program
146 headers. Move PT_PHDR check..
147 (assign_file_positions_for_non_load_sections): ..and code setting
148 PT_PHDR p_vaddr and p_paddr, and code setting __ehdr_start value..
149 (assign_file_positions_for_load_sections): ..to here. Sort
150 PT_LOAD headers. Delete header_pad code. Use actual number of
151 headers rather than allocated in calculating size for program
152 headers. Don't assume program headers follow ELF file header.
153 Simplify pt_load_count code. Only set "off" for PT_LOAD or
155 (rewrite_elf_program_header): Set p_vaddr_offset for segments
156 that include file and program headers.
157 (copy_elf_program_header): Likewise, replacing header_size code.
159 2019-10-21 Alan Modra <amodra@gmail.com>
162 * archive.c (normalize): Return file unchanged when
163 BFD_ARCHIVE_FULL_PATH.
164 (_bfd_construct_extended_name_table): Pass abfd, the output
166 (_bfd_archive_bsd44_construct_extended_name_table): Likewise.
167 * bfd.c (struct bfd): Make flags a full flagword.
168 (BFD_ARCHIVE_FULL_PATH): Define.
169 * bfd-in2.h: Regenerate.
171 2019-10-20 John David Anglin <danglin@gcc.gnu.org>
173 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Provide 8-byte
174 minimum alignment for .plt section.
176 2019-10-19 John David Anglin <danglin@gcc.gnu.org>
178 * elf32-hppa.c: Revise import stub sequences.
179 (LONG_BRANCH_STUB_SIZE): Define.
180 (LONG_BRANCH_SHARED_STUB_SIZE): Define.
181 (IMPORT_STUB_SIZE): Define.
182 (IMPORT_SHARED_STUB_SIZE): Define.
183 (EXPORT_STUB_SIZE): Define.
184 (plt_stub): Revise to not use register %r22.
185 (LDO_R1_R22): Define.
186 (LDW_R22_R21): Define.
187 (LDW_R22_R19): Define.
188 (hppa_build_one_stub): Update stub generation and use new defines.
189 (hppa_size_one_stub): Likewise.
191 2019-10-17 Nelson Chu <nelson.chu@sifive.com>
193 * elfnn-riscv.c (riscv_elf_relocate_section): Report the error message
194 that user should recompile their code with `fPIC` when linking non-pic
195 code into shared library.
197 * elfnn-riscv.c (riscv_elf_relocate_section): Use asprintf to extend
198 the error message if needed, and then store the result into the
199 `msg_buf`. Finally, remember to free the unused `msg_buf`. All error
200 message for the dangerous relocation should be set before we call the
201 callback function. If we miss the error message since linker runs out
202 of memory, we should set the default error message for the error.
204 2019-10-16 Alan Modra <amodra@gmail.com>
207 * cpu-powerpc.c (bfd_arch_ppc_nop_fill): New function, use it
208 for all ppc arch info.
209 * linker.c (default_data_link_order): Pass info->big_endian to
210 arch_info->fill function.
212 2019-10-15 Alan Modra <amodra@gmail.com>
214 * elf32-m68hc1x.c (reloc_warning): Add printf attribute.
215 (elf32_m68hc11_relocate_section): Don't use a variable for format
216 strings. Delete some unnecessary xgettext:c-format comments.
218 2019-10-15 Alan Modra <amodra@gmail.com>
221 * elf32-arm.c (set_cmse_veneer_addr_from_implib): Use bfd_malloc
223 * elf32-m68hc1x.c (reloc_warning): New function.
224 (elf32_m68hc11_relocate_section): Use it here. Cast bfd_vma values
225 corresponding to %lx in format strings.
226 * elf32-nds32.c (nds32_insertion_sort): Use a stack temporary.
228 2019-10-15 Alan Modra <amodra@gmail.com>
231 * elf64-ppc.c (sfpr_define): Delete dead code that triggered a warning.
233 2019-10-15 Alan Modra <amodra@gmail.com>
235 * bfd.c (bfd_check_compression_header): Check for powers of two
238 2019-10-14 Alan Modra <amodra@gmail.com>
240 * syms.c (struct indexentry): Add idx field.
241 (cmpindexentry): Final sort on idx.
242 (_bfd_stab_section_find_nearest_line): Set idx.
244 2019-10-14 Alan Modra <amodra@gmail.com>
246 * dwarf2.c (struct lookup_funcinfo): Add idx field.
247 (compare_lookup_funcinfos): Perform final sort on idx.
248 (build_lookup_funcinfo_table): Set idx.
249 (compare_sequences): Perform final sort on num_lines.
250 (build_line_info_table): Set num_lines and line_info_lookup earlier.
251 (sort_line_sequences): Set num_lines for sort.
253 2019-10-14 Alan Modra <amodra@gmail.com>
255 * elflink.c (elf_sort_symbol): Sort on type and name as well.
256 (elf_link_add_object_symbols): Style fix.
258 2019-10-14 Alan Modra <amodra@gmail.com>
260 * elf.c (_bfd_elf_map_sections_to_segments): Init target_index
261 for sections about to be sorted.
262 (assign_file_positions_for_load_sections): Likewise.
263 (elf_sort_sections): Don't bother optimising both TOEND case.
264 * elflink.c (bfd_elf_final_link): Reset target_index.
266 2019-10-14 Alan Modra <amodra@gmail.com>
268 * elflink.c (elf_get_linked_section_vma): Delete.
269 (compare_link_order): Use elf_linked_to_section and sort by lma,
271 (elf_fixup_link_order): Use size_t variables where appropriate.
272 Make use of elf_linked_to_section. Formatting. Properly align
275 2019-10-14 Alan Modra <amodra@gmail.com>
277 * elf-strtab.c (strrevcmp): Comment.
278 * merge.c (strrevcmp): Likewise.
279 * elf64-ppc.c (compare_symbols): Correct final pointer comparison.
280 Comment on why comparing pointers ensures a stable sort.
281 * elflink.c (struct elf_symbol): Add void* to union.
282 (elf_sort_elf_symbol): Ensure a stable sort with pointer comparison.
283 (elf_sym_name_compare): Likewise.
284 (bfd_elf_match_symbols_in_sections): Style fix.
285 (elf_link_sort_cmp1): Comment.
287 2019-10-14 Alan Modra <amodra@gmail.com>
290 * elflink.c (elf_output_implib): Don't use xmalloc. Don't ignore
291 return value of bfd_alloc2.
292 * peXXigen.c (_bfd_XXi_write_codeview_record): Don't use xmalloc.
293 * pef.c (bfd_pef_print_symbol): Likewise. Don't ignore return
294 value of bfd_get_section_contents.
295 * som.c (som_write_space_strings): Don't use xmalloc.
296 (som_write_symbol_strings): Likewise.
298 2019-10-11 Max Filippov <jcmvbkbc@gmail.com>
300 * dwarf2.c (stash_maybe_enable_info_hash_tables): Only set
301 stash->info_hash_status = STASH_INFO_HASH_ON when
302 stash_maybe_update_info_hash_tables succeeds.
304 2019-10-09 Alan Modra <amodra@gmail.com>
307 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Catch overflow of
308 total_size calculation.
310 2019-10-08 Alan Modra <amodra@gmail.com>
313 * dwarf2.c (find_abstract_instance): Delete orig_info_ptr, add
314 recur_count. Error on recur_count reaching 100 rather than
315 info_ptr matching orig_info_ptr. Adjust calls.
317 2019-10-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
319 * elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Rename to..
320 (elf32_msp430_merge_msp430_attributes): Add support for merging
321 the GNU object attribute for data region.
323 2019-10-07 Alan Modra <amodra@gmail.com>
325 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Do allocate
326 space for local got non-tls relocs when PIE.
328 2019-10-07 Alan Modra <amodra@gmail.com>
330 * elflink.c (elf_fixup_link_order): Don't attempt to find
331 an elf_section for linker created bfd sections.
333 2019-10-07 Alan Modra <amodra@gmail.com>
335 * elf32-ppc.c (ppc_elf_tls_optimize): Don't process R_PPC_TLSLD
336 with non-local symbol. Don't double count __tls_get_addr calls
338 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
340 2019-10-07 Alan Modra <amodra@gmail.com>
342 * elf32-ppc.c (nomark_tls_get_addr): Rename from has_tls_get_addr_call
344 * elf64-ppc.c (nomark_tls_get_addr): Likewise.
346 2019-10-04 Alan Modra <amodra@gmail.com>
348 * elf64-ppc.c (ppc64_elf_check_relocs): Move initialisation of vars.
349 (ppc64_elf_tls_optimize): Correct is_local condition.
350 (allocate_got): Don't reserve dynamic relocations for any of the
351 tls got relocs in PIEs when the symbol is local.
352 (allocate_dynrelocs): Correct validity test for local sym using
354 (ppc64_elf_size_dynamic_sections): Don't reserve dynamic relocations
355 for any of the tls got relocs in PIEs.
356 (ppc64_elf_layout_multitoc): Likewise.
357 (ppc64_elf_relocate_section): Correct validity test for local sym
358 using tlsld_got slot. Don't emit dynamic relocations for any of
359 the tls got relocs in PIEs when the symbol is local.
360 * elf32-ppc.c (ppc_elf_tls_optimize): Correct is_local condition.
361 (got_relocs_needed): Delete.
362 (allocate_dynrelocs): Correct validity test for local sym using
363 tlsld_got slot. Don't reserve dynamic relocations for any of the
364 tls got relocs in PIEs when the symbol is local.
365 (ppc_elf_size_dynamic_sections): Don't reserve dynamic relocations
366 for any of the tls got relocs in PIEs.
367 (ppc_elf_relocate_section): Correct validity test for local sym
368 using tlsld_got slot. Don't emit dynamic relocations for any of
369 the tls got relocs in PIEs when the symbol is local.
371 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
375 * elf32-arm.c (elf32_arm_tls_transition): Use bfd_link_dll instead of
376 bfd_link_pic for TLS checks.
377 (elf32_arm_final_link_relocate): Likewise.
378 (allocate_dynrelocs_for_symbol): Likewise.
380 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
383 * elf32-arm.c (elf32_arm_final_link_relocate): Sign extend data.
385 2019-09-30 Nick Alcock <nick.alcock@oracle.com>
387 * elf-bfd.h (bfd_section_is_ctf): New inline function.
388 * elf.c (special_sections_c): Add ".ctf".
389 (assign_file_positions_for_non_load_sections): Note that
390 compressed debugging sections etc are not assigned here. Treat
391 CTF sections like SEC_ELF_COMPRESS sections when is_linker_output:
393 (assign_file_positions_except_relocs): Likewise.
394 (find_section_in_list): Note that debugging and CTF sections, as
395 well as reloc sections, are assigned later.
396 (_bfd_elf_assign_file_positions_for_non_load): CTF sections get
397 their size and contents updated.
398 (_bfd_elf_set_section_contents): Skip CTF sections: unlike
399 compressed sections, they have no uncompressed content to copy at
401 * elflink.c (elf_link_swap_symbols_out): Call the examine_strtab
402 callback right before the strtab is written out.
403 (bfd_elf_final_link): Don't cache the section contents of CTF
404 sections: they are not populated yet. Call the emit_ctf callback
405 right at the end, after all the symbols and strings are flushed
408 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
410 * elf-strtab.c (_bfd_elf_strtab_len): New.
411 (_bfd_elf_strtab_str): Likewise.
412 * bfd-elf.h: Declare them.
414 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
416 * elf-bfd.h (bfd_elf_get_str_section): Add.
417 * elf.c (bfd_elf_get_str_section): No longer static.
419 2019-09-26 Alan Modra <amodra@gmail.com>
422 * Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
423 * plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
424 ${bindir}/../lib/bfd-plugins if different.
425 * Makefile.in: Regenerate.
427 2019-09-23 Alan Modra <amodra@gmail.com>
429 * elf64-ppc.c (ppc64_elf_check_relocs): Use bfd_link_executable
430 in choosing between different actions for shared library and
431 non-shared library cases. Delete ELIMINATE_COPY_RELOCS test.
432 (dec_dynrel_count): Likewise. Account for ifunc special case.
433 (ppc64_elf_adjust_dynamic_symbol): Copy relocs are for executables,
435 (allocate_dynrelocs): Comment fixes. Delete ELIMINATE_COPY_RELOCS
438 2019-09-23 Alan Modra <amodra@gmail.com>
440 * Makefile.am (SOURCE_HFILES): Add many missing .h files.
441 * Makefile.in: Regenerate.
442 * po/SRC-POTFILES.in: Regenerate.
444 2019-09-23 Alan Modra <amodra@gmail.com>
446 * bfd-in.h (bfd_symbol, bfd_section_already_linked),
447 (bfd_elf_version_tree): Delete forward declarations.
448 Move other forward decls and remaining elf function decl later.
449 (bfd_section_already_linked_table_init),
450 (bfd_section_already_linked_table_free),
451 (_bfd_handle_already_linked, _bfd_nearby_section),
452 (_bfd_fix_excluded_sec_syms): Move to bfdlink.h.
454 2019-09-23 Alan Modra <amodra@gmail.com>
456 * bfd-in.h: Move ecoff function declarations..
457 * ecoff-bfd.h: ..to here, new file.
458 * ecoff.c: Include ecoff-bfd.h.
459 * ecofflink.c: Likewise.
460 * elf64-alpha.c: Likewise.
461 * elfxx-mips.c: Likewise.
462 * bfd-in2.h: Regenerate.
464 2019-09-23 Alan Modra <amodra@gmail.com>
466 * bfd-in.h (enum notice_asneeded_action): Move to bfdlink.h.
467 Move most other elf declarations..
468 * elf-bfd.h: ..to here.
469 * bfd-in2.h: Regenerate.
471 2019-09-23 Alan Modra <amodra@gmail.com>
473 * bfd-in.h: Move m68k function declaration..
474 * cpu-m68k.h: ..to here, new file..
475 * elf32-m68k.h: ..and here, new file.
476 * elf32-m68k.c: Include cpu-m68k.h and elf32-m68k.h.
477 * bfd-in2.h: Regenerate.
479 2019-09-23 Alan Modra <amodra@gmail.com>
481 * bfd-in.h: Move bfin function declaration..
482 * elf32-bfin.h: ..to here, new file.
483 * elf32-bfin.c: Include elf32-bfin.h.
484 * bfd-in2.h: Regenerate.
486 2019-09-23 Alan Modra <amodra@gmail.com>
488 * bfd-in.h: Move cr16 function declaration..
489 * elf32-cr16.h: ..to here, new file.
490 * elf32-cr16.c: Include elf32-cr16.h.
491 * bfd-in2.h: Regenerate.
493 2019-09-23 Alan Modra <amodra@gmail.com>
495 * bfd-in.h (bfd_sunos_get_needed_list),
496 (bfd_sunos_record_link_assignment),
497 (bfd_sunos_size_dynamic_sections),
498 (bfd_i386linux_size_dynamic_sections),
499 (bfd_sparclinux_size_dynamic_sections): Delete obsolete decls.
500 * bfd-in2.h: Regenerate.
502 2019-09-23 Alan Modra <amodra@gmail.com>
504 * bfd-in.h: Move xcoff function declarations..
505 * xcofflink.h: ..to here, new file.
506 * xcofflink.c: Include xcofflink.h.
507 * coff-rs6000.c (bfd_xcoff_ar_archive_set_magic): Delete unused func.
508 * bfd-in2.h: Regenerate.
510 2019-09-23 Alan Modra <amodra@gmail.com>
512 * bfd-in.h: Delete coff forward refs and move coff declaration..
513 * coff-bfd.h: ..to here.
514 * bfd-in2.h: Regenerate.
516 2019-09-23 Alan Modra <amodra@gmail.com>
518 * bfd-in.h: Move arm declaraions..
519 * cpu-arm.h: ..to here, new file..
520 * coff-arm.h: ..and here, new file..
521 * elf32-arm.h: ..and here, new file.
522 * cpu-arm.c: Include cpu-arm.h.
523 * coff-arm.c: Include cpu-arm.h and coff-arm.h.
524 * elf32-arm.c: Include cpu-arm.h and elf32-arm.h.
525 * pe-arm.c: Move function rename defines later.
526 * pe-arm-wince.c: Likewise and include sysdep.h and bfd.h early.
527 * bfd-in2.h: Regenerate.
529 2019-09-23 Alan Modra <amodra@gmail.com>
531 * bfd-in.h: Move tic6x function declaration..
532 * elf32-tic6x.h: ..to here.
533 * bfd-in2.h: Regenerate.
535 2019-09-23 Alan Modra <amodra@gmail.com>
537 * bfd-in.h: Move aarch64 declarations and defines..
538 * cpu-aarch64.h: ..to here, new file..
539 * elfxx-aarch64.h: ..and here.
540 * cpu-aarch64.c: Include cpu-aarch64.h.
541 * elfnn-aarch64.c: Likewise.
542 * bfd-in2.h: Regenerate.
544 2019-09-23 Alan Modra <amodra@gmail.com>
546 * bfd-in.h: Delete ticoff function declarations.
547 * coff-tic54x.c (bfd_ticoff_set_section_load_page),
548 (bfd_ticoff_get_section_load_page): Make static.
549 * bfd-in2.h: Regenerate.
551 2019-09-23 Alan Modra <amodra@gmail.com>
553 * bfd-in.h: Move h8300 function declaration to..
554 * cpu-h8300.h: ..here, new file.
555 * cpu-h8300.c: Include cpu-h8300.h.
556 * elf32-h8300.c: Likewise.
557 * bfd-in2.h: Regenerate.
559 2019-09-23 Alan Modra <amodra@gmail.com>
561 * bfd-in.h: Move ia64 function declarations..
562 * elfxx-ia64.h: ..to here.
563 * bfd-in2.h: Regenerate.
565 2019-09-23 Alan Modra <amodra@gmail.com>
567 * bfd-in.h: Move v850 function declarations..
568 * elf32-v850.h: ..to here, new file.
569 * elf32-v850.c: Include elf32-v850.h.
570 * bfd-in2.h: Regenerate.
572 2019-09-23 Alan Modra <amodra@gmail.com>
574 * bfd-in.h: Move mips function declaration to..
575 * elfxx-mips.h: ..here.
576 * bfd-in2.h: Regenerate.
578 2019-09-23 Alan Modra <amodra@gmail.com>
580 * bfd-in.h: Move csky function declarations to..
581 * elf32-csky.h: ..here, new file.
582 * elf32-csky.c: Include elf32-csky.h.
583 * bfd-in2.h: Regenerate.
585 2019-09-20 Nelson Chu <nelson.chu@sifive.com>
587 * elfnn-riscv.c (riscv_pcgp_hi_reloc): Add new field undefined_weak.
588 (riscv_record_pcgp_hi_reloc): New parameter undefined_weak.
589 Set undefined_weak field from it.
590 (relax_func_t): New parameter undefined_weak.
591 (_bfd_riscv_relax_call): New ignored parameter undefined_weak.
592 (_bfd_riscv_relax_tls_le): Likewise.
593 (_bfd_riscv_relax_align): Likewise.
594 (_bfd_riscv_relax_delete): Likewise.
595 (_bfd_riscv_relax_lui): New parameter undefined_weak. If true,
596 allow relaxing. For LO12* relocs, set rs1 to x0 when undefined_weak.
597 (_bfd_riscv_relax_pc): New parameter undefined_weak. For LO12* relocs,
598 set undefined_weak from hi_reloc. If true, allow relaxing. For LO12*
599 relocs, set rs1 to x0 when undefined_weak and change to non-pcrel
601 (_bfd_riscv_relax_section): New local undefined_weak. Set for
602 undef weak relocs that can be relaxed. Pass to relax_func call.
604 2019-09-20 Alan Modra <amodra@gmail.com>
606 * bfd-in.h (bfd_section_name, bfd_section_size, bfd_section_vma),
607 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
608 (bfd_section_userdata, bfd_is_com_section, discarded_section),
609 (bfd_get_section_limit_octets, bfd_get_section_limit): Delete macros.
610 * bfd.c (bfd_get_section_limit_octets, bfd_get_section_limit),
611 (bfd_section_list_remove, bfd_section_list_append),
612 (bfd_section_list_prepend, bfd_section_list_insert_after),
613 (bfd_section_list_insert_before, bfd_section_removed_from_list):
614 New inline functions.
615 * section.c (bfd_is_und_section, bfd_is_abs_section),
616 (bfd_is_ind_section, bfd_is_const_section, bfd_section_list_remove),
617 (bfd_section_list_append, bfd_section_list_prepend),
618 (bfd_section_list_insert_after, bfd_section_list_insert_before),
619 (bfd_section_removed_from_list): Delete macros.
620 (bfd_section_name, bfd_section_size, bfd_section_vma),
621 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
622 (bfd_section_userdata, bfd_is_com_section, bfd_is_und_section),
623 (bfd_is_abs_section, bfd_is_ind_section, bfd_is_const_section),
624 (discarded_section): New inline functions.
625 * bfd-in2.h: Regenerate.
627 2019-09-20 Alan Modra <amodra@gmail.com>
629 * bfd-in.h (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
630 (bfd_asymbol_bfd, bfd_asymbol_flavour, bfd_set_asymbol_name): Delete.
631 * bfd.c (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
632 (bfd_asymbol_bfd, bfd_set_asymbol_name): New inline functions.
633 * targets.c (bfd_asymbol_flavour): Likewise.
634 * bfd-in2.h: Regenerate.
636 2019-09-20 Alan Modra <amodra@gmail.com>
638 * archive.c (bfd_generic_archive_p): Use bfd_set_thin_archive.
639 * bfd-in.h (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
640 (bfd_get_target, bfd_get_flavour, bfd_family_coff, bfd_big_endian),
641 (bfd_little_endian, bfd_header_big_endian, bfd_header_little_endian),
642 (bfd_get_file_flags, bfd_applicable_file_flags),
643 (bfd_applicable_section_flags, bfd_has_map, bfd_is_thin_archive),
644 (bfd_valid_reloc_types, bfd_usrdata, bfd_get_start_address),
645 (bfd_get_symcount, bfd_get_outsymbols, bfd_count_sections),
646 (bfd_get_dynamic_symcount, bfd_get_symbol_leading_char): Delete.
647 * bfd/bfd.c (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
648 (bfd_get_file_flags, bfd_get_start_address, bfd_get_symcount),
649 (bfd_get_dynamic_symcount, bfd_get_outsymbols, bfd_count_sections),
650 (bfd_has_map, bfd_is_thin_archive, bfd_set_thin_archive),
651 (bfd_usrdata, bfd_set_usrdata): New inline functions.
652 * targets.c (bfd_get_target, bfd_get_flavour),
653 (bfd_applicable_file_flags, bfd_family_coff, bfd_big_endian),
654 (bfd_little_endian, bfd_header_big_endian),
655 (bfd_header_little_endian, bfd_applicable_section_flags),
656 (bfd_get_symbol_leading_char): New inline functions.
657 * bfd-in2.h: Regenerate.
659 2019-09-20 Alan Modra <amodra@gmail.com>
661 * elf64-ppc.c (ppc64_glibc_dynamic_reloc): New function.
662 (ppc64_elf_relocate_section): Warn if emitting unsupported dynamic
665 2019-09-18 Alan Modra <amodra@gmail.com>
667 * bfd-in.h (bfd_get_section_name, bfd_get_section_vma),
668 (bfd_get_section_lma, bfd_get_section_alignment),
669 (bfd_get_section_size, bfd_get_section_flags),
670 (bfd_get_section_userdata): Delete.
671 (bfd_section_name, bfd_section_size, bfd_section_vma),
672 (bfd_section_lma, bfd_section_alignment): Lose bfd parameter.
673 (bfd_section_flags, bfd_section_userdata): New.
674 (bfd_is_com_section): Rename parameter.
675 * section.c (bfd_set_section_userdata, bfd_set_section_vma),
676 (bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section),
677 (bfd_set_section_size): Delete bfd parameter, rename section parameter.
678 (bfd_set_section_lma): New.
679 * bfd-in2.h: Regenerate.
680 * mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param,
682 * aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c,
683 * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
684 * compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h,
685 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c,
686 * elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c,
687 * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
688 * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c,
689 * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c,
690 * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c,
691 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
692 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
693 * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
694 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
695 * elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c,
696 * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
697 * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
698 * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c,
699 * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
700 * elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
701 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
702 * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c,
703 * elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
704 * elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c,
705 * mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c,
706 * peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c,
707 * xcofflink.c: Update throughout for bfd section macro and function
710 2019-09-18 Alan Modra <amodra@gmail.com>
712 * bfd-in.h (bfd_asymbol_section): Rename from bfd_get_section.
713 (bfd_get_output_section): Delete.
714 (bfd_asymbol_base): Delete.
715 (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
716 (bfd_asymbol_bfd, bfd_asymbol_flavour): Tidy.
717 (bfd_set_asymbol_name): New macro.
718 * bfd-in2.h: Regenerate.
719 * aout-cris.c: Update throughout to use bfd_asymbol_section.
721 * cofflink.c: Likewise.
722 * dwarf2.c: Likewise.
725 * elf32-arm.c: Likewise.
726 * elf32-mips.c: Likewise.
727 * elf32-score.c: Likewise.
728 * elf32-score7.c: Likewise.
729 * elfn32-mips.c: Likewise.
730 * elfnn-aarch64.c: Likewise.
731 * elfxx-mips.c: Likewise.
732 * linker.c: Likewise.
734 * elf64-mmix.c (mmix_elf_reloc): Part expand bfd_get_output_section.
736 2019-09-18 Simon Marchi <simon.marchi@polymtl.ca>
738 * Makefile.in: Re-generate.
739 * configure: Re-generate.
740 * doc/Makefile.in: Re-generate.
742 2019-09-18 Alan Modra <amodra@gmail.com>
744 * aoutx.h (slurp_symbol_table): Don't set symcount using bfd_get
746 * pdp11.c (slurp_symbol_table): Likewise.
747 * som.c (som_slurp_symbol_table): Likewise.
748 * coff-ppc.c (ppc_bfd_coff_final_link): Likewise.
749 * coffcode.h (coff_slurp_symbol_table): Likewise.
750 * cofflink.c (_bfd_coff_final_link): Likewise.
751 * ecoff.c (ecoff_slurp_symbolic_header): Likewise.
752 (_bfd_ecoff_slurp_symbolic_info): Likewise.
753 (_bfd_ecoff_slurp_symbol_table): Likewise.
754 (_bfd_ecoff_bfd_final_link): Likewise.
755 * elf.c (_bfd_elf_canonicalize_symtab): Likewise.
756 * elflink.c (elf_link_output_symstrtab): Likewise.
757 (bfd_elf_final_link): Likewise.
758 * peicode.h (pe_ILF_build_a_bfd): Likewise.
759 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
760 * aoutx.h (some_aout_object_p, slurp_symbol_table): Don't set
761 start_address or symcount using bfd_get macros.
762 * coffgen.c (coff_real_object_p): Likewise.
763 * pdp11.c (some_aout_object_p, slurp_symbol_table): Likewise.
764 * som.c (som_object_setup, som_slurp_symbol_table): Likewise.
765 * elfcore.h (elf_core_file_p): Don't set start_address using
767 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Don't set dynsymcount
769 * bfd.c (bfd_set_file_flags): Don't set flags using bfd_get macro.
770 * linker.c (bfd_generic_link_read_symbols): Don't set outsymbols
771 or symcount using bfd_get macros.
772 (_bfd_generic_final_link, generic_add_output_symbol): Likewise.
773 * syms.c (bfd_set_symtab): Likewise.
774 * vms-alpha.c (alpha_vms_bfd_final_link): Likewise.
775 * archive.c (do_slurp_bsd_armap): Don't set has_armap using
777 (do_slurp_coff_armap, bfd_slurp_armap): Likewise.
778 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
779 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
780 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
781 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
782 * som.c (som_slurp_armap): Likewise.
784 2019-09-18 Alan Modra <amodra@gmail.com>
786 * archures.c (bfd_get_arch): Make param const.
787 (bfd_get_mach, bfd_arch_bits_per_byte): Likewise.
788 (bfd_arch_bits_per_address, bfd_octets_per_byte): Likewise.
789 * bfd-in2.h: Regenerate.
791 2019-09-18 Alan Modra <amodra@gmail.com>
793 * bfd-in.h (carsym.name): Make const.
794 * reloc.c (struct reloc_howto_struct.name): Likewise.
795 * targets.c (bfd_target.name): Likewise.!
796 * bfd.c (bfd_get_sign_extend_vma): Make variable const.
797 * som.c (som_bfd_fill_in_ar_symbols): Use an intermediary variable
798 when setting carsym.name.
799 * bfd-in2.h: Regenerate.
801 2019-09-18 Alan Modra <amodra@gmail.com>
803 * mach-o.c (bfd_mach_o_fat_member_init): Likewise. Replace
804 xstrdup and xmalloc with bfd_strdup and bfd_malloc. Return an
805 error status. Adjust calls.
806 * vms-lib.c (_bfd_vms_lib_get_module): Test mhd->id earlier.
807 Close bfd on failure. Replace xstrdup/bfd_alloc use with
808 bfd_malloc. Use bfd_set_filename.
810 2019-09-18 Alan Modra <amodra@gmail.com>
812 * elf64-ppc.c (must_be_dyn_reloc): Return 0 for TOC16 relocs.
813 (ppc64_elf_check_relocs): Support dynamic/copy relocs for TOC16.
814 (ppc64_elf_adjust_dynamic_symbol): Don't keep dynamic reloc when
815 needs_copy even if all relocs are in rw sections.
816 (dec_dynrel_count): Handle TOC16 relocs.
817 (ppc64_elf_relocate_section): Support dynamic relocs for TOC16.
818 (ppc64_elf_finish_dynamic_symbol): Adjust to handle needs_copy
821 2019-09-16 Phil Blundell <pb@pbcl.net>
823 * version.m4: Set version to 2.33.50.
824 * Makefile.in, configure, doc/Makefile.in: Regenerated.
826 2019-09-11 Tom Tromey <tom@tromey.com>
828 * opncls.c (bfd_set_filename): New function.
829 * bfd-in2.h: Regenerate.
831 2019-09-11 Alan Modra <amodra@gmail.com>
833 * targets.c (struct bfd_target): Add _bfd_group_name.
834 (BFD_JUMP_TABLE): Likewise.
835 * coffgen.c (bfd_coff_group_name): New function.
836 * elf.c (bfd_elf_group_name): New function.
837 * linker.c (_bfd_nolink_bfd_group_name): New function.
838 * section.c (bfd_generic_group_name): New function.
839 * elf-bfd.h (bfd_elf_group_name): Declare.
840 * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
841 * libcoff-in.h (bfd_coff_group_name): Declare.
842 * aout-target.h (MY_bfd_group_name): Define.
843 * aout-tic30.c (MY_bfd_group_name): Define.
844 * bfd.c (bfd_group_name): Define.
845 * binary.c (binary_bfd_group_name): Define.
846 * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
847 * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
848 * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
849 * coffcode.h (coff_bfd_group_name): Define.
850 * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
851 * i386msdos.c (msdos_bfd_group_name): Define.
852 * ihex.c (ihex_bfd_group_name): Define.
853 * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
854 * mmo.c (mmo_bfd_group_name): Define.
855 * pef.c (bfd_pef_bfd_group_name): Define.
856 * plugin.c (bfd_plugin_bfd_group_name): Define.
857 * ppcboot.c (ppcboot_bfd_group_name): Define.
858 * som.c (som_bfd_group_name): Define.
859 * srec.c (srec_bfd_group_name): Define.
860 * tekhex.c (tekhex_bfd_group_name): Define.
861 * verilog.c (verilog_bfd_group_name): Define.
862 * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
863 * xsym.c (bfd_sym_bfd_group_name): Define.
864 * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
865 (rs6000_xcoff64_aix_vec): Likewise.
866 * bfd-in2.h: Regenerate.
867 * libbfd.h: Regenerate.
868 * libcoff.h: Regenerate.
870 2019-09-10 Nick Clifton <nickc@redhat.com>
873 * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
875 (bfd_default_arch_struct): Initialise the new field.
876 * bfd-in2.h: Regenerate.
877 * cpu-aarch64.c: Initialise the new field.
878 * cpu-alpha.c: Likewise.
879 * cpu-arc.c: Likewise.
880 * cpu-arm.c: Likewise.
881 * cpu-avr.c: Likewise.
882 * cpu-bfin.c: Likewise.
883 * cpu-bpf.c: Likewise.
884 * cpu-cr16.c: Likewise.
885 * cpu-cr16c.c: Likewise.
886 * cpu-cris.c: Likewise.
887 * cpu-crx.c: Likewise.
888 * cpu-csky.c: Likewise.
889 * cpu-d10v.c: Likewise.
890 * cpu-d30v.c: Likewise.
891 * cpu-dlx.c: Likewise.
892 * cpu-epiphany.c: Likewise.
893 * cpu-fr30.c: Likewise.
894 * cpu-frv.c: Likewise.
895 * cpu-ft32.c: Likewise.
896 * cpu-h8300.c: Likewise.
897 * cpu-hppa.c: Likewise.
898 * cpu-i386.c: Likewise.
899 * cpu-ia64.c: Likewise.
900 * cpu-iamcu.c: Likewise.
901 * cpu-ip2k.c: Likewise.
902 * cpu-iq2000.c: Likewise.
903 * cpu-k1om.c: Likewise.
904 * cpu-l1om.c: Likewise.
905 * cpu-lm32.c: Likewise.
906 * cpu-m10200.c: Likewise.
907 * cpu-m10300.c: Likewise.
908 * cpu-m32c.c: Likewise.
909 * cpu-m32r.c: Likewise.
910 * cpu-m68hc11.c: Likewise.
911 * cpu-m68hc12.c: Likewise.
912 * cpu-m68k.c: Likewise.
913 * cpu-m9s12x.c: Likewise.
914 * cpu-m9s12xg.c: Likewise.
915 * cpu-mcore.c: Likewise.
916 * cpu-mep.c: Likewise.
917 * cpu-metag.c: Likewise.
918 * cpu-microblaze.c: Likewise.
919 * cpu-mips.c: Likewise.
920 * cpu-mmix.c: Likewise.
921 * cpu-moxie.c: Likewise.
922 * cpu-msp430.c: Likewise.
923 * cpu-mt.c: Likewise.
924 * cpu-nds32.c: Likewise.
925 * cpu-nfp.c: Likewise.
926 * cpu-nios2.c: Likewise.
927 * cpu-ns32k.c: Likewise.
928 * cpu-or1k.c: Likewise.
929 * cpu-pdp11.c: Likewise.
930 * cpu-pj.c: Likewise.
931 * cpu-plugin.c: Likewise.
932 * cpu-powerpc.c: Likewise.
933 * cpu-pru.c: Likewise.
934 * cpu-riscv.c: Likewise.
935 * cpu-rl78.c: Likewise.
936 * cpu-rs6000.c: Likewise.
937 * cpu-rx.c: Likewise.
938 * cpu-s12z.c: Likewise.
939 * cpu-s390.c: Likewise.
940 * cpu-score.c: Likewise.
941 * cpu-sh.c: Likewise.
942 * cpu-sparc.c: Likewise.
943 * cpu-spu.c: Likewise.
944 * cpu-tic30.c: Likewise.
945 * cpu-tic4x.c: Likewise.
946 * cpu-tic54x.c: Likewise.
947 * cpu-tic6x.c: Likewise.
948 * cpu-tic80.c: Likewise.
949 * cpu-tilegx.c: Likewise.
950 * cpu-tilepro.c: Likewise.
951 * cpu-v850.c: Likewise.
952 * cpu-v850_rh850.c: Likewise.
953 * cpu-vax.c: Likewise.
954 * cpu-visium.c: Likewise.
955 * cpu-wasm32.c: Likewise.
956 * cpu-xc16x.c: Likewise.
957 * cpu-xgate.c: Likewise.
958 * cpu-xstormy16.c: Likewise.
959 * cpu-xtensa.c: Likewise.
960 * cpu-z80.c: Likewise.
961 * cpu-z8k.c: Likewise.
963 2019-09-09 Phil Blundell <pb@pbcl.net>
965 binutils 2.33 branch created.
967 2019-09-06 Alan Modra <amodra@gmail.com>
969 * aout-target.h (object_p): Formatting.
970 * bfd-in.h (bfd_get_filename): Don't cast to char*.
971 * corefile.c (generic_core_file_matches_executable_p): Constify
972 variables and remove cast.
973 * bfd-in2.h: Regenerate.
975 2019-09-05 Alan Modra <amodra@gmail.com>
977 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
978 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
979 in the GOT/PLT entry rather than affecting the offset to that
981 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
983 2019-09-05 Alan Modra <amodra@gmail.com>
985 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
986 in second instruction.
987 (ppc64_elf_relocate_section): Likewise.
989 2019-09-05 Alan Modra <amodra@gmail.com>
992 * libbfd-in.h (bfd_strdup): New inline function.
993 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
995 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
996 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
998 (bfd_openstreamr): Use bfd_strdup.
999 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
1000 * plugin.c (try_load_plugin): Use bfd_malloc.
1001 * libbfd.h: Regenerate.
1003 2019-09-02 Alan Modra <amodra@gmail.com>
1006 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
1008 (read_alt_indirect_string): Likewise.
1009 (read_alt_indirect_ref): Likewise.
1011 2019-08-31 Jim Wilson <jimw@sifive.com>
1014 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
1015 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
1017 2019-08-30 Jim Wilson <jimw@sifive.com>
1019 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
1020 error, call bfd_set_error, set ret to FALSE, and goto out label.
1022 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
1025 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
1026 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
1028 2019-08-29 Alan Modra <amodra@gmail.com>
1031 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
1032 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
1033 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
1036 2019-08-29 Alan Modra <amodra@gmail.com>
1038 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
1039 on second insn, return it in poff.
1040 (ppc64_elf_relocate_section): Add offset to paddi addend for
1043 2019-08-28 Jim Wilson <jimw@sifive.com>
1045 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
1046 section when setting max_alignment. Update comment.
1047 (_bfd_riscv_relax_pc): Likewise.
1049 2019-08-29 Alan Modra <amodra@gmail.com>
1052 * bfd.c (struct bfd): Add no_element_cache.
1053 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
1054 archive cache when no_element_cache.
1055 (bfd_generic_archive_p): Set no_element_cache when opening first
1056 element to check format. Close first element too.
1057 (do_slurp_bsd_armap): Don't zero ardata->cache here.
1058 * bfd-in2.h: Regenerate.
1060 2019-08-24 Alan Modra <amodra@gmail.com>
1062 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
1063 symbols from GOT optimisation.
1065 2019-08-23 Stafford Horne <shorne@gmail.com>
1067 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
1070 2019-08-23 Nick Clifton <nickc@redhat.com>
1073 * elf.c (bfd_section_from_shdr): Issue an informative warning
1074 message and continue processing other sections after encountering
1075 a reloc section for a section which already has other relocs
1078 2019-08-23 Alan Modra <amodra@gmail.com>
1081 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
1082 on error without freeing plts[] contents.
1084 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
1086 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
1088 2019-08-22 Nick Clifton <nickc@redhat.com>
1091 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
1092 reading data from extra records.
1094 2019-08-22 Tamar Christina <tamar.christina@arm.com>
1097 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
1098 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
1099 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
1100 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
1103 2019-08-22 Alan Modra <amodra@gmail.com>
1105 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
1106 instead recognize CMSE_PREFIX in symbol name.
1107 (elf32_arm_gc_mark_extra_sections): Likewise.
1108 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
1109 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
1111 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
1113 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
1114 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
1116 2019-08-20 Tamar Christina <tamar.christina@arm.com>
1118 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
1119 elf32_arm_stub_long_branch_v4t_thumb_thumb,
1120 elf32_arm_stub_long_branch_v4t_thumb_arm,
1121 elf32_arm_stub_short_branch_v4t_thumb_arm,
1122 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
1123 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
1124 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
1125 previous instruction.
1127 2019-08-19 Tom Tromey <tromey@adacore.com>
1129 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
1132 2019-08-19 Alan Modra <amodra@gmail.com>
1134 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
1136 (struct _ppc64_elf_section_data): Likewise.
1137 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
1138 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
1139 than TOC loop. Check PLT16 insns too.
1141 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
1144 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
1145 PC-relative relocations back to ...
1146 (elf_x86_64_relocate_section): Here.
1148 2019-08-16 Martin Liska <mliska@suse.cz>
1151 * elflink.c: Report error only for not relocatable.
1152 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
1153 here lto_slim_object as it's handled in caller.
1155 2019-08-16 Alan Modra <amodra@gmail.com>
1157 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
1159 2019-08-15 Jim Wilson <jimw@sifive.com>
1161 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
1162 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
1163 to c.li instruction, and use ENCODE_RVC_IMM to set value.
1165 2019-08-15 Tom Tromey <tromey@adacore.com>
1167 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
1170 2019-08-14 Alan Modra <amodra@gmail.com>
1173 * dwarf2.c (stash_comp_unit): New function, extracted from..
1174 (_bfd_dwarf2_find_nearest_line): ..here.
1175 (find_abstract_instance): Parse comp units and decode line info
1178 2019-08-14 Alan Modra <amodra@gmail.com>
1180 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
1181 (comp_unit_find_nearest_line): Use it here..
1182 (_bfd_dwarf2_find_symbol_bias): ..and here.
1184 2019-08-14 Alan Modra <amodra@gmail.com>
1186 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
1187 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
1188 * coffgen.c (coff_find_nearest_line_with_names): Adjust
1189 _bfd_dwarf2_find_nearest_line calls.
1190 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
1191 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
1192 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
1193 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
1194 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
1195 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
1196 * libbfd.h: Regenerate.
1198 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
1200 * elf-bfd.h (struct elf_backend_data): New members.
1201 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
1202 .gnu.hash section if necessary.
1203 (struct collect_gnu_hash_codes): New member.
1204 (elf_gnu_hash_process_symidx): New function name.
1205 (elf_renumber_gnu_hash_syms): Ignore local and undefined
1206 symbols. Record xlat location for every symbol which should have
1207 a .MIPS.xhash entry.
1208 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
1209 dynamic section if necessary.
1210 (GNU_HASH_SECTION_NAME): New define.
1211 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
1212 Update the section size info.
1213 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
1214 (struct mips_elf_link_hash_entry): New member.
1215 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
1217 (mips_elf_sort_hash_table): Initialize the pointer to the
1218 .MIPS.xhash section.
1219 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
1220 translation table entry with the symbol dynindx.
1221 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
1222 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
1224 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
1226 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
1228 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
1229 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
1231 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
1232 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
1233 (_bfd_mips_post_process_headers): Mark the ABI version as
1234 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
1235 but not a .hash section.
1236 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
1237 position in the translation table, associated with the hash
1239 * elfxx-mips.h (literal_reloc_p): Define
1240 elf_backend_record_xhash_symbol backend hook.
1241 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
1244 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
1246 * elf64-bpf.c (bpf_elf_relocate_section): New function.
1247 (bpf_elf_insn_disp_reloc): Delete function.
1248 (elf_backend_relocate_section): Define.
1250 2019-08-07 Alan Modra <amodra@gmail.com>
1253 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
1254 for overflow in expressions involving nsymz.
1256 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
1258 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
1259 two pages in relro presence.
1261 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
1263 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
1264 (get_wsr_lbeg_opcode): New functions.
1265 (check_loop_aligned): Detect relaxed loops and adjust loop_len
1266 and insn_len for the first actual instruction of the loop.
1268 2019-07-30 Alan Modra <amodra@gmail.com>
1271 * bfd.c (struct bfd): Add lto_slim_object flag.
1272 * bfd-in2.h: Regenerate.
1274 2019-07-29 Martin Liska <mliska@suse.cz>
1277 * archive.c (_bfd_compute_and_write_armap): Come up with
1278 report_plugin_err variable.
1279 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
1280 * elf.c (struct lto_section): New.
1281 (_bfd_elf_make_section_from_shdr): Parse content of
1282 .gnu_lto_.lto section.
1283 * elflink.c: Report error for a missing LTO plugin.
1284 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1286 2019-07-28 Alan Modra <amodra@gmail.com>
1290 * elflink.c (elf_link_add_object_symbols): Report an informative
1291 error on finding local symbols with index equal or greater than
1292 symbol table sh_info. Correct comment. Allow such symbols in
1293 dynamic objects. Abort on NULL section for symbol.
1295 2019-07-26 Alan Modra <amodra@gmail.com>
1297 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
1298 (elf_linker): Don't define.
1299 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
1301 2019-07-25 YunQiang Su <syq@debian.org>
1304 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
1307 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
1309 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
1311 (reloc_type_to_name): Fix formating.
1312 (arc_elf_object_p): Likewise.
1313 (debug_arc_reloc): Likewise.
1314 (arc_do_relocation): Likewise.
1316 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
1318 * elf32-arc.c (bfd_get_32_me): New function.
1319 (bfd_put_32_me): Likewise.
1320 (arc_elf_relax_section): Likewise.
1321 (bfd_elf32_bfd_relax_section): Define.
1323 2019-07-24 Alan Modra <amodra@gmail.com>
1325 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
1326 elf_backend_final_write_processing, don't pass linker arg.
1327 (_bfd_elf_final_write_processing): Update prototype.
1328 * elf.c (_bfd_elf_write_object_contents): Adjust call.
1329 (_bfd_elf_final_write_processing): Return error on incompatible
1330 OSABI and has_gnu_osabi. Remove linker arg.
1331 * elf-nacl.h (nacl_final_write_processing): Update prototype.
1332 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
1333 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
1334 (_bfd_mips_elf_final_write_processing): Likewise.
1335 * elf-hppa.h (elf_hppa_final_write_processing): Return status
1336 and remove linker arg.
1337 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
1338 * elf-nacl.c (nacl_final_write_processing): Likewise.
1339 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
1340 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1341 * elf32-arm.c (arm_final_write_processing): Likewise.
1342 (elf32_arm_final_write_processing): Likewise.
1343 (elf32_arm_nacl_final_write_processing): Likewise.
1344 (elf32_arm_vxworks_final_write_processing): Likewise.
1345 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1346 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
1347 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
1348 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
1349 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
1350 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
1351 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
1352 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
1353 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
1354 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
1355 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
1356 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
1357 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
1358 * elf32-ppc.c (ppc_final_write_processing): Likewise.
1359 (ppc_elf_final_write_processing): Likewise.
1360 (ppc_elf_vxworks_final_write_processing): Likewise.
1361 * elf32-sparc.c (sparc_final_write_processing): Likewise.
1362 (elf32_sparc_final_write_processing): Likewise.
1363 (elf32_sparc_vxworks_final_write_processing): Likewise.
1364 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
1365 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
1366 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1367 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
1368 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
1369 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
1370 (_bfd_mips_elf_final_write_processing): Likewise.
1372 2019-07-24 Alan Modra <amodra@gmail.com>
1374 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
1376 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1377 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1379 2019-07-24 Alan Modra <amodra@gmail.com>
1381 * elf32-visium.c (visium_elf_post_process_headers): Don't set
1382 EI_OSABI header byte here.
1383 (ELF_OSABI): Define.
1385 2019-07-23 Alan Modra <amodra@gmail.com>
1387 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
1388 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
1389 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
1390 when elf_gnu_osabi_mbind is set.
1391 (_bfd_elf_map_sections_to_segments): Likewise.
1392 (_bfd_elf_init_private_section_data): Likewise.
1393 (_bfd_elf_final_write_processing): Update comment.
1394 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
1395 (elf_backend_special_sections): Define without .tbss for linux.
1397 2019-07-23 Alan Modra <amodra@gmail.com>
1399 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
1400 Remove none, any, all enums.
1401 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
1402 (_bfd_elf_final_write_processing): Declare.
1403 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
1404 elf_backend_final_write_processing.
1405 (_bfd_elf_post_process_headers): Move body of function to..
1406 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
1407 only when not already set. Adjust for rename.
1408 * elfxx-target.h (elf_backend_final_write_processing): Default to
1409 _bfd_elf_final_write_processing.
1410 * elf-hppa.h (elf_hppa_final_write_processing): Call
1411 _bfd_elf_final_write_processing.
1412 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
1413 * elf-nacl.c (nacl_final_write_processing): Likewise.
1414 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
1415 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1416 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1417 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
1418 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
1419 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
1420 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
1421 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
1422 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
1423 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
1424 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
1425 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
1426 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
1427 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
1428 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
1429 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
1430 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1431 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
1432 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
1433 * elf32-arm.c (arm_final_write_processing): Split out from..
1434 (elf32_arm_final_write_processing): ..here. Call
1435 _bfd_elf_final_write_processing.
1436 (elf32_arm_nacl_final_write_processing): Adjust.
1437 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
1438 (_bfd_mips_elf_final_write_processing): ..here. Call
1439 _bfd_elf_final_write_processing.
1440 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
1441 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
1442 * elf32-ppc.c (ppc_final_write_processing): Split out from..
1443 (ppc_elf_final_write_processing): ..here. Call
1444 _bfd_elf_final_write_processing.
1445 (ppc_elf_vxworks_final_write_processing): Adjust.
1446 * elf32-sparc.c (sparc_final_write_processing): Split out from..
1447 (elf32_sparc_final_write_processing): ..here. Call
1448 _bfd_elf_final_write_processing.
1449 (elf32_sparc_vxworks_final_write_processing): Adjust.
1450 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
1451 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
1452 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
1453 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
1454 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
1455 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
1456 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1457 * elflink.c (elf_link_add_object_symbols): Likewise.
1458 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
1461 2019-07-23 Omar Majid <omajid@redhat.com>
1463 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
1464 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
1465 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
1467 * peXXigen.c: Add comment about source of .NET magic numbers.
1469 2019-07-19 Alan Modra <amodra@gmail.com>
1471 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
1472 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
1473 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
1474 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
1475 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
1476 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
1477 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
1478 (ppc64_elf_check_relocs): Support pcrel tls relocs.
1479 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
1480 * bfd-in2.h: Regenerate.
1481 * libbfd.h: Regenerate.
1483 2019-07-18 Alan Modra <amodra@gmail.com>
1485 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
1486 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
1489 2019-07-18 Alan Modra <amodra@gmail.com>
1491 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
1492 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
1493 is more than 8 bits.
1494 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
1495 tls_type vars unsigned int.
1496 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
1497 to select r_type edit.
1499 2019-07-18 Alan Modra <amodra@gmail.com>
1501 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
1503 * elf64-ppc.c (TLS_GDIE): Likewise.
1505 2019-07-18 Alan Modra <amodra@gmail.com>
1507 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
1508 range of tp-relative offsets.
1510 2019-07-15 Alan Modra <amodra@gmail.com>
1512 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
1513 alias is no longer bfd_link_hash_defined, clear the alias.
1515 2019-07-13 Alan Modra <amodra@gmail.com>
1517 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
1519 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
1520 (_bfd_elf_init_2_index_sections): Likewise.
1521 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
1522 relocations for local TLS symbols, use STN_UNDEF as the relocation
1524 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
1525 leave TLS symbol value in the addend.
1527 2019-07-08 Alan Modra <amodra@gmail.com>
1530 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
1531 size before reading first word.
1533 2019-07-02 Nick Clifton <nickc@redhat.com>
1536 * elf.c (is_debuginfo_file): New function.
1537 (assign_file_positions_for_non_load_sections): Do not warn about
1538 allocated sections outside of loadable segments if they are found
1539 in a debuginfo file.
1540 * elf-bfd.h (is_debuginfo_file): Prototype.
1542 2019-07-02 Nick Clifton <nickc@redhat.com>
1545 * compress.c (bfd_get_full_section_contents): Do not complain
1546 about linker created sections that are larger than the file size.
1548 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
1550 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
1551 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
1553 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
1555 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
1557 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
1558 sections when .text section contain secure entry functions
1561 2019-07-01 Nick Clifton <nickc@redhat.com>
1564 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
1565 section VMA in the offset used to update exidx relocs.
1567 2019-06-28 Nick Clifton <nickc@redhat.com>
1570 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
1571 large version reference section.
1572 * compress.c (bfd_get_full_section_contents): Check for an
1573 uncompressed section whose size is larger than the file size.
1575 2019-06-28 Alan Modra <amodra@gmail.com>
1577 * format.c (bfd_check_format_matches): Don't match plugin target
1578 if another target matches. Expand comment.
1579 * targets.c (_bfd_target_vector): Move plugin_vec after all other
1580 non-corefile targets, outside !SELECT_VECS.
1581 * config.bfd: Don't handle targ=plugin here.
1582 * configure.ac: Don't add plugin to enable_targets or handle in
1583 target loop setting selvecs and other target vars.
1584 * configure: Regenerate.
1586 2019-06-26 Nick Clifton <nickc@redhat.com>
1589 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
1590 messages for failures.
1591 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
1592 if returning an error value.
1594 2019-06-25 Jan Beulich <jbeulich@suse.com>
1596 * elf-properties.c (elf_find_and_remove_property): Rename last
1597 parameter. Mention it in comment.
1599 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
1601 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
1602 SEC_MERGE or SEC_CODE flags are set.
1603 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
1604 symtype consistently. Don't include sec_addr (sym_sec) in symval.
1605 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
1606 Add sec_addr (sym_sec) after handling merge sections.
1608 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
1611 * elf-properties.c (elf_merge_gnu_property_list): Remove the
1612 property after reporting property removal.
1614 2019-06-23 Alan Modra <amodra@gmail.com>
1617 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
1618 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
1619 Reduce range of offsets allowed for other GOT relocs.
1621 2019-06-23 Alan Modra <amodra@gmail.com>
1624 * elfcode.h (elf_object_p): Warning fix.
1626 2019-06-21 Alan Modra <amodra@gmail.com>
1629 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
1631 2019-06-19 Alan Modra <amodra@gmail.com>
1634 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
1635 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
1637 2019-06-19 Alan Modra <amodra@gmail.com>
1639 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
1640 functions that require r2 valid to use local entry.
1641 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
1643 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1645 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
1646 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
1647 with elfNN_aarch64_allocate_local_dynrelocs.
1649 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
1651 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
1653 2019-06-14 Alan Modra <amodra@gmail.com>
1655 * Makefile.in: Regenerate.
1656 * configure: Regenerate.
1658 2019-06-14 Alan Modra <amodra@gmail.com>
1660 * elf64-ppc.c: Fix comments involving paddi.
1662 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
1665 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
1666 absent, or the bfd is not in the ELF formart.
1667 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
1669 2019-06-10 Christos Zoulas <christos@zoulas.com>
1672 * elf.c (elfcore_make_auxv_note_section): New function.
1673 (elfcore_grok_note): Use it.
1674 (elfcore_grok_freebsd_note): Likewise.
1675 (elfcore_grok_openbsd_note): Likewise.
1676 (elfcore_grok_netbsd_note): Likewise. Plus add support for
1677 NT_NETBSDCORE_AUXV notes.
1679 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1681 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
1682 alignment of the new gnu property section.
1684 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1686 * bfd-in.h: Change comment.
1687 * bfd-in2.h: Regenerate.
1688 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
1689 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
1692 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
1694 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
1695 Remove overflow check.
1697 2019-05-28 Alan Modra <amodra@gmail.com>
1700 * cofflink.c (coff_link_check_archive_element): Don't assume
1701 element is a coff object file after calling add_archive_element.
1703 2019-05-28 Alan Modra <amodra@gmail.com>
1706 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
1707 attempt to set sh_entsize for excluded PLT section.
1709 2019-05-28 Alan Modra <amodra@gmail.com>
1712 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
1713 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
1714 allocated in alpha_dynamic_entries_for_reloc.
1716 2019-05-28 Alan Modra <amodra@gmail.com>
1719 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
1720 on NULL output_section.
1721 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
1723 2019-05-28 Alan Modra <amodra@gmail.com>
1726 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
1727 entry when MUST_FIND. Abort when MUST_FIND not found.
1728 (elf_m68k_get_bfd2got_entry): Likewise.
1729 (elf_m68k_relocate_section): Remove now useless assert.
1731 2019-05-28 Alan Modra <amodra@gmail.com>
1734 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
1735 from bfd_link_info, not an output section owner.
1736 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
1737 (elf_hppa_final_link_relocate): Likewise.
1739 2019-05-28 Alan Modra <amodra@gmail.com>
1742 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
1743 create_object_symbols_section, obj_textsec, obj_datasec or
1744 obj_bsssec. Fix other errors in placement.
1745 * config.bfd: Obsolete tic30-aout.
1747 2019-05-28 Alan Modra <amodra@gmail.com>
1750 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
1751 end of section list as well as section_count.
1752 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
1753 section list before returning error.
1755 2019-05-27 Alan Modra <amodra@gmail.com>
1757 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
1759 2019-05-27 Alan Modra <amodra@gmail.com>
1762 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
1764 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
1766 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
1767 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
1768 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
1769 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
1770 (elf_backend_merge_symbol_attribute): Define.
1772 2019-05-24 Alan Modra <amodra@gmail.com>
1774 * po/SRC-POTFILES.in: Regenerate.
1776 2019-05-24 Alan Modra <amodra@gmail.com>
1778 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
1779 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
1780 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
1781 (struct ppc_link_hash_table): Add powerxx_stubs.
1782 (ppc64_elf_check_relocs): Set powerxx_stubs.
1783 (build_powerxx_offset, size_powerxx_offset),
1784 (num_relocs_for_powerxx_offset),
1785 (emit_relocs_for_powerxx_offset): New functions.
1786 (plt_stub_size): Size powerxx stubs.
1787 (ppc_build_one_stub): Emit powerxx stubs.
1788 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
1791 2019-05-24 Alan Modra <amodra@gmail.com>
1793 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
1794 R_PPC64_GOT_PCREL34.
1795 (xlate_pcrel_opt): New function.
1796 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
1797 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1798 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
1800 2019-05-24 Alan Modra <amodra@gmail.com>
1802 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
1803 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
1804 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
1805 (BFD_RELOC_PPC64_PLT_PCREL34),
1806 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
1807 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
1808 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
1809 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
1810 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
1811 * elf64-ppc.c (PNOP): Define.
1812 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
1813 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
1814 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
1816 (ppc64_elf_prefix_reloc): New function.
1817 (struct ppc_link_hash_table): Add notoc_plt.
1818 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
1819 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
1820 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
1821 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
1822 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
1823 possible need for dynamic relocs on non-pcrel powerxx relocs.
1824 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
1825 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
1826 (toc_adjusting_stub_needed): Likewise.
1827 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
1828 (ppc64_elf_relocate_section): Handle new powerxx relocs.
1829 * bfd-in2.h: Regenerate.
1830 * libbfd.h: Regenerate.
1832 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1834 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
1835 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
1837 * configure: Regenerate.
1839 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1841 * configure: Regenerated.
1842 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
1843 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
1844 (BFD64_BACKENDS): Add elf64-bpf.lo.
1845 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
1846 * Makefile.in (SOURCE_HFILES): Regenerate.
1847 * config.bfd (targ_cpu): Handle bpf-*-* targets.
1848 * cpu-bpf.c: New file.
1849 * elf64-bpf.c: Likewise.
1850 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
1852 * archures.c: Define architecture bfd_arch_bpf and machine
1854 * reloc.c: Define BFD relocations used by the BPF target.
1855 * bfd-in2.h: Regenerated.
1856 * libbfd.h: Likewise.
1858 2019-05-22 Alan Modra <amodra@gmail.com>
1860 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
1863 2019-05-22 Alan Modra <amodra@gmail.com>
1865 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
1866 processing on "size error in section".
1868 2019-05-22 Alan Modra <amodra@gmail.com>
1870 * som.c (som_bfd_free_cached_info): Call
1871 _bfd_generic_close_and_cleanup.
1873 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1875 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
1876 for TLS_TPREL_HI16(/LO16) relocations in shared library.
1878 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1880 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
1881 checks. Search the RELA table for n64 relocations.
1883 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
1884 Faraz Shahbazker <fshahbazker@wavecomp.com>
1886 * elfxx-mips.c (LA25_BC): New macro.
1887 (mips_elf_link_hash_table)<compact_branches>: New field.
1888 (STUB_JALRC): New macro.
1889 (mipsr6_o32_exec_plt0_entry_compact): New array.
1890 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
1891 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
1892 (mipsr6_exec_plt_entry_compact): Likewise.
1893 (mips_elf_create_la25_stub): Use BC instead of J for stubs
1894 when compact_branches is true.
1895 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
1896 PLT for MIPSR6 with compact_branches. Do not reorder the
1897 compact branches PLT. Switch the lazy stub for MIPSR6
1898 with compact_branches to use JALRC.
1899 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
1900 when compact_branches is true.
1901 (_bfd_mips_elf_compact_branches): New function.
1902 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
1904 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1907 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
1908 Fix print formatter.
1910 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1913 * elf32-arm.c (get_value_helper): Remove.
1914 (elf32_arm_final_link_relocate): Fix branch future relocations.
1916 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1919 * bfd-in.h (enum erratum_84319_opts): New
1920 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1921 int to enum erratum_84319_opts.
1922 * bfd-in2.h: Regenerate.
1923 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
1924 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
1925 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
1926 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
1927 (_bfd_aarch64_resize_stubs): Amend comment.
1928 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
1930 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
1931 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
1933 (clear_erratum_843419_entry): Update erratum conditional.
1935 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1938 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
1939 when computing distance_short_enough.
1941 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1944 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1945 Wrap around even if distance equals avr_pc_wrap_around.
1947 2019-05-20 Nick Clifton <nickc@redhat.com>
1949 * po/fr.po: Updated French translation.
1951 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1953 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1955 2019-05-16 Alan Modra <amodra@gmail.com>
1957 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1959 2019-05-15 Alan Modra <amodra@gmail.com>
1961 * elf32-arm.c (elf32_arm_write_section): Don't leave
1962 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1963 unitialised section contents.
1965 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1968 * verilog.c: (VerilogDataWidth): New variable.
1969 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1971 2019-05-08 Nick Clifton <nickc@redhat.com>
1974 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1975 rather than FALSE if encountering a non-ELF file.
1977 2019-05-06 Alan Modra <amodra@gmail.com>
1979 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1981 2019-05-06 Alan Modra <amodra@gmail.com>
1983 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1984 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1985 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1986 * libbfd.h: Regenerate.
1987 * bfd-in2.h: Regenerate.
1989 2019-05-04 Alan Modra <amodra@gmail.com>
1992 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1993 following the standard section names.
1994 (bfd_decode_symclass): Prioritize section flag tests in
1995 decode_section_type before name tests in coff_section_type.
1996 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1997 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1998 their names and choose standard .text section flags for
2001 2019-05-02 Nick Clifton <nickc@redhat.com>
2004 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
2005 .gnu.debugaltlink sections as debugging sections.
2007 2019-04-30 Alan Modra <amodra@gmail.com>
2009 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
2010 (struct _ppc64_elf_section_data): Likewise.
2011 (ppc64_elf_check_relocs): Set above fields.
2012 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
2013 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
2016 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2019 * elflink.c (elf_link_output_extsym): Don't complain undefined
2020 weak dynamic reference.
2022 2019-04-25 Sudakshina Das <sudi.das@arm.com>
2024 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
2025 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
2026 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
2027 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
2028 (elfNN_aarch64_small_plt0_pac_entry): Remove.
2029 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
2030 (elfNN_aarch64_small_plt0_bti_entry): Update.
2031 (elfNN_aarch64_small_plt_bti_entry): Update.
2032 (elfNN_aarch64_small_plt_pac_entry): Update.
2033 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
2034 (setup_plt_values): Setup new entries.
2035 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
2036 (elfNN_aarch64_plt_sym_val): Likewise.
2038 2019-04-22 Jim Wilson <jimw@sifive.com>
2040 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
2042 2019-04-19 Alan Modra <amodra@gmail.com>
2044 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
2046 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
2048 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
2049 building shared object.
2050 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
2052 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
2055 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
2058 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
2060 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
2062 * bfd-in2.h: Regenerate.
2063 * libbfd.h: Likewise.
2065 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2067 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
2068 * bfd-in2.h: Regenerated.
2069 * libbfd.h: Regenerated.
2071 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2073 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
2074 * bfd-in2.h: Regenerated.
2075 * libbfd.h: Likewise.
2077 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2079 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
2080 * bfd-in2.h: Regenerated.
2081 * libbfd.h: Regenerated.
2082 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
2083 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
2084 and R_ARM_THM_BF12 together.
2085 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
2087 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2089 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
2090 * libbfd.h: Regenerated.
2091 * bfd-in2.h: Regenerated.
2092 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
2093 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
2094 and R_ARM_THM_BF18 together.
2095 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
2097 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2099 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
2100 * bfd-in2.h: Regenerated.
2101 * libbfd.h: Regenerated.
2102 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
2103 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
2104 and R_ARM_THM_BF16 together.
2105 (get_value_helper): New reloc helper.
2106 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
2108 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2110 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
2111 * bfd-in2.h: Regenerate.
2112 * libbfd.h: Regenerate.
2114 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
2116 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
2117 * bfd-in2.h: Regenerate.
2118 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
2119 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
2121 (using_thumb2): Likewise.
2122 (using_thumb2_bl): Update assert.
2123 (arch_has_arm_nop): Likewise.
2124 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
2125 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
2127 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
2129 * elf-linker-x86.h (elf_x86_cet_report): New.
2130 (elf_linker_x86_params): Add cet_report.
2131 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
2132 missing IBT and SHSTK properties if needed.
2134 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
2137 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
2138 "h != NULL". Don't check "h != NULL" before calling.
2139 bfd_elf_gc_record_vtentry.
2140 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
2141 * elf32-bfin.c (bfin_check_relocs): Likewise.
2142 * elf32-cris.c (cris_elf_check_relocs): Likewise.
2143 * elf32-csky.c (csky_elf_check_relocs): Likewise.
2144 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
2145 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
2146 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
2147 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
2148 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
2149 * elf32-i386.c (elf_i386_check_relocs): Likewise.
2150 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
2151 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
2152 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
2153 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
2154 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
2155 * elf32-metag.c (elf_metag_check_relocs): Likewise.
2156 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
2157 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
2158 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2159 * elf32-sh.c (sh_elf_check_relocs): Likewise.
2160 * elf32-v850.c (v850_elf_check_relocs): Likewise.
2161 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2162 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
2163 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2164 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
2165 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
2166 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2167 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
2168 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2169 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2170 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
2173 2019-04-11 Alan Modra <amodra@gmail.com>
2176 * elflink.c (elf_link_add_object_symbols): Don't read partial
2177 dynamic entries from fuzzed objects.
2179 2019-04-11 Tamar Christina <tamar.christina@arm.com>
2182 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
2183 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
2184 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
2186 2019-04-10 Michael Forney <mforney@mforney.org>
2189 * doc/chew.c (free_words): Correctly free "push_text" strings.
2191 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
2193 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
2195 2019-04-08 Alan Modra <amodra@gmail.com>
2197 * configure.ac (elfxx_x86): Define and use.
2198 * configure: Regenerate.
2200 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
2202 * elf-linker-x86.h: New file.
2203 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
2204 to get x86-specific linker options.
2205 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2206 (elf_x86_64_check_relocs): Likewise.
2207 (elf_x86_64_relocate_section): Likewise.
2208 (elf_x86_64_link_setup_gnu_properties): Likewise.
2209 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
2210 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
2211 (_bfd_elf_linker_x86_set_options): New function.
2212 * elfxx-x86.h: Include "elf-linker-x86.h".
2213 (elf_x86_link_hash_table): Add params.
2215 2019-04-03 Alan Modra <amodra@gmail.com>
2217 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
2218 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
2219 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
2220 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
2221 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
2222 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
2224 2019-04-02 Jim Wilson <jimw@sifive.com>
2227 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
2228 ELF header flags to after check for ELF object file. Loop through
2229 sections looking for code sections, if none, then skip ABI checks.
2231 2019-03-30 Andrew Waterman <andrew@sifive.com>
2233 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
2236 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
2238 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
2239 info->export_dynamic to the conditional.
2241 2019-03-28 Alan Modra <amodra@gmail.com>
2244 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
2245 * configure: Regenerate.
2246 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
2247 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
2248 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
2249 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
2250 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
2252 2019-03-21 Jim Wilson <jimw@sifive.com>
2255 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
2256 verify sym non-NULL before using. Add identical check using h.
2258 2019-03-21 Sudakshina Das <sudi.das@arm.com>
2260 * elf-bfd.h (struct elf_backend_data): Add argument to
2261 merge_gnu_properties.
2262 * elf-properties.c (elf_merge_gnu_properties): Add argument to
2263 itself and while calling bed->merge_gnu_properties.
2264 (elf_merge_gnu_property_list): Update the calls for
2265 elf_merge_gnu_properties.
2266 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
2267 of --force-bti warning and add argument.
2268 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
2270 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
2271 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
2274 2019-03-20 Sudakshina Das <sudi.das@arm.com>
2276 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
2277 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
2278 (elf_backend_fixup_gnu_properties): Define for AArch64.
2280 2019-03-18 Alan Modra <amodra@gmail.com>
2283 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
2284 for local iplt syms with ent->plt.offset == -1. Remove ineffective
2285 attempt at writing glink stubs only once.
2287 2019-03-16 Alan Modra <amodra@gmail.com>
2290 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
2291 (_bfd_elf_rel_local_sym): Likewise.
2292 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
2293 section of symbols with unrecognized shndx.
2295 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2298 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
2300 * cofflink.c (coff_link_add_symbols): Check for symbols defined
2301 in discarded section.
2303 2019-03-15 Alan Modra <amodra@gmail.com>
2306 * elflink.c (elf_link_add_object_symbols): Bail out on a local
2307 symbol after globals if elf_bad_symtab is not set.
2309 2019-03-15 Alan Modra <amodra@gmail.com>
2312 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
2313 (_bfd_elf_rel_local_sym): Likewise.
2315 2019-03-15 Alan Modra <amodra@gmail.com>
2318 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
2319 object files with sh_size not a multiple of sh_entsize.
2321 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2324 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
2325 input with bad relocation.
2327 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2329 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2331 2019-03-14 Nick Clifton <nickc@redhat.com>
2334 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
2335 (save_section_vma): Initialise field to the number of entries in
2337 (section_vma_same): Check that the number of entries in the
2338 sec_vma table matches the number of sections in the bfd.
2340 2019-03-14 Nick Clifton <nickc@redhat.com>
2343 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
2344 section owner pointer when adding the default symbol.
2346 2019-03-14 Nick Clifton <nickc@redhat.com>
2349 * elflink.c (elf_link_add_object_symbols): Add new local variable
2350 extversym_end. Initialise it to point to the end of the version
2351 symbol table, if present. Check it when initialising and updating
2354 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2356 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
2357 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
2358 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
2359 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
2361 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
2362 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
2363 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
2365 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2366 Szabolcs Nagy <szabolcs.nagy@arm.com>
2368 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
2369 (aarch64_bti_pac_info): New.
2370 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
2371 (bfd_elf32_aarch64_set_options): Likewise.
2372 * bfd-in2.h: Regenerate
2373 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
2374 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
2375 (elfNN_aarch64_small_plt0_bti_entry): New.
2376 (elfNN_aarch64_small_plt_bti_entry): New.
2377 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
2378 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
2379 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
2380 tlsdesc_plt_entry_size fields.
2381 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
2382 (setup_plt_values): New helper function.
2383 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
2385 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
2387 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
2388 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
2389 to plt stubs instead of fixed ones and update filling them according
2390 to the need for bti.
2391 (elfNN_aarch64_init_small_plt0_entry): Likewise.
2392 (elfNN_aarch64_finish_dynamic_sections): Likewise.
2393 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
2394 (elfNN_aarch64_plt_sym_val): Update size accordingly.
2395 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
2397 (bfd_elfNN_get_synthetic_symtab): Define.
2398 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
2399 and mising BTI NOTE SECTION.
2402 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2404 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
2405 linker created inputs from merge.
2406 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
2407 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
2408 (elfNN_aarch64_link_setup_gnu_properties): New.
2409 (elfNN_aarch64_merge_gnu_properties): New.
2410 (elf_backend_setup_gnu_properties): Define for AArch64.
2411 (elf_backend_merge_gnu_properties): Likewise.
2412 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
2413 (_bfd_aarch64_elf_parse_gnu_properties): Define.
2414 (_bfd_aarch64_elf_merge_gnu_properties): Define.
2415 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
2416 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
2417 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
2418 (elf_backend_parse_gnu_properties): Define for AArch64.
2420 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
2423 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
2424 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
2426 2019-03-12 Alan Modra <amodra@gmail.com>
2428 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
2429 nmemb parameter. Use bfd_alloc2.
2430 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
2432 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
2433 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
2434 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
2436 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
2437 (assign_section_numbers): Style fix.
2438 (swap_out_syms): Use bfd_malloc2.
2439 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
2441 (_bfd_elf_make_empty_symbol): Style fix.
2442 (elfobj_grok_stapsdt_note_1): Formatting.
2443 * elfcode.h (elf_object_p): Use bfd_alloc2.
2444 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
2445 (elf_slurp_symbol_table): Use bfd_zalloc2.
2446 (elf_slurp_reloc_table): Use bfd_alloc2.
2447 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
2448 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
2449 size calculation doesn't overflow.
2450 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
2451 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
2452 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
2454 2019-03-08 Alan Modra <amodra@gmail.com>
2457 * merge.c (merge_strings): Return secinfo. Don't pad section
2459 (_bfd_merge_sections): Pad section to alignment here, if input
2460 sections contributing to merged output all pad to alignment.
2463 2019-03-06 Nick Clifton <nickc@redhat.com>
2465 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
2467 * coffgen.c (coff_find_nearest_line_with_names): Do not call
2468 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
2470 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
2472 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
2473 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2476 * elf32-s390.c (allocate_dynrelocs): Update comment.
2478 2019-02-28 Tamar Christina <tamar.christina@arm.com>
2480 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
2482 2019-02-28 Nick Clifton <nickc@redhat.com>
2485 * elf.c (bfd_elf_string_from_elf_section): Check for a string
2486 section that is not NUL terminated.
2488 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
2491 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
2492 by linker when checking copy reloc on protected symbol.
2494 2019-02-24 Alan Modra <amodra@gmail.com>
2497 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
2499 2019-02-20 Eric Tsai <erictsai@cadence.com>
2501 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
2502 sections between the call site and call destination and adjust
2503 call distance by the largest alignment.
2505 2019-02-20 Alan Hayward <alan.hayward@arm.com>
2507 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
2508 * elf.c (elfcore_grok_aarch_pauth): New function.
2509 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
2510 (elfcore_write_aarch_pauth): New function.
2511 (elfcore_write_register_note): Check for AArch64 pauth section.
2513 2019-02-20 Alan Modra <amodra@gmail.com>
2516 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
2519 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
2521 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
2522 Darwin hosts, not just or1k.
2523 * configure: Regenerate.
2525 2019-02-20 Alan Modra <amodra@gmail.com>
2528 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
2529 sentinel NUL to string buffer nearer to loop where it is used.
2530 Don't go past sentinel when scanning strings, and don't write
2532 * archive.c (do_slurp_coff_armap): Simplify string handling to
2535 2019-02-19 Alan Modra <amodra@gmail.com>
2538 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
2539 attempting to prevent read past end of section.
2541 2019-02-18 Alan Modra <amodra@gmail.com>
2544 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
2545 PRIx64 to generate warning messages. Print local sym names too.
2547 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
2549 * elf32-arc (INIT_SYM_STRING): Delete.
2550 (FINI_SYM_STRING): Likewise.
2551 (init_str): Likewise.
2552 (fini_str): Likewise.
2554 2019-02-08 Alan Modra <amodra@gmail.com>
2556 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
2557 for bss-plt" warning to make it an error.
2559 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2562 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
2563 reloc_class_ifunc for ifunc symbols.
2564 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
2566 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2568 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
2569 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
2571 2019-02-07 Nick Clifton <nickc@redhat.com>
2573 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
2574 into the definitely obsolete list.
2576 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
2579 * elf64-x86-64.c (elf_x86_64_need_pic): Check
2580 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
2581 (elf_x86_64_relocate_section): Move PIC check for PC-relative
2583 (elf_x86_64_check_relocs): Here.
2584 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
2585 to check if a symbol is defined in a non-shared object.
2586 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
2588 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
2590 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
2591 of 'labs' (and fix GCC warning).
2593 2019-01-25 Nick Clifton <nickc@redhat.com>
2595 * po/ru.po: Updated Russian translation.
2597 2019-01-23 Nick Clifton <nickc@redhat.com>
2599 * po/fr.po: Updated French translation.
2601 2019-01-21 Nick Clifton <nickc@redhat.com>
2603 * po/pt.po: Updated Portuguese translation.
2604 * po/uk.po: Updated Ukranian translation.
2606 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
2609 * elf32-nds32.c (nds32_relocate_section): Add space between words
2611 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
2613 (riscv_i_or_e_p): Likewise.
2614 (riscv_merge_arch_attr_info): Likewise.
2616 2019-01-19 Nick Clifton <nickc@redhat.com>
2618 * version.m4: Reset to 2.32.51
2619 * configure: Regenerate.
2620 * po/bfd.pot: Regenerate.
2622 2018-06-24 Nick Clifton <nickc@redhat.com>
2624 2.32 branch created.
2626 2019-01-16 Kito Cheng <kito@andestech.com>
2628 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
2631 2019-01-16 Kito Cheng <kito@andestech.com>
2632 Nelson Chu <nelson@andestech.com>
2634 * elfnn-riscv.c (in_subsets): New.
2635 (out_subsets): Likewise.
2636 (merged_subsets): Likewise.
2637 (riscv_std_ext_p): Likewise.
2638 (riscv_non_std_ext_p): Likewise.
2639 (riscv_std_sv_ext_p): Likewise.
2640 (riscv_non_std_sv_ext_p): Likewise.
2641 (riscv_version_mismatch): Likewise.
2642 (riscv_i_or_e_p): Likewise.
2643 (riscv_merge_std_ext): Likewise.
2644 (riscv_merge_non_std_and_sv_ext): Likewise.
2645 (riscv_merge_arch_attr_info): Likewise.
2646 (riscv_merge_attributes): Likewise.
2647 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
2649 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
2650 (elf_backend_obj_attrs_vendor): Define.
2651 (elf_backend_obj_attrs_section_type): Likewise.
2652 (elf_backend_obj_attrs_section): Likewise.
2653 (elf_backend_obj_attrs_arg_type): Define as
2654 riscv_elf_obj_attrs_arg_type.
2655 * elfxx-riscv.c (riscv_estimate_digit): New.
2656 (riscv_estimate_arch_strlen1): Likewise.
2657 (riscv_estimate_arch_strlen): Likewise.
2658 (riscv_arch_str1): Likewise.
2659 (riscv_arch_str): Likewise.
2660 * elfxx-riscv.h (riscv_arch_str): Declare.
2662 2019-01-14 John Darrington <john@darrington.wattle.id.au>
2664 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
2666 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
2667 source field. (md_apply_fix): Apply final fix
2668 to BFD_RELOC_S12Z_OPR.
2669 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
2671 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2674 * elf32-s390.c (allocate_dynrelocs): Update comment.
2676 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
2678 * warning.m4: Adjust egrep pattern for non-GNU compilers.
2679 * configure: Regenerate.
2681 2019-01-08 Alan Modra <amodra@gmail.com>
2685 * ihex.c (ihex_write_object_contents): Properly check 32-bit
2688 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
2690 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
2691 * bfd/bfd-in2.h: Regenerate.
2692 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
2693 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
2695 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
2697 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
2698 default target, little endian target is more suitable.
2700 2019-01-04 Alan Modra <amodra@gmail.com>
2704 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
2706 (EQ_VALUE_IN_FIELD): Likewise.
2707 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
2709 2019-01-01 Alan Modra <amodra@gmail.com>
2711 Update year range in copyright notice of all files.
2713 For older changes see ChangeLog-2018
2715 Copyright (C) 2019 Free Software Foundation, Inc.
2717 Copying and distribution of this file, with or without modification,
2718 are permitted in any medium without royalty provided the copyright
2719 notice and this notice are preserved.
2725 version-control: never