summaryrefslogtreecommitdiff
path: root/src/tests/getpc_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/getpc_test.cc')
-rw-r--r--src/tests/getpc_test.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tests/getpc_test.cc b/src/tests/getpc_test.cc
index 1277636..b6df69b 100644
--- a/src/tests/getpc_test.cc
+++ b/src/tests/getpc_test.cc
@@ -99,14 +99,16 @@ int main(int argc, char** argv) {
char* expected = (char*)&RoutineCallingTheSignal;
char* actual = (char*)getpc_retval;
- // For ia64, ppc64, and parisc64, the function pointer is actually
+ // For ia64, ppc64v1, and parisc64, the function pointer is actually
// a struct. For instance, ia64's dl-fptr.h:
// struct fdesc { /* An FDESC is a function descriptor. */
// ElfW(Addr) ip; /* code entry point */
// ElfW(Addr) gp; /* global pointer */
// };
// We want the code entry point.
-#if defined(__ia64) || defined(__powerpc64__) // NOTE: ppc64 is UNTESTED
+ // NOTE: ppc64 ELFv2 (Little Endian) does not have function pointers
+#if defined(__ia64) || \
+ (defined(__powerpc64__) && _CALL_ELF != 2)
expected = ((char**)expected)[0]; // this is "ip"
#endif