mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 14:14:45 +03:00
Kernel: Specify protection flags for ELF load headers
These are currently unused by the prekernel and ld used the same flags by default - except for the .ksyms section which was marked as read-write.
This commit is contained in:
parent
2019cf3289
commit
ac1455d3ba
Notes:
sideshowbarker
2024-07-18 08:41:42 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/ac1455d3ba2 Pull-request: https://github.com/SerenityOS/serenity/pull/8891 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/dascandy
@ -8,15 +8,19 @@ ENTRY(init)
|
||||
# define KERNEL_BASE 0x2000000000
|
||||
#endif
|
||||
|
||||
#define PF_X 0x1
|
||||
#define PF_W 0x2
|
||||
#define PF_R 0x4
|
||||
|
||||
KERNEL_VIRTUAL_BASE = KERNEL_BASE;
|
||||
|
||||
PHDRS
|
||||
{
|
||||
super_pages PT_LOAD ;
|
||||
text PT_LOAD ;
|
||||
data PT_LOAD ;
|
||||
bss PT_LOAD ;
|
||||
ksyms PT_LOAD ;
|
||||
super_pages PT_LOAD FLAGS(PF_R | PF_W) ;
|
||||
text PT_LOAD FLAGS(PF_R | PF_X) ;
|
||||
data PT_LOAD FLAGS(PF_R | PF_W) ;
|
||||
bss PT_LOAD FLAGS(PF_R | PF_W) ;
|
||||
ksyms PT_LOAD FLAGS(PF_R) ;
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
|
Loading…
Reference in New Issue
Block a user