From 33c93164819ea3de9c0358dbf124b9de88b3964f Mon Sep 17 00:00:00 2001 From: Stefano Moioli Date: Thu, 4 Apr 2024 20:45:24 +0200 Subject: [PATCH] fix elf_get_code_size prototype, and rename accordingly elf_get_code_size -> elf_get_code_segment --- xzre.h | 8 ++++---- xzre.lds | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xzre.h b/xzre.h index badcb37..dfd450d 100644 --- a/xzre.h +++ b/xzre.h @@ -534,13 +534,13 @@ extern Elf64_Sym *elf_symbol_get(elf_info_t *elf_info, u32 encoded_string_id, co extern void *elf_symbol_get_addr(elf_info_t *elf_info, u32 encoded_string_id); /** - * @brief Obtains the size of the first executable page in the given ELF file + * @brief Obtains the address and size of the first executable page in the given ELF file * * @param elf_info the parsed ELF context, which will be updated with the address and size of the code segment - * @param pSize variable that will hold the page-aligned segment size - * @return BOOL TRUE on success, FALSE if the executable segment wasn't found + * @param pSize variable that will be populated with the page-aligned segment size + * @return the page-aligned virtual address of the executable code segment */ -extern BOOL elf_get_code_size(elf_info_t *elf_info, u64 *pSize); +extern u64 elf_get_code_segment(elf_info_t *elf_info, u64 *pSize); /** * @brief gets the fake LZMA allocator, used for imports resolution diff --git a/xzre.lds b/xzre.lds index a6f3c09..9b2048e 100644 --- a/xzre.lds +++ b/xzre.lds @@ -33,7 +33,7 @@ SECTIONS { "elf_symbol_get_addr" = "."; *(.text.crc64_generia); - "elf_get_code_size" = "."; + "elf_get_code_segment" = "."; *(.text.lzma_check_updata); "secret_data_append_if_flags" = ".";