Hanning wrote:

>    object=/mnt/s_10/usr/lib/libc.so.1; filter for /usr/lib/ld.so.1
> 
>    object=/mnt/s_10/usr/lib/libc.so.1; filter for libm.so.2
> 
>    ....
>
>    object=/mnt/s_10/usr/lib/libc.so.1; filter for 
> /platform/$PLATFORM/lib/libc_psr.so.1

ld.so.1 and libm.so.2 are required by libc.so.1 - they're referenced as
standard filters.  You could put both of these in your "secure" directory.

libc_psr.so.1 contains optimizations for libc.so.1, and is referenced as
an auxiliary filter.  This library doesn't need to exist, as the associated
routines in libc.so.1 act as a fall-back.

So, if you wanted a self contained home for your objects you could:

   % cp /lib/libc.so.1 .
   % cp /lib/libm.so.2 .
   % cp /lib/ld.so.1 .
   % LD_OPTIONS=-I./ld.so.1 cc -o memdump memdump.c
   % LD_LIBRARY_PATH=. LD_NOAUXFLTR=yes ./memdump
   ...
   % pmap -x 19147
   19147:  ./main
     Address  Kbytes     RSS    Anon  Locked Mode   Mapped File
    00010000       8       8       -       - r-x--  memdump
    00020000       8       8       8       - rwx--  memdump
    FF100000     648     648       -       - r-x--  libm.so.2
    FF1B0000       8       8       8       - rwx--  libm.so.2
    FF200000    1296    1296       -       - r-x--  libc.so.1
    FF354000      32      32      32       - rwx--  libc.so.1
    FF35C000       8       8       8       - rwx--  libc.so.1
    FF370000       8       8       8       - rwx--    [ anon ]
    FF380000      24      16      16       - rwx--    [ anon ]
    FF390000       8       8       8       - rw---    [ anon ]
    FF3A0000       8       8       8       - rw---    [ anon ]
    FF3B0000     216     216       -       - r-x--  ld.so.1
    FF3F6000       8       8       8       - rwx--  ld.so.1
    FF3F8000       8       8       8       - rwx--  ld.so.1
    FFBFC000      16      16      16       - rwx--    [ stack ]

I make no claims over how "secure" this set of objects are :-)

Plus, you should make sure that the copies you've made remain
compatible with the underlying system.  ld.so.1 and libc.so.1
are tightly coupled with themselves and the underlying kernel.

--
Rod.

Reply via email to