Commit 389151e6 authored by Kalesh Singh's avatar Kalesh Singh Committed by Treehugger Robot
Browse files

ANDROID: 16K: Check for ELF file before marking padding



The existing code checks if a file ends with ".so" to identify it as a
shared library before applying page size migration padding. However,
this can lead to incorrect behavior if a non-ELF file happens to have
a ".so" suffix.

Introduce the is_elf_file() helper function to verify that the file is a
valid ELF file by checking for the magic number before proceeding with
the file name check. This ensures that page padding is only applied to
actual ELF .so files.

Bug: 444312693
Change-Id: Id1b38e03ba436aa648cbc722cb19e2429a8d0ebe
Signed-off-by: default avatarKalesh Singh <kaleshsingh@google.com>
parent b33cc4fb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment