diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt --- a/libc/config/linux/x86_64/entrypoints.txt +++ b/libc/config/linux/x86_64/entrypoints.txt @@ -86,6 +86,7 @@ libc.src.stdlib.malloc libc.src.stdlib.calloc libc.src.stdlib.realloc + libc.src.stdlib.aligned_alloc libc.src.stdlib.free # sys/mman.h entrypoints diff --git a/libc/spec/stdc.td b/libc/spec/stdc.td --- a/libc/spec/stdc.td +++ b/libc/spec/stdc.td @@ -536,6 +536,7 @@ FunctionSpec<"malloc", RetValSpec, [ArgSpec]>, FunctionSpec<"calloc", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"realloc", RetValSpec, [ArgSpec, ArgSpec]>, + FunctionSpec<"aligned_alloc", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"free", RetValSpec, [ArgSpec]>, FunctionSpec<"_Exit", RetValSpec, [ArgSpec]>, diff --git a/libc/src/stdlib/CMakeLists.txt b/libc/src/stdlib/CMakeLists.txt --- a/libc/src/stdlib/CMakeLists.txt +++ b/libc/src/stdlib/CMakeLists.txt @@ -234,6 +234,11 @@ DEPENDS ${SCUDO_DEPS} ) + add_entrypoint_external( + aligned_alloc + DEPENDS + ${SCUDO_DEPS} + ) add_entrypoint_external( free DEPENDS @@ -249,6 +254,9 @@ add_entrypoint_external( realloc ) + add_entrypoint_external( + aligned_alloc + ) add_entrypoint_external( free ) diff --git a/libc/test/integration/scudo/CMakeLists.txt b/libc/test/integration/scudo/CMakeLists.txt --- a/libc/test/integration/scudo/CMakeLists.txt +++ b/libc/test/integration/scudo/CMakeLists.txt @@ -15,6 +15,7 @@ libc.src.stdlib.malloc libc.src.stdlib.calloc libc.src.stdlib.realloc + libc.src.stdlib.aligned_alloc libc.src.stdlib.free )