libroot: make all areas executable for old binaries
* If at least one image is either B_HAIKU_ABI_GCC_2_ANCIENT or B_HAIKU_ABI_GCC_2_BEOS almost all areas are marked as executable. * B_EXECUTE_AREA and B_STACK_AREA are made public. The former is enforced since the introduction of DEP and apps need it to correctly set area protection. The latter is currently needed only to recognize stack areas and fix their protection in compatibility mode, but may also be useful if an app wants to use sigaltstack from POSIX API.
This commit is contained in:
@@ -85,6 +85,11 @@ typedef struct area_info {
|
||||
/* area protection */
|
||||
#define B_READ_AREA 1
|
||||
#define B_WRITE_AREA 2
|
||||
#define B_EXECUTE_AREA 4
|
||||
#define B_STACK_AREA 8
|
||||
// "stack" protection is not available on most platforms - it's used
|
||||
// to only commit memory as needed, and have guard pages at the
|
||||
// bottom of the stack.
|
||||
|
||||
extern area_id create_area(const char *name, void **startAddress,
|
||||
uint32 addressSpec, size_t size, uint32 lock,
|
||||
|
||||
Reference in New Issue
Block a user