FAQ Search Today's Posts Mark Forums Read

» Linux Archive
Home
New Posts
Search
FAQ


Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 04-15-2008, 09:34 PM
Cliff Wickman
 
Default x86_64 crash (cross-platform)

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@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@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@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
------------------------------------------------------------------------

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 04-15-2008, 09:43 PM
Chip Coldwell
 
Default x86_64 crash (cross-platform)

On Tue, 15 Apr 2008, Cliff Wickman wrote:

>
> 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?

This isn't specific to crash; it's the result of a change in the
Linux/glibc ABI. Specifically, the new ABI has a .hash.gnu section
whereas the old one has .hash. Your linker option above causes both
sections to be included, so that the old dynamic loader can load a
binary built with a new toolchain.

Chip

--
Charles M. "Chip" Coldwell
Senior Software Engineer
Red Hat, Inc
978-392-2426

GPG ID: 852E052F
GPG FPR: 77E5 2B51 4907 F08A 7E92 DE80 AFA9 9A8F 852E 052F

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 02:41 AM.

VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org