[100113] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Static linking, but resolv libraries needed in chrooted environment?

daemon@ATHENA.MIT.EDU (Mike Blatchley)
Wed Nov 18 14:30:57 1998

Date: Wed, 18 Nov 1998 12:30:17 -0700 (MST)
From: Mike Blatchley <mblatch@rocky.orci.com>
Reply-To: Mike Blatchley <mblatch@orci.com>
To: redhat-list@redhat.com
Resent-From: redhat-list@redhat.com

I am running an application chrooted to a protected directory.  The
program calls functions such as getpeername, gethostbyaddr, gethostbyname,
and res_query.  Even though I have statically linked the app, I must put
copies of many of the .so system libs in the chrooted environment for it
to run correctly.  My system is a RH5.1 Intel installation. 

After building the object's, I'm linking with the following:
  gcc -g -static -o smap smap.o arpadate.o ../libfwall.a -lresolv -lcrypt -lpthread

But then, "nm --undefined smap" returns:
  __gmon_start__
  __nss_aliases_database
  __nss_ethers_database
  __nss_netgroup_database
  __nss_networks_database
  __nss_publickey_database
  __nss_rpc_database
  __nss_services_database
  __nss_shadow_database
  __pthread_initialize
  _dl_rtld_map
  _dl_starting_up
  _dl_sysdep_start
  _nl_C_LC_MESSAGES
  _nl_current_LC_MESSAGES

I have lib's such as ld, ld-linux, libc, libnsl, libnss*, libresolv in the
chrooted environment, but I'd like to eliminate this need.  Apparently
these still will be dynamically linked on execution.  Anybody know how to
get these wrapped into the executable on a Linux machine; I've talked with
people running on different architectures, and they havn't had this
problem. 

Thanks,

Mike 
mblatch@orci.com



-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post