diff options
-rw-r--r-- | bfd/elf32-ppc.c | 44 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 40 | ||||
-rw-r--r-- | bfd/version.h | 2 | ||||
-rw-r--r-- | binutils/README-how-to-make-a-release | 54 | ||||
-rw-r--r-- | gas/config/tc-arc.h | 2 | ||||
-rw-r--r-- | gas/config/tc-arm.h | 3 | ||||
-rw-r--r-- | gas/config/tc-csky.h | 2 | ||||
-rw-r--r-- | gas/config/tc-msp430.h | 3 | ||||
-rw-r--r-- | gas/config/tc-nds32.c | 17 | ||||
-rw-r--r-- | gas/config/tc-ppc.h | 3 | ||||
-rw-r--r-- | gas/config/tc-s390.h | 3 | ||||
-rw-r--r-- | gas/config/tc-sparc.h | 2 | ||||
-rw-r--r-- | gas/config/tc-tic6x.h | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/nds32/nds32.exp | 22 | ||||
-rw-r--r-- | gas/testsuite/gas/nds32/pr33229.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/nds32/pr33229.s | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.ada/operator_call.exp | 6 | ||||
-rw-r--r-- | ld/ChangeLog | 15 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/indirect.exp | 15 | ||||
-rw-r--r-- | ld/testsuite/ld-elfweak/elfweak.exp | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/lto.exp | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/elfv2-2so.d | 2 | ||||
-rw-r--r-- | libctf/ctf-link.c | 88 |
23 files changed, 173 insertions, 165 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 3fd9f28..1ed995b 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -53,6 +53,10 @@ static bfd_reloc_status_type ppc_elf_addr16_ha_reloc static bfd_reloc_status_type ppc_elf_unhandled_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) +#endif + /* Branch prediction bit for branch taken relocs. */ #define BRANCH_PREDICT_BIT 0x200000 /* Mask to set RA in memory instructions. */ @@ -702,13 +706,10 @@ ppc_elf_howto_init (void) { unsigned int i, type; - for (i = 0; - i < sizeof (ppc_elf_howto_raw) / sizeof (ppc_elf_howto_raw[0]); - i++) + for (i = 0; i < ARRAY_SIZE (ppc_elf_howto_raw); i++) { type = ppc_elf_howto_raw[i].type; - if (type >= (sizeof (ppc_elf_howto_table) - / sizeof (ppc_elf_howto_table[0]))) + if (type >= ARRAY_SIZE (ppc_elf_howto_table)) abort (); ppc_elf_howto_table[type] = &ppc_elf_howto_raw[i]; } @@ -870,9 +871,7 @@ ppc_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, { unsigned int i; - for (i = 0; - i < sizeof (ppc_elf_howto_raw) / sizeof (ppc_elf_howto_raw[0]); - i++) + for (i = 0; i < ARRAY_SIZE (ppc_elf_howto_raw); i++) if (ppc_elf_howto_raw[i].name != NULL && strcasecmp (ppc_elf_howto_raw[i].name, r_name) == 0) return &ppc_elf_howto_raw[i]; @@ -894,7 +893,8 @@ ppc_elf_info_to_howto (bfd *abfd, ppc_elf_howto_init (); r_type = ELF32_R_TYPE (dst->r_info); - if (r_type >= R_PPC_max) + if (r_type >= ARRAY_SIZE (ppc_elf_howto_table) + || ppc_elf_howto_table[r_type] == NULL) { /* xgettext:c-format */ _bfd_error_handler (_("%pB: unsupported relocation type %#x"), @@ -904,19 +904,6 @@ ppc_elf_info_to_howto (bfd *abfd, } cache_ptr->howto = ppc_elf_howto_table[r_type]; - - /* Just because the above assert didn't trigger doesn't mean that - ELF32_R_TYPE (dst->r_info) is necessarily a valid relocation. */ - if (cache_ptr->howto == NULL) - { - /* xgettext:c-format */ - _bfd_error_handler (_("%pB: unsupported relocation type %#x"), - abfd, r_type); - bfd_set_error (bfd_error_bad_value); - - return false; - } - return true; } @@ -7088,12 +7075,11 @@ ppc_elf_relocate_section (bfd *output_bfd, /* For relocs against symbols from removed linkonce sections, or sections discarded by a linker script, we just want the section contents zeroed. Avoid any special processing. */ - howto = NULL; - if (r_type < R_PPC_max) - howto = ppc_elf_howto_table[r_type]; - - _bfd_clear_contents (howto, input_bfd, input_section, - contents, rel->r_offset); + if (r_type < ARRAY_SIZE (ppc_elf_howto_table) + && ppc_elf_howto_table[r_type] != NULL) + _bfd_clear_contents (ppc_elf_howto_table[r_type], + input_bfd, input_section, + contents, rel->r_offset); wrel->r_offset = rel->r_offset; wrel->r_info = 0; wrel->r_addend = 0; @@ -7653,7 +7639,7 @@ ppc_elf_relocate_section (bfd *output_bfd, addend = rel->r_addend; save_unresolved_reloc = unresolved_reloc; howto = NULL; - if (r_type < R_PPC_max) + if (r_type < ARRAY_SIZE (ppc_elf_howto_table)) howto = ppc_elf_howto_table[r_type]; tls_type = 0; diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index e6c90a6..7868063 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -1379,7 +1379,8 @@ ppc64_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, ppc_howto_init (); type = ELF64_R_TYPE (dst->r_info); - if (type >= ARRAY_SIZE (ppc64_elf_howto_table)) + if (type >= ARRAY_SIZE (ppc64_elf_howto_table) + || ppc64_elf_howto_table[type] == NULL) { /* xgettext:c-format */ _bfd_error_handler (_("%pB: unsupported relocation type %#x"), @@ -1388,15 +1389,6 @@ ppc64_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, return false; } cache_ptr->howto = ppc64_elf_howto_table[type]; - if (cache_ptr->howto == NULL || cache_ptr->howto->name == NULL) - { - /* xgettext:c-format */ - _bfd_error_handler (_("%pB: unsupported relocation type %#x"), - abfd, type); - bfd_set_error (bfd_error_bad_value); - return false; - } - return true; } @@ -5104,7 +5096,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (!ppc64_elf_howto_table[R_PPC64_ADDR32]) ppc_howto_init (); /* xgettext:c-format */ - info->callbacks->einfo (_("%H: %s reloc unsupported " + info->callbacks->einfo (_("%H: %s unsupported " "in shared libraries and PIEs\n"), abfd, sec, rel->r_offset, ppc64_elf_howto_table[r_type]->name); @@ -5274,7 +5266,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (ppc64_sec->sec_type != sec_toc || rel->r_offset % 8 != 0) { - info->callbacks->einfo (_("%H: %s reloc unsupported here\n"), + info->callbacks->einfo (_("%H: %s unsupported here\n"), abfd, sec, rel->r_offset, ppc64_elf_howto_table[r_type]->name); bfd_set_error (bfd_error_bad_value); @@ -15685,9 +15677,11 @@ ppc64_elf_relocate_section (bfd *output_bfd, if (sec != NULL && discarded_section (sec)) { - _bfd_clear_contents (ppc64_elf_howto_table[r_type], - input_bfd, input_section, - contents, rel->r_offset); + if (r_type < ARRAY_SIZE (ppc64_elf_howto_table) + && ppc64_elf_howto_table[r_type] != NULL) + _bfd_clear_contents (ppc64_elf_howto_table[r_type], + input_bfd, input_section, + contents, rel->r_offset); wrel->r_offset = rel->r_offset; wrel->r_info = 0; wrel->r_addend = 0; @@ -15750,6 +15744,8 @@ ppc64_elf_relocate_section (bfd *output_bfd, relocs are used with non-tls syms. */ if (r_symndx != STN_UNDEF && r_type != R_PPC64_NONE + && r_type < ARRAY_SIZE (ppc64_elf_howto_table) + && ppc64_elf_howto_table[r_type] != NULL && (h == NULL || h->elf.root.type == bfd_link_hash_defined || h->elf.root.type == bfd_link_hash_defweak) @@ -16865,9 +16861,15 @@ ppc64_elf_relocate_section (bfd *output_bfd, switch (r_type) { default: - /* xgettext:c-format */ - _bfd_error_handler (_("%pB: %s unsupported"), - input_bfd, ppc64_elf_howto_table[r_type]->name); + if (r_type < ARRAY_SIZE (ppc64_elf_howto_table) + && ppc64_elf_howto_table[r_type] != NULL) + /* xgettext:c-format */ + _bfd_error_handler (_("%pB: %s unsupported"), + input_bfd, ppc64_elf_howto_table[r_type]->name); + else + /* xgettext:c-format */ + _bfd_error_handler (_("%pB: unsupported relocation type %#x"), + input_bfd, r_type); bfd_set_error (bfd_error_bad_value); ret = false; @@ -17909,7 +17911,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, /* Dynamic relocs are not propagated for SEC_DEBUGGING sections because such sections are not SEC_ALLOC and thus ld.so will not process them. */ - howto = ppc64_elf_howto_table[(int) r_type]; + howto = ppc64_elf_howto_table[r_type]; if (unresolved_reloc && !((input_section->flags & SEC_DEBUGGING) != 0 && h->elf.def_dynamic) diff --git a/bfd/version.h b/bfd/version.h index 3bf3c17..751f40f 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -16,7 +16,7 @@ In releases, the date is not included in either version strings or sonames. */ -#define BFD_VERSION_DATE 20250726 +#define BFD_VERSION_DATE 20250730 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ diff --git a/binutils/README-how-to-make-a-release b/binutils/README-how-to-make-a-release index 0604a56..7ab4c69 100644 --- a/binutils/README-how-to-make-a-release +++ b/binutils/README-how-to-make-a-release @@ -232,6 +232,10 @@ If this is an ODD numbered release: For the next few weeks, monitor the mailing list for new translations and respond to any requests to have patches applied to the branch. +Also - expect to receive lots of new/updated translations from the +Translation Project. These all need to be checked in to both the +mainline and the branch. + ============================================================================== ============================================================================== @@ -253,7 +257,7 @@ How to create the release. 21. a. Update the release number in bfd/version.m4 on the release branch to a whole new minor version number, without a point - value. Eg "2.44.90" becomes "2.45". NB/ Not: "2.45.00" + value. Eg "2.45.90" becomes "2.46". NB/ Not: "2.46.00" b. Change bfd/development.sh to set all values to "false". @@ -280,11 +284,10 @@ How to create the release. to exist in the master repository, and that the GDB project would need to agree to have it there. - e. Add ChangeLog entries for all of the updates and add a - "this-is-the-2.43-release" comment and commit. + e. Commit. git add . - git commit -m "This is the 2.45 release" + git commit -m "This is the 2.46 release" git push 22. Check that your file creation mask will create the @@ -311,17 +314,15 @@ How to create the release. If this is an EVEN numbered release: - ./src-release.sh -b -g -l -x -z binutils_with_gold + ./src-release.sh -b -g -l -x -z \ + -r `git log -1 --format=%cd --date=format:%F bfd/version.m4` \ + binutils_with_gold If this is an ODD numbered release: - ./src-release.sh -b -g -l -x -z binutils - - OR ... for a more reproducible tarball: - ./src-release.sh -b -g -l -x -z \ -r `git log -1 --format=%cd --date=format:%F bfd/version.m4` \ - [binutils | binutils_with_gold] + binutils 24. Check that the files in the tarballs have the correct permissions. @@ -330,7 +331,7 @@ How to create the release. Also check that the man files are not empty. (cf PR 28144). - tar tvf binutils-*.tar | grep -e "\.1" + tar tvf binutils-*.tar | grep -e "\.1" (look for zero sized files) 25. Sanity check the release on x86_64-pc-linux-gnu by building and running the testsuites (gas, gold, binutils and ld). @@ -365,21 +366,23 @@ How to create the release. popd 26. Tag the branch with the new release number: - [optional: add "-u XXXXX" to sign with a gpg key] - enter a tag message such as: "Official GNU Binutils 2.4x release" + [Optional: add "-u XXXXX" to sign with a gpg key. + Note: This may require changing the setting of [gpg] in your .gitconfig file] + + Enter a tag message such as: "Official GNU Binutils 2.4x release" git tag -a <TAG> -u <Your Key> eg: - git tag -a binutils-2_44 -u DD9E3C4F <=== Be careful to get the tag right + git tag -a binutils-2_46 -u DD9E3C4F <=== Be careful to get the tag right or: - git tag -a binutils-2_44 -u DD9E3C4F -m "Official GNU Binutils 2.44 release" + git tag -a binutils-2_46 -u DD9E3C4F -m "Official GNU Binutils 2.46 release" NB/ If you do sign the binaries make sure to use a key that has been published with the FSF. Then push the release: - git push origin binutils-2_44 + git push origin binutils-2_46 If you get an error message along the lines of: "Invalid revision range ..." @@ -387,11 +390,11 @@ How to create the release. 27. Upload the tarballs to ftp.gnu.org. - gnupload --to ftp.gnu.org:binutils binutils-2.44.tar.* + gnupload --to ftp.gnu.org:binutils binutils-2.46.tar.* Be prepared to provide the password for the key, if you signed the binaries. - + The gnupload script is in the build-aux/ directory of the gnulib project's srouces. It uses the ncftp package for transmitting the files. @@ -420,8 +423,8 @@ How to create the release. Create a new docs sub-directory and move into it: cd binutils-htdocs - mkdir docs-2.45 - cd docs-2.45 + mkdir docs-2.46 + cd docs-2.46 Copy the index.html from the previous release @@ -457,8 +460,8 @@ How to create the release. cp <build-dir>/ld/ld.pdf . [NB/ Path not like others] [NB/ The gprofng documentation does not have a node-per-page selection] - cp <build-dir>/gprofng/doc/gprof.html . - cp <build-dir>/gprofng/doc/gprof.pdf . + cp <build-dir>/gprofng/gprof.html . + cp <build-dir>/gprofng/gprof.pdf . cp <build-dir>/libctf/doc/ctf-spec.html . cp <build-dir>/libctf/doc/ctf-spec.pdf . @@ -470,19 +473,20 @@ How to create the release. cd .. [Should now be in be in binutils-htdocs/ ] rm docs - ln -s docs-2.45 docs + ln -s docs-2.46 docs Edit index.html file to change the links to point to the new release, mention any new features, update dates and so on. - Check that the new web page is correct: + Check that the new web page is correct by opening it in a browser: file:///<path-to-binutils-htdocs>/index.html Add the new directories and files, commit and push the changes: + get add docs-2.46 git add . - git commit -m"Update documenation for the 2.45 release" + git commit -m"Update documenation for the 2.46 release" git push diff --git a/gas/config/tc-arc.h b/gas/config/tc-arc.h index 145d955..65470f0 100644 --- a/gas/config/tc-arc.h +++ b/gas/config/tc-arc.h @@ -271,4 +271,4 @@ struct arc_relax_type extern void arc_md_end (void); #define md_end arc_md_end -#endif +#endif /* TC_ARC */ diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h index aa5f117..4148a6f 100644 --- a/gas/config/tc-arm.h +++ b/gas/config/tc-arm.h @@ -20,6 +20,7 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef TC_ARM #define TC_ARM 1 #ifndef TARGET_BYTES_BIG_ENDIAN @@ -377,3 +378,5 @@ extern bool arm_tc_equal_in_insn (int, char *); #define TC_LARGEST_EXPONENT_IS_NORMAL(PRECISION) \ arm_is_largest_exponent_ok ((PRECISION)) int arm_is_largest_exponent_ok (int precision); + +#endif /* TC_ARM */ diff --git a/gas/config/tc-csky.h b/gas/config/tc-csky.h index 7e32347..d391084 100644 --- a/gas/config/tc-csky.h +++ b/gas/config/tc-csky.h @@ -106,4 +106,4 @@ extern long csky_relax_frag (segT, fragS *, long); const char * elf32_csky_target_format (void); #endif -#endif +#endif /* TC_CSKY */ diff --git a/gas/config/tc-msp430.h b/gas/config/tc-msp430.h index 47da4aa..fc39a59 100644 --- a/gas/config/tc-msp430.h +++ b/gas/config/tc-msp430.h @@ -20,6 +20,7 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef TC_MSP430 #define TC_MSP430 /* By convention, you should define this macro in the `.h' file. For example, `tc-m68k.h' defines `TC_M68K'. You might have to use this @@ -172,3 +173,5 @@ extern bool msp430_allow_local_subtract (expressionS *, expressionS *, segT); #define TC_LINKRELAX_FIXUP(seg) ((seg->flags & SEC_CODE) || (seg->flags & SEC_DEBUGGING)) #define DWARF2_ADDR_SIZE(bfd) 4 + +#endif /* TC_MSP430 */ diff --git a/gas/config/tc-nds32.c b/gas/config/tc-nds32.c index 647744f..d107555 100644 --- a/gas/config/tc-nds32.c +++ b/gas/config/tc-nds32.c @@ -3452,8 +3452,9 @@ nds32_lookup_pseudo_opcode (const char *str) for (i = 0; i < maxlen; i++) { - if (is_whitespace (op[i] = str[i])) + if (is_end_of_stmt (str[i]) || is_whitespace (str[i])) break; + op[i] = str[i]; } op[i] = '\0'; @@ -4093,7 +4094,8 @@ nds32_relax_relocs (int relax) {"", "",}; name = input_line_pointer; - while (*input_line_pointer && !is_whitespace (*input_line_pointer)) + while (!is_end_of_stmt (*input_line_pointer) + && !is_whitespace (*input_line_pointer)) input_line_pointer++; saved_char = *input_line_pointer; *input_line_pointer = 0; @@ -4228,7 +4230,8 @@ nds32_relax_hint (int mode ATTRIBUTE_UNUSED) struct relax_hint_id *record_id; name = input_line_pointer; - while (*input_line_pointer && !is_whitespace (*input_line_pointer)) + while (!is_end_of_stmt (*input_line_pointer) + && !is_whitespace (*input_line_pointer)) input_line_pointer++; saved_char = *input_line_pointer; *input_line_pointer = 0; @@ -4361,7 +4364,8 @@ nds32_flag (int ignore ATTRIBUTE_UNUSED) /* Skip whitespaces. */ name = input_line_pointer; - while (*input_line_pointer && !is_whitespace (*input_line_pointer)) + while (!is_end_of_stmt (*input_line_pointer) + && !is_whitespace (*input_line_pointer)) input_line_pointer++; saved_char = *input_line_pointer; *input_line_pointer = 0; @@ -4398,7 +4402,8 @@ ict_model (int ignore ATTRIBUTE_UNUSED) /* Skip whitespaces. */ name = input_line_pointer; - while (*input_line_pointer && !is_whitespace (*input_line_pointer)) + while (!is_end_of_stmt (*input_line_pointer) + && !is_whitespace (*input_line_pointer)) input_line_pointer++; saved_char = *input_line_pointer; *input_line_pointer = 0; @@ -5944,7 +5949,7 @@ nds32_elf_append_relax_relocs (const char *key, const void *value) char *where; int pcrel; - if (!relocs_pattern) + if (!relocs_pattern || !relocs_pattern->opcode) return; if (!nds32_find_reloc_table (relocs_pattern, &hint_info)) diff --git a/gas/config/tc-ppc.h b/gas/config/tc-ppc.h index 97e2f4e..e568c42 100644 --- a/gas/config/tc-ppc.h +++ b/gas/config/tc-ppc.h @@ -19,6 +19,7 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef TC_PPC #define TC_PPC #include "opcode/ppc.h" @@ -367,3 +368,5 @@ extern int ppc_dwarf2_line_min_insn_length; #define DWARF2_DEFAULT_RETURN_COLUMN 0x41 #define DWARF2_CIE_DATA_ALIGNMENT ppc_cie_data_alignment #define EH_FRAME_ALIGNMENT 2 + +#endif /* TC_PPC */ diff --git a/gas/config/tc-s390.h b/gas/config/tc-s390.h index c92769e..0c62125 100644 --- a/gas/config/tc-s390.h +++ b/gas/config/tc-s390.h @@ -19,6 +19,7 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef TC_S390 #define TC_S390 struct fix; @@ -129,3 +130,5 @@ extern offsetT s390_sframe_cfa_ra_offset (void); /* The abi/arch identifier for SFrame. */ unsigned char s390_sframe_get_abi_arch (void); #define sframe_get_abi_arch s390_sframe_get_abi_arch + +#endif /* TC_S390 */ diff --git a/gas/config/tc-sparc.h b/gas/config/tc-sparc.h index d569fe7..cfb89e0 100644 --- a/gas/config/tc-sparc.h +++ b/gas/config/tc-sparc.h @@ -178,4 +178,4 @@ extern int sparc_cie_data_alignment; this, BFD_RELOC_32_PCREL will be emitted directly instead. */ #define CFI_DIFF_EXPR_OK 0 -#endif +#endif /* TC_SPARC */ diff --git a/gas/config/tc-tic6x.h b/gas/config/tc-tic6x.h index 55f2b2c..5859333 100644 --- a/gas/config/tc-tic6x.h +++ b/gas/config/tc-tic6x.h @@ -18,7 +18,9 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef TC_TIC6X #define TC_TIC6X 1 + #define TARGET_BYTES_BIG_ENDIAN 0 #define WORKING_DOT_WORD #define DOUBLEBAR_PARALLEL @@ -225,3 +227,5 @@ struct fde_entry; void tic6x_cfi_endproc (struct fde_entry *fde); #define tc_cfi_section_name ".c6xabi.exidx" + +#endif /* TC_TIC6X */ diff --git a/gas/testsuite/gas/nds32/nds32.exp b/gas/testsuite/gas/nds32/nds32.exp index 82934ce..216fcf1 100644 --- a/gas/testsuite/gas/nds32/nds32.exp +++ b/gas/testsuite/gas/nds32/nds32.exp @@ -16,17 +16,13 @@ # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, # MA 02110-1301, USA. -if { [istarget nds32*] } { - run_dump_test "alu-1" - run_dump_test "alu-2" - run_dump_test "lsi" - run_dump_test "ls" - run_dump_test "br-1" - run_dump_test "br-2" - run_dump_test "ji-jr" - run_dump_test "to-16bit-v1" - run_dump_test "to-16bit-v2" - run_dump_test "to-16bit-v3" - run_dump_test "usr-spe-reg" - run_dump_test "sys-reg" +if { ![istarget nds32*] } { + return +} + +set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]] +foreach t $test_list { + # We need to strip the ".d", but can leave the dirname. + verbose [file rootname $t] + run_dump_test [file rootname $t] } diff --git a/gas/testsuite/gas/nds32/pr33229.d b/gas/testsuite/gas/nds32/pr33229.d new file mode 100644 index 0000000..e65ca41 --- /dev/null +++ b/gas/testsuite/gas/nds32/pr33229.d @@ -0,0 +1,2 @@ +#as: --fatal-warnings +#error: .*relax hint.* diff --git a/gas/testsuite/gas/nds32/pr33229.s b/gas/testsuite/gas/nds32/pr33229.s new file mode 100644 index 0000000..3127d6d --- /dev/null +++ b/gas/testsuite/gas/nds32/pr33229.s @@ -0,0 +1,3 @@ + .relax_hint 0 + ret5 + .relax_hint 1 diff --git a/gdb/testsuite/gdb.ada/operator_call.exp b/gdb/testsuite/gdb.ada/operator_call.exp index e96107b..dc7f679 100644 --- a/gdb/testsuite/gdb.ada/operator_call.exp +++ b/gdb/testsuite/gdb.ada/operator_call.exp @@ -71,6 +71,12 @@ proc test_with_menu {command result} { fail $command } } + "Argument to arithmetic operation not a number or boolean." { + fail $command + } + -re "No definition of \".*\" in current context." { + fail $command + } timeout { fail "$command (timeout)" } diff --git a/ld/ChangeLog b/ld/ChangeLog index 96960ab..7b03989 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,18 @@ +2025-07-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * testsuite/ld-elfweak/elfweak.exp: Enable on *-*-solaris2* rather + than sparc*-*-solaris2* only. + +2025-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * testsuite/ld-plugin/lto.exp (PR ld/28138 test): Raise fd limit + to 25. + +2025-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * testsuite/ld-elf/indirect.exp (Run with libpr19553c.so): + Skip on *-*-solaris2*. + 2025-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR ld/32580 diff --git a/ld/testsuite/ld-elf/indirect.exp b/ld/testsuite/ld-elf/indirect.exp index 9a0bcb2..3d9cc2a 100644 --- a/ld/testsuite/ld-elf/indirect.exp +++ b/ld/testsuite/ld-elf/indirect.exp @@ -189,14 +189,21 @@ set run_tests [list \ {check-ptr-eq.c} "pr18720d" "pr18720.out"] \ [list "Run with libpr19553b.so" \ "-Wl,--no-as-needed tmpdir/libpr19553b.so tmpdir/libpr19553d.so -Wl,-rpath-link,." "" \ - {pr19553a.c} "pr19553b" "pr19553b.out"] \ + {pr19553a.c} "pr19553b" "pr19553b.out"] +] + +# This test relies on versioned symbols, which Solaris ld.so.1 doesn't support. +if { ![istarget *-*-solaris2*] } { + lappend run_tests \ [list "Run with libpr19553c.so" \ "-Wl,--no-as-needed tmpdir/libpr19553c.so tmpdir/libpr19553b.so tmpdir/libpr19553d.so" "" \ - {pr19553a.c} "pr19553c" "pr19553c.out"] \ + {pr19553a.c} "pr19553c" "pr19553c.out"] +} + +lappend run_tests \ [list "Run with libpr19553d.so" \ "-Wl,--no-as-needed tmpdir/libpr19553d.so tmpdir/libpr19553b.so -Wl,-rpath-link,." "" \ - {pr19553a.c} "pr19553d" "pr19553d.out"] \ -] + {pr19553a.c} "pr19553d" "pr19553d.out"] run_ld_link_exec_tests $run_tests diff --git a/ld/testsuite/ld-elfweak/elfweak.exp b/ld/testsuite/ld-elfweak/elfweak.exp index aa6c29a..4e5ac42 100644 --- a/ld/testsuite/ld-elfweak/elfweak.exp +++ b/ld/testsuite/ld-elfweak/elfweak.exp @@ -35,7 +35,8 @@ if { ![check_shared_lib_support] } { # This test can only be run on a couple of ELF platforms. # Square bracket expressions seem to confuse istarget. # This is similar to the test that is used in ld-shared, BTW. -if { ![istarget alpha*-*-linux*] +if { ![istarget *-*-solaris2*] + && ![istarget alpha*-*-linux*] && ![istarget arm*-*-linux*] && ![istarget hppa*64*-*-hpux*] && ![istarget hppa*-*-linux*] @@ -52,7 +53,6 @@ if { ![istarget alpha*-*-linux*] && ![istarget powerpc*-*-sysv4*] && ![istarget sh\[34\]*-*-linux*] && ![istarget sparc*-*-elf] - && ![istarget sparc*-*-solaris2*] && ![istarget sparc*-*-linux*] && ![istarget x86_64-*-linux*] } { return diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index d68e5f4..9ac3cf6 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -1009,7 +1009,7 @@ run_cc_link_tests [list \ set board_flags [get_board_flags] set exec_output [run_host_cmd "sh" \ - "-c \"ulimit -n 20; \ + "-c \"ulimit -n 25; \ $CC_FOR_TARGET $gcc_B_opt $CFLAGS_FOR_TARGET \ $board_flags $ld_L_opt -o tmpdir/pr28138 \ tmpdir/pr28138.o tmpdir/pr28138.a\""] diff --git a/ld/testsuite/ld-powerpc/elfv2-2so.d b/ld/testsuite/ld-powerpc/elfv2-2so.d index 56b1434..18bc87f 100644 --- a/ld/testsuite/ld-powerpc/elfv2-2so.d +++ b/ld/testsuite/ld-powerpc/elfv2-2so.d @@ -2,4 +2,4 @@ #source: elfv2-2b.s #as: -a64 #ld: -melf64ppc -shared -e f1 -#error: .* R_PPC64_ADDR64_LOCAL reloc unsupported in shared libraries and PIEs.* +#error: .* R_PPC64_ADDR64_LOCAL unsupported in shared libraries and PIEs.* diff --git a/libctf/ctf-link.c b/libctf/ctf-link.c index 2d4401d..524ed7e 100644 --- a/libctf/ctf-link.c +++ b/libctf/ctf-link.c @@ -20,10 +20,6 @@ #include <ctf-impl.h> #include <string.h> -#if defined (PIC) -#pragma weak ctf_open -#endif - /* CTF linking consists of adding CTF archives full of content to be merged into this one to the current file (which must be writable) by calling ctf_link_add_ctf. Once this is done, a call to ctf_link will merge the type @@ -145,56 +141,33 @@ ctf_link_add_ctf_internal (ctf_dict_t *fp, ctf_archive_t *ctf, return ctf_set_errno (fp, ENOMEM); } -/* Add a file, memory buffer, or unopened file (by name) to a link. - - You can call this with: - - CTF and NAME: link the passed ctf_archive_t, with the given NAME. - NAME alone: open NAME as a CTF file when needed. - BUF and NAME: open the BUF (of length N) as CTF, with the given NAME. (Not - yet implemented.) +/* Add an opened CTF archive or unopened file (by name) to a link. + If CTF is NULL and NAME is non-null, an unopened file is meant: + otherwise, the specified archive is assumed to have the given NAME. - Passed in CTF args are owned by the dictionary and will be freed by it. - The BUF arg is *not* owned by the dictionary, and the user should not free - its referent until the link is done. + If CTF is NULL, the NAME is only opened when needed, and is closed when no + longer needed, so that large cu-mapped links will only use memory for their + cu-mapped inputs briefly (compensating for the memory usage of the + smushed-together cu-mapped verion). - The order of calls to this function influences the order of types in the - final link output, but otherwise is not important. + Passed in CTF args are owned by the dictionary and will be freed by it. - Repeated additions of the same NAME have no effect; repeated additions of - different dicts with the same NAME add all the dicts with unique NAMEs - derived from NAME. + The order of calls to this function influences the order of types in the + final link output, but otherwise is not important. - Private for now, but may in time become public once support for BUF is - implemented. */ + Repeated additions of the same NAME have no effect; repeated additions of + different dicts with the same NAME add all the dicts with unique NAMEs + derived from NAME. */ -static int -ctf_link_add (ctf_dict_t *fp, ctf_archive_t *ctf, const char *name, - void *buf _libctf_unused_, size_t n _libctf_unused_) +int +ctf_link_add_ctf (ctf_dict_t *fp, ctf_archive_t *ctf, const char *name) { - if (buf) - return (ctf_set_errno (fp, ECTF_NOTYET)); - - if (!((ctf && name && !buf) - || (name && !buf && !ctf) - || (buf && name && !ctf))) + if (!name) return (ctf_set_errno (fp, EINVAL)); - /* We can only lazily open files if libctf.so is in use rather than - libctf-nobfd.so. This is a little tricky: in shared libraries, we can use - a weak symbol so that -lctf -lctf-nobfd works, but in static libraries we - must distinguish between the two libraries explicitly. */ - -#if defined (PIC) - if (!buf && !ctf && name && !ctf_open) - return (ctf_set_errno (fp, ECTF_NEEDSBFD)); -#elif NOBFD - if (!buf && !ctf && name) - return (ctf_set_errno (fp, ECTF_NEEDSBFD)); -#endif - if (fp->ctf_link_outputs) return (ctf_set_errno (fp, ECTF_LINKADDEDLATE)); + if (fp->ctf_link_inputs == NULL) fp->ctf_link_inputs = ctf_dynhash_create (ctf_hash_string, ctf_hash_eq_string, free, @@ -203,22 +176,15 @@ ctf_link_add (ctf_dict_t *fp, ctf_archive_t *ctf, const char *name, if (fp->ctf_link_inputs == NULL) return (ctf_set_errno (fp, ENOMEM)); - return ctf_link_add_ctf_internal (fp, ctf, NULL, name); -} - -/* Add an opened CTF archive or unopened file (by name) to a link. - If CTF is NULL and NAME is non-null, an unopened file is meant: - otherwise, the specified archive is assumed to have the given NAME. - - Passed in CTF args are owned by the dictionary and will be freed by it. + /* We can only lazily open files if libctf.so is in use rather than + libctf-nobfd.so. */ - The order of calls to this function influences the order of types in the - final link output, but otherwise is not important. */ +#if NOBFD + if (!ctf) + return (ctf_set_errno (fp, ECTF_NEEDSBFD)); +#endif -int -ctf_link_add_ctf (ctf_dict_t *fp, ctf_archive_t *ctf, const char *name) -{ - return ctf_link_add (fp, ctf, name, NULL, 0); + return ctf_link_add_ctf_internal (fp, ctf, NULL, name); } /* Lazily open a CTF archive for linking, if not already open. @@ -238,12 +204,12 @@ ctf_link_lazy_open (ctf_dict_t *fp, ctf_link_input_t *input) return 1; /* See ctf_link_add_ctf. */ -#if defined (PIC) || !NOBFD - input->clin_arc = ctf_open (input->clin_filename, NULL, &err); -#else +#if NOBFD ctf_err_warn (fp, 0, ECTF_NEEDSBFD, _("cannot open %s lazily"), input->clin_filename); return ctf_set_errno (fp, ECTF_NEEDSBFD); +#else + input->clin_arc = ctf_open (input->clin_filename, NULL, &err); #endif /* Having no CTF sections is not an error. We just don't need to do |