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