From db314d69f023d2a6c8956073aa9d283e20b280ef Mon Sep 17 00:00:00 2001 From: Hristo Bojinov Date: Mon, 2 Aug 2010 10:29:49 -0700 Subject: Working ASLR implementation Separate files for retouch functionality are in minelf/* ASLR for shared libraries is controlled by "-a" in ota_from_target_files. Binary files are self-contained. Retouch logic can recover from crashes. Signed-off-by: Hristo Bojinov Change-Id: I76c596abf4febd68c14f9d807ac62e8751e0b1bd --- applypatch/applypatch.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'applypatch/applypatch.h') diff --git a/applypatch/applypatch.h b/applypatch/applypatch.h index 10c01259a..a78c89bfe 100644 --- a/applypatch/applypatch.h +++ b/applypatch/applypatch.h @@ -19,6 +19,7 @@ #include #include "mincrypt/sha.h" +#include "minelf/Retouch.h" #include "edify/expr.h" typedef struct _Patch { @@ -59,10 +60,12 @@ int applypatch_check(const char* filename, int num_patches, char** const patch_sha1_str); -// Read a file into memory; store it and its associated metadata in -// *file. Return 0 on success. -int LoadFileContents(const char* filename, FileContents* file); +int LoadFileContents(const char* filename, FileContents* file, + int retouch_flag); +int SaveFileContents(const char* filename, FileContents file); void FreeFileContents(FileContents* file); +int FindMatchingPatch(uint8_t* sha1, char** const patch_sha1_str, + int num_patches); // bsdiff.c void ShowBSDiffLicense(); -- cgit v1.2.3