|
From: Harris, J. <Je...@ai...> - 2007-08-15 14:05:47
Attachments:
valgrind-softfloat.patch
valgrind-8xx.patch
|
I have attached two patches for Valgrind 3.2.3 to support the PPC 8xx family of processors. =20 The 8xx patch adds support for the 860's 16 byte cache line size. The patch also includes support for an additional instruction to access the PVR special purpose register, SPR number 287. This register is required for GLIBC 2.3.6 support on the 8xx family to determine which processor model is being used. I simply modified the existing code to retrieve other SPR registers to make it slightly more generic. The softfloat patch is perhaps slightly more questionable. I am using GCC 4.2.1 with soft-float and GLIBC 2.3.6. With this combination, libgcc.a contains undefined references to the abort function in some of the soft floating point functions. The linker was generating an error when building memcheck. Rather than linking against libc.a, I chose to simply allow the symbol to remain undefined. A simple run of "valgrind -v /bin/ls" works fine. I have not attempted to recreate the condition under which the abort function would be called. I suspect it is under some overflow condition. =20 I also tried to add "-lc" to link the tools against libc.a. The tools built successfully, and a simple run of the program worked. I did notice a fair number of functions being added from libc.a, probably to resolve all of the dependencies on abort(). =20 Is there a better workaround for this situation? Is either method preferred? It does seem like the tools take some care to avoid libc, so the first option seems better. Jeff |