[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH 4/5] ARM: tests/Gtest-dyn1.c workaround for GCC
From: |
Ken Werner |
Subject: |
[Libunwind-devel] [PATCH 4/5] ARM: tests/Gtest-dyn1.c workaround for GCC bug. |
Date: |
Thu, 21 Apr 2011 17:52:41 +0200 |
Temporarily workaround for a GCC bug that prevents code from obtaining the
thumb marker: https://bugs.launchpad.net/gcc-linaro/+bug/721531.
Signed-off-by: Ken Werner <address@hidden>
---
tests/Gtest-dyn1.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/Gtest-dyn1.c b/tests/Gtest-dyn1.c
index b7b788f..fcb773d 100644
--- a/tests/Gtest-dyn1.c
+++ b/tests/Gtest-dyn1.c
@@ -68,8 +68,12 @@ struct fdesc
long code;
long is_thumb;
};
-# define get_fdesc(fdesc,func) ({(fdesc).code = (long) &(func) & ~0x1; \
- (fdesc).is_thumb = (long) &(func) & 0x1;})
+/* Workaround GCC bug: https://bugs.launchpad.net/gcc-linaro/+bug/721531 */
+# define get_fdesc(fdesc,func) ({long tmp = (long) &(func); \
+ (fdesc).code = (long) &(func) & ~0x1; \
+ (fdesc).is_thumb = tmp & 0x1;})
+/*# define get_fdesc(fdesc,func) ({(fdesc).code = (long) &(func) & ~0x1; \
+ (fdesc).is_thumb = (long) &(func) & 0x1;})*/
# define get_funcp(fdesc) ((template_t) ((fdesc).code |
(fdesc).is_thumb))
# define get_gp(fdesc) (0)
#else
--
1.7.4.1
- [Libunwind-devel] [PATCH 0/5] ARM: initial support for local unw_resume and minor fixes, Ken Werner, 2011/04/21
- [Libunwind-devel] [PATCH 2/5] ARM: tests/Gtest-trace.c - IP printing, Ken Werner, 2011/04/21
- [Libunwind-devel] [PATCH 4/5] ARM: tests/Gtest-dyn1.c workaround for GCC bug.,
Ken Werner <=
- [Libunwind-devel] [PATCH 3/5] ARM: tests/Gtest-dyn1.c fixes., Ken Werner, 2011/04/21
- [Libunwind-devel] [PATCH 1/5] Add the appropriate libraries to the *_LDADD variables., Ken Werner, 2011/04/21
- [Libunwind-devel] [PATCH 5/5] Add initial support for local unw_resume on ARM Linux., Ken Werner, 2011/04/21
- Re: [Libunwind-devel] [PATCH 0/5] ARM: initial support for local unw_resume and minor fixes, Arun Sharma, 2011/04/21