aboutsummaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2012-02-28 10:40:00 -0800
committerNick Kralevich <nnk@google.com>2012-03-05 16:44:42 -0800
commit9ec0f03a0d0b17bbb94ac0b9fef6add28a133c3a (patch)
treedde5e86b6ae51f92087a9034750c282e11884164 /libc
parent1fe109ecf3b1acd10d55091f3e0eed7efeca98f1 (diff)
downloadandroid_bionic-9ec0f03a0d0b17bbb94ac0b9fef6add28a133c3a.tar.gz
android_bionic-9ec0f03a0d0b17bbb94ac0b9fef6add28a133c3a.tar.bz2
android_bionic-9ec0f03a0d0b17bbb94ac0b9fef6add28a133c3a.zip
Add relro support
Add support for PT_GNU_RELRO. This allows the static linker to indicate that certain regions of memory should be marked as "read-only" after dynamic linking is complete. See: * http://www.akkadia.org/drepper/nonselsec.pdf (section 6) * http://tk-blog.blogspot.com/2009/02/relro-not-so-well-known-memory.html Note that this change has no effect on Android right now, because we don't compile our code with relro enabled. Change-Id: I6541f8775367e8558b4388f7d105b1ae6e8f046b
Diffstat (limited to 'libc')
-rw-r--r--libc/include/sys/exec_elf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/include/sys/exec_elf.h b/libc/include/sys/exec_elf.h
index 03bbdac5e..eecbd647a 100644
--- a/libc/include/sys/exec_elf.h
+++ b/libc/include/sys/exec_elf.h
@@ -130,4 +130,6 @@
#define STT_LOPROC 13 /* reserved range for processor */
#define STT_HIPROC 15 /* specific symbol types */
+#define PT_GNU_RELRO 0x6474e552 /* Read-only post relocation */
+
#endif /* _SYS_EXEC_ELF_H_ */