linker: LoadSegments: Factor out DropPaddingPages()
This is a preparatory patch for 16KiB app compat. No functional change
is introduced.
Bug: 339709616
Test: atest -c linker-unit-tests
Change-Id: Ibd11ef972094fcc8406a1ff93b3adbfb82b7c8ad
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
diff --git a/linker/linker_phdr.h b/linker/linker_phdr.h
index 4028062..33e55ac 100644
--- a/linker/linker_phdr.h
+++ b/linker/linker_phdr.h
@@ -70,6 +70,7 @@
[[nodiscard]] bool ReserveAddressSpace(address_space_params* address_space);
[[nodiscard]] bool MapSegment(size_t seg_idx, size_t len);
void ZeroFillSegment(const ElfW(Phdr)* phdr);
+ void DropPaddingPages(const ElfW(Phdr)* phdr, uint64_t seg_file_end);
[[nodiscard]] bool LoadSegments();
[[nodiscard]] bool FindPhdr();
[[nodiscard]] bool FindGnuPropertySection();