[PATCH] Replace libelf nested functions with macros.