Rev 9047 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9047 | Rev 9048 | ||
---|---|---|---|
Line 3643... | Line 3643... | ||
3643 | beginning of the buffer again. |
3643 | beginning of the buffer again. |
Line 3644... | Line 3644... | ||
3644 | 3644 | ||
3645 | ---------------------- Constants for registers: ---------------------- |
3645 | ---------------------- Constants for registers: ---------------------- |
3646 | eax - SF_SYS_MISC (68) |
3646 | eax - SF_SYS_MISC (68) |
- | 3647 | ebx - SSF_MEM_ALLOC_RING (29) |
|
- | 3648 | ====================================================================== |
|
- | 3649 | ============ Function 68, subfunction 30 - load PE-file ============== |
|
- | 3650 | ====================================================================== |
|
- | 3651 | Parameters: |
|
- | 3652 | * eax = 68 - function number |
|
- | 3653 | * ebx = 30 - subfunction number |
|
- | 3654 | * ecx = pointer to the string with path to file, |
|
- | 3655 | rules of path forming can be found in function 70 description. |
|
- | 3656 | Returned value: |
|
- | 3657 | * eax > 0xFFFFF000 - error, -eax = error code |
|
- | 3658 | * eax <= 0xFFFFF000 - pointer to the loaded file |
|
- | 3659 | Remarks: |
|
- | 3660 | * This function is to be called only by system loader from |
|
- | 3661 | kolibri.dll; the file loaded is not ready yet, it requires further |
|
- | 3662 | configuration. Use dlopen() from kolibri.dll instead of this |
|
- | 3663 | function. |
|
- | 3664 | ====================================================================== |
|
- | 3665 | =========== Function 68, subfunction 31 - unload PE-file ============= |
|
- | 3666 | ====================================================================== |
|
- | 3667 | Parameters: |
|
- | 3668 | * eax = 68 - function number |
|
- | 3669 | * ebx = 31 - subfunction number |
|
- | 3670 | * ecx = pointer to the loaded file |
|
- | 3671 | Returned value: |
|
- | 3672 | * eax = 0 - success |
|
- | 3673 | * eax = -1 - provided address does not correspond to any loaded file |
|
- | 3674 | Remarks: |
|
- | 3675 | * This function is to be called only by system loader from |
|
- | 3676 | kolibri.dll. Use dlclose() from kolibri.dll instead of this |
|
- | 3677 | function. |
|
- | 3678 | ====================================================================== |
|
- | 3679 | ===== Function 68, subfunction 32 - modify memory access rights ====== |
|
- | 3680 | ====================================================================== |
|
- | 3681 | Parameters: |
|
- | 3682 | * eax = 68 - function number |
|
- | 3683 | * ebx = 32 - subfunction number |
|
- | 3684 | * ecx = new access rights: zero or more of the following bits: |
|
- | 3685 | * PROT_READ = 1 - allow reading |
|
- | 3686 | * PROT_WRITE = 2 - allow writing |
|
- | 3687 | * PROT_EXEC = 4 - allow execution |
|
- | 3688 | * edx = pointer to begin of memory region |
|
- | 3689 | * esi = size of memory region in bytes |
|
- | 3690 | Returned value: |
|
- | 3691 | * eax = -1 - error |
|
- | 3692 | * else eax = old access rights |
|
- | 3693 | Remarks: |
|
- | 3694 | * The function modifies access rights to whole pages (4096 bytes). |
|
- | 3695 | * The function modifies access rights to all the pages intersecting |
|
- | 3696 | provided memory region. |
|
- | 3697 | * It is considered an error if a memory region returned by function |
|
- | 3698 | 68.22 is passed to this function. |
|
- | 3699 | * If any part of the passed memory region is incorrect, then the |
|
- | 3700 | function returns an error. However it is not guaranteed that |
|
- | 3701 | access rights of the correct part have been changed. |
|
- | 3702 | * If there was no error, the function returns old access rights of |
|
- | 3703 | the first provided page. |
|
- | 3704 | * Current implementation does not support execution access rights |
|
- | 3705 | without reading rights. Therefore bit PROT_EXEC is ignored on |
|
- | 3706 | entering the function, and becomes a copy of PROT_READ at exit. |
|
- | 3707 | ---------------------- Constants for registers: ---------------------- |
|
- | 3708 | eax - SF_SYS_MISC (68) |
|
Line 3647... | Line 3709... | ||
3647 | ebx - SSF_MEM_ALLOC_RING (29) |
3709 | ebx - SSF_MPROTECT (32) |
3648 | 3710 | ||
3649 | ====================================================================== |
3711 | ====================================================================== |
3650 | ====================== Function 69 - debugging. ====================== |
3712 | ====================== Function 69 - debugging. ====================== |