This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] or1k: increase linux TEXT_START_ADDR to 0x2000


I've committed the following patch, which prevents or1k Linux
executables from being mapped at address 0.
Apart from the obvious benefit that userspace null pointer
de-referencing can be caught, it also fixes a problem
where the kernel would be provided a null pointer as
the end of a robust_list.

Stefan

Override the default value of 0x0000 defined in
TEXT_START_ADDR to avoid linux executables to be mapped
at zero page.

ld/
	* emulparams/elf32or1k_linux.sh (TEXT_START_ADDR): Increase from
	0x0 to first page boundary at 0x2000.
---
 ld/ChangeLog                     | 5 +++++
 ld/emulparams/elf32or1k_linux.sh | 1 +
 2 files changed, 6 insertions(+)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index a39e29e..9354e64 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2014-07-17  Stefan Kristiansson  <stefan.kristiansson@saunalahti.fi>
+
+	* emulparams/elf32or1k_linux.sh (TEXT_START_ADDR): Increase from
+	0x0 to first page boundary at 0x2000.
+
 2014-07-10  Max Filippov  <jcmvbkbc@gmail.com>
 
 	* emultempl/xtensaelf.em (is_inconsistent_linkonce_section):
diff --git a/ld/emulparams/elf32or1k_linux.sh b/ld/emulparams/elf32or1k_linux.sh
index a5bf129..80ef51c 100644
--- a/ld/emulparams/elf32or1k_linux.sh
+++ b/ld/emulparams/elf32or1k_linux.sh
@@ -3,3 +3,4 @@ unset EMBEDDED
 GENERATE_SHLIB_SCRIPT=yes
 GENERATE_PIE_SCRIPT=yes
 GENERATE_COMBRELOC_SCRIPT=yes
+TEXT_START_ADDR=0x00002000
-- 
1.8.3.2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]