diff options
author | kan <kan@FreeBSD.org> | 2004-07-29 18:07:08 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2004-07-29 18:07:08 +0000 |
commit | 10a0e8305d6319f75f4801ac6259f6d415cf8446 (patch) | |
tree | eba52ce4be659ab7cf65a8c6f100dfa80aab6837 /lib/libc/gen/_pthread_stubs.c | |
parent | 44ddf6cddd77c0720f9d04d984282bb298e2018d (diff) | |
download | FreeBSD-src-10a0e8305d6319f75f4801ac6259f6d415cf8446.zip FreeBSD-src-10a0e8305d6319f75f4801ac6259f6d415cf8446.tar.gz |
Use newly added __used attribute to keep static function symbols from being
eliminated by compiler optimizer.
Diffstat (limited to 'lib/libc/gen/_pthread_stubs.c')
-rw-r--r-- | lib/libc/gen/_pthread_stubs.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/libc/gen/_pthread_stubs.c b/lib/libc/gen/_pthread_stubs.c index ef9ecb4..dd93752 100644 --- a/lib/libc/gen/_pthread_stubs.c +++ b/lib/libc/gen/_pthread_stubs.c @@ -97,8 +97,8 @@ pthread_func_entry_t __thr_jtable[PJT_MAX] = { #define FUNC_EXP(name) __CONCAT(name, _exp) #define STUB_FUNC(name, idx, ret) \ - static ret FUNC_EXP(name)(void) __unused; \ - static ret FUNC_INT(name)(void) __unused; \ + static ret FUNC_EXP(name)(void) __used; \ + static ret FUNC_INT(name)(void) __used; \ WEAK_REF(FUNC_EXP(name), name); \ WEAK_REF(FUNC_INT(name), __CONCAT(_, name)); \ typedef ret (*FUNC_TYPE(name))(void); \ @@ -116,8 +116,8 @@ pthread_func_entry_t __thr_jtable[PJT_MAX] = { } #define STUB_FUNC1(name, idx, ret, p0_type) \ - static ret FUNC_EXP(name)(p0_type) __unused; \ - static ret FUNC_INT(name)(p0_type) __unused; \ + static ret FUNC_EXP(name)(p0_type) __used; \ + static ret FUNC_INT(name)(p0_type) __used; \ WEAK_REF(FUNC_EXP(name), name); \ WEAK_REF(FUNC_INT(name), __CONCAT(_, name)); \ typedef ret (*FUNC_TYPE(name))(p0_type); \ @@ -135,8 +135,8 @@ pthread_func_entry_t __thr_jtable[PJT_MAX] = { } #define STUB_FUNC2(name, idx, ret, p0_type, p1_type) \ - static ret FUNC_EXP(name)(p0_type, p1_type) __unused; \ - static ret FUNC_INT(name)(p0_type, p1_type) __unused; \ + static ret FUNC_EXP(name)(p0_type, p1_type) __used; \ + static ret FUNC_INT(name)(p0_type, p1_type) __used; \ WEAK_REF(FUNC_EXP(name), name); \ WEAK_REF(FUNC_INT(name), __CONCAT(_, name)); \ typedef ret (*FUNC_TYPE(name))(p0_type, p1_type); \ @@ -154,8 +154,8 @@ pthread_func_entry_t __thr_jtable[PJT_MAX] = { } #define STUB_FUNC3(name, idx, ret, p0_type, p1_type, p2_type) \ - static ret FUNC_EXP(name)(p0_type, p1_type, p2_type) __unused; \ - static ret FUNC_INT(name)(p0_type, p1_type, p2_type) __unused; \ + static ret FUNC_EXP(name)(p0_type, p1_type, p2_type) __used; \ + static ret FUNC_INT(name)(p0_type, p1_type, p2_type) __used; \ WEAK_REF(FUNC_EXP(name), name); \ WEAK_REF(FUNC_INT(name), __CONCAT(_, name)); \ typedef ret (*FUNC_TYPE(name))(p0_type, p1_type, p2_type); \ |