aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2013-10-25 16:25:07 +0200
committerPetr Machata <pmachata@redhat.com>2013-10-25 16:27:34 +0200
commit693cd2882c9592f9bfca2fc3c14d62eae00f7475 (patch)
treecc327222119e76df5d4757069cae0961652dd358
parent51788253b9a2f00c7047c7e7f272e91389e12e78 (diff)
downloadltrace-693cd2882c9592f9bfca2fc3c14d62eae00f7475.tar.gz
Rewrite the IFUNC test case to avoid GCC attribute
- GCC doesn't support __attribute__ ((ifunc)) on all platforms where IFUNC is supported.
-rw-r--r--testsuite/ltrace.minor/trace-irelative.exp10
1 files changed, 8 insertions, 2 deletions
diff --git a/testsuite/ltrace.minor/trace-irelative.exp b/testsuite/ltrace.minor/trace-irelative.exp
index cb73ade..567be24 100644
--- a/testsuite/ltrace.minor/trace-irelative.exp
+++ b/testsuite/ltrace.minor/trace-irelative.exp
@@ -18,8 +18,14 @@
set bin [ltraceCompile {} [ltraceSource c {
int abc (int a) { return a + 1; }
- static int (*resolve_xyz (void)) (int) { return abc; }
- int xyz (int a) __attribute__ ((ifunc ("resolve_xyz")));
+
+ __asm__(".type xyz, \%gnu_indirect_function");
+
+ int xyz (int a);
+ extern void *xyz_ifunc(void) __asm__("xyz");
+ extern void *xyz_ifunc(void) {
+ return abc;
+ }
int
main(int argc, char *argv[])