diff options
author | Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> | 2007-08-24 10:54:00 -0600 |
---|---|---|
committer | David Mosberger-Tang <davidm@koala.mostang.com> | 2007-08-24 10:54:00 -0600 |
commit | 3e24581adca378307322555d2b5e70439dbc9c19 (patch) | |
tree | bfa6bad9e315c8f2bc2d6f563716bc45a09b86c2 | |
parent | e6b9f350f78ecd9ef3b8a3e721f9435c94fc2562 (diff) | |
download | libunwind-3e24581adca378307322555d2b5e70439dbc9c19.tar.gz |
[PPC64] Add PPC64 entry to README and fix David's typo in ppc64/get_func_addr.c
-rw-r--r-- | README | 18 | ||||
-rw-r--r-- | src/ppc64/get_func_addr.c | 8 |
2 files changed, 23 insertions, 3 deletions
@@ -61,6 +61,24 @@ workaround is to issue the following commands before running GCC v3.3.2 or later have been fixed and do not require this workaround. +* Building for PowerPC64 / Linux + +For building for power64 you should use: + + $ ./configure CFLAGS="-g -O2 -m64" CXXFLAGS="-g -O2 -m64" + +If your power support altivec registers: + $ ./configure CFLAGS="-g -O2 -m64 -maltivec" CXXFLAGS="-g -O2 -m64 -maltivec" + +To check if your processor has support for vector registers (altivec): + cat /proc/cpuinfo | grep altivec +and should have something like this: + cpu : PPC970, altivec supported + +If libunwind seems to not work (backtracing failing), try to compile +it with -O0, without optimizations. There are some compiler problems +depending on the version of your gcc. + * Regression Testing diff --git a/src/ppc64/get_func_addr.c b/src/ppc64/get_func_addr.c index 5a8139fa..a9c828dc 100644 --- a/src/ppc64/get_func_addr.c +++ b/src/ppc64/get_func_addr.c @@ -35,9 +35,11 @@ tdep_get_func_addr (unw_addr_space_t as, unw_word_t addr, int ret; a = unw_get_accessors (as); - /* entry-point is stored in the 1st word of the function descriptor: */ - ret = (a->access_mem) (as, addr + offset, entry_point, 0, NULL); + /* Entry-point is stored in the 1st word of the function descriptor. + In case that changes in the future, we'd have to update the line + below and read the word at addr + offset: */ + ret = (*a->access_mem) (as, addr, entry_point, 0, NULL); if (ret < 0) - return ret; + return ret; return 0; } |