Check alignment along with range of mapped file fragments
Improve sanity-checks of elf-file by adding alignment check
of mapped sections and section headers.
Bug: http://b/30687964
Change-Id: I7f06ddaa56a13989ce7be847b3a73c352e32c008
(cherry picked from commit 7e2d49ae3ebbae7ebf1ca033f86e87002c0dd83c)
diff --git a/linker/linker_globals.h b/linker/linker_globals.h
index 265af27..b6f8a04 100644
--- a/linker/linker_globals.h
+++ b/linker/linker_globals.h
@@ -49,6 +49,12 @@
__libc_format_fd(2, "\n"); \
} while (false)
+#define DL_ERR_AND_LOG(fmt, x...) \
+ do { \
+ DL_ERR(fmt, x); \
+ PRINT(fmt, x); \
+ } while (false)
+
constexpr ElfW(Versym) kVersymNotNeeded = 0;
constexpr ElfW(Versym) kVersymGlobal = 1;