Print this page
6282 ONBLD man pages not pbchk clean
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Josef Sipek <jeffpc@josefsipek.net>
   1 find_elf(1ONBLD)              illumos Build Tools             find_elf(1ONBLD)
   2 
   3 
   4 
   5 NAME
   6        find_elf - Locate ELF shared objects and executables
   7 
   8 SYNOPSIS
   9        find_elf [-afrs] path
  10 
  11 DESCRIPTION
  12        The find_elf command descends a directory hierarchy and produces one
  13        line of output on stdout for each ELF executable or shared object
  14        found.
  15 
  16 OPTIONS
  17        The following options are supported:
  18 
  19        -a  Disable alias processing. Symbolic links are treated as independent
  20            files, each such link results in a separate OBJECT output line, and
  21            ALIAS lines are not issued.


  80 
  81            % /bin/ls -alRF /usr/lib/foo
  82            /usr/lib/foo:
  83            total 111
  84            drwxr-xr-x  3 root root    7 Jul 16 17:35 ./
  85            drwxr-xr-x 34 root root   42 Jul 16 17:34 ../
  86            lrwxrwxrwx  1 root bin     1 Jul 16 17:34 32 -> ./
  87            lrwxrwxrwx  1 root bin     5 Jul 16 17:34 64 -> amd64/
  88            drwxr-xr-x  2 root bin     4 Jul 16 17:35 amd64/
  89            lrwxrwxrwx  1 root bin    11 Jul 16 17:35 libfoo.so -> libfoo.so.1*
  90            -rwxr-xr-x  1 root bin 49132 Jul 16 17:35 libfoo.so.1*
  91 
  92            /usr/lib/foo/amd64:
  93            total 150
  94            drwxr-xr-x  2 root root   4 Jul 16 17:35 ./
  95            drwxr-xr-x  3 root root   7 Jul 16 17:35 ../
  96            lrwxrwxrwx  1 root bin    11 Jul 16 17:35 libfoo.so -> libfoo.so.1*
  97            -rwxr-xr-x  1 root bin 72536 Jul 16 17:35 libfoo.so.1*
  98 
  99        This hierarchy contains compilation symlinks (libfoo.so) and path alias
 100        symlinks (32, 64), as discussed in OUTPUT.  find_elf produces the
 101        following output for the above hierarchy:
 102 


 103            % find_elf -r /usr/lib/foo
 104            PREFIX /usr/lib/foo
 105            OBJECT 64 DYN  VERDEF  amd64/libfoo.so.1
 106            ALIAS                  amd64/libfoo.so.1  64/libfoo.so
 107            ALIAS                  amd64/libfoo.so.1  64/libfoo.so.1
 108            ALIAS                  amd64/libfoo.so.1  amd64/libfoo.so
 109            OBJECT 32 DYN  VERDEF  libfoo.so.1
 110            ALIAS                  libfoo.so.1        32/libfoo.so
 111            ALIAS                  libfoo.so.1        32/libfoo.so.1
 112            ALIAS                  libfoo.so.1        libfoo.so
 113 
 114        Contrast this with the output when -a is used to treat each name as an
 115        independent file:
 116 
 117            % find_elf -ar /usr/lib/foo
 118            PREFIX /usr/lib/foo
 119            OBJECT 32 DYN  VERDEF  32/libfoo.so
 120            OBJECT 32 DYN  VERDEF  32/libfoo.so.1
 121            OBJECT 64 DYN  VERDEF  64/libfoo.so
 122            OBJECT 64 DYN  VERDEF  64/libfoo.so.1


 128        When find_elf is used to process an alias for which no target object is
 129        given, there will be no output. For example, using /lib/libc.so, which
 130        is a compilation symlink for /lib/libc.so.1:
 131 
 132            % find_elf /lib/libc.so
 133 
 134        In such situations, the -a option can be used to produce the desired
 135        output:
 136 
 137            % find_elf -a /lib/libc.so
 138            OBJECT 32 DYN  VERDEF   /lib/libc.so
 139 
 140 
 141 
 142 SEE ALSO
 143        check_rtime(1ONBLD), interface_check(1ONBLD), interface_cmp(1ONBLD),
 144        ld(1), ldd(1), elfdump(1), pvs(1).
 145 
 146 
 147 
 148                                  25 March 2010                find_elf(1ONBLD)

   1 FIND_ELF(1ONBLD)              illumos Build Tools             FIND_ELF(1ONBLD)
   2 
   3 
   4 
   5 NAME
   6        find_elf - Locate ELF shared objects and executables
   7 
   8 SYNOPSIS
   9        find_elf [-afrs] path
  10 
  11 DESCRIPTION
  12        The find_elf command descends a directory hierarchy and produces one
  13        line of output on stdout for each ELF executable or shared object
  14        found.
  15 
  16 OPTIONS
  17        The following options are supported:
  18 
  19        -a  Disable alias processing. Symbolic links are treated as independent
  20            files, each such link results in a separate OBJECT output line, and
  21            ALIAS lines are not issued.


  80 
  81            % /bin/ls -alRF /usr/lib/foo
  82            /usr/lib/foo:
  83            total 111
  84            drwxr-xr-x  3 root root    7 Jul 16 17:35 ./
  85            drwxr-xr-x 34 root root   42 Jul 16 17:34 ../
  86            lrwxrwxrwx  1 root bin     1 Jul 16 17:34 32 -> ./
  87            lrwxrwxrwx  1 root bin     5 Jul 16 17:34 64 -> amd64/
  88            drwxr-xr-x  2 root bin     4 Jul 16 17:35 amd64/
  89            lrwxrwxrwx  1 root bin    11 Jul 16 17:35 libfoo.so -> libfoo.so.1*
  90            -rwxr-xr-x  1 root bin 49132 Jul 16 17:35 libfoo.so.1*
  91 
  92            /usr/lib/foo/amd64:
  93            total 150
  94            drwxr-xr-x  2 root root   4 Jul 16 17:35 ./
  95            drwxr-xr-x  3 root root   7 Jul 16 17:35 ../
  96            lrwxrwxrwx  1 root bin    11 Jul 16 17:35 libfoo.so -> libfoo.so.1*
  97            -rwxr-xr-x  1 root bin 72536 Jul 16 17:35 libfoo.so.1*
  98 
  99        This hierarchy contains compilation symlinks (libfoo.so) and path alias
 100        symlinks (32, 64), as discussed in OUTPUT.

 101 
 102        find_elf produces the following output for the above hierarchy:
 103 
 104            % find_elf -r /usr/lib/foo
 105            PREFIX /usr/lib/foo
 106            OBJECT 64 DYN  VERDEF  amd64/libfoo.so.1
 107            ALIAS                  amd64/libfoo.so.1  64/libfoo.so
 108            ALIAS                  amd64/libfoo.so.1  64/libfoo.so.1
 109            ALIAS                  amd64/libfoo.so.1  amd64/libfoo.so
 110            OBJECT 32 DYN  VERDEF  libfoo.so.1
 111            ALIAS                  libfoo.so.1        32/libfoo.so
 112            ALIAS                  libfoo.so.1        32/libfoo.so.1
 113            ALIAS                  libfoo.so.1        libfoo.so
 114 
 115        Contrast this with the output when -a is used to treat each name as an
 116        independent file:
 117 
 118            % find_elf -ar /usr/lib/foo
 119            PREFIX /usr/lib/foo
 120            OBJECT 32 DYN  VERDEF  32/libfoo.so
 121            OBJECT 32 DYN  VERDEF  32/libfoo.so.1
 122            OBJECT 64 DYN  VERDEF  64/libfoo.so
 123            OBJECT 64 DYN  VERDEF  64/libfoo.so.1


 129        When find_elf is used to process an alias for which no target object is
 130        given, there will be no output. For example, using /lib/libc.so, which
 131        is a compilation symlink for /lib/libc.so.1:
 132 
 133            % find_elf /lib/libc.so
 134 
 135        In such situations, the -a option can be used to produce the desired
 136        output:
 137 
 138            % find_elf -a /lib/libc.so
 139            OBJECT 32 DYN  VERDEF   /lib/libc.so
 140 
 141 
 142 
 143 SEE ALSO
 144        check_rtime(1ONBLD), interface_check(1ONBLD), interface_cmp(1ONBLD),
 145        ld(1), ldd(1), elfdump(1), pvs(1).
 146 
 147 
 148 
 149 
 150                                 March 25, 2010                FIND_ELF(1ONBLD)