1.1 --- a/libexec/include/exec/segment.h Sun Jun 12 17:50:58 2022 +0200
1.2 +++ b/libexec/include/exec/segment.h Sun Jun 12 18:04:17 2022 +0200
1.3 @@ -26,6 +26,7 @@
1.4
1.5 #include <fsclient/client.h>
1.6
1.7 +#include <exec/common.h>
1.8 #include <exec/mapped_region.h>
1.9
1.10
1.11 @@ -36,6 +37,7 @@
1.12 {
1.13 protected:
1.14 MappedRegion _region;
1.15 + struct exec_region _exec_region;
1.16
1.17 /* Allocated memory. */
1.18
1.19 @@ -61,15 +63,17 @@
1.20 public:
1.21 virtual ~Segment();
1.22
1.23 + l4_cap_idx_t cap();
1.24 +
1.25 char *address();
1.26
1.27 offset_t size();
1.28
1.29 /* Segment population methods. */
1.30
1.31 - long allocate();
1.32 + long allocate(bool attach);
1.33
1.34 - long fill(file_t *file);
1.35 + long fill(file_t *file, bool attach);
1.36
1.37 /* Mapped region methods. */
1.38
1.39 @@ -81,6 +85,8 @@
1.40
1.41 /* Generic property access. */
1.42
1.43 + struct exec_region &exec_region();
1.44 +
1.45 virtual bool loadable() = 0;
1.46 virtual offset_t file_contents() = 0;
1.47 virtual offset_t file_offset() = 0;