mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-04 17:09:25 +01:00
[PPC64] Add PPC64 entry to README and fix David's typo in ppc64/get_func_addr.c
This commit is contained in:
parent
e6b9f350f7
commit
3e24581adc
2 changed files with 23 additions and 3 deletions
18
README
18
README
|
@ -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
|
GCC v3.3.2 or later have been fixed and do not require this
|
||||||
workaround.
|
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
|
* Regression Testing
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,11 @@ tdep_get_func_addr (unw_addr_space_t as, unw_word_t addr,
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
a = unw_get_accessors (as);
|
a = unw_get_accessors (as);
|
||||||
/* entry-point is stored in the 1st word of the function descriptor: */
|
/* Entry-point is stored in the 1st word of the function descriptor.
|
||||||
ret = (a->access_mem) (as, addr + offset, entry_point, 0, NULL);
|
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)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue