From: Alan Modra Date: Mon, 1 Dec 2025 23:58:04 +0000 (+1030) Subject: mips regression fixes X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=894024c708c3bdbd75855c4eecc12db583762e83;p=thirdparty%2Fbinutils-gdb.git mips regression fixes Commit 54fbc12d64 introduced mips-linux testsuite regressions. +FAIL: MIPS magic __ehdr_start symbol test 1 (o32) +FAIL: PR ld/21334 MIPS GOT16 relocation in static binary +FAIL: PR ld/21375 in SVR4 executable (hidden) These are all assertion failures in mips_elf_sort_hash_table BFD_ASSERT (hsd.max_local_dynindx <= htab->root.local_dynsymcount + 1); This was a pre-existing problem exposed by commit 54fbc12d64. * elfxx-mips.c (mips_elf_sort_hash_table): Properly test for no dynsyms. --- diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index e37c45fec15..bf2ee4801bb 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -4005,7 +4005,7 @@ mips_elf_sort_hash_table (bfd *abfd, struct bfd_link_info *info) htab = mips_elf_hash_table (info); BFD_ASSERT (htab != NULL); - if (htab->root.dynsymcount == 0) + if (htab->root.dynsymcount <= 1) return true; g = htab->got_info;