Skip to content

Commit

Permalink
Memory aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
djphoenix committed Apr 20, 2017
1 parent ba8aa8d commit 2fc662f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/kernlib/mem.cpp
Expand Up @@ -42,3 +42,14 @@ void Memory::fill(void *addr, uint8_t value, size_t size) {
::"D"(addr),"a"(value),"c"(size)
);
}

extern "C" {
void memcpy(void *dest, const void *src, size_t count)
__attribute((alias("_ZN6Memory4copyEPvPKvm")));
void memmove(void *dest, const void *src, size_t count)
__attribute((alias("_ZN6Memory4copyEPvPKvm")));
void memset(void *addr, uint8_t value, size_t size)
__attribute((alias("_ZN6Memory4fillEPvhm")));
void bzero(void *addr, size_t size)
__attribute((alias("_ZN6Memory4zeroEPvm")));
}

0 comments on commit 2fc662f

Please sign in to comment.