Use function pointer instead of if statement in load.c when using static data.