Created
February 12, 2016 00:06
-
-
Save rui314/2ba27dbb8766a4f16fcb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ELF/OutputSections.cpp b/ELF/OutputSections.cpp | |
index c941993..cefdb46 100644 | |
--- a/ELF/OutputSections.cpp | |
+++ b/ELF/OutputSections.cpp | |
@@ -844,8 +844,8 @@ static bool compCtors(const InputSection<ELFT> *A, | |
assert(Y.startswith(".ctors") || Y.startswith(".dtors")); | |
X = X.substr(6); | |
Y = Y.substr(6); | |
- if (X.empty() || Y.empty()) | |
- return X.empty(); | |
+ if (X.empty() && Y.empty()) | |
+ return false; | |
return X < Y; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment