[PATCH] PR gold/21128: Issue an error only if no symbol is folded
H.J. Lu
hongjiu.lu@intel.com
Tue May 2 16:28:00 GMT 2017
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
More information about the Binutils
mailing list