|
From: <sv...@va...> - 2013-04-22 09:53:46
|
sewardj 2013-04-22 10:57:01 +0100 (Mon, 22 Apr 2013)
New Revision: 13375
Log:
Android's elf.h doesn't have PT_GNU_STACK (sigh) and so r13368 broke
the build. This conditionalises that fragment on the present of
PT_GNU_STACK.
Modified files:
trunk/coregrind/m_ume/elf.c
Modified: trunk/coregrind/m_ume/elf.c (+5 -2)
===================================================================
--- trunk/coregrind/m_ume/elf.c 2013-04-21 00:43:49 -23:00 (rev 13374)
+++ trunk/coregrind/m_ume/elf.c 2013-04-22 10:57:01 +01:00 (rev 13375)
@@ -315,9 +315,9 @@
entry point and initial tocptr (R2) value. */
ESZ(Word) interp_offset = 0;
-#ifdef HAVE_PIE
+# if defined(HAVE_PIE)
ebase = info->exe_base;
-#endif
+# endif
e = readelf(fd, name);
@@ -417,11 +417,14 @@
}
break;
+# if defined(PT_GNU_STACK)
+ /* Android's elf.h doesn't appear to have PT_GNU_STACK. */
case PT_GNU_STACK:
if ((ph->p_flags & PF_X) == 0) info->stack_prot &= ~VKI_PROT_EXEC;
if ((ph->p_flags & PF_W) == 0) info->stack_prot &= ~VKI_PROT_WRITE;
if ((ph->p_flags & PF_R) == 0) info->stack_prot &= ~VKI_PROT_READ;
break;
+# endif
default:
// do nothing
|