nuttx/arch/sim/src/nuttx-names.in

155 lines
3.7 KiB
Plaintext
Raw Normal View History

/****************************************************************************
* arch/sim/src/nuttx-names.in
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#include <nuttx/config.h>
#define CONCAT_(x, y) x##y
#define CONCAT(x, y) CONCAT_(x, y)
#if defined(CONFIG_HOST_MACOS) || \
(defined(CONFIG_HOST_WINDOWS) && defined(CONFIG_SIM_CYGWIN_DECORATED))
#define NXSYMBOLS(s) _##s NX##s
#else
#define NXSYMBOLS(s) s NX##s
#endif
NXSYMBOLS(__cxa_atexit)
2021-10-26 08:57:15 +02:00
NXSYMBOLS(abort)
NXSYMBOLS(accept)
2021-10-26 08:57:15 +02:00
NXSYMBOLS(access)
NXSYMBOLS(atexit)
NXSYMBOLS(backtrace)
NXSYMBOLS(bind)
NXSYMBOLS(calloc)
NXSYMBOLS(chmod)
NXSYMBOLS(chdir)
NXSYMBOLS(chown)
NXSYMBOLS(clock_gettime)
NXSYMBOLS(close)
NXSYMBOLS(closedir)
NXSYMBOLS(connect)
sim: Add dlsym to nuttx-names.in Fixes the following crash with CONFIG_SIM_SANITIZE=y on Linux. ``` Program received signal SIGSEGV, Segmentation fault. getpid () at task/task_getpid.c:76 76 task/task_getpid.c: No such file or directory. rax 0x2feeb4 3141300 rbx 0xc53f83 12926851 rcx 0x6837665ee4c00 1833394399759360 rdx 0x472080 4661376 rsi 0xc53f83 12926851 rdi 0xffffffffffffffff -1 rbp 0x7ffe4cdfe140 0x7ffe4cdfe140 rsp 0x7ffe4cdfe0f0 0x7ffe4cdfe0f0 r8 0xffffffffffffffff -1 r9 0x0 0 r10 0x22 34 r11 0x246 582 r12 0x472080 4661376 r13 0x7ffe4cdfe3e8 140730188162024 r14 0x472080 4661376 r15 0xf60398 16122776 rip 0x4e9b93 0x4e9b93 <getpid+35> eflags 0x10206 [ PF IF RF ] cs 0x33 51 ss 0x2b 43 ds 0x0 0 es 0x0 0 fs 0x0 0 gs 0x0 0 #0 getpid () at task/task_getpid.c:76 #1 0x00000000006ad25a in modlib_registry_lock () at modlib/modlib_registry.c:89 #2 0x0000000000c3648d in modsym (handle=0xffffffffffffffff, name=0xc53f83 "mmap") at module/mod_modsym.c:77 #3 0x0000000000c2cd3a in dlsym (handle=0xffffffffffffffff, name=0xc53f83 "mmap") at dlfcn/lib_dlsym.c:149 #4 0x00000000004a0034 in __interception::InterceptFunction(char const*, unsigned long*, unsigned long, unsigned long) () #5 0x000000000048181e in InitializeCommonInterceptors() () #6 0x000000000048106a in __asan::InitializeAsanInterceptors() () #7 0x000000000049b85e in __asan::AsanInitInternal() () #8 0x00007f09cfb04ce6 in ?? () from /lib64/ld-linux-x86-64.so.2 #9 0x00007f09cfaf413a in ?? () from /lib64/ld-linux-x86-64.so.2 #10 0x0000000000000001 in ?? () #11 0x00007ffe4cdfff56 in ?? () #12 0x0000000000000000 in ?? () ```
2021-03-23 09:11:49 +01:00
NXSYMBOLS(dlsym)
NXSYMBOLS(dup)
NXSYMBOLS(exit)
NXSYMBOLS(fchmod)
NXSYMBOLS(fchown)
2021-10-26 08:57:15 +02:00
NXSYMBOLS(fclose)
NXSYMBOLS(fcntl)
2021-10-26 08:57:15 +02:00
NXSYMBOLS(fdopen)
NXSYMBOLS(fopen)
NXSYMBOLS(fprintf)
NXSYMBOLS(fread)
NXSYMBOLS(free)
2021-10-26 08:57:15 +02:00
NXSYMBOLS(fseek)
NXSYMBOLS(fstat)
NXSYMBOLS(fsync)
2021-10-26 08:57:15 +02:00
NXSYMBOLS(ftell)
NXSYMBOLS(ftruncate)
NXSYMBOLS(futimens)
2021-10-26 08:57:15 +02:00
NXSYMBOLS(fwrite)
NXSYMBOLS(getpeername)
NXSYMBOLS(getsockname)
2021-10-26 08:57:15 +02:00
NXSYMBOLS(getenv)
NXSYMBOLS(getpid)
NXSYMBOLS(getsockopt)
NXSYMBOLS(if_nametoindex)
NXSYMBOLS(ioctl)
NXSYMBOLS(listen)
NXSYMBOLS(longjmp)
NXSYMBOLS(lseek)
NXSYMBOLS(malloc)
NXSYMBOLS(malloc_size)
NXSYMBOLS(malloc_usable_size)
NXSYMBOLS(memcpy)
NXSYMBOLS(mkdir)
NXSYMBOLS(mmap)
NXSYMBOLS(mprotect)
NXSYMBOLS(munmap)
NXSYMBOLS(open)
NXSYMBOLS(opendir)
NXSYMBOLS(perror)
NXSYMBOLS(poll)
NXSYMBOLS(posix_memalign)
NXSYMBOLS(posix_spawn)
NXSYMBOLS(pthread_attr_init)
NXSYMBOLS(pthread_attr_setstack)
NXSYMBOLS(pthread_attr_destroy)
NXSYMBOLS(pthread_cond_destroy)
NXSYMBOLS(pthread_cond_init)
NXSYMBOLS(pthread_cond_signal)
NXSYMBOLS(pthread_cond_wait)
NXSYMBOLS(pthread_create)
#if defined(CONFIG_TLS_NELEM) && CONFIG_TLS_NELEM > 0
NXSYMBOLS(pthread_getspecific)
NXSYMBOLS(pthread_key_create)
#endif
NXSYMBOLS(pthread_kill)
NXSYMBOLS(pthread_mutex_destroy)
NXSYMBOLS(pthread_mutex_init)
NXSYMBOLS(pthread_mutex_lock)
NXSYMBOLS(pthread_mutex_unlock)
#if defined(CONFIG_TLS_NELEM) && CONFIG_TLS_NELEM > 0
NXSYMBOLS(pthread_setspecific)
#endif
NXSYMBOLS(pthread_sigmask)
2021-10-26 08:57:15 +02:00
NXSYMBOLS(puts)
NXSYMBOLS(read)
NXSYMBOLS(readdir)
NXSYMBOLS(readlink)
NXSYMBOLS(readv)
NXSYMBOLS(realloc)
NXSYMBOLS(recvfrom)
NXSYMBOLS(rename)
NXSYMBOLS(rewinddir)
NXSYMBOLS(rmdir)
NXSYMBOLS(sched_yield)
NXSYMBOLS(select)
NXSYMBOLS(sendmsg)
NXSYMBOLS(sendto)
NXSYMBOLS(setitimer)
2021-10-26 08:57:15 +02:00
NXSYMBOLS(setbuf)
NXSYMBOLS(setjmp)
NXSYMBOLS(setsockopt)
NXSYMBOLS(shutdown)
NXSYMBOLS(sigaction)
NXSYMBOLS(sigaddset)
NXSYMBOLS(sigemptyset)
NXSYMBOLS(sigfillset)
NXSYMBOLS(sleep)
NXSYMBOLS(socket)
NXSYMBOLS(stat)
NXSYMBOLS(statvfs)
2021-10-26 08:57:15 +02:00
NXSYMBOLS(strcat)
NXSYMBOLS(strchr)
NXSYMBOLS(strerror)
2021-10-26 08:57:15 +02:00
NXSYMBOLS(strlen)
NXSYMBOLS(strtol)
NXSYMBOLS(sysconf)
NXSYMBOLS(syslog)
NXSYMBOLS(system)
NXSYMBOLS(tcgetattr)
NXSYMBOLS(tcsetattr)
NXSYMBOLS(unlink)
NXSYMBOLS(usleep)
NXSYMBOLS(utimensat)
NXSYMBOLS(write)
NXSYMBOLS(writev)
NXSYMBOLS(waitpid)