|
|
a11eb6 |
diff --git a/annocheck/hardened.c b/annocheck/hardened.c
|
|
|
a11eb6 |
index d41c740..83645a7 100644
|
|
|
a11eb6 |
--- a/annocheck/hardened.c
|
|
|
a11eb6 |
+++ b/annocheck/hardened.c
|
|
|
a11eb6 |
@@ -3523,8 +3523,12 @@ finish (annocheck_data * data)
|
|
|
a11eb6 |
case TEST_STACK_PROT:
|
|
|
a11eb6 |
if (per_file.current_tool == TOOL_GO)
|
|
|
a11eb6 |
skip (data, i, SOURCE_FINAL_SCAN, "GO is stack safe");
|
|
|
a11eb6 |
+ else if (per_file.seen_tools == TOOL_GAS
|
|
|
a11eb6 |
+ || (per_file.gcc_from_comment && per_file.seen_tools == (TOOL_GAS | TOOL_GCC)))
|
|
|
a11eb6 |
+ skip (data, i, SOURCE_FINAL_SCAN, "no compiled code found");
|
|
|
a11eb6 |
else if (is_C_compiler (per_file.seen_tools))
|
|
|
a11eb6 |
- maybe (data, i, SOURCE_FINAL_SCAN, "no valid notes found regarding this test");
|
|
|
a11eb6 |
+ /* The skip is necessary because some glibc code is built this way. */
|
|
|
a11eb6 |
+ skip (data, i, SOURCE_FINAL_SCAN, "no notes found regarding this feature");
|
|
|
a11eb6 |
else
|
|
|
a11eb6 |
skip (data, i, SOURCE_FINAL_SCAN, "not compiled code");
|
|
|
a11eb6 |
break;
|
|
|
a11eb6 |
diff --git a/tests/glibc-notes-test b/tests/glibc-notes-test
|
|
|
a11eb6 |
index ab9e639..8496af8 100755
|
|
|
a11eb6 |
--- a/tests/glibc-notes-test
|
|
|
a11eb6 |
+++ b/tests/glibc-notes-test
|
|
|
a11eb6 |
@@ -31,7 +31,7 @@ $GCC -pie -Wl,-z,now hello.o hello2.o hello3.o -L. -lhello -o glibc-notes.exe
|
|
|
a11eb6 |
|
|
|
a11eb6 |
# Run annocheck
|
|
|
a11eb6 |
|
|
|
a11eb6 |
-$ANNOCHECK glibc-notes.exe --skip-cf-protection --skip-property-note --ignore-gaps > glibc-notes.out
|
|
|
a11eb6 |
+$ANNOCHECK glibc-notes.exe --skip-cf-protection --skip-property-note --skip-stack-realign --ignore-gaps > glibc-notes.out
|
|
|
a11eb6 |
grep -e "PASS" glibc-notes.out
|
|
|
a11eb6 |
if [ $? != 0 ];
|
|
|
a11eb6 |
then
|