Recent ld versions emit this warning when linking the (object file) created from ARM assembly:
0/usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: warning: field_10x26_arm.o: missing .note.GNU-stack section implies executable stack
1/usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
“Executable stack” sounds like something we should try to avoid.
To reproduce, try ./configure --host=arm-linux-gnueabihf --enable-experimental --with-asm=arm32
(e.g, in the CI image):
0root@ad8b1ab4bedc:/tmp/secp256k1# make
1make all-am
2make[1]: Entering directory '/tmp/secp256k1'
3 CC src/bench-bench.o
4 CC src/libsecp256k1_la-secp256k1.lo
5 CCAS src/asm/field_10x26_arm.lo
6 CCLD libsecp256k1_common.la
7 CC src/libsecp256k1_precomputed_la-precomputed_ecmult.lo
8 CC src/libsecp256k1_precomputed_la-precomputed_ecmult_gen.lo
9 CCLD libsecp256k1_precomputed.la
10 CCLD libsecp256k1.la
11/usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: warning: field_10x26_arm.o: missing .note.GNU-stack section implies executable stack
12/usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
13 CCLD bench
14 CC src/bench_internal-bench_internal.o
15 CCLD bench_internal
16/usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: warning: field_10x26_arm.o: missing .note.GNU-stack section implies executable stack
17/usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
18 CC src/bench_ecmult-bench_ecmult.o
19 CCLD bench_ecmult
20/usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: warning: field_10x26_arm.o: missing .note.GNU-stack section implies executable stack
21/usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
22 CC src/noverify_tests-tests.o
23 CCLD noverify_tests
24/usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: warning: field_10x26_arm.o: missing .note.GNU-stack section implies executable stack
25/usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
26 CC src/tests-tests.o
27 CCLD tests
28/usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: warning: field_10x26_arm.o: missing .note.GNU-stack section implies executable stack
29/usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
30 CC src/ctime_tests-ctime_tests.o
31 CCLD ctime_tests
32 CC src/exhaustive_tests-tests_exhaustive.o
33 CCLD exhaustive_tests
34/usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: warning: field_10x26_arm.o: missing .note.GNU-stack section implies executable stack
35/usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
36make[1]: Leaving directory '/tmp/secp256k1'
37
38
39root@ad8b1ab4bedc:/tmp/secp256k1# ld -version
40GNU ld (GNU Binutils for Debian) 2.40
41Copyright (C) 2023 Free Software Foundation, Inc.
42This program is free software; you may redistribute it under the terms of
43the GNU General Public License version 3 or (at your option) a later version.
44This program has absolutely no warranty.```