Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ if(NOT CI)
OUTPUT "${BOX64_ROOT}/src/wrapped/generated/functions_list.txt"
COMMAND "${PYTHON_EXECUTABLE}" "${BOX64_ROOT}/rebuild_wrappers.py"
"${BOX64_ROOT}"
"PANDORA" "HAVE_LD80BITS" "NOALIGN" "HAVE_TRACE" "ANDROID" "TERMUX" "STATICBUILD" "LA64" "--"
"PANDORA" "HAVE_LD80BITS" "NOALIGN" "HAVE_TRACE" "ANDROID" "TERMUX" "STATICBUILD" "LA64" "LA64_ABI_1" "--"
${WRAPPEDS_HEAD}
MAIN_DEPENDENCY "${BOX64_ROOT}/rebuild_wrappers.py"
DEPENDS ${WRAPPEDS} ${WRAPPEDS_HEAD}
Expand Down
2 changes: 2 additions & 0 deletions src/wrapped/generated/functions_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5032,6 +5032,8 @@ wrappedlibc:
- uname
- CFp:
- _ITM_RU1
- uFv:
- arc4random
- uFp:
- _ITM_RU4
- UFp:
Expand Down
2 changes: 2 additions & 0 deletions src/wrapped/generated/wrappedlibctypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ typedef int32_t (*iFv_t)(void);
typedef int32_t (*iFi_t)(int32_t);
typedef int32_t (*iFp_t)(void*);
typedef uint8_t (*CFp_t)(void*);
typedef uint32_t (*uFv_t)(void);
typedef uint32_t (*uFp_t)(void*);
typedef uint64_t (*UFp_t)(void*);
typedef intptr_t (*lFv_t)(void);
Expand Down Expand Up @@ -137,6 +138,7 @@ typedef int32_t (*iFppipppp_t)(void*, void*, int32_t, void*, void*, void*, void*
GO(stime, iFp_t) \
GO(uname, iFp_t) \
GO(_ITM_RU1, CFp_t) \
GO(arc4random, uFv_t) \
GO(_ITM_RU4, uFp_t) \
GO(_ITM_RU8, UFp_t) \
GO(syscall, lFv_t) \
Expand Down
7 changes: 7 additions & 0 deletions src/wrapped/wrappedlibc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4000,6 +4000,13 @@ EXPORT char* secure_getenv(const char* name)
return getenv(name);
}

uint32_t get_random32();

EXPORT uint32_t my_arc4random(void)
{
return get_random32();
}

#ifdef STATICBUILD
uint32_t get_random32();
__attribute__((weak)) uint32_t arc4random()
Expand Down
8 changes: 6 additions & 2 deletions src/wrapped/wrappedlibc_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -2690,10 +2690,14 @@ GO(android_set_abort_message, vFp)
#ifdef STATICBUILD
GO(dummy_pFLp, pFLp)
GO(dummy_pFpLLp, pFpLLp)
GO(arc4random, uFv)
#else
// not needed in no-static build
//GO(dummy_pFLp, pFLp)
//GO(dummy_pFpLLp, pFpLLp)
//GO(arc4random, uFv)
#endif

#ifdef LA64_ABI_1
GOM(arc4random, uFv)
#else
GO(arc4random, uFv)
#endif
Loading