r5150: consolidate the samr_make.*obj_sd() functions to share code