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
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Anne M. Hammond  
View profile  
 More options Jul 19 2002, 4:00 pm
Newsgroups: comp.sys.sun.admin
From: "Anne M. Hammond" <Anne.Hamm...@Colorado.EDU>
Date: Fri, 19 Jul 2002 13:52:46 -0600
Local: Fri, Jul 19 2002 3:52 pm
Subject: Re: Cannot find ELF
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.