Add a test for unloading object files in the linker (#8039)