[Crash-utility] x86_64 crash (cross-platform)

Cliff Wickman cpw at sgi.com
Tue Apr 15 20:34:38 UTC 2008


Hi Dave,

We've recently seen lcrash fail with a floating point exception
very early in initialization.
Seems to be a binary compiled under one distribution and then
executed on another.

And the solution seems to be the -Wl,--hash-style=both option.

Have others reported this?
There must be a cleaner solution than in my notes below.   That is,
an easier way to link with this option.

Thanks.
-Cliff
--------------------------------------------------------------------------

To make crash so that it runs under SLES or RedHat:
cd /home/estes02/cpw/crash-4.0-6.2
make

Compile it on a SLES system:
good:
cpw at spandau:/tmp/cpw/crash-4.0-6.2> readelf -S crash | grep -A1 hash 
  [ 4] .hash             HASH             0000000000400290  00000290
       0000000000009490  0000000000000004   A       5     0     8
on a RHEL:
bad:
cpw at alcatraz crash-4.0-6.2 $ readelf -S crash | grep -A1 hash
  [ 3] .gnu.hash         GNU_HASH         0000000000400240  00000240
       000000000000a040  0000000000000000   A       4     0     8
OR

vi gdb-6.1/gdb/configure
---
  if test "$GCC" = yes; then
    CFLAGS="-g -O2 -Wl,--hash-style=both"
  else
    CFLAGS="-g -Wl,--hash-style=both"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2 -Wl,--hash-style=both"
  else
    CFLAGS="-Wl,--hash-style=both"
---
make
readelf -S crash | grep -A1 hash   (should show GNU form)

cpw at alcatraz crash-4.0-6.2 $ readelf -S crash | grep -A1 hash
  [ 3] .hash             HASH             0000000000400240  00000240
       0000000000009490  0000000000000004   A       5     0     8
  [ 4] .gnu.hash         GNU_HASH         00000000004096d0  000096d0
       000000000000a040  0000000000000000   A       5     0     8
------------------------------------------------------------------------




More information about the Crash-utility mailing list