Working ASLR implementation.
ASLR for shared libraries is controlled by "-a" in ota_from_target_files.
Binary files are self-contained (supported by apriori/soslim).
Signed-off-by: Hristo Bojinov <hristo@google.com>
Change-Id: I500e325bf4a70a8d69a2ab9b2938e83dadb4e65d
diff --git a/tools/soslim/soslim.c b/tools/soslim/soslim.c
index 125e29e..33b1ee7 100644
--- a/tools/soslim/soslim.c
+++ b/tools/soslim/soslim.c
@@ -27,7 +27,10 @@
#ifdef SUPPORT_ANDROID_PRELINK_TAGS
, int *prelinked,
int *elf_little,
- long *prelink_addr
+ long *prelink_addr,
+ int *retouched,
+ unsigned int *retouch_byte_cnt,
+ char *retouch_buf
#endif
, bool rebuild_shstrtab,
bool strip_debug,
@@ -70,6 +73,11 @@
ASSERT(elf_little);
*elf_little = (ehdr->e_ident[EI_DATA] == ELFDATA2LSB);
*prelinked = check_prelinked(elf_name, *elf_little, prelink_addr);
+ ASSERT(retouched);
+ ASSERT(retouch_byte_cnt);
+ ASSERT(retouch_buf);
+ *retouched = check_retouched(elf_name, *elf_little,
+ retouch_byte_cnt, retouch_buf);
#endif
INFO("\n\nCALCULATING MODIFICATIONS\n\n");