mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +00:00
base: Explicitly state ELF segment flags
The code in base-hw/src/bootstrap/platform.cc uses segment flags for identification purposes. Based on this information the code decides what to do with each segment. Unfortunately the linker script does not actually ensure the flags for a specific named segment match expectations. The code relies on implicit linker behaviour. This implicit behaviour can vary between linkers. This breaks arm_v7a base-hw builds linked with LLVM's lld linker. The segment named "ro" ends up having writeable flag set when using LLD. This patch ensures that all ELF segments in genode.ld have their required perimssion flags set explicitly. Fixes #3988
This commit is contained in:
parent
80e8cf99e2
commit
8b172bf22e
@ -15,8 +15,8 @@ ENTRY(_start)
|
||||
|
||||
PHDRS
|
||||
{
|
||||
ro PT_LOAD;
|
||||
rw PT_LOAD;
|
||||
ro PT_LOAD FLAGS(5);
|
||||
rw PT_LOAD FLAGS(6);
|
||||
boot PT_LOAD FLAGS(4);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user