In order to run the application, the LD_LIBRARY_PATH environment variable must again be set to the directory where regs.so resides.%cc -n32 -O -shared -o regs.so regs.s
%cc -n32 -O -o app1 main.c foo.c gp.s regs.so
Running the application produces the following results. Note that the values of some of the returned registers are different from those returned by the o32 version of app1.%setenv LD_LIBRARY_PATH .
%app1
gp is 0x100090e8
Number of Arguments is: 7
3.140000e+00
first double precision argument is 1.000000e+00
second double precision argument is 2.000000e+00
Back from assembly routine
gp is 0x5fff8ff0
ra is 0x10000d68
sp is 0x7fff2e30
result of double precision add is 3.000000e+00