mirror of
https://github.com/drasko/codezero.git
synced 2026-01-21 15:23:15 +01:00
More progress on parsing elf files. Fixes to memfs file read/write
Increased inode block pointers to 40. The current maximum allowed (and checked). Updates to file size after every file write ensures subsequent writes can correctly operate using updated file size information (i.e. not try to add more pages that are already present). We cannot do this inside write() because directory writes rely on byte-granularity updates on file buffers, whereas file updates are by page-granularity (currently).
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
struct exec_file_desc {
|
||||
unsigned long text_offset; /* File offset of text section */
|
||||
unsigned long data_offset; /* File offset of data section */
|
||||
unsigned long bss_offset; /* File offset of bss section */
|
||||
};
|
||||
|
||||
#endif /* __EXEC_H__ */
|
||||
|
||||
@@ -58,4 +58,7 @@ struct elf_header {
|
||||
} __attribute__((__packed__));
|
||||
|
||||
|
||||
int elf_parse_executable(struct tcb *task, struct vm_file *file,
|
||||
struct exec_file_desc *efd);
|
||||
|
||||
#endif /* __ELF_H__ */
|
||||
|
||||
Reference in New Issue
Block a user