From a5ab4f4dfacd1938a64df4d07df346774f62c541 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 13 Aug 2025 02:25:32 +0900 Subject: feat: output .note.GNU-stack section and remove "-z noexecstack" from ld flags --- tests/050.sh | 2 +- tests/test_diff.sh | 2 +- tests/test_example.sh | 2 +- tests/test_exit_code.sh | 2 +- tests/test_output.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/050.sh b/tests/050.sh index 295ac2d..7e05ec2 100644 --- a/tests/050.sh +++ b/tests/050.sh @@ -17,7 +17,7 @@ if [[ $? -ne 0 ]]; then cat main.s >&2 exit 1 fi -gcc -Wl,-z,noexecstack -o a.out main.s +gcc -o a.out main.s ./a.out "$@" > output exit_code=$? diff --git a/tests/test_diff.sh b/tests/test_diff.sh index 14e5200..adc281e 100644 --- a/tests/test_diff.sh +++ b/tests/test_diff.sh @@ -4,7 +4,7 @@ cat > main.c if [[ $? -ne 0 ]]; then exit 1 fi -gcc -Wl,-z,noexecstack -o a.out main.s +gcc -o a.out main.s if [[ ! -f input ]]; then touch input fi diff --git a/tests/test_example.sh b/tests/test_example.sh index d5feaab..f76b606 100644 --- a/tests/test_example.sh +++ b/tests/test_example.sh @@ -4,7 +4,7 @@ filename="../../../examples/$1.c" if [[ $? -ne 0 ]]; then exit 1 fi -gcc -Wl,-z,noexecstack -o a.out main.s +gcc -o a.out main.s if [[ ! -f input ]]; then touch input fi diff --git a/tests/test_exit_code.sh b/tests/test_exit_code.sh index 7119b1d..4cdee0a 100644 --- a/tests/test_exit_code.sh +++ b/tests/test_exit_code.sh @@ -4,7 +4,7 @@ cat > main.c if [[ $? -ne 0 ]]; then exit 1 fi -gcc -Wl,-z,noexecstack -o a.out main.s +gcc -o a.out main.s ./a.out exit_code=$? diff --git a/tests/test_output.sh b/tests/test_output.sh index a286a4a..63dce46 100644 --- a/tests/test_output.sh +++ b/tests/test_output.sh @@ -4,7 +4,7 @@ cat > main.c if [[ $? -ne 0 ]]; then exit 1 fi -gcc -Wl,-z,noexecstack -o a.out main.s +gcc -o a.out main.s output="$(./a.out)" exit_code=$? -- cgit v1.2.3-70-g09d2