lib: elf: Move the generic elf loading/validating functions to lib

Move the generic elf loading/validating functions to lib/
so that they can be re-used and accessed by code existing
outside cmd.

While at it remove the duplicate static version of load_elf_image_phdr
under arch/arm/mach-imx/imx_bootaux.c.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Suggested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
diff --git a/lib/Kconfig b/lib/Kconfig
index ab6aff7..452f390 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -602,4 +602,10 @@
 config LIB_DATE
 	bool
 
+config LIB_ELF
+	bool
+	help
+	  Supoort basic elf loading/validating functions.
+	  This supports fir 32 bit and 64 bit versions.
+
 endmenu