blob: a4386d4194586d737418f9b89f3152bd854e2113 [file] [log] [blame]
// Copyright 2020 The Fuchsia Authors
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT
// The memcpy implementation is verbatim from cortex-strings.
// We include it here so we can define aliases for the sanitizer runtime. The
// assembler gives warnings if `.weak foo` and `.global foo` both appear,
// though the last one always wins. To avoid touching the cortex-strings code
// temporarily redefine `global` as a macro; it's only used once in the file.
#define global weak
#include "third_party/lib/cortex-strings/src/aarch64/memcpy.S"
#undef global
.globl __unsanitized_memcpy
.hidden __unsanitized_memcpy
__unsanitized_memcpy = memcpy