summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* RISC-V/zfh: Added big endian testcase for .float16 directive.users/riscv/binutils-integration-2.37Nelson Chu2021-07-224-5/+16
| | | | | | | | | gas/ * testsuite/gas/riscv/extended/extended.exp: Updated. * testsuite/gas/riscv/extended/float16.s: Minor fix for sNaNh. * testsuite/gas/riscv/extended/float16-le.d: Updated and renamed from float16.d. * testsuite/gas/riscv/extended/float16-be.d: New testcase.
* RISC-V/zfh: Support .float16 directive for assembler.Nelson Chu2021-07-225-1/+39
| | | | | | | | | | | | This probably need to be sent to mainline rather than here. gas/ * config/tc-riscv.c (FLT_CHARS): Added h and H. (riscv_pseudo_table): Added .float16. * read.c (hex_float): Handle case 'h' and 'H'. * testsuite/gas/riscv/extended/extended.exp: Updated. * testsuite/gas/riscv/extended/float16.d: New testcase. * testsuite/gas/riscv/extended/float16.s: Likewise.
* RISC-V/zfh: Add half-precision floating-point v0.1 instructions.Nelson Chu2021-07-228-1/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is porting from the following riscv github, https://github.com/riscv/riscv-binutils-gdb/commits/rvv-1.0.x-zfh And here is the draft zfh spec, https://github.com/riscv/riscv-isa-manual/tree/zfh bfd/ * elfxx-riscv.c (riscv_std_draft_ext_strtab): Added zfh. (riscv_implicit_subset): Add implicit f and zicsr for zfh. gas/ * config/tc-riscv.c (extended_ext_version_table): Added default version of zfh to v0.1. (riscv_extended_subset_supports): Handle INSN_CLASS*_ZFH. (extended_macro): Handle M_FLH and M_FSH. * testsuite/gas/riscv/extended/extended.exp: Updated. * testsuite/gas/riscv/extended/fp-zfh-insns.d: New testcase. * testsuite/gas/riscv/extended/fp-zfh-insns.s: Likewise. include/ * opcode/riscv-opc-extended.h: Added zfh encoding macros and DECLARE_INSN. * opcode/riscv.h (enum riscv_extended_insn_class): Added INSN_CLASS*_ZFH. (enum M_FLH, M_FSH): Added. opcodes/ * riscv-opc.c (riscv_draft_opcodes): Added zfh instructions.
* RISC-V/rvv: Add rvv v0.10 instructions.Nelson Chu2021-07-2242-41/+10153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2021-03-30 Jim Wilson <jimw@sifive.com> Kito Cheng <kito.cheng@sifive.com> Nelson Chu <nelson.chu@sifive.com> This patch is porting from the following riscv github, https://github.com/riscv/riscv-binutils-gdb/tree/rvv-1.0.x And here is the vector draft spec, https://github.com/riscv/riscv-v-spec The match_func in opcodes/riscv-opc.c have many purposes. One of them is checking the instruction constraints. But we got the request before that the assembler constraint checkings break some hardware exception testcases, which are written by assmebly code. Therefore, we add new assembler options and .option directives to let users can disable/enable the rvv constraints. For now the constraints are disabled by default, but should we default enable them for safety? Besides, the match_func will return different error constriant messages, so that we can report the details to users. This should be more user-friendly. bfd/ * elfxx-riscv.c (riscv_std_draft_ext_strtab): Added zvamo and zvlsseg. gas/ * config/tc-riscv.c (enum DRAFT_EXT): Added. (enum riscv_extended_csr_class): Added CSR_CLASS_V for rvv CSRs. (enum reg_extended_class): Added vector registers. (op_draft_hash): Added draft hash table for rvv. (md_begin): Init op_draft_hash and register hash for rvv. (extended_ext_version_table): Added default versions of rvv to v0.10. (riscv_extended_subset_supports): Handle INSN_CLASS_V*. (riscv_extended_csr_class_check): Handle CSR_CLASS_V. (validate_riscv_extended_insn): Check if the rvv instructions are valid. (riscv_find_extended_opcode_hash): Search instruction opcode from op_draft_hash. (vector_macro): Call macro_build to expand rvv macros into instructions. (extended_macro_build): Handle rvv operands for macro_build. (extended_macro): Handle M_VMSGE and M_VMSGEU. (my_getVsetvliExpression): Similar to my_getVsetvliExpression, but used for parsing vsetvli operands. (riscv_parse_extended_operands): Handle rvv operands. Pass &regno from riscv_ip, otherwise we will get fail when parsing Vf operand for AMO VS3. (riscv_ip): Add two new arguments to match_func, check_constraints and &error. We can disbale the match_func check by setting check_constraints to zero; The part of match_func will set different error messages to the &error, and them we can report more details to users. (riscv_set_options, riscv_opts, s_riscv_option): Add .option checkconstraints and nocheckconstraints, to enable/disable the match_func constraints checking. Disable it by default. (enum options, md_longopts, md_parse_option): Add assembler options m[no-]check-constraints. * testsuite/gas/riscv/extended/extended.exp: Updated. * testsuite/gas/riscv/extended/extended-csr.d: New testcase for rvv CSRs. * testsuite/gas/riscv/extended/extended-csr.s: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-arith-fixp.d: New testcase for rvv constriants. * testsuite/gas/riscv/extended/vector-insns-fail-arith-fixp.l: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-arith-fixp.s: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-arith-floatp.d: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-arith-floatp.l: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-arith-floatp.s: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-arith-int.d: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-arith-int.l: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-arith-int.s: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-arith-narrow.d: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-arith-narrow.l: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-arith-narrow.s: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-arith-widen.d: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-arith-widen.l: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-arith-widen.s: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-load-store.d: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-load-store.l: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-load-store.s: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-mask.d: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-mask.l: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-mask.s: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-permutation.d: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-permutation.l: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-permutation.s: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-zvamo.d: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-zvamo.l: Likewise. * testsuite/gas/riscv/extended/vector-insns-fail-zvamo.s: Likewise. * testsuite/gas/riscv/extended/vector-insns-vmsgtvx.d: Likewise. * testsuite/gas/riscv/extended/vector-insns-vmsgtvx.s: Likewise. * testsuite/gas/riscv/extended/vector-insns-zero-imm.d: Likewise. * testsuite/gas/riscv/extended/vector-insns-zero-imm.s: Likewise. * testsuite/gas/riscv/extended/vector-insns.d: Likewise. * testsuite/gas/riscv/extended/vector-insns.s: Likewise. include/ * opcode/riscv-opc-extended.h: Added rvv encoding macros and CSRs. * opcode/riscv.h: Added rvv immediate encodings and fields. (struct riscv_opcode): Updated match_func. (enum riscv_extended_insn_class): Added INSN_CLASS_V*. (enum M_VMSGE, M_VMSGEU): Added. opcodes/ * riscv-dis.c (print_extended_insn_args): Handle rvv operands. (riscv_disassemble_opcode): Updated match_func. * riscv-opc.c (match_*): Updated since two new parameters. (riscv_vecr_names_numeric): Added rvv register names. (riscv_vecm_names_numeric): Added rvv mask register name. (riscv_vsew, riscv_vlmul, riscv_vta, riscv_vma): Added for vsetvli. (MASK_VD, MASK_VS1, MASK_VS2, MASK_VMASK): Added for rvv match_func. (match_vs1_eq_vs2, match_vs1_eq_vs2_neq_vm, match_vd_eq_vs1_eq_vs2): Added to check special register usage, cannot be disabled. (match_widen_vd_neq_vs1_neq_vs2_neq_vm): The rvv constraint check, can be disabled/enabled by m[no-]check-constraints or .option [no]checkconstraints. (match_widen_vd_neq_vs1_neq_vm): Likewise. (match_widen_vd_neq_vs2_neq_vm): Likewise. (match_widen_vd_neq_vm): Likewise. (match_narrow_vd_neq_vs2_neq_vm): Likewise. (match_vd_neq_vs1_neq_vs2): Likewise. (match_vd_neq_vs1_neq_vs2_neq_vm): Likewise. (match_vd_neq_vs2_neq_vm): Likewise. (match_vd_neq_vm): Likewise. (match_vls_nf_rv): Likewise. (match_vmv_nf_rv): Likewise. (riscv_draft_opcodes): Added rvv v0.10 instructions. (riscv_extended_opcodes): Updated.
* RISC-V/extended: Add assembler and dis-assembler hooks for extended extensions.Nelson Chu2021-07-227-371/+681
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To keep the original functions clean, we try to provide assembler and dis-assembler hooks as enough as possible for extended extensions. We probably need to add more once they are not enough in the future. However, there are several changes that might need to be discussed as follows, * Change the type of enums to int directly, to extend them for extended extensions. Not sure if the change is good enough, but it should be the easiler way to extend enums. * The extended operands should be parsed in the extended hooks, validate_riscv_extended_insn and riscv_parse_extended_operands. Obviously, we may need to reparse the opernad string in the extended hooks, when the original functions cannot recognize them. But the original functions have already pointed the parsed poniter to the next characters. Therefore, we should use a new pointer, opargStart, to record the position before parsing, and then pass it to the hooks when we need to reparse the extended operands. * Part of the "internal: unknown" errors are reported in the extended hooks rather than the original functions. For example, we used to report the "internal: unreachable" in the riscv_multi_subset_supports, to tell developers that they forgot to handle the new defined INSN_CLASS_. And the function returns TRUE/FALSE if the instruction is allowed or not according to the architecture string. The riscv_extended_subset_supports is the extended hook of riscv_multi_subset_supports, so it also returns a bfd_boolean to check the same thing. But it is hard to know if the INSN_CLASS_ is unknown from the same returned bfd_boolean, unless we add another new flag, or we just move the error report to the hook directly. I choose the latter for now, but it may cause the code of mainline and integration branches are inconsistent, which may affect the difficulty of the regular merge between these two branches. The same inconsistent problem also happens in riscv_parse_extended_operands. The hook only parse an operand rather than all, so it just has a switch without a for loop. We used to set "continue" to skip the loop in the switch, but the extended hook doesn't need the "continue". Perhaps we should use a single while/for in the hooks to keep the code consistent, then the regular merge may be more easiler. * Rename the variables to the more meaningful names in the riscv_ip, validate_riscv_insn and print_insn_args. - oparg: Renamed from args, means the arguments in the opcode table. - opargStart: Added to record the start of the argument. - asarg: Renamed from s, means the arguments of assembly string. - asargStart: Renamed from argsStart. * Extract the part that parsing the instruction opcode from the riscv_disassemble_insn, since we will need to call it for many times to search multiple opcode tables. bfd/ * elfxx-riscv.c (riscv_std_draft_ext_strtab): Added for draft extensions. (riscv_valid_prefixed_ext): Check whether the draft extension is defined. gas/ * config/tc-riscv.c (enum EXTENDED_EXT_NUM): Added to choose the right extended opcode hashes in the riscv_find_extended_opcode_hash. (enum riscv_csr_class): Added CSR_CLASS_EXTENDED. (enum reg_class): Added RCLASS_EXTENDED_NUM. (enum reg_extended_class): Added to define extended registers. (struct riscv_csr_extra): Changed enum riscv_csr_class to int, to increase the expandability of enum. (riscv_init_csr_hash): Likewise. (extended_ext_version_table): Record default versions for extended extensions. (extended_ext_version_hash): Handle of the extended extensions with version hash table. (riscv_search_ext_version_hash): Handle more than one ext_version_hash hashes. (riscv_find_opcode_hash): Handle more than one opcode hashes. (md_begin): Included riscv-opc-extended.h to define extended CSR. (init_ext_version_hash): Updated. (riscv_get_default_ext_version): Likewise. (md_assemble): Likewise. (s_riscv_insn): Likewsie. (riscv_after_parse_args): Likewise. (riscv_find_extended_opcode_hash): Extended hook for riscv_find_opcode_hash. (riscv_extended_subset_supports): Extended hook for riscv_multi_subset_supports. (riscv_extended_csr_class_check): Extended hook for riscv_csr_address, to check the CSR ISA dependency. (extended_macro): Extended hook for macro. (validate_riscv_extended_insn): Extended hook for validate_riscv_insn. (extended_macro_build): Extended hook for macro_build. (riscv_parse_extended_operands): Extended hook for riscv_ip. (riscv_multi_subset_supports): Updated to call extended hook. (riscv_csr_address): Likewise (macro): Likewise. (validate_riscv_insn): Likewise. Also define new variables, xxx and xxxStart, in case single letters are not enough to represent all extended operands. (macro_build): Likewise. (riscv_ip): Likewise. The asarg means assembly operand string, and oparg means operand string defined in the opcode table. * testsuite/gas/riscv/extended/extended.exp: New file to run extended testcases. include/ * opcode/riscv-opc-extended.h: New file to define encoding macros and CSR for extended extensions. * opcode/riscv.h: Included riscv-opc-extended.h. (enum riscv_insn_class): Added INSN_CLASS_EXTENDED. (struct riscv_opcode): Same as struct riscv_csr_extra. (enum M_EXTENDED): Added to support extended pseudo macros. opcode/ * riscv-dis.c (print_extended_insn_args): Extended hook for print_insn_args. (print_insn_args): Updated to call extended hook, and same as what validate_riscv_insn does. Also include riscv-opc-extended.h to show extended CSR correctly. * riscv-opc.c (riscv_extended_opcodes): Added to store all supported extended instruction opcodes.
* This is the 2.37 releasebinutils-2_37Nick Clifton2021-07-1825-143/+183
|
* Automatic date update in version.inGDB Administrator2021-07-181-1/+1
|
* Automatic date update in version.inGDB Administrator2021-07-171-1/+1
|
* Updated Swedish translation for the binutils sub-directoryNick Clifton2021-07-162-2299/+3138
|
* Automatic date update in version.inGDB Administrator2021-07-161-1/+1
|
* Fix a stack exhaustion problem in the Rust demangling code in the libiberty ↵Nick Clifton2021-07-152-6/+30
| | | | | | | library. PR 99935 * rust-demangle.c: Add recursion limit.
* Automatic date update in version.inGDB Administrator2021-07-151-1/+1
|
* Automatic date update in version.inGDB Administrator2021-07-141-1/+1
|
* Automatic date update in version.inGDB Administrator2021-07-131-1/+1
|
* Updated French translation for the binutils sub-directoryNick Clifton2021-07-122-2314/+3456
|
* Automatic date update in version.inGDB Administrator2021-07-121-1/+1
|
* Automatic date update in version.inGDB Administrator2021-07-111-1/+1
|
* Automatic date update in version.inGDB Administrator2021-07-101-1/+1
|
* Automatic date update in version.inGDB Administrator2021-07-091-1/+1
|
* x86-64: Disallow PC reloc against weak undefined symbols in PIEH.J. Lu2021-07-084-12/+17
| | | | | | | | | | | | | | | | | | Disallow PC relocations against weak undefined symbols in PIE since they can lead to non-zero address at run-time. bfd/ PR ld/21782 * elf64-x86-64.c (elf_x86_64_relocate_section): Disallow PC relocations against weak undefined symbols in PIE. ld/ PR ld/21782 * testsuite/ld-x86-64/pie3.d: Expect linker error. (cherry picked from commit 661b504df9bfb8d7c5d669091720e1dc0079c05e)
* Updated Portuguese translation for the BFD sub-directoryNick Clifton2021-07-082-1423/+1540
|
* Automatic date update in version.inGDB Administrator2021-07-081-1/+1
|
* elf/riscv: Fix relaxation with aliases [PR28021]Michael Matz2021-07-077-1/+124
| | | | | | | | | | | | | | | | | | | | | | | | | the fix for PR22756 only changed behaviour for hidden aliases, but the same situation exists for non-hidden aliases: sym_hashes[] can contain multiple entries pointing to the same symbol structure leading to relaxation adjustment to be applied twice. Fix this by testing for duplicates for everything that looks like it has a version. PR ld/28021 bfd/ * elfnn-riscv.c (riscv_relax_delete_bytes): Check for any versioning. ld/ * testsuite/ld-riscv-elf/relax-twice.ver: New. * testsuite/ld-riscv-elf/relax-twice-1.s: New. * testsuite/ld-riscv-elf/relax-twice-2.s: New. * testsuite/ld-riscv-elf/ld-riscv-elf.exp (run_relax_twice_test): New, and call it. (cherry picked from commit 235f5ef4a6b8fbdcfaea8b629f7c6a9792a789de)
* ld: Check archive only for archive memberH.J. Lu2021-07-074-13/+31
| | | | | | | | | | | | | | | | | | | | | | | Since plugin_maybe_claim calls bfd_close on the original input BFD if it isn't an archive member, pass NULL to bfd_plugin_close_file_descriptor to indicate that the BFD isn't an archive member. bfd/ PR ld/18028 * plugin.c (bfd_plugin_close_file_descriptor): Check archive only of abfd != NULL. (try_claim): Pass NULL to bfd_plugin_close_file_descriptor if it isn't an archive member. ld/ PR ld/18028 * plugin.c (plugin_input_file): Add comments for abfd and ibfd. (plugin_object_p): Set input->ibfd to NULL if it isn't an archive member. (cherry picked from commit 7a30ac441a4e776e68399cb916c4731b5192e931)
* Fix Solaris gprof build with --disable-nlsRainer Orth2021-07-072-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gprof fails to compile on Solaris 10 and 11.3 with --disable-nls: In file included from /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/gprof.h:33, from /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/basic_blocks.c:24: /usr/include/libintl.h:45:14: error: expected identifier or '(' before 'const' 45 | extern char *dcgettext(const char *, const char *, const int); | ^~~~~~~~~ /usr/include/libintl.h:46:14: error: expected identifier or '(' before 'const' 46 | extern char *dgettext(const char *, const char *); | ^~~~~~~~ /usr/include/libintl.h:47:14: error: expected identifier or '(' before 'const' 47 | extern char *gettext(const char *); | ^~~~~~~ /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/../bfd/sysdep.h:165:33: error: expected identifier or '(' before 'do' 165 | # define textdomain(Domainname) do {} while (0) | ^~ /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/../bfd/sysdep.h:165:39: error: expected identifier or '(' before 'while' 165 | # define textdomain(Domainname) do {} while (0) | ^~~~~ /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/../bfd/sysdep.h:166:46: error: expected identifier or '(' before 'do' 166 | # define bindtextdomain(Domainname, Dirname) do {} while (0) | ^~ /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/../bfd/sysdep.h:166:52: error: expected identifier or '(' before 'while' 166 | # define bindtextdomain(Domainname, Dirname) do {} while (0) | ^~~~~ /usr/include/libintl.h:55:14: error: expected identifier or '(' before 'unsigned' 55 | extern char *dcngettext(const char *, const char *, | ^~~~~~~~~~ /usr/include/libintl.h:57:14: error: expected identifier or '(' before 'unsigned' 57 | extern char *dngettext(const char *, const char *, | ^~~~~~~~~ /usr/include/libintl.h:59:14: error: expected identifier or '(' before 'unsigned' 59 | extern char *ngettext(const char *, const char *, unsigned long int); | ^~~~~~~~ This is a known issue already partially fixed in binutils/sysdep.h. For gprof, the same fix needs to be applied in bfd/sysdep.h, as the following patch does. Tested on i386-pc-solaris2.10 and i386-pc-solaris2.11. 2021-07-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> bfd: * sysdep.h [!ENABLE_NLS]: Prevent inclusion of <libintl.h> on Solaris.
* Check for strnlen declaration to fix Solaris 10 buildRainer Orth2021-07-078-2/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | binutils currently fails to compile on Solaris 10: /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/bfd/opncls.c: In function 'bfd_get_debug_link_info_1': /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/bfd/opncls.c:1231:16: error: implicit declaration of function 'strnlen' [-Werror=implicit-function-declaration] 1231 | crc_offset = strnlen (name, size) + 1; | ^~~~~~~ /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/bfd/opncls.c:1231:16: error: incompatible implicit declaration of built-in function 'strnlen' [-Werror] /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/bfd/opncls.c: In function 'bfd_get_alt_debug_link_info': /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/bfd/opncls.c:1319:20: error: incompatible implicit declaration of built-in function 'strnlen' [-Werror] 1319 | buildid_offset = strnlen (name, size) + 1; | ^~~~~~~ and in a couple of other places. The platform lacks strnlen, and while libiberty.h can provide a fallback declaration, the necessary configure test isn't run. Fixed with the following patch. Tested on i386-pc-solaris2.10. 2021-07-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> bfd: * configure.ac: Check for strnlen declaration. * configure, config.in: Regenerate. binutils: * configure.ac: Check for strnlen declaration. * configure, config.in: Regenerate.
* Automatic date update in version.inGDB Administrator2021-07-071-1/+1
|
* Automatic date update in version.inGDB Administrator2021-07-061-1/+1
|
* ld: Cache and reuse the IR archive file descriptorH.J. Lu2021-07-0511-39/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linker plugin_object_p opens the IR archive for each IR archive member. For GCC plugin, plugin_object_p closes the archive file descriptor. But for LLVM plugin, the archive file descriptor remains open. If there are 3000 IR archive members, there are 3000 file descriptors for them. We can run out of file descriptors petty easily. 1. Add archive_plugin_fd and archive_plugin_fd_open_count to bfd so that we can cache and reuse the IR archive file descriptor for all IR archive members in the archive. 2. Add bfd_plugin_close_file_descriptor to properly close the IR archive file descriptor. bfd/ PR ld/28040 * archive.c (_bfd_archive_close_and_cleanup): Close the archive plugin file descriptor if needed. * bfd.c (bfd): Add archive_plugin_fd and archive_plugin_fd_open_count. * opncls.c (_bfd_new_bfd): Initialize to -1. * plugin.c (bfd_plugin_open_input): Cache and reuse the archive plugin file descriptor. (bfd_plugin_close_file_descriptor): New function. (try_claim): Call bfd_plugin_close_file_descriptor. * plugin.h (bfd_plugin_close_file_descriptor): New. * bfd-in2.h: Regenerated. ld/ PR ld/28040 * plugin.c (plugin_input_file): Add ibfd. (release_plugin_file_descriptor): New function. (release_input_file): Call release_plugin_file_descriptor to close input->fd. (plugin_object_p): Call release_plugin_file_descriptor to close input->fd. Also call release_plugin_file_descriptor if not claimed. * testsuite/config/default.exp (RANLIB): New. * testsuite/ld-plugin/lto.exp: Run ranlib test. (cherry picked from commit 918172470430ea6fa082c941e6789add88331197)
* Reapply patch to allow libiberty to be built with LTO enabled.Nick Clifton2021-07-055-2/+169
| | | | | | | | | | | | | Reapply this change from commit: 50ad1254d5030d0804cbf89c758359ae202e8d55 * Makefile.in (AR): Add @AR_PLUGIN_OPTION@ (RANLIB): Add @RANLIB_PLUGIN_OPTION@. (configure_deps): Depend on ../config/gcc-plugin.m4. * aclocal.m4: Include ../config/gcc-plugin.m4. * configure.ac: AC_SUBST AR_PLUGIN_OPTION and RANLIB_PLUGIN_OPTION. * configure: Regenerated.
* Updated translationsNick Clifton2021-07-0521-16787/+18706
|
* Automatic date update in version.inGDB Administrator2021-07-051-1/+1
|
* Automatic date update in version.inGDB Administrator2021-07-041-1/+1
|
* Regenerate gprof/configureNick Clifton2021-07-031-10/+10
|
* Update version number and regenerate filesNick Clifton2021-07-0320-8468/+9673
|
* Add markers for 2.37 branchNick Clifton2021-07-0317-0/+59
|
* Synchronize libiberty sources (and include/demangle.h) with GCC master versionNick Clifton2021-07-0317-393/+476
|
* Automatic date update in version.inGDB Administrator2021-07-031-1/+1
|
* Use 'const' in ada-exp.yTom Tromey2021-07-022-10/+15
| | | | | | | | | | | I found a few spots in ada-exp.y that could use 'const'. Tested by rebuilding. 2021-07-02 Tom Tromey <tromey@adacore.com> * ada-exp.y (chop_selector, chop_separator, write_selectors) (write_ambiguous_var, get_symbol_field_type): Use const.
* Document TUI improvements in the manual & NEWSPedro Alves2021-07-024-0/+46
| | | | | | | | | | | | | | | | | | | | gdb/ChangeLog: yyyy-mm-dd Pedro Alves <pedro@palves.net> Hannes Domani <ssbssa@yahoo.de> * NEWS: Add new "TUI Improvements" section and mention mouse support and that unrecognized special keys are now passed to GDB. Mention Python Window.click in the Python improvements section. gdb/doc/ChangeLog: yyyy-mm-dd Pedro Alves <pedro@palves.net> * gdb.texinfo (TUI): <TUI Mouse Support>: New node/section. Co-Authored-By: Hannes Domani <ssbssa@yahoo.de> Change-Id: I0d79a795d8ac561fd28cdc5184bff029ba28bc64
* Fix an illegal memory access triggered by an attempt to parse a corrupt ↵Nick Clifton2021-07-022-1/+10
| | | | | | | | input file. PR 28046 * dwarf2.c (read_ranges): Check that range_ptr does not exceed range_end.
* PR28048, heap-buffer-overflow on readelf -WwAlan Modra2021-07-022-1/+7
| | | | | | PR 28048 * dwarf.c (get_type_signedness): Don't run off end of buffer printing DW_FORM_string attribute.
* Re: Fix minor NDS32 renaming snafuAlan Modra2021-07-025-14/+27
| | | | | | | | | | | | | | | | | Some extern declarations differ in constnes to their definitions too. Let's make sure this sort of thing doesn't happen again, but putting the externs in a header where they belong. gas/ * config/tc-nds32.c (nds32_keyword_gpr): Don't declare. (md_begin): Constify k. opcodes/ * nds32-dis.c (nds32_find_reg_keyword): Constify arg and return. (nds32_parse_audio_ext, nds32_parse_opcode): Constify psys_reg. (nds32_field_table, nds32_opcode_table, nds32_keyword_table), (nds32_opcodes, nds32_operand_fields, nds32_keywords), (nds32_keyword_gpr): Move declarations to.. * nds32-asm.h: ..here, constifying to match definitions.
* Fix minor NDS32 renaming snafu.Nick Clifton2021-07-022-2/+7
| | | | | * config/tc-nds32.c: Change all references of keyword_gpr to nds32_keyword_gpr.
* sim: unify reserved instruction bits settingsMike Frysinger2021-07-0133-140/+100
| | | | | | | | Move these options up to the common dir so we only test & export them once across all ports. The setting only affects igen based ports, and they were turning this on by default, so keep the default in place.
* sim: m32r: merge with common configure scriptMike Frysinger2021-07-018-2902/+35
| | | | | Now that the traps code has been unified, the configure script has no unique logic in it, so it can be merged into the single common one.
* sim: m32r: reformat linux traps codeMike Frysinger2021-07-012-1067/+1067
| | | | Do this as a sep commit to try and make the history easier to review.
* sim: m32r: unify ELF & Linux traps logicMike Frysinger2021-07-018-1385/+1207
| | | | | | | | This makes the simulator work the same regardless of the target (bare metal m32r-elf or Linux m32r-linux-gnu) by unifying the traps code. It was mostly already the same with the only difference being support for trap #2 reserved for Linux syscalls. We can move that logic to runtime by checking the current environment operating mode instead.
* sim: m32r: replace custom endian helpers with sim-endianMike Frysinger2021-07-012-107/+90
| | | | | | This improves the logic a bit by making the host<->target translations a bit more clear. The structs still bleed way too much between the two worlds, but let's fix one thing at a time.
* sim: m32r: fix virtual environment with Linux targetsMike Frysinger2021-07-015-8/+15
| | | | | | | | | | We don't want to handle Linux syscalls when in the virtual environment, just the user environment, so adjust the Linux traps logic to check for that specifically (instead of just skipping the operating environment). Also tweak some testcases to explicitly specify the environment they run under rather than relying on the default matching their needs. This gets the tests passing for all m32r targets.