ChorusOS 4.0 Introduction

Running the Dynamic Program

Copy the dynamic program into the /bin subdirectory of the chorus_root_directory directory:


% cp $WORK/progdyn2dir/progdyn2 chorus_root_directory/bin 

Copy the dynamic library into the /lib subdirectory of the chorus_root_directory directory:


% cp $WORK/libdyn2dir/libdyn2.so chorus_root_directory/lib 

Then, the following command will tell the runtime linker where to find the libdyn2.so dynamic library:


% rsh jericho setenv LD_LIBRARY_PATH /lib

Finally, the following command will start the program:


% rsh jericho arun /bin/progdyn2 

At program start-up, the runtime linker will only load the executable progdyn2. The libdyn2.so library will be loaded when the dlopen() function is called.