bionic: loader: Log failures to load incompatible 4KiB-ELFs
When loading ELFs with 4KiB segment alignment on a 16KiB page size
device, log the failures to facilitate analysis from CI by logcat
inspection.
Bug: 392190858
Test: manual; check logcat for error message
Change-Id: If2df53931c141b03b5512ae94650767fcfbb7095
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
diff --git a/linker/linker_phdr.cpp b/linker/linker_phdr.cpp
index e695efd..5967e2d 100644
--- a/linker/linker_phdr.cpp
+++ b/linker/linker_phdr.cpp
@@ -979,8 +979,8 @@
// Apps may rely on undefined behavior here on 4 KB systems,
// which is the norm before this change is introduced
if (kPageSize >= 16384 && min_align_ < kPageSize && !should_use_16kib_app_compat_) {
- DL_ERR("\"%s\" program alignment (%zu) cannot be smaller than system page size (%zu)",
- name_.c_str(), min_align_, kPageSize);
+ DL_ERR_AND_LOG("\"%s\" program alignment (%zu) cannot be smaller than system page size (%zu)",
+ name_.c_str(), min_align_, kPageSize);
return false;
}