diff options
author | Tom Hughes <tomhughes@chromium.org> | 2022-03-28 15:11:46 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-03-29 19:13:40 +0000 |
commit | 3b0ca45921e5111f89c34ef96c8667bd65973684 (patch) | |
tree | 74795b259c44052e2426f5ffdf1db6507a231457 /common/util_stdlib.c | |
parent | c20a1a6b579c4bf632716e3a633656f6532295b3 (diff) | |
download | chrome-ec-3b0ca45921e5111f89c34ef96c8667bd65973684.tar.gz |
tree: Replace __attribute__((used)) with __keep
The two are equivalent, so use __keep everywhere for consistency.
BRANCH=none
BUG=b:172020503
TEST=./util/compare_build.sh -b all -j 120
=> MATCH
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Ie2d15e8fa00dbe35a190060c80f15f4ba720e3a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3556497
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Diffstat (limited to 'common/util_stdlib.c')
-rw-r--r-- | common/util_stdlib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/util_stdlib.c b/common/util_stdlib.c index 8302730ad7..7e59b0fbc5 100644 --- a/common/util_stdlib.c +++ b/common/util_stdlib.c @@ -134,7 +134,7 @@ __stdlib_compat int atoi(const char *nptr) return neg ? -result : result; } -__attribute__((used)) +__keep __stdlib_compat int memcmp(const void *s1, const void *s2, size_t len) { const char *sa = s1; @@ -151,7 +151,7 @@ __stdlib_compat int memcmp(const void *s1, const void *s2, size_t len) } #if !(__has_feature(address_sanitizer) || __has_feature(memory_sanitizer)) -__attribute__((used)) +__keep __stdlib_compat void *memcpy(void *dest, const void *src, size_t len) { char *d = (char *)dest; @@ -197,7 +197,7 @@ __stdlib_compat void *memcpy(void *dest, const void *src, size_t len) #endif /* address_sanitizer || memory_sanitizer */ #if !(__has_feature(address_sanitizer) || __has_feature(memory_sanitizer)) -__attribute__((used)) +__keep __stdlib_compat __visible void *memset(void *dest, int c, size_t len) { char *d = (char *)dest; @@ -237,7 +237,7 @@ __stdlib_compat __visible void *memset(void *dest, int c, size_t len) #endif /* address_sanitizer || memory_sanitizer */ #if !(__has_feature(address_sanitizer) || __has_feature(memory_sanitizer)) -__attribute__((used)) +__keep __stdlib_compat void *memmove(void *dest, const void *src, size_t len) { if ((uintptr_t)dest <= (uintptr_t)src || |