mirror of https://github.com/red-prig/fpPS4.git
This commit is contained in:
parent
62e787bb1d
commit
a1d6f7d67a
|
@ -2188,14 +2188,15 @@ begin
|
|||
end;
|
||||
|
||||
error:=rtld_mmap(@addr,imgp^.max_addr-imgp^.min_addr);
|
||||
|
||||
Writeln(' rtld_mmap:0x',HexStr(addr,12),'..0x',HexStr(addr+(imgp^.max_addr-imgp^.min_addr),12),':',imgp^.execpath);
|
||||
|
||||
if (error<>0) then
|
||||
begin
|
||||
Writeln(StdErr,'self_load_shared_object:','failed to allocate VA for ',imgp^.execpath);
|
||||
goto _fail_dealloc;
|
||||
end;
|
||||
|
||||
Writeln(' rtld_mmap:0x',HexStr(addr,12),'..0x',HexStr(addr+(imgp^.max_addr-imgp^.min_addr),12),':',imgp^.execpath);
|
||||
|
||||
delta:=addr-imgp^.min_addr;
|
||||
imgp^.min_addr:=addr;
|
||||
imgp^.max_addr:=imgp^.max_addr+delta;
|
||||
|
@ -2806,6 +2807,7 @@ var
|
|||
count:Integer;
|
||||
error:Integer;
|
||||
begin
|
||||
Result:=0;
|
||||
count:=0;
|
||||
|
||||
//get sym count
|
||||
|
@ -2825,7 +2827,11 @@ begin
|
|||
obj^.map_size :=obj^.text_size+obj^.data_size;
|
||||
|
||||
//alloc addr
|
||||
vaddr_lo:=0;
|
||||
error:=rtld_mmap(@vaddr_lo,obj^.map_size);
|
||||
|
||||
Writeln(' rtld_mmap:0x',HexStr(vaddr_lo,12),'..0x',HexStr(vaddr_lo+obj^.map_size,12),':',obj^.lib_path);
|
||||
|
||||
if (error<>0) then
|
||||
begin
|
||||
Writeln(StdErr,'[KERNEL] preload_prx_internal:','failed to allocate VA for ',obj^.lib_path,' (',error,')');
|
||||
|
|
|
@ -321,16 +321,20 @@ var
|
|||
addr,prev:Pointer;
|
||||
info:TMemoryBasicInformation;
|
||||
len:ULONG_PTR;
|
||||
|
||||
guest_pmap_mem:array[0..2] of t_addr_range;
|
||||
begin
|
||||
if Length(pmap_mem)<>0 then
|
||||
guest_pmap_mem:=pmap_mem;
|
||||
//
|
||||
if Length(guest_pmap_mem)<>0 then
|
||||
begin
|
||||
//fixup
|
||||
pmap_mem[0].start:=_PROC_AREA_START_0;
|
||||
guest_pmap_mem[0].start:=_PROC_AREA_START_0;
|
||||
//
|
||||
For i:=0 to High(pmap_mem) do
|
||||
For i:=0 to High(guest_pmap_mem) do
|
||||
begin
|
||||
base:=Pointer(pmap_mem[i].start);
|
||||
size:=pmap_mem[i].__end-pmap_mem[i].start;
|
||||
base:=Pointer(guest_pmap_mem[i].start);
|
||||
size:=guest_pmap_mem[i].__end-guest_pmap_mem[i].start;
|
||||
|
||||
r:=md_reserve_ex(hProcess,base,size);
|
||||
if (r<>0) then Exit(r);
|
||||
|
@ -344,7 +348,7 @@ begin
|
|||
r:=md_reserve_ex(hProcess,base,size);
|
||||
if (r<>0) then Exit(r);
|
||||
|
||||
addr:=Pointer(pmap_mem[0].start);
|
||||
addr:=Pointer(guest_pmap_mem[0].start);
|
||||
|
||||
repeat
|
||||
|
||||
|
|
|
@ -192,6 +192,7 @@ var
|
|||
size:QWORD;
|
||||
i:Integer;
|
||||
begin
|
||||
Result:=0;
|
||||
if Length(pmap_mem)<>0 then
|
||||
begin
|
||||
For i:=0 to High(pmap_mem) do
|
||||
|
|
|
@ -378,7 +378,8 @@ var
|
|||
fitit:Boolean;
|
||||
writecounted:Boolean;
|
||||
begin
|
||||
if (size=0) then Exit(0);
|
||||
Result:=0;
|
||||
if (size=0) then Exit;
|
||||
|
||||
obj:=nil;
|
||||
|
||||
|
|
Loading…
Reference in New Issue