From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew F. Davis Date: Tue, 21 Jan 2020 07:47:48 -0500 Subject: [PATCH v3 01/10] lib: elf: Move the generic elf loading/validating functions to lib In-Reply-To: <20200121110749.28714-2-j-keerthy@ti.com> References: <20200121110749.28714-1-j-keerthy@ti.com> <20200121110749.28714-2-j-keerthy@ti.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 1/21/20 6:07 AM, Keerthy wrote: > Move the generic elf loading/validating functions to lib/ > so that they can be re-used and accessed by code existing > outside cmd. > > Signed-off-by: Keerthy > Suggested-by: Simon Goldschmidt > Reviewed-by: Simon Goldschmidt > --- > diff --git a/include/elf.h b/include/elf.h > index 81f40191d7..e7c51986df 100644 > --- a/include/elf.h > +++ b/include/elf.h > @@ -692,6 +692,10 @@ unsigned long elf_hash(const unsigned char *name); > > #ifndef __ASSEMBLER__ > int valid_elf_image(unsigned long addr); > +unsigned long load_elf64_image_phdr(unsigned long addr); > +unsigned long load_elf64_image_shdr(unsigned long addr); > +unsigned long load_elf_image_phdr(unsigned long addr); > +unsigned long load_elf_image_shdr(unsigned long addr); > #endif > > #endif /* _ELF_H */ > diff --git a/lib/Kconfig b/lib/Kconfig > index d040a87d26..b155ced4b2 100644 > --- a/lib/Kconfig > +++ b/lib/Kconfig > @@ -601,4 +601,7 @@ config TEST_FDTDEC > config LIB_DATE > bool > > +config ELF LIB_ELF? Andrew