Export memalign to linker

In order to support demangling of rust symbols by the linker, we are
adding a small Rust component. Rust expects `memalign` to be present in
hosted environments, and it doesn't appear costly to enable it.

Bug: 178565008
Test: m, killall -11 keystore2 produced mangled names in tombstone
Change-Id: I8fc749000fa02a3b760c8cc55be3348b9964d931
This commit is contained in:
Matthew Maurer 2021-06-24 16:12:45 -07:00
parent 556b45ad41
commit 2411a5e789
1 changed files with 4 additions and 0 deletions

View File

@ -72,6 +72,10 @@ void* malloc(size_t byte_count) {
return get_allocator().alloc(byte_count);
}
void* memalign(size_t alignment, size_t byte_count) {
return get_allocator().memalign(alignment, byte_count);
}
void* calloc(size_t item_count, size_t item_size) {
return get_allocator().alloc(item_count*item_size);
}