From 34a81df019bc3bf5221337111046eacf661b461b Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Thu, 19 Feb 2026 19:29:41 +0000 Subject: [PATCH] tests.hardeningFlags: only inspect .text section in instructionPresenceTest other sections may include code that doesn't originate from the compiler under test or may not obey flags in the same way. this should fix our pacret-detecting tests. --- pkgs/test/cc-wrapper/hardening.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/test/cc-wrapper/hardening.nix b/pkgs/test/cc-wrapper/hardening.nix index fae8d72c2989..fe00383b5af6 100644 --- a/pkgs/test/cc-wrapper/hardening.nix +++ b/pkgs/test/cc-wrapper/hardening.nix @@ -272,6 +272,7 @@ let '' touch $out if $OBJDUMP -d \ + -j .text \ --no-addresses \ --no-show-raw-insn \ "$(PATH=$HOST_PATH type -P test-bin)" \