Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Cannot find ELF

Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!news-hog.berkeley.edu!ucberkeley!news.colorado.edu!not-for-mail
From: "Anne M. Hammond" <Anne.Hamm...@Colorado.EDU>
Newsgroups: comp.sys.sun.admin
Subject: Re: Cannot find ELF
Date: Fri, 19 Jul 2002 13:57:02 -0600
Organization: University of Colorado, Boulder
Lines: 53
Message-ID: <3D386F0E.D03DA8B@Colorado.EDU>
References: <3D2C9846.CEC3CB0B@Colorado.EDU> <agihp1$ltbko$1@fu-berlin.de> <3D34A058.6124A764@Colorado.EDU>
NNTP-Posting-Host: electra.colorado.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: peabody.colorado.edu 1027108625 4829 128.138.188.148 (19 Jul 2002 19:57:05 GMT)
X-Complaints-To: abuse@colorado.edu
NNTP-Posting-Date: 19 Jul 2002 19:57:05 GMT
Cc: hamm...@Colorado.EDU
X-Mailer: Mozilla 4.78C-SGI [en] (X11; I; IRIX 6.5 IP32)
X-Accept-Language: en

This is the result of gnu strip incorrectly stripping
parts of the object file (man strip) when the file had
been compiled with gcc and when using the Solaris loader.

Strip is used to save filesystem and memory space after
the object file has been tested and is ready for installation.
As you can see, the resultant file is about 20% the size of
the original:

-rwxr-xr-x   1 root      4359576 Jul 18 15:12 ./ssh
-rwxr-xr-x   1 root       933876 Jul 18 15:15 ssh  (installed version)

To solve this problem of the executable not containing the
full information, use /usr/ccs/bin/strip instead of
/usr/local/bin/strip.  Either setenv PATH so that /usr/ccs/bin
is first, or edit install-sh:
  #stripprog="${STRIPPROG-strip}"
  stripprog=/usr/ccs/bin/strip

You can diagnose this by running the ldd utility on the object
file in the compile directory, and on the installed binary:

lcd 255# ldd ./ssh
        libz.so =>       /usr/local/lib/libz.so
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1

lcd 256# ldd /usr2/newssh/bin/ssh
ldd: /usr2/newssh/bin/ssh: file has insecure interpreter ELF

Below is an ls of the object file in the compile directory, and
in the installion directory, when /usr/ccs/bin/strip is used.
/usr/ccs/bin/strip actually creates a smaller executable than
gnu's strip:

-rwxr-xr-x   1 root      4359576 Jul 18 15:12 ./ssh
-rwxr-xr-x   1 root       891380 Jul 19 12:57 /usr2/newssh/bin/ssh

LD_LIBRARY_PATH does not have anything to do with this problem.
There may be options to gnu's strip, but I haven't investigated
this.

Another fix is to run gnu strip twice on the object file.
I didn't try this.  Since make install doesn't run strip twice,
using /usr/ccs/bin/strip seems a better solution.

Thanks to Tino Reinhardt for solving this problem.

Anne Hammond