Electroneum
Loading...
Searching...
No Matches
glibc_compat.cpp File Reference
#include <cstddef>
#include <cstdint>
#include <strings.h>
#include <string.h>
#include <glob.h>
#include <unistd.h>
#include <fnmatch.h>
Include dependency graph for glibc_compat.cpp:

Go to the source code of this file.

Macros

#define strong_alias   (__explicit_bzero_chk, __explicit_bzero_chk_internal)

Functions

void * memmove (void *a, const void *b, size_t c)
void * memcpy (void *a, const void *b, size_t c)
void __chk_fail (void) __attribute__((__noreturn__))
void explicit_bzero (void *s, size_t len)
void __explicit_bzero_chk (void *dst, size_t len, size_t dstlen)
int glob_old (const char *pattern, int flags, int(*errfunc)(const char *epath, int eerrno), glob_t *pglob)
int __wrap_glob (const char *pattern, int flags, int(*errfunc)(const char *epath, int eerrno), glob_t *pglob)

Macro Definition Documentation

◆ strong_alias

#define strong_alias   (__explicit_bzero_chk, __explicit_bzero_chk_internal)

Definition at line 80 of file glibc_compat.cpp.

Function Documentation

◆ __chk_fail()

void __chk_fail ( void )
Here is the caller graph for this function:

◆ __explicit_bzero_chk()

void __explicit_bzero_chk ( void * dst,
size_t len,
size_t dstlen )

Definition at line 67 of file glibc_compat.cpp.

68{
69 /* Inline __memset_chk to avoid a PLT reference to __memset_chk. */
70 if (__glibc_unlikely (dstlen < len))
71 __chk_fail ();
72 memset (dst, '\0', len);
73 /* Compiler barrier. */
74 asm volatile ("" ::: "memory");
75}
void __chk_fail(void) __attribute__((__noreturn__))
Here is the call graph for this function:

◆ __wrap_glob()

int __wrap_glob ( const char * pattern,
int flags,
int(* errfunc )(const char *epath, int eerrno),
glob_t * pglob )

Definition at line 94 of file glibc_compat.cpp.

95{
96 return glob_old(pattern, flags, errfunc, pglob);
97}
int glob_old(const char *pattern, int flags, int(*errfunc)(const char *epath, int eerrno), glob_t *pglob)
Here is the call graph for this function:

◆ explicit_bzero()

void explicit_bzero ( void * s,
size_t len )

Definition at line 58 of file glibc_compat.cpp.

59{
60 memset (s, '\0', len);
61 /* Compiler barrier. */
62 asm volatile ("" ::: "memory");
63}

◆ glob_old()

int glob_old ( const char * pattern,
int flags,
int(* errfunc )(const char *epath, int eerrno),
glob_t * pglob )
Here is the caller graph for this function:

◆ memcpy()

void * memcpy ( void * a,
const void * b,
size_t c )

Definition at line 16 of file glibc_compat.cpp.

17{
18 return memmove(a, b, c);
19}
void * memmove(void *a, const void *b, size_t c)
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1124
Here is the call graph for this function:

◆ memmove()

void * memmove ( void * a,
const void * b,
size_t c )
Here is the caller graph for this function: