* [binutils-gdb] Fix PR30079: abort on mingw
@ 2023-02-13 13:03 Michael Matz
0 siblings, 0 replies; only message in thread
From: Michael Matz @ 2023-02-13 13:03 UTC (permalink / raw)
To: bfd-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b7eab2a9d4f4e92692daf14b09fc95ca11b72e30
commit b7eab2a9d4f4e92692daf14b09fc95ca11b72e30
Author: Michael Matz <matz@suse.de>
Date: Thu Feb 9 15:29:00 2023 +0100
Fix PR30079: abort on mingw
the early-out in wild_sort is not enough, it might still be
that filenames are equal _and_ the wildcard list doesn't specify
a sort order either. Don't call compare_section then.
Tested on all targets.
Diff:
---
ld/ldlang.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 84a2914fc26..b5e0d026ae4 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -649,7 +649,8 @@ wild_sort (lang_wild_statement_type *wild,
looking at the sections for this file. */
/* Find the correct node to append this section. */
- if (compare_section (sec->spec.sorted, section, (*tree)->section) < 0)
+ if (sec && sec->spec.sorted != none && sec->spec.sorted != by_none
+ && compare_section (sec->spec.sorted, section, (*tree)->section) < 0)
tree = &((*tree)->left);
else
tree = &((*tree)->right);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-13 13:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-13 13:03 [binutils-gdb] Fix PR30079: abort on mingw Michael Matz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).