2 ms·
This is documented[0]: > Note that it is assumed that a freestanding environment will additionally provide memcpy, memmove, memset, and memcmp implementations,
by moonchild 6y ago
This is documented[0]:
> Note that it is assumed that a freestanding environment will additionally provide memcpy, memmove, memset, and memcmp implementations, as these are needed for efficient codegen for many programs.
GCC has effectively the same stipulation[1]:
> GCC requires the freestanding environment provide memcpy, memmove, memset and memcmp.
The main thing I'm confused about is why you didn't get a linker error.
0. https://clang.llvm.org/docs/CommandGuide/clang.html#cmdoption-ffreestanding https://clang.llvm.org/docs/CommandGuide/clang.html#cmdoptio...
1. https://gcc.gnu.org/onlinedocs/gcc/Standards.html https://gcc.gnu.org/onlinedocs/gcc/Standards.html
- trissylegs 6y ago> The main thing I'm confused about is why you didn't get a linker error. EFI isn't your usual Freestanding env. Your output is a dynamically linked PE2 (Windows) executable. The linker had spots for memcpy and others to be linked in Dynamically. But they were not. Whatever was there caused a hang in TianoCore UEFI. (Which would eventually reset due to the watchdog timer)