diff options
author | Petr Machata <pmachata@redhat.com> | 2013-10-25 16:25:07 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2013-10-25 16:27:34 +0200 |
commit | 693cd2882c9592f9bfca2fc3c14d62eae00f7475 (patch) | |
tree | cc327222119e76df5d4757069cae0961652dd358 | |
parent | 51788253b9a2f00c7047c7e7f272e91389e12e78 (diff) | |
download | ltrace-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.exp | 10 |
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[]) |