This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] PR gold/21128: Issue an error only if no symbol is folded
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Date: Tue, 2 May 2017 09:28:55 -0700
- Subject: [PATCH] PR gold/21128: Issue an error only if no symbol is folded
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Since one or both symbols can be folded here, it is an error only if no
symbol is folded.
OK for master?
H.J.
---
PR gold/21128
* testsuite/icf_safe_so_test.sh (check_fold): Issue an error
only if no symbol is folded.
---
gold/testsuite/icf_safe_so_test.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gold/testsuite/icf_safe_so_test.sh b/gold/testsuite/icf_safe_so_test.sh
index 28600be..bf13d38 100755
--- a/gold/testsuite/icf_safe_so_test.sh
+++ b/gold/testsuite/icf_safe_so_test.sh
@@ -76,7 +76,9 @@ BEGIN { discard = 0; }
/.*\\.text\\..*($2|$3).*/ { act[discard] = act[discard] \" \" \$0; }
END {
# printf \"kept\" act[0] \"\\nfolded\" act[1] \"\\n\";
- if (length(act[0]) == 0 || length(act[1]) == 0)
+ # Since one or both symbols can be folded here, it is an error only
+ # if no symbol is folded.
+ if (length(act[1]) == 0)
{
printf \"Safe Identical Code Folding did not fold $2 and $3\\n\"
exit 1;
--
2.9.3