From 3f6410003f2588de10b383a6ed172a512a6ad0ca Mon Sep 17 00:00:00 2001 From: Arjan Oortgiese Date: Tue, 13 Sep 2016 15:27:19 +0200 Subject: [PATCH] Use relative addresses from __ARRAY__ for PIC compiled binaries (e.g. Android) --- common/copy_graph_to_string.c | 2 +- common/copy_string_to_graph.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/copy_graph_to_string.c b/common/copy_graph_to_string.c index a91f01d..ddd9658 100644 --- a/common/copy_graph_to_string.c +++ b/common/copy_graph_to_string.c @@ -21,7 +21,7 @@ # endif #endif -#if defined (MACH_O64) +#if defined (MACH_O64) || defined (PIC) // Use positions relative to _ARRAY_ for address space layout randomization systems. # define USE_DESC_RELATIVE_TO_ARRAY 1 #endif diff --git a/common/copy_string_to_graph.c b/common/copy_string_to_graph.c index 87abc5a..8f4a36e 100644 --- a/common/copy_string_to_graph.c +++ b/common/copy_string_to_graph.c @@ -21,7 +21,7 @@ # endif #endif -#if defined (MACH_O64) +#if defined (MACH_O64) || defined (PIC) // Use positions relative to _ARRAY_ for address space layout randomization systems. # define USE_DESC_RELATIVE_TO_ARRAY 1 #endif -- GitLab