[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH 45/57] Define and use `WEAK'
From: |
Tommi Rantala |
Subject: |
[Libunwind-devel] [PATCH 45/57] Define and use `WEAK' |
Date: |
Fri, 21 Sep 2012 14:11:46 +0300 |
---
include/compiler.h | 2 ++
src/mi/backtrace.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/compiler.h b/include/compiler.h
index e15f7a7..ed5384c 100644
--- a/include/compiler.h
+++ b/include/compiler.h
@@ -45,6 +45,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
# define HIDDEN
# define PROTECTED
# endif
+# define WEAK __attribute__((weak))
# if (__GNUC__ >= 3)
# define likely(x) __builtin_expect ((x), 1)
# define unlikely(x) __builtin_expect ((x), 0)
@@ -61,6 +62,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
# define ALIAS(name)
# define HIDDEN
# define PROTECTED
+# define WEAK
# define likely(x) (x)
# define unlikely(x) (x)
#endif
diff --git a/src/mi/backtrace.c b/src/mi/backtrace.c
index bd748aa..b520535 100644
--- a/src/mi/backtrace.c
+++ b/src/mi/backtrace.c
@@ -76,6 +76,6 @@ unw_backtrace (void **buffer, int size)
}
extern int backtrace (void **buffer, int size)
- __attribute__((weak, alias("unw_backtrace")));
+ WEAK __attribute__((alias("unw_backtrace")));
#endif /* !UNW_REMOTE_ONLY */
--
1.7.9.5
- [Libunwind-devel] [PATCH 50/57] Teach autotools current ARM `ex_tables.h' location, (continued)
- [Libunwind-devel] [PATCH 50/57] Teach autotools current ARM `ex_tables.h' location, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 48/57] Use `UNUSED' in tests, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 52/57] Apply `define_lock()', Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 49/57] Use shared `ARRAY_SIZE' in IA64 tests, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 56/57] Add arguments to malloc and calloc prototypes in Ltest-nocalloc, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 55/57] Remove unused variable in Ltest-nocalloc, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 53/57] Prefer NULL over zero, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 35/57] SuperH port, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 47/57] Plug in `ALIAS' attribute, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 42/57] IA64: constify read only arrays in `tdep_init()', Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 45/57] Define and use `WEAK',
Tommi Rantala <=
- [Libunwind-devel] [PATCH 46/57] Define and use `CONST_ATTR', Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 43/57] Plug in `ARRAY_SIZE' in ptrace code, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 57/57] Assign `func' just once in Ltest-nocalloc glibc case, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 44/57] Define and use `NOINLINE', Tommi Rantala, 2012/09/21