Move some cruft from the build system to the source.
It's more intention-revealing this way round anyway... Test: treehugger Change-Id: I561d8ac3003fa6b7f19fcf7110a6646c69bdd936
This commit is contained in:
parent
c40ea825e7
commit
8d9549e28a
2 changed files with 2 additions and 3 deletions
|
@ -782,7 +782,6 @@ cc_library_static {
|
|||
arch: {
|
||||
arm: {
|
||||
cflags: [
|
||||
"-DHAVE_ASSEMBLER___MEMCPY_CHK",
|
||||
"-DRENAME___STRCAT_CHK",
|
||||
"-DRENAME___STRCPY_CHK",
|
||||
],
|
||||
|
@ -809,7 +808,6 @@ cc_library_static {
|
|||
],
|
||||
},
|
||||
arm64: {
|
||||
cflags: ["-DHAVE_ASSEMBLER___MEMCPY_CHK"],
|
||||
srcs: [
|
||||
"arch-arm64/string/__memcpy_chk.S",
|
||||
"arch-arm64/string/__memset_chk.S",
|
||||
|
|
|
@ -489,8 +489,9 @@ extern "C" char* __STRCPY_CHK(char* dst, const char* src, size_t dst_len) {
|
|||
return strcpy(dst, src);
|
||||
}
|
||||
|
||||
#if !defined(HAVE_ASSEMBLER___MEMCPY_CHK)
|
||||
#if !defined(__arm__) && !defined(__aarch64__)
|
||||
// Runtime implementation of __memcpy_chk (used directly by compiler, not in headers).
|
||||
// arm32 and arm64 have assembler implementations, and don't need this C fallback.
|
||||
extern "C" void* __memcpy_chk(void* dst, const void* src, size_t count, size_t dst_len) {
|
||||
__check_count("memcpy", "count", count);
|
||||
__check_buffer_access("memcpy", "write into", count, dst_len);
|
||||
|
|
Loading…
Reference in a new issue