diff mbox series

[01/10] cmd: elf: Export out load_elf_image_phdr

Message ID 20200110102333.22767-2-j-keerthy@ti.com
State New
Headers show
Series arm: k3: Add support for loading main_r5fss0_core0 | expand

Commit Message

J, KEERTHY Jan. 10, 2020, 10:23 a.m. UTC
Export out load_elf_image_phdr so that it can be reused to load
elf segments outside cmd/elf

Signed-off-by: Keerthy <j-keerthy at ti.com>
---
 cmd/elf.c     | 4 ++--
 include/elf.h | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/cmd/elf.c b/cmd/elf.c
index 32f12a72b9..ea76fb42aa 100644
--- a/cmd/elf.c
+++ b/cmd/elf.c
@@ -33,7 +33,7 @@ 
  * Note if U-Boot is 32-bit, the loader assumes the to segment's
  * physical address and size is within the lower 32-bit address space.
  */
-static unsigned long load_elf64_image_phdr(unsigned long addr)
+unsigned long load_elf64_image_phdr(unsigned long addr)
 {
 	Elf64_Ehdr *ehdr; /* Elf header structure pointer */
 	Elf64_Phdr *phdr; /* Program header structure pointer */
@@ -145,7 +145,7 @@  static unsigned long load_elf64_image_shdr(unsigned long addr)
  * The loader firstly reads the EFI class to see if it's a 64-bit image.
  * If yes, call the ELF64 loader. Otherwise continue with the ELF32 loader.
  */
-static unsigned long load_elf_image_phdr(unsigned long addr)
+unsigned long load_elf_image_phdr(unsigned long addr)
 {
 	Elf32_Ehdr *ehdr; /* Elf header structure pointer */
 	Elf32_Phdr *phdr; /* Program header structure pointer */
diff --git a/include/elf.h b/include/elf.h
index 81f40191d7..a951570686 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -692,6 +692,8 @@  unsigned long elf_hash(const unsigned char *name);
 
 #ifndef __ASSEMBLER__
 int valid_elf_image(unsigned long addr);
+unsigned long load_elf_image_phdr(unsigned long addr);
+unsigned long load_elf64_image_phdr(unsigned long addr);
 #endif
 
 #endif /* _ELF_H */