mirror of
https://review.haiku-os.org/haiku
synced 2025-01-22 06:16:03 +01:00
find_image_at_address() now also takes the data section into account, so
that you can now also look up symbols in there. load_kernel_add_on() now sets the text section read-only & execute after having loaded the area - note, it currently doesn't have any effect anyway :) git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8173 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a596e677c7
commit
5a23dcc80b
@ -127,8 +127,10 @@ find_image_at_address(addr_t address)
|
||||
// get image that may contain the address
|
||||
|
||||
while ((image = hash_next(sImagesHash, &iterator)) != NULL) {
|
||||
if (address >= image->text_region.start
|
||||
&& address <= (image->text_region.start + image->text_region.size))
|
||||
if ((address >= image->text_region.start
|
||||
&& address <= (image->text_region.start + image->text_region.size))
|
||||
|| (address >= image->data_region.start
|
||||
&& address <= (image->data_region.start + image->data_region.size)))
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1354,8 +1356,8 @@ load_kernel_add_on(const char *path)
|
||||
goto error5;
|
||||
|
||||
// We needed to read in the contents of the "text" area, but
|
||||
// now we can protect it read-only
|
||||
set_area_protection(image->text_region.id, B_KERNEL_READ_AREA);
|
||||
// now we can protect it read-only/execute
|
||||
set_area_protection(image->text_region.id, B_KERNEL_READ_AREA | B_KERNEL_EXECUTE_AREA);
|
||||
|
||||
// ToDo: this should be enabled by kernel settings!
|
||||
if (1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user