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:
Andreas Kling 2018-11-03 11:28:23 +01:00
commit aa6d06b47e
Notes: sideshowbarker 2024-07-19 18:34:04 +09:00
9 changed files with 42 additions and 198 deletions

View file

@ -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&);