diff options
author | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2014-02-02 19:32:37 -0200 |
---|---|---|
committer | Aliaksey Kandratsenka <alk@tut.by> | 2014-03-29 13:35:36 -0700 |
commit | df227794361f9725eca7420d95e65ab997c79716 (patch) | |
tree | 8652ed19eda56f5d614b900a351f5ba76293cdd7 /src/tests | |
parent | e3deb42d5dcdeeb8a340d03f207f2488ef3fb2eb (diff) | |
download | gperftools-df227794361f9725eca7420d95e65ab997c79716.tar.gz |
Fix getpc_test for PPC64v2 LE
This patch fix the PPC64 guard to get the function address for PPC64v2.
It removes the use of an indirection (to get the ODP text address),
since the PPCv2 does not have function descriptors.
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/getpc_test.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tests/getpc_test.cc b/src/tests/getpc_test.cc index 43a9fe2..d75e40b 100644 --- a/src/tests/getpc_test.cc +++ b/src/tests/getpc_test.cc @@ -100,14 +100,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 |