Rump uses the concept of Namespacing to segregate system calls. Now the C
Programming language does not incorporate the concept of Namespaces for function
calls, something that got introduced with C++. Historically when the C language
was designed, this was not a necessitiy at the time and introducing this feature
into later revisions of C might actually have broken backward compatibility.

Which brings us to the original question how did the author of Rumpkernel
(pooka@) manage to get namespacing into the existing NetBSD code base to
segregate system / kernel calls that would be directed to stuff within the Rump
vs the calls that would go into the Host Operating system.

He clevery used objcopy to create a new namespace by renaming the existing one
after the creation of the libraries that rump uses. Anything that is not named
as rump or RUMP is prefixed with rumpns_ which creates an isolated
namespace where all calls are redirected to the Rump kernel system rather than
the host kernel.

An small excerpt from Makefile.rump that shows how the renaming of namespace
is done.

for renameobj in ${RUMP_SYMREN:U${.ALLSRC:C/(${RUMPOBJ_NORENAME:ts|})//g}}; do \
        ${NM} -go $${renameobj} | ${TOOL_AWK} ' \
		    $$NF!~/^'${_PQ}'(rump|RUMP|__|_GLOBAL_OFFSET_TABLE'${_SYMQUIRK}'${RUMP_SYM_NORENAME:D|${RUMP_SYM_NORENAME}})/ \
			  {s=$$NF;sub(/^'${_PQ}'/, "&rumpns_", s); print $$NF, s}'\
			| sort | uniq  > renametab.$${renameobj}; \
		${OBJCOPY} --preserve-dates --redefine-syms \
			renametab.$${renameobj} $${renameobj}; \
        rm -f renametab.$${renameobj}; \
done

So that being said, I still needed to figure out how to use this implementation
to our advantage in uvm testing, what all should I rename, should I bring in the
uvm_physseg implementation into Rump or just include the files directly and
allow the compiler to do it’s job.