Mini glibc written in Assembly x86-64.
Compiled as shared library.
For more informations see man glibc.
compiling:
make
cleaning objects files:
make clean
cleaning binary files:
make fclean
cleaning all and compiling:
make re
You just need to upload your minilibc library instead of the glibc library with this command
export LD_PRELOAD=./libasm.so
or execute your program with your minilibc library
LD_PRELOAD=./libasm.so ./a.out
The memcpy() function copies n bytes from memory area src to memory area dest. The memory areas must not overlap. Use memmove if the memory areas do overlap.
The memmove() function copies n bytes from memory area src to memory area dest. The memory areas may overlap: copying takes place as though the bytes in src are first copied into a temporary array that does not overlap src or dest, and the bytes are then copied from the temporary array to dest.
The memset() function fills the first n bytes of the memory area pointed to by s with the constant byte c.
The strcmp() function compares the two strings s1 and s2. It returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2.
The strncmp() function is similar to strcmp(), except it compares only the first (at most) n bytes of s1 and s2.
The strcasecmp() function performs a byte-by-byte comparison of the strings s1 and s2, ignoring the case of the characters. It returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2.
The strncasecmp() function is similar to strcasecmp(), except that it compares no more than n bytes of s1 and s2.
The strchr() function returns a pointer to the first occurrence of the character c in the string s.
The strpbrk() function locates the first occurrence in the string s of any of the bytes in the string accept.
The strstr() function finds the first occurrence of the substring needle in the string haystack. The terminating null bytes ('\0') are not compared.
The rindex() function returns a pointer to the last occurrence of the character c in the string s.
The strcspn() function calculates the length of the initial segment of s which consists entirely of bytes not in reject.
The strlen() function calculates the length of the string pointed to by s, excluding the terminating null byte ('\0').
The read utility shall read a single line from standard input.
write() writes up to count bytes from the buffer pointed buf to the file referred to by the file descriptor fd.