Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!samsung!uunet!mcsun!sunic!tut!tukki!eloranta From: eloranta@tukki.jyu.fi (Jussi Eloranta) Newsgroups: comp.unix.wizards Subject: Loading object files to running program.. Message-ID: <2547@tukki.jyu.fi> Date: 27 Dec 89 05:57:54 GMT Reply-To: eloranta@tukki.jyu.fi (Jussi Eloranta) Organization: University of Jyvaskyla, Finland Lines: 25 Thanks to everybody who responsed. Here is a quick summary what to do (sunos; bsd without static stuff, I guess): 1) find the address of top of mem. (top = sbrk(0)) 2) do: ld -Bstatic -N -x -A a.out -T top objfile.o -e _entry -o tmpfil libs.a\ -lc (-T top specifies the address) 3) read tmpfil header (total size) and allocate space using sbrk(totsize) 4) read the tmpfil in. 5) call header.a_entry () If anoyone wants the examples I got I can mail those. Jussi -- ============================================================================ Jussi Eloranta Internet(/Bitnet): University of Jyvaskyla, eloranta@tukki.jyu.fi Finland [128.214.7.5]