updated pagesize patch

This commit is contained in:
Enrico Scholz 2011-01-09 14:39:48 +01:00
commit c42d5c8550

View file

@ -1,7 +1,7 @@
From abcbc90e768b431ce4e063de8a47ab236feeacf5 Mon Sep 17 00:00:00 2001
From 537a231d89113170b9f761f8a490389f8b1c5cee Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 19 Apr 2008 17:35:14 +0200
Subject: [PATCH 11/18] Support for dynamic PAGE_SIZE
Subject: [PATCH 13/20] Support for dynamic PAGE_SIZE
This patch adds support for dynamic PAGE_SIZE values. It
is a little bit invasive in several aspects:
@ -66,7 +66,7 @@ auxilary elf-info table. Now, this is not available anymore and I
use a type derived from __WORD_SIZE.
---
alpha/start.S | 9 +++++
arm/start.S | 13 +++++++-
arm/start.S | 27 ++++++++++++++-
dietdirent.h | 6 +++-
dietelfinfo.h | 20 +++++++++++
dietfeatures.h | 14 ++++++++
@ -99,7 +99,7 @@ use a type derived from __WORD_SIZE.
test/runtests.sh | 2 +-
test/sysconf.c | 80 +++++++++++++++++++++++++++++++++++++++++++++
x86_64/start.S | 16 +++++++++
34 files changed, 403 insertions(+), 51 deletions(-)
34 files changed, 417 insertions(+), 51 deletions(-)
create mode 100644 dietelfinfo.h
create mode 100644 dietpagesize.h
create mode 100644 lib/__get_elf_aux_value.c
@ -126,10 +126,28 @@ index 7e7cf9b..b13c9c9 100644
/* in v0 ($0) is the ld.so _fini pointer */
mov $0, $19 /* mov v0(dynload) to a3 */
diff --git a/arm/start.S b/arm/start.S
index ccbac48..c9cee01 100644
index d68d49d..765021b 100644
--- a/arm/start.S
+++ b/arm/start.S
@@ -59,11 +59,22 @@ _start:
@@ -25,6 +25,17 @@ _start:
add a3, a2, a1, lsl #2 @ &argv[argc]
add a3, a3, #4 @ envp
str a3, [ip, #0] @ environ = envp
+
+#ifdef WANT_ELFINFO
+ mov r6, a3 @ work on a copy of a3 so that common
+ @ 'main(argc, argv, envp)' function
+ @ stays valid
+1: ldr r5, [r6], #4 @ load *envp and increment it
+ cmp r5, #0 @ read value==0?
+ bne 1b
+ str r6, [ip, #4] @ __elfinfo = envp
+#endif
+
bl main
@
@@ -59,11 +70,25 @@ _start:
#ifdef __DYN_LIB
ldr sl, .L4
1: add sl, pc, sl
@ -140,13 +158,16 @@ index ccbac48..c9cee01 100644
#endif
+#ifdef WANT_ELFINFO
+1: ldr r5, [a3], #4 @ load *envp and increment it
+ mov r6, a3 @ work on a copy of a3 so that common
+ @ 'main(argc, argv, envp)' function
+ @ stays valid
+1: ldr r5, [r6], #4 @ load *envp and increment it
+ cmp r5, #0 @ read value==0?
+ bne 1b
+#ifdef __DYN_LIB
+ str a3, [ip, sl] @ __elfinfo = envp
+ str r6, [ip, sl] @ __elfinfo = envp
+#else
+ str a3, [ip, #4] @ __elfinfo = envp
+ str r6, [ip, #4] @ __elfinfo = envp
+#endif
+#endif
+
@ -1050,5 +1071,5 @@ index adc461a..8b4f3c9 100644
#ifdef PROFILING
pushq %rdi /* save reg args */
--
1.7.3.3
1.7.3.4