Exec just creates a new environment, loads the new process into it, and then kills itself. The shared library is also mapped into the upper part of the user address space.
Shared libraries are implemented pretty poorly right now. Currently, they are just a program that has every libc function linked in. A stub .S file is then generated that points to the location of each symbol and a program wishing to link against the shared library just links against this stub file. exec then makes sure that each symbol is really where this stub file says it is by mapping in the shared library at the right place.
Exec must also run through all the ExOS subsystems and notify them that an exec has occurred so that they can update their reference counts and other data.