Since we now have a working B_BASE_ADDRESS, we don't need the "RLD_padding"

area anymore.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10447 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-12-14 04:02:42 +00:00
parent c3808a9e47
commit 836356a0ca
2 changed files with 8 additions and 29 deletions
+8 -14
View File
@@ -50,6 +50,8 @@
#define PAGE_BASE(x) ((x) & ~(PAGE_MASK))
#define TO_PAGE_SIZE(x) ((x + (PAGE_MASK)) & ~(PAGE_MASK))
#define RLD_PROGRAM_BASE 0x00200000
/* keep in sync with app ldscript */
enum {
RFLAG_RW = 0x0001,
@@ -563,23 +565,17 @@ map_image(int fd, char const *path, image_t *image, bool fixed)
baseName, i, (image->regions[i].flags & RFLAG_RW) ? "rw" : "ro");
if (image->dynamic_ptr && !fixed) {
/*
* relocatable image... we can afford to place wherever
*/
// relocatable image... we can afford to place wherever
if (i == 0) {
/*
* but only the first segment gets a free ride
*/
loadAddress = 0;
addressSpecifier = B_ANY_ADDRESS;
// but only the first segment gets a free ride
loadAddress = RLD_PROGRAM_BASE;
addressSpecifier = B_BASE_ADDRESS;
} else {
loadAddress = image->regions[i].vmstart + image->regions[i-1].delta;
addressSpecifier = B_EXACT_ADDRESS;
}
} else {
/*
* not relocatable, put it where it asks or die trying
*/
// not relocatable, put it where it asks or die trying
loadAddress = image->regions[i].vmstart;
addressSpecifier = B_EXACT_ADDRESS;
}
@@ -608,9 +604,7 @@ map_image(int fd, char const *path, image_t *image, bool fixed)
image->regions[i].delta = loadAddress - image->regions[i].vmstart;
image->regions[i].vmstart = loadAddress;
/*
* handle trailer bits in data segment
*/
// handle trailer bits in data segment
if (image->regions[i].flags & RFLAG_RW) {
addr_t startClearing;
addr_t toClear;
-15
View File
@@ -10,13 +10,10 @@
#define RLD_SCRATCH_SIZE 65536
#define RLD_PROGRAM_BASE 0x00200000 /* keep in sync with app ldscript */
static area_id rld_region;
static area_id rld_region_2;
static char *rld_base;
static char *rld_base_2;
static char *rld_ptr;
@@ -27,18 +24,6 @@ rldheap_init(void)
(void **)&rld_base, B_ANY_ADDRESS, RLD_SCRATCH_SIZE,
B_NO_LOCK, B_READ_AREA | B_WRITE_AREA);
/*
* Fill in the gap upto RLD_PROGRAM_BASE,
*
* NOTE: this will be required only untile the vm finally
* support REGION_ADDR_ANY_ABOVE and REGION_ADDR_ANY_BELOW.
* Not doing these leads to some funny troubles with some
* libraries.
*/
rld_region_2 = _kern_create_area("RLD_padding", (void **)&rld_base_2,
B_ANY_ADDRESS, RLD_PROGRAM_BASE - (uint32)(rld_base + RLD_SCRATCH_SIZE),
B_NO_LOCK, B_READ_AREA | B_WRITE_AREA);
rld_ptr = rld_base;
}