libc/armv7: remove default version for alloca

The alloca() interface has been a macro expanding to __builtin_alloca()
since 2003 (commit 79806b4cdc, included in FreeBSD 5.2).  Even before
that virtually every compiler version I was able to test replaced
alloca() with compiler generated code when targeting C.

Hide it to prevent future (mis)use.

Reviewed by:	imp, kib
Differential Revision:	https://reviews.freebsd.org/D51858
This commit is contained in:
Brooks Davis
2026-03-05 10:33:53 +00:00
parent db1ecd5854
commit 4dd517acb6
2 changed files with 3 additions and 1 deletions
-1
View File
@@ -5,7 +5,6 @@
*/
FBSD_1.0 {
__mcount;
alloca;
brk;
sbrk;
};
+3
View File
@@ -35,6 +35,7 @@
/* like alloc, but automatic automatic free in return */
#include <machine/asm.h>
ENTRY(alloca)
add r0, r0, #0x00000007 /* round up to next 8 byte alignment */
bic r0, r0, #0x00000007
@@ -43,4 +44,6 @@ ENTRY(alloca)
RET
END(alloca)
.symver alloca, alloca@FBSD_1.0
.section .note.GNU-stack,"",%progbits