mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:38:11 +00:00
Use ELF program headers to load executables smarter.
This turned out way better than the old code. ELF loading is now quite straightforward, and we don't need the weird concept of subregions anymore. Next step is to respect the is_writable flag.
This commit is contained in:
parent
dd060d0fa8
commit
aa6d06b47e
9 changed files with 42 additions and 198 deletions
|
@ -48,17 +48,6 @@ struct Region : public Retainable<Region> {
|
|||
String name;
|
||||
};
|
||||
|
||||
struct Subregion {
|
||||
Subregion(Region&, dword offset, size_t, LinearAddress, String&& name);
|
||||
~Subregion();
|
||||
|
||||
RetainPtr<Region> region;
|
||||
dword offset;
|
||||
size_t size { 0 };
|
||||
LinearAddress linearAddress;
|
||||
String name;
|
||||
};
|
||||
|
||||
#define MM MemoryManager::the()
|
||||
|
||||
class MemoryManager {
|
||||
|
@ -75,9 +64,6 @@ public:
|
|||
|
||||
RetainPtr<Zone> createZone(size_t);
|
||||
|
||||
bool mapSubregion(Process&, Subregion&);
|
||||
bool unmapSubregion(Process&, Subregion&);
|
||||
|
||||
bool mapRegion(Process&, Region&);
|
||||
bool unmapRegion(Process&, Region&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue