diff --git a/libc-test/src/functionalext/dlns/BUILD.gn b/libc-test/src/functionalext/dlns/BUILD.gn index 500f49b3828775e9ac4ce860efd3c9aaf2f4ab73..ed4c3050568da7cf8d7da475f3f3456c544b98d2 100644 --- a/libc-test/src/functionalext/dlns/BUILD.gn +++ b/libc-test/src/functionalext/dlns/BUILD.gn @@ -50,6 +50,7 @@ ohos_executable("dlns_set_fun_test") { sources = [ "dlns_set_fun.c" ] configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ] + libs = [ "${musl_lib_dir}/libc.a" ] } ohos_executable("dlns_inherit_test") { @@ -63,6 +64,7 @@ ohos_executable("dlns_inherit_test") { sources = [ "dlns_inherit.c" ] configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ] + libs = [ "${musl_lib_dir}/libc.a" ] } ohos_executable("dlns_separated_test") { @@ -76,6 +78,7 @@ ohos_executable("dlns_separated_test") { sources = [ "dlns_separated.c" ] configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ] + libs = [ "${musl_lib_dir}/libc.a" ] } ohos_executable("dlns_special_scene_test") { diff --git a/libc-test/test_template.gni b/libc-test/test_template.gni index a8bb2a60c1e22ed08e2c54253d968ce4e19a9c44..c0b2061e52671fce0742c68678a9193c54e5d402 100644 --- a/libc-test/test_template.gni +++ b/libc-test/test_template.gni @@ -73,6 +73,7 @@ template("test_unittest") { ldflags = [ "-nostdlib" ] libs = [ "//${out_test_dir}/src/common/libtest.a" ] + libs += [ "${musl_lib_dir}/libc.a" ] if (target_dir == "math") { include_dirs += [ diff --git a/libc.map.txt b/libc.map.txt new file mode 100644 index 0000000000000000000000000000000000000000..1e2965ffab397a372bc71b253045c14f2a279b49 --- /dev/null +++ b/libc.map.txt @@ -0,0 +1,2063 @@ +LIBC { + global: + ___environ; + __adjtime64; + __adjtimex_time64; + __aeabi_atexit; + __aeabi_memclr; + __aeabi_memclr4; + __aeabi_memclr8; + __aeabi_memcpy; + __aeabi_memcpy4; + __aeabi_memcpy8; + __aeabi_memmove; + __aeabi_memmove4; + __aeabi_memmove8; + __aeabi_memset; + __aeabi_memset4; + __aeabi_memset8; + __aeabi_read_tp; + __aio_suspend_time64; + __assert_fail; + __clock_adjtime64; + __clock_getres_time64; + __clock_gettime64; + __clock_nanosleep_time64; + __clock_settime64; + __cnd_timedwait_time64; + __ctime64; + __ctime64_r; + __ctype_b_loc; + __ctype_get_mb_cur_max; + __ctype_tolower_loc; + __ctype_toupper_loc; + __cxa_atexit; + __cxa_finalize; + __daylight; + __difftime64; + __dls2b; + __dls3; + __dlsym_time64; + __duplocale; + __environ; + __errno_location; + __fbufsize; + __fgets_chk; + __fgetwc_unlocked; + __flbf; + __flt_rounds; + __fortify_error; + __fpclassify; + __fpclassifyf; + __fpclassifyl; + __fpending; + __fpurge; + __fputwc_unlocked; + __fread_chk; + __freadable; + __freadahead; + __freading; + __freadptr; + __freadptrinc; + __freelocale; + __fseterr; + __fsetlocking; + __fstat_time64; + __fstatat_time64; + __ftime64; + __futimens_time64; + __futimes_time64; + __futimesat_time64; + __fwritable; + __fwrite_chk; + __fwriting; + __fxstat; + __fxstat64; + __fxstatat; + __fxstatat64; + __getcwd_chk; + __getdelim; + __getgmtoff; + __getitimer_time64; + __getrusage_time64; + __gettimeofday_time64; + __getzonename; + __gmtime64; + __gmtime64_r; + __gnu_Unwind_Find_exidx; + __h_errno_location; + __hook_enable_hook_flag; + __isalnum_l; + __isalpha_l; + __isblank_l; + __iscntrl_l; + __isdigit_l; + __isgraph_l; + __islower_l; + __isoc99_fscanf; + __isoc99_fwscanf; + __isoc99_scanf; + __isoc99_sscanf; + __isoc99_swscanf; + __isoc99_vfscanf; + __isoc99_vfwscanf; + __isoc99_vscanf; + __isoc99_vsscanf; + __isoc99_vswscanf; + __isoc99_vwscanf; + __isoc99_wscanf; + __isprint_l; + __ispunct_l; + __isspace_l; + __isupper_l; + __iswalnum_l; + __iswalpha_l; + __iswblank_l; + __iswcntrl_l; + __iswctype_l; + __iswdigit_l; + __iswgraph_l; + __iswlower_l; + __iswprint_l; + __iswpunct_l; + __iswspace_l; + __iswupper_l; + __iswxdigit_l; + __isxdigit_l; + __lgammal_r; + __libc_current_sigrtmax; + __libc_current_sigrtmin; + __libc_free; + __libc_malloc; + __libc_malloc_default_dispatch; + __libc_mmap; + __libc_munmap; + __libc_start_main; + __localtime64; + __localtime64_r; + __lstat_time64; + __lutimes_time64; + __lxstat; + __lxstat64; + __mem_typeset; + __memchr_diagnose; + __memcpy_chk; + __memmove_aarch64; + __memmove_chk; + __mempcpy_chk; + __memrchr_chk; + __memset_chk; + __mktime64; + __mq_timedreceive_time64; + __mq_timedsend_time64; + __mtx_timedlock_time64; + __musl_libc_globals; + __nanosleep_time64; + __newlocale; + __nl_langinfo; + __nl_langinfo_l; + __open_diagnose; + __open64_diagnose; + __openat_diagnose; + __openat64_diagnose; + __optpos; + __optreset; + __overflow; + __poll_diagnose; + __posix_getopt; + __ppoll_chk; + __ppoll_time64; + __pread_chk; + __progname; + __progname_full; + __pselect_time64; + __pthread_cond_timedwait_time64; + __pthread_gettid_np; + __pthread_mutex_timedlock_time64; + __pthread_release_signal_stack; + __pthread_reserve_signal_stack; + __pthread_rwlock_timedrdlock_time64; + __pthread_rwlock_timedwrlock_time64; + __pthread_timedjoin_np_time64; + __pwrite_chk; + __read_chk; + __readlink_chk; + __readlinkat_chk; + __reboot; + __recv_diagnose; + __recvfrom_diagnose; + __recvmmsg_time64; + __res_state; + __sched_cpualloc; + __sched_cpucount; + __sched_rr_get_interval_time64; + __select_time64; + __sem_timedwait_time64; + __semtimedop_time64; + __send_diagnose; + __sendto_diagnose; + __setitimer_time64; + __setjmp; + __settimeofday_time64; + __signbit; + __signbitf; + __signbitl; + __signgam; + __sigsetjmp; + __sigtimedwait_time64; + __snprintf_chk; + __sprintf_chk; + __stack_chk_fail; + __stack_chk_guard; + __stat_time64; + __stime64; + __stpcpy_chk; + __stpncpy_chk; + __strcasecmp_l; + __strcat_chk; + __strchr_diagnose; + __strcoll_l; + __strcpy_chk; + __strerror_l; + __strlcat_diagnose; + __strlcpy_diagnose; + __strlen_chk; + __strncasecmp_l; + __strncat_chk; + __strncpy_chk; + __strrchr_diagnose; + __strtod_l; + __strtof_l; + __strtoimax_internal; + __strtol_internal; + __strtold_l; + __strtoll_internal; + __strtoul_internal; + __strtoull_internal; + __strtoumax_internal; + __strxfrm_l; + __sysv_signal; + __thrd_sleep_time64; + __time64; + __timegm_time64; + __timer_gettime64; + __timer_settime64; + __timerfd_gettime64; + __timerfd_settime64; + __timespec_get_time64; + __timezone; + __tls_get_addr; + __tolower_l; + __toupper_l; + __towctrans_l; + __towlower_l; + __towupper_l; + __tzname; + __uflow; + __umask_diagnose; + __uselocale; + __utime64; + __utimensat_time64; + __utimes_time64; + __vsnprintf_chk; + __vsprintf_chk; + __wait3_time64; + __wait4_time64; + __wcscoll_l; + __wcsftime_l; + __wcsxfrm_l; + __wctrans_l; + __wctype_l; + __write_chk; + __xmknod; + __xmknodat; + __xpg_basename; + __xpg_strerror_r; + __xstat; + __xstat64; + _dl_debug_addr; + _dl_debug_state; + _dlstart; + _environ; + _Exit; + _exit; + _fini; + _flushlbf; + _init; + _IO_feof_unlocked; + _IO_ferror_unlocked; + _IO_getc; + _IO_getc_unlocked; + _IO_putc; + _IO_putc_unlocked; + _longjmp; + _ns_flagdata; + _pthread_cleanup_pop; + _pthread_cleanup_push; + _setjmp; + a64l; + abort; + abs; + accept; + accept4; + access; + acct; + acos; + acosf; + acosh; + acoshf; + acoshl; + acosl; + addmntent; + adjtime; + adjtimex; + aio_cancel; + aio_cancel64; + aio_error; + aio_error64; + aio_fsync; + aio_fsync64; + aio_read; + aio_read64; + aio_return; + aio_return64; + aio_suspend; + aio_suspend64; + aio_write; + aio_write64; + alarm; + aligned_alloc; + alphasort; + alphasort64; + asctime; + asctime_r; + asin; + asinf; + asinh; + asinhf; + asinhl; + asinl; + asprintf; + at_quick_exit; + atan; + atan2; + atan2f; + atan2l; + atanf; + atanh; + atanhf; + atanhl; + atanl; + atexit; + atof; + atoi; + atol; + atoll; + basename; + bcmp; + bcopy; + bind; + bind_textdomain_codeset; + bindtextdomain; + brk; + bsd_signal; + bsearch; + btowc; + bzero; + c16rtomb; + c32rtomb; + cabs; + cabsf; + cabsl; + cacos; + cacosf; + cacosh; + cacoshf; + cacoshl; + cacosl; + call_once; + calloc; + capget; + capset; + carg; + cargf; + cargl; + casin; + casinf; + casinh; + casinhf; + casinhl; + casinl; + catan; + catanf; + catanh; + catanhf; + catanhl; + catanl; + catclose; + catgets; + catopen; + cbrt; + cbrtf; + cbrtl; + ccos; + ccosf; + ccosh; + ccoshf; + ccoshl; + ccosl; + ceil; + ceilf; + ceill; + cexp; + cexpf; + cexpl; + cfgetispeed; + cfgetospeed; + cfmakeraw; + cfsetispeed; + cfsetospeed; + cfsetspeed; + chdir; + check_asan_path; + chmod; + chown; + chroot; + cimag; + cimagf; + cimagl; + clearenv; + clearerr; + clearerr_unlocked; + clock; + clock_adjtime; + clock_getcpuclockid; + clock_getres; + clock_gettime; + clock_nanosleep; + clock_settime; + clog; + clogf; + clogl; + clone; + close; + closedir; + closelog; + cnd_broadcast; + cnd_destroy; + cnd_init; + cnd_signal; + cnd_timedwait; + cnd_wait; + configor_free; + configor_init; + confstr; + conj; + conjf; + conjl; + connect; + copy_file_range; + copysign; + copysignf; + copysignl; + cos; + cosf; + cosh; + coshf; + coshl; + cosl; + cpow; + cpowf; + cpowl; + cproj; + cprojf; + cprojl; + creal; + crealf; + creall; + creat; + creat64; + crypt; + crypt_r; + csin; + csinf; + csinh; + csinhf; + csinhl; + csinl; + csqrt; + csqrtf; + csqrtl; + ctan; + ctanf; + ctanh; + ctanhf; + ctanhl; + ctanl; + ctermid; + ctime; + ctime_r; + cuserid; + daemon; + daylight; + dcgettext; + dcngettext; + delete_module; + DestroyParamList; + DFX_InstallSignalHandler; + DfxLog; + dgettext; + difftime; + dirfd; + dirname; + div; + dl_iterate_phdr; + dladdr; + dlclose; + dlerror; + dlinfo; + dlns_create; + dlns_create2; + dlns_get; + dlns_inherit; + dlns_init; + dlns_set_namespace_allowed_libs; + dlns_set_namespace_lib_path; + dlns_set_namespace_permitted_paths; + dlns_set_namespace_separated; + dlopen; + dlopen_ext; + dlopen_ns; + dlsym; + dlvsym; + dn_comp; + dn_expand; + dn_skipname; + dngettext; + dns_get_addr_info_from_netsys_cache; + dns_set_addr_info_to_netsys_cache; + dprintf; + drand48; + drem; + dremf; + dup; + dup2; + dup3; + duplocale; + eaccess; + ecvt; + encode_ptr; + encrypt; + endgrent; + endhostent; + endmntent; + endnetent; + endprotoent; + endpwent; + endservent; + endspent; + endusershell; + endutent; + endutxent; + environ; + epoll_create; + epoll_create1; + epoll_ctl; + epoll_pwait; + epoll_wait; + erand48; + erf; + erfc; + erfcf; + erfcl; + erff; + erfl; + err; + errx; + ether_aton; + ether_aton_r; + ether_hostton; + ether_line; + ether_ntoa; + ether_ntoa_r; + ether_ntohost; + euidaccess; + eventfd; + eventfd_read; + eventfd_write; + execl; + execle; + execlp; + execv; + execve; + execvp; + execvpe; + exit; + exp; + exp10; + exp10f; + exp10l; + exp2; + exp2f; + exp2l; + expf; + expl; + explicit_bzero; + expm1; + expm1f; + expm1l; + fabs; + fabsf; + fabsl; + faccessat; + fallocate; + fallocate64; + fanotify_init; + fanotify_mark; + fchdir; + fchmod; + fchmodat; + fchown; + fchownat; + fclose; + fcntl; + fcvt; + fdatasync; + fdim; + fdimf; + fdiml; + fdopen; + fdopendir; + feclearexcept; + fegetenv; + fegetexceptflag; + fegetround; + feholdexcept; + feof; + feof_unlocked; + feraiseexcept; + ferror; + ferror_unlocked; + fesetenv; + fesetexceptflag; + fesetround; + fetestexcept; + feupdateenv; + fexecve; + fflush; + fflush_unlocked; + ffs; + ffsl; + ffsll; + fgetc; + fgetc_unlocked; + fgetgrent; + fgetln; + fgetpos; + fgetpos64; + fgetpwent; + fgets; + fgets_unlocked; + fgetspent; + fgetwc; + fgetwc_unlocked; + fgetws; + fgetws_unlocked; + fgetxattr; + fileno; + fileno_unlocked; + find_ns_by_name; + finish_install_ohos_malloc_hooks; + finite; + finitef; + flistxattr; + flock; + flockfile; + floor; + floorf; + floorl; + fma; + fmaf; + fmal; + fmax; + fmaxf; + fmaxl; + fmemopen; + fmin; + fminf; + fminl; + fmod; + fmodf; + fmodl; + fmtmsg; + fnmatch; + fopen; + fopen64; + fopencookie; + fork; + forkpty; + fpathconf; + fprintf; + fpurge; + fputc; + fputc_unlocked; + fputs; + fputs_unlocked; + fputwc; + fputwc_unlocked; + fputws; + fputws_unlocked; + fread; + fread_unlocked; + free; + freeaddrinfo; + freeifaddrs; + freelocale; + fremovexattr; + freopen; + freopen64; + frexp; + frexpf; + frexpl; + fscanf; + fseek; + fseeko; + fseeko64; + fsetpos; + fsetpos64; + fsetxattr; + fstat; + fstat64; + fstatat; + fstatat64; + fstatfs; + fstatfs64; + fstatvfs; + fstatvfs64; + fsync; + ftell; + ftello; + ftello64; + ftime; + ftok; + ftruncate; + ftruncate64; + ftrylockfile; + ftw; + ftw64; + function_of_shared_lib; + funlockfile; + futimens; + futimes; + futimesat; + fwide; + fwprintf; + fwrite; + fwrite_unlocked; + fwscanf; + gai_strerror; + gcvt; + get_application_target_sdk_version; + get_avphys_pages; + get_current_dir_name; + get_default_ns; + get_device_api_version; + get_fatal_message; + get_nprocs; + get_nprocs_conf; + get_phys_pages; + getaddrinfo; + getauxval; + getc; + getc_unlocked; + getchar; + getchar_unlocked; + getcwd; + getdate; + getdate_err; + getdelim; + getdents; + getdents64; + getdomainname; + getdtablesize; + getegid; + getentropy; + getenv; + geteuid; + getgid; + getgrent; + getgrgid; + getgrgid_r; + getgrnam; + getgrnam_r; + getgrouplist; + getgroups; + gethostbyaddr; + gethostbyaddr_r; + gethostbyname; + gethostbyname_r; + gethostbyname2; + gethostbyname2_r; + gethostent; + gethostid; + gethostname; + getifaddrs; + getitimer; + GetLastFatalMessage; + getline; + getloadavg; + getlogin; + getlogin_r; + getmntent; + getmntent_r; + getnameinfo; + getnetbyaddr; + getnetbyname; + getnetent; + getopt; + getopt_long; + getopt_long_only; + getpagesize; + GetParamLabel; + GetParamList; + GetParamWorkSpace; + getpass; + getpeername; + getpgid; + getpgrp; + getpid; + getppid; + getpriority; + GetProcessName; + GetProcStatus; + getprotobyname; + getprotobynumber; + getprotoent; + getpwent; + getpwnam; + getpwnam_r; + getpwuid; + getpwuid_r; + getrandom; + getresgid; + getresuid; + getrlimit; + getrlimit64; + getrusage; + gets; + getservbyname; + getservbyname_r; + getservbyport; + getservbyport_r; + getservent; + getsid; + getsockname; + getsockopt; + getspent; + getspnam; + getspnam_r; + getsubopt; + gettext; + GetThreadName; + gettid; + GetTimeMilliseconds; + gettimeofday; + getuid; + getusershell; + getutent; + getutid; + getutline; + getutxent; + getutxid; + getutxline; + getw; + getwc; + getwc_unlocked; + getwchar; + getwchar_unlocked; + getxattr; + glob; + glob64; + globfree; + globfree64; + gmtime; + gmtime_r; + grantpt; + h_errno; + handle_asan_path_open; + HashMapAdd; + HashMapCreate; + HashMapDestroy; + HashMapFind; + HashMapGet; + HashMapRemove; + hasmntopt; + hcreate; + hcreate_r; + hdestroy; + hdestroy_r; + herror; + HiTraceGetId; + hsearch; + hsearch_r; + hstrerror; + htonl; + htons; + hypot; + hypotf; + hypotl; + iconv; + iconv_close; + iconv_open; + if_freenameindex; + if_indextoname; + if_nameindex; + if_nametoindex; + ilogb; + ilogbf; + ilogbl; + imaxabs; + imaxdiv; + in6addr_any; + in6addr_loopback; + index; + inet_addr; + inet_aton; + inet_lnaof; + inet_makeaddr; + inet_netof; + inet_network; + inet_ntoa; + inet_ntop; + inet_pton; + init_malloc_hook_shared_library; + init_module; + initgroups; + InitParameterClient; + InitParamSelinux; + InitParamWorkSpace; + InitSharedMem; + initstate; + inotify_add_watch; + inotify_init; + inotify_init1; + inotify_rm_watch; + insque; + INVALID_SOCKET; + ioctl; + is_accessible; + is_allow_internet; + is_sharable; + isalnum; + isalnum_l; + isalpha; + isalpha_l; + isascii; + isastream; + isatty; + isblank; + isblank_l; + iscntrl; + iscntrl_l; + isdigit; + isdigit_l; + isgraph; + isgraph_l; + islower; + islower_l; + isprint; + isprint_l; + ispunct; + ispunct_l; + issetugid; + isspace; + isspace_l; + isupper; + isupper_l; + iswalnum; + iswalnum_l; + iswalpha; + iswalpha_l; + iswblank; + iswblank_l; + iswcntrl; + iswcntrl_l; + iswctype; + iswctype_l; + iswdigit; + iswdigit_l; + iswgraph; + iswgraph_l; + iswlower; + iswlower_l; + iswprint; + iswprint_l; + iswpunct; + iswpunct_l; + iswspace; + iswspace_l; + iswupper; + iswupper_l; + iswxdigit; + iswxdigit_l; + isxdigit; + isxdigit_l; + j0; + j0f; + j1; + j1f; + jn; + jnf; + jrand48; + kill; + killpg; + klogctl; + l64a; + labs; + lchmod; + lchown; + lckpwdf; + lcong48; + ldexp; + ldexpf; + ldexpl; + ldiv; + lfind; + lgamma; + lgamma_r; + lgammaf; + lgammaf_r; + lgammal; + lgammal_r; + lgetxattr; + link; + linkat; + lio_listio; + lio_listio64; + listen; + listxattr; + llabs; + lldiv; + llistxattr; + llrint; + llrintf; + llrintl; + llround; + llroundf; + llroundl; + load_malloc_hook_shared_library; + LoadParameterContextsToSharedMem; + localeconv; + localtime; + localtime_r; + lockf; + lockf64; + log; + log_print; + log10; + log10f; + log10l; + log1p; + log1pf; + log1pl; + log2; + log2f; + log2l; + logb; + logbf; + logbl; + logf; + login_tty; + logl; + longjmp; + lrand48; + lremovexattr; + lrint; + lrintf; + lrintl; + lround; + lroundf; + lroundl; + lsearch; + lseek; + lseek64; + lsetxattr; + lstat; + lstat64; + lutimes; + madvise; + mallinfo; + mallinfo2; + malloc; + malloc_usable_size; + mblen; + mbrlen; + mbrtoc16; + mbrtoc32; + mbrtowc; + mbsinit; + mbsnrtowcs; + mbsrtowcs; + mbstowcs; + mbtowc; + memalign; + membarrier; + memccpy; + memchr; + memcmp; + memcpy; + memfd_create; + memmem; + memmove; + mempcpy; + memrchr; + memset; + mincore; + mkdir; + mkdirat; + mkdtemp; + mkfifo; + mkfifoat; + mknod; + mknodat; + mkostemp; + mkostemp64; + mkostemps; + mkostemps64; + mkstemp; + mkstemp64; + mkstemps; + mkstemps64; + mktemp; + mktime; + mlock; + mlock2; + mlockall; + mmap; + mmap64; + modf; + modff; + modfl; + mount; + mprotect; + mq_close; + mq_getattr; + mq_notify; + mq_open; + mq_receive; + mq_send; + mq_setattr; + mq_timedreceive; + mq_timedsend; + mq_unlink; + mrand48; + mremap; + msgctl; + msgget; + msgrcv; + msgsnd; + msync; + mtx_destroy; + mtx_init; + mtx_lock; + mtx_timedlock; + mtx_trylock; + mtx_unlock; + munlock; + munlockall; + munmap; + name_to_handle_at; + nan; + nanf; + nanl; + nanosleep; + nearbyint; + nearbyintf; + nearbyintl; + newlocale; + next_key; + nextafter; + nextafterf; + nextafterl; + nexttoward; + nexttowardf; + nexttowardl; + nftw; + nftw64; + ngettext; + nice; + nl_langinfo; + nl_langinfo_l; + nrand48; + ns_add_dso; + ns_add_inherit; + ns_alloc; + ns_free; + ns_get16; + ns_get32; + ns_initparse; + ns_name_uncompress; + ns_parserr; + ns_put16; + ns_put32; + ns_set_allowed_libs; + ns_set_asan_lib_paths; + ns_set_asan_permitted_paths; + ns_set_env_paths; + ns_set_lib_paths; + ns_set_name; + ns_set_permitted_paths; + ns_set_separated; + ns_skiprr; + nslist_add_ns; + nslist_init; + ntohl; + ntohs; + OH_HashMapAdd; + OH_HashMapCreate; + OH_HashMapDestory; + OH_HashMapFind; + OH_HashMapGet; + OH_HashMapIsEmpty; + OH_HashMapRemove; + OH_HashMapTraverse; + OH_ListAddTail; + OH_ListAddWithOrder; + OH_ListFind; + OH_ListGetCnt; + OH_ListInit; + OH_ListRemove; + OH_ListRemoveAll; + OH_ListTraversal; + ohos_malloc_hook_init_function; + ohos_malloc_hook_shared_library; + open; + open_by_handle_at; + open_memstream; + open_wmemstream; + open64; + openat; + openat64; + opendir; + openlog; + openpty; + optarg; + opterr; + optind; + optopt; + optreset; + pathconf; + pause; + pclose; + perror; + personality; + pipe; + pipe2; + pivot_root; + poll; + popen; + posix_close; + posix_fadvise; + posix_fadvise64; + posix_fallocate; + posix_fallocate64; + posix_madvise; + posix_memalign; + posix_openpt; + posix_spawn; + posix_spawn_file_actions_addchdir_np; + posix_spawn_file_actions_addclose; + posix_spawn_file_actions_adddup2; + posix_spawn_file_actions_addfchdir_np; + posix_spawn_file_actions_addopen; + posix_spawn_file_actions_destroy; + posix_spawn_file_actions_init; + posix_spawnattr_destroy; + posix_spawnattr_getflags; + posix_spawnattr_getpgroup; + posix_spawnattr_getschedparam; + posix_spawnattr_getschedpolicy; + posix_spawnattr_getsigdefault; + posix_spawnattr_getsigmask; + posix_spawnattr_init; + posix_spawnattr_setflags; + posix_spawnattr_setpgroup; + posix_spawnattr_setschedparam; + posix_spawnattr_setschedpolicy; + posix_spawnattr_setsigdefault; + posix_spawnattr_setsigmask; + posix_spawnp; + pow; + pow10; + pow10f; + pow10l; + powf; + powl; + ppoll; + prctl; + pread; + pread64; + preadv; + preadv64; + printf; + prlimit; + prlimit64; + process_vm_readv; + process_vm_writev; + program_invocation_name; + program_invocation_short_name; + pselect; + psiginfo; + psignal; + pthread_atfork; + pthread_attr_destroy; + pthread_attr_getdetachstate; + pthread_attr_getguardsize; + pthread_attr_getinheritsched; + pthread_attr_getschedparam; + pthread_attr_getschedpolicy; + pthread_attr_getscope; + pthread_attr_getstack; + pthread_attr_getstacksize; + pthread_attr_init; + pthread_attr_setdetachstate; + pthread_attr_setguardsize; + pthread_attr_setinheritsched; + pthread_attr_setschedparam; + pthread_attr_setschedpolicy; + pthread_attr_setscope; + pthread_attr_setstack; + pthread_attr_setstacksize; + pthread_barrier_destroy; + pthread_barrier_init; + pthread_barrier_wait; + pthread_barrierattr_destroy; + pthread_barrierattr_getpshared; + pthread_barrierattr_init; + pthread_barrierattr_setpshared; + pthread_cancel; + pthread_cond_broadcast; + pthread_cond_clockwait; + pthread_cond_destroy; + pthread_cond_init; + pthread_cond_signal; + pthread_cond_timedwait; + pthread_cond_timedwait_monotonic_np; + pthread_cond_timeout_np; + pthread_cond_wait; + pthread_condattr_destroy; + pthread_condattr_getclock; + pthread_condattr_getpshared; + pthread_condattr_init; + pthread_condattr_setclock; + pthread_condattr_setpshared; + pthread_create; + pthread_detach; + pthread_equal; + pthread_exit; + pthread_getaffinity_np; + pthread_getattr_default_np; + pthread_getattr_np; + pthread_getconcurrency; + pthread_getcpuclockid; + pthread_getname_np; + pthread_getschedparam; + pthread_getspecific; + pthread_gettid_np; + pthread_join; + pthread_key_create; + pthread_key_delete; + pthread_kill; + pthread_mutex_clocklock; + pthread_mutex_consistent; + pthread_mutex_destroy; + pthread_mutex_getprioceiling; + pthread_mutex_init; + pthread_mutex_lock; + pthread_mutex_lock_timeout_np; + pthread_mutex_setprioceiling; + pthread_mutex_timedlock; + pthread_mutex_timedlock_monotonic_np; + pthread_mutex_trylock; + pthread_mutex_unlock; + pthread_mutexattr_destroy; + pthread_mutexattr_getprotocol; + pthread_mutexattr_getpshared; + pthread_mutexattr_getrobust; + pthread_mutexattr_gettype; + pthread_mutexattr_init; + pthread_mutexattr_setprotocol; + pthread_mutexattr_setpshared; + pthread_mutexattr_setrobust; + pthread_mutexattr_settype; + pthread_once; + pthread_rwlock_clockrdlock; + pthread_rwlock_clockwrlock; + pthread_rwlock_destroy; + pthread_rwlock_init; + pthread_rwlock_rdlock; + pthread_rwlock_timedrdlock; + pthread_rwlock_timedrdlock_monotonic_np; + pthread_rwlock_timedwrlock; + pthread_rwlock_timedwrlock_monotonic_np; + pthread_rwlock_tryrdlock; + pthread_rwlock_trywrlock; + pthread_rwlock_unlock; + pthread_rwlock_wrlock; + pthread_rwlockattr_destroy; + pthread_rwlockattr_getpshared; + pthread_rwlockattr_init; + pthread_rwlockattr_setpshared; + pthread_self; + pthread_setaffinity_np; + pthread_setattr_default_np; + pthread_setcancelstate; + pthread_setcanceltype; + pthread_setconcurrency; + pthread_setname_np; + pthread_setschedparam; + pthread_setschedprio; + pthread_setspecific; + pthread_sigmask; + pthread_spin_destroy; + pthread_spin_init; + pthread_spin_lock; + pthread_spin_trylock; + pthread_spin_unlock; + pthread_testcancel; + pthread_timedjoin_np; + pthread_tryjoin_np; + ptrace; + ptsname; + ptsname_r; + putc; + putc_unlocked; + putchar; + putchar_unlocked; + putenv; + putgrent; + putpwent; + puts; + putspent; + pututline; + pututxline; + putw; + putwc; + putwc_unlocked; + putwchar; + putwchar_unlocked; + pwrite; + pwrite64; + pwritev; + pwritev64; + qsort; + quick_exit; + quotactl; + raise; + rand; + rand_r; + random; + read; + readahead; + readdir; + readdir_r; + readdir64; + readdir64_r; + readlink; + readlinkat; + ReadParamFromSharedMem; + ReadSharedMem; + ReadStringFromFile; + readv; + realloc; + realpath; + reboot; + recv; + recvfrom; + recvmmsg; + recvmsg; + regcomp; + regerror; + regexec; + regfree; + remainder; + remainderf; + remainderl; + remap_file_pages; + remove; + removexattr; + remque; + remquo; + remquof; + remquol; + rename; + renameat; + res_init; + res_mkquery; + res_query; + res_querydomain; + res_search; + res_send; + rewind; + rewinddir; + rindex; + rint; + rintf; + rintl; + rmdir; + round; + roundf; + roundl; + sbrk; + scalb; + scalbf; + scalbln; + scalblnf; + scalblnl; + scalbn; + scalbnf; + scalbnl; + scandir; + scandir64; + scanf; + sched_get_priority_max; + sched_get_priority_min; + sched_getaffinity; + sched_getcpu; + sched_getparam; + sched_getscheduler; + sched_rr_get_interval; + sched_setaffinity; + sched_setparam; + sched_setscheduler; + sched_yield; + SearchFromParamTrie; + secure_getenv; + seed48; + seekdir; + select; + sem_close; + sem_destroy; + sem_getvalue; + sem_init; + sem_open; + sem_post; + sem_timedwait; + sem_trywait; + sem_unlink; + sem_wait; + semctl; + semget; + semop; + semtimedop; + send; + sendfile; + sendfile64; + sendmmsg; + sendmsg; + sendto; + set_application_target_sdk_version; + set_fatal_message; + setbuf; + setbuffer; + setdomainname; + setegid; + setenv; + seteuid; + setfsgid; + setfsuid; + setgid; + setgrent; + setgroups; + sethostent; + sethostname; + setitimer; + setjmp; + setkey; + setlinebuf; + setlocale; + setlogmask; + setmntent; + setnetent; + setns; + setpgid; + setpgrp; + setpriority; + setprotoent; + setpwent; + setregid; + setresgid; + setresuid; + setreuid; + setrlimit; + setrlimit64; + setservent; + setsid; + setsockopt; + setspent; + setstate; + settimeofday; + setuid; + setusershell; + setutent; + setutxent; + setvbuf; + setxattr; + shm_open; + shm_unlink; + shmat; + shmctl; + shmdt; + shmget; + shutdown; + sigaction; + sigaddset; + sigaltstack; + sigandset; + sigdelset; + sigemptyset; + sigfillset; + sighold; + sigignore; + siginterrupt; + sigisemptyset; + sigismember; + siglongjmp; + signal; + signalfd; + signgam; + significand; + significandf; + sigorset; + sigpause; + sigpending; + sigprocmask; + sigqueue; + sigrelse; + sigset; + sigsetjmp; + sigsuspend; + sigtimedwait; + sigwait; + sigwaitinfo; + sin; + sincos; + sincosf; + sincosl; + sinf; + sinh; + sinhf; + sinhl; + sinl; + sleep; + snprintf; + sockatmark; + socket; + SOCKET_ADDR; + SOCKET_TYPE; + socketpair; + splice; + sprintf; + sqrt; + sqrtf; + sqrtl; + srand; + srand48; + srandom; + sscanf; + stack_naming; + stat; + stat64; + statfs; + statfs64; + statvfs; + statvfs64; + stderr; + stdin; + stdout; + stime; + stpcpy; + stpncpy; + strcasecmp; + strcasecmp_l; + strcasestr; + strcat; + strchr; + strchrnul; + strcmp; + strcoll; + strcoll_l; + strcpy; + strcspn; + strdup; + strerror; + strerror_l; + strerror_r; + strfmon; + strfmon_l; + strftime; + strftime_l; + strlcat; + strlcpy; + strlen; + strncasecmp; + strncasecmp_l; + strncat; + strncmp; + strncpy; + strndup; + strnlen; + strpbrk; + strptime; + strrchr; + strsep; + strsignal; + strspn; + strstr; + strtod; + strtod_l; + strtof; + strtof_l; + strtoimax; + strtok; + strtok_r; + strtol; + strtold; + strtold_l; + strtoll; + strtoul; + strtoull; + strtoumax; + strverscmp; + strxfrm; + strxfrm_l; + swab; + swapoff; + swapon; + swprintf; + swscanf; + symlink; + symlinkat; + sync; + sync_file_range; + syncfs; + syscall; + sysconf; + sysinfo; + syslog; + system; + SystemReadParam; + tan; + tanf; + tanh; + tanhf; + tanhl; + tanl; + tcdrain; + tcflow; + tcflush; + tcgetattr; + tcgetpgrp; + tcgetsid; + tcsendbreak; + tcsetattr; + tcsetpgrp; + tdelete; + tdestroy; + tee; + telldir; + tempnam; + textdomain; + tfind; + tgamma; + tgammaf; + tgammal; + tgkill; + thrd_create; + thrd_current; + thrd_detach; + thrd_equal; + thrd_exit; + thrd_join; + thrd_sleep; + thrd_yield; + time; + timegm; + timer_create; + timer_delete; + timer_getoverrun; + timer_gettime; + timer_settime; + timerfd_create; + timerfd_gettime; + timerfd_settime; + times; + timespec_get; + timezone; + tmpfile; + tmpfile64; + tmpnam; + toascii; + tolower; + tolower_l; + toupper; + toupper_l; + towctrans; + towctrans_l; + towlower; + towlower_l; + towupper; + towupper_l; + trace_marker_async_begin; + trace_marker_async_end; + trace_marker_begin; + trace_marker_count; + trace_marker_end; + trunc; + truncate; + truncate64; + truncf; + truncl; + tsearch; + tss_create; + tss_delete; + tss_get; + tss_set; + ttyname; + ttyname_r; + twalk; + tzname; + tzset; + ualarm; + ulckpwdf; + ulimit; + umask; + umount; + umount2; + uname; + ungetc; + ungetwc; + unlink; + unlinkat; + unlockpt; + UnmapSharedMem; + unsetenv; + unshare; + updwtmp; + updwtmpx; + uselocale; + usleep; + utime; + utimensat; + utimes; + utmpname; + utmpxname; + valloc; + vasprintf; + vdprintf; + verr; + verrx; + versionsort; + versionsort64; + vfork; + vfprintf; + vfscanf; + vfwprintf; + vfwscanf; + vhangup; + vmsplice; + vprintf; + vscanf; + vsnprintf; + vsprintf; + vsscanf; + vswprintf; + vswscanf; + vsyslog; + vwarn; + vwarnx; + vwprintf; + vwscanf; + wait; + wait3; + wait4; + waitid; + waitpid; + warn; + warnx; + wcpcpy; + wcpncpy; + wcrtomb; + wcscasecmp; + wcscasecmp_l; + wcscat; + wcschr; + wcscmp; + wcscoll; + wcscoll_l; + wcscpy; + wcscspn; + wcsdup; + wcsftime; + wcsftime_l; + wcslen; + wcsncasecmp; + wcsncasecmp_l; + wcsncat; + wcsncmp; + wcsncpy; + wcsnlen; + wcsnrtombs; + wcspbrk; + wcsrchr; + wcsrtombs; + wcsspn; + wcsstr; + wcstod; + wcstof; + wcstoimax; + wcstok; + wcstol; + wcstold; + wcstoll; + wcstombs; + wcstoul; + wcstoull; + wcstoumax; + wcswcs; + wcswidth; + wcsxfrm; + wcsxfrm_l; + wctob; + wctomb; + wctrans; + wctrans_l; + wctype; + wctype_l; + wcwidth; + wmemchr; + wmemcmp; + wmemcpy; + wmemmove; + wmemset; + wordexp; + wordfree; + wprintf; + write; + WriteSharedMem; + writev; + wscanf; + y0; + y0f; + y1; + y1f; + yn; + ynf; + local: + mq_close; + mq_getattr; + mq_notify; + mq_open; + mq_receive; + mq_send; + mq_setattr; + mq_timedreceive; + mq_timedsend; + mq_unlink; + __mq_timedreceive_time64; + __mq_timedsend_time64; + shm_open; + shm_unlink; + # pthread_cancel; + pthread_setcancelstate; + pthread_setcanceltype; + pthread_testcancel; + pthread_mutex_consistent; + pthread_mutexattr_getrobust; + pthread_mutexattr_setrobust; + __optpos; + aio_cancel; + aio_cancel64; + aio_error; + aio_error64; + aio_fsync; + aio_fsync64; + aio_read; + aio_read64; + aio_return; + aio_return64; + aio_suspend; + aio_suspend64; + aio_write; + aio_write64; + lio_listio; + lio_listio64; + setkey; + __getgmtoff; + __getzonename; + __libc_mmap; + __libc_munmap; + # __mem_typeset; + __memmove_aarch64; + __pthread_release_signal_stack; + __pthread_reserve_signal_stack; + __pthread_timedjoin_np_time64; + __reboot; + __res_state; + check_asan_path; + configor_free; + configor_init; + # crypt; + crypt_r; + dlns_set_namespace_lib_path; + dlns_set_namespace_permitted_paths; + dlns_set_namespace_separated; + dns_get_addr_info_from_net; + dns_set_addr_info_to_net; + dns_set_addr_info_to_netsys_cache; + encode_ptr; + encrypt; + find_ns_by_name; + get_default_ns; + # getspnam; + getspnam_r; + handle_asan_path_open; + HiLogAdapterIsLoggable; + HiLogAdapterPrint; + INVALID_SOCKET; + is_accessible; + is_allow_inherit; + is_sharable; + next_key; + ns_add_dso; + ns_alloc; + ns_free; + ns_set_allowed_libs; + ns_set_asan_lib_paths; + ns_set_asan_permitted_paths; + ns_set_env_paths; + ns_set_lib_paths; + ns_set_name; + ns_set_permitted_paths; + ns_set_separated; + nslist_add_ns; + nslist_init; + # ohos_malloc_hook_shared_library; + pthread_timedjoin_np; + pthread_tryjoin_np; + SOCKER_ADDR; + SOCKET_TYPE; + spnam; + stack_naming; + strlist_alloc; + strlist_free; + strlist_set; + strlwc; + strsplit; + strtrim; + sys_cache; + trace_marker_async_begin; + trace_marker_async_end; + trace_marker_count; + trace_marker_end; +}; \ No newline at end of file diff --git a/musl_template.gni b/musl_template.gni index a5eb0a8a30ad5f3b3dd29cad6d2113296a2fffaf..54abda7b8b6729cef50bb2d95f4698acb7fec718 100644 --- a/musl_template.gni +++ b/musl_template.gni @@ -483,6 +483,7 @@ template("musl_libs") { output_dir = "${target_out_dir}/${_libs_out_dir}" deps = [ ":soft_musl_hook", + ":soft_musl_ldso", ":soft_musl_src", ":soft_musl_src_nossp", ] @@ -558,6 +559,9 @@ template("musl_libs") { musl_lib_path = rebase_path("${target_out_dir}/${_libs_out_dir}") + libc_map_path = + rebase_path("${target_out_dir}/${musl_ported_dir}/libc.map.txt") + ldflags = [ "-nostdlib", "-Wl,-e,_dlstart", @@ -567,6 +571,7 @@ template("musl_libs") { "-L${musl_lib_path}", "-ldl", "-lpthread", + "-Wl,--version-script=${libc_map_path}", ] configs -= musl_inherited_configs diff --git a/porting/linux/user/ldso/dynlink.c b/porting/linux/user/ldso/dynlink.c index 33a62e4fb650e791d8a35f44d2ca2adc3179a204..20a25e4a451883306aa9aab8728b85c2685b7cc9 100644 --- a/porting/linux/user/ldso/dynlink.c +++ b/porting/linux/user/ldso/dynlink.c @@ -478,6 +478,9 @@ static int check_vna_hash(Verdef *def, int16_t vsym, uint32_t vna_hash) } break; } + if (matched) { + break; + } if (verdef->vd_next == 0) { break; }