diff options
author | Siva Chandra <sivachandra@google.com> | 2022-07-14 14:37:24 -0700 |
---|---|---|
committer | Siva Chandra <sivachandra@google.com> | 2022-07-14 14:37:50 -0700 |
commit | 98fdabecf529f7d52eaf225e1f79baf09ac84c52 (patch) | |
tree | adcec6198a32036752381bdfba9d80cc7ee61bd7 /libc | |
parent | b032e3ff6121a969b2e90ad7bf493c2d5d7ac3a2 (diff) | |
download | llvm-98fdabecf529f7d52eaf225e1f79baf09ac84c52.zip llvm-98fdabecf529f7d52eaf225e1f79baf09ac84c52.tar.gz llvm-98fdabecf529f7d52eaf225e1f79baf09ac84c52.tar.bz2 |
[libc] Enable a few stdlib and time functions on aarch64.
Diffstat (limited to 'libc')
-rw-r--r-- | libc/config/linux/aarch64/entrypoints.txt | 13 | ||||
-rw-r--r-- | libc/config/linux/x86_64/entrypoints.txt | 1 | ||||
-rw-r--r-- | libc/loader/linux/aarch64/start.cpp | 1 |
3 files changed, 14 insertions, 1 deletions
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt index 3913602..377d306 100644 --- a/libc/config/linux/aarch64/entrypoints.txt +++ b/libc/config/linux/aarch64/entrypoints.txt @@ -245,6 +245,12 @@ if(LLVM_LIBC_FULL_BUILD) libc.src.stdio.stderr libc.src.stdio.stdout + # stdlib.h entrypoints + libc.src.stdlib._Exit + libc.src.stdlib.atexit + libc.src.stdlib.exit + libc.src.stdlib.getenv + # threads.h entrypoints libc.src.threads.call_once libc.src.threads.cnd_broadcast @@ -290,6 +296,13 @@ if(LLVM_LIBC_FULL_BUILD) libc.src.pthread.pthread_mutexattr_setpshared libc.src.pthread.pthread_mutexattr_setrobust libc.src.pthread.pthread_mutexattr_settype + + # time.h entrypoints + libc.src.time.asctime + libc.src.time.asctime_r + libc.src.time.gmtime + libc.src.time.gmtime_r + libc.src.time.mktime ) endif() diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt index 93c76b3..4fd16ef 100644 --- a/libc/config/linux/x86_64/entrypoints.txt +++ b/libc/config/linux/x86_64/entrypoints.txt @@ -259,7 +259,6 @@ if(LLVM_LIBC_FULL_BUILD) # stdlib.h entrypoints libc.src.stdlib._Exit - # libc.src.stdlib.abort libc.src.stdlib.atexit libc.src.stdlib.exit libc.src.stdlib.getenv diff --git a/libc/loader/linux/aarch64/start.cpp b/libc/loader/linux/aarch64/start.cpp index 6c97786..fa8c776 100644 --- a/libc/loader/linux/aarch64/start.cpp +++ b/libc/loader/linux/aarch64/start.cpp @@ -118,6 +118,7 @@ extern "C" void _start() { // value. We step over it (the "+ 1" below) to get to the env values. uint64_t *env_ptr = app.args->argv + app.args->argc + 1; uint64_t *env_end_marker = env_ptr; + app.envPtr = env_ptr; while (*env_end_marker) ++env_end_marker; |