diff --git a/common/linker_bios.ld.in b/common/linker_bios.ld.in index 095b075e..6b91de3f 100644 --- a/common/linker_bios.ld.in +++ b/common/linker_bios.ld.in @@ -4,12 +4,12 @@ ENTRY(_start) PHDRS { - text_s2 PT_LOAD FLAGS((1 << 0) | (1 << 2)) ; - rodata_s2 PT_LOAD FLAGS((1 << 2)) ; - data_s2 PT_LOAD FLAGS((1 << 1) | (1 << 2)) ; - text_s3 PT_LOAD FLAGS((1 << 0) | (1 << 2)) ; - rodata_s3 PT_LOAD FLAGS((1 << 2)) ; - data_s3 PT_LOAD FLAGS((1 << 1) | (1 << 2)) ; + text_s2 PT_LOAD FLAGS(0x05); + rodata_s2 PT_LOAD FLAGS(0x04); + data_s2 PT_LOAD FLAGS(0x06); + text_s3 PT_LOAD FLAGS(0x05); + rodata_s3 PT_LOAD FLAGS(0x04); + data_s3 PT_LOAD FLAGS(0x06); } SECTIONS diff --git a/common/linker_uefi_aarch64.ld.in b/common/linker_uefi_aarch64.ld.in index e2c9fe35..0bc0ce84 100644 --- a/common/linker_uefi_aarch64.ld.in +++ b/common/linker_uefi_aarch64.ld.in @@ -4,10 +4,10 @@ ENTRY(_start) PHDRS { - text PT_LOAD FLAGS((1 << 0) | (1 << 2)) ; - rodata PT_LOAD FLAGS((1 << 2)) ; - data PT_LOAD FLAGS((1 << 1) | (1 << 2)) ; - dynamic PT_DYNAMIC FLAGS((1 << 1) | (1 << 2)) ; + text PT_LOAD FLAGS(0x05); + rodata PT_LOAD FLAGS(0x04); + data PT_LOAD FLAGS(0x06); + dynamic PT_DYNAMIC FLAGS(0x06); } SECTIONS diff --git a/common/linker_uefi_ia32.ld.in b/common/linker_uefi_ia32.ld.in index 26b734ae..58daeaa9 100644 --- a/common/linker_uefi_ia32.ld.in +++ b/common/linker_uefi_ia32.ld.in @@ -4,10 +4,10 @@ ENTRY(_start) PHDRS { - text PT_LOAD FLAGS((1 << 0) | (1 << 2)) ; - rodata PT_LOAD FLAGS((1 << 2)) ; - data PT_LOAD FLAGS((1 << 1) | (1 << 2)) ; - dynamic PT_DYNAMIC FLAGS((1 << 1) | (1 << 2)) ; + text PT_LOAD FLAGS(0x05); + rodata PT_LOAD FLAGS(0x04); + data PT_LOAD FLAGS(0x06); + dynamic PT_DYNAMIC FLAGS(0x06); } SECTIONS diff --git a/common/linker_uefi_riscv64.ld.in b/common/linker_uefi_riscv64.ld.in index acc868d4..c3726eae 100644 --- a/common/linker_uefi_riscv64.ld.in +++ b/common/linker_uefi_riscv64.ld.in @@ -4,10 +4,10 @@ ENTRY(_start) PHDRS { - text PT_LOAD FLAGS((1 << 0) | (1 << 2)) ; - rodata PT_LOAD FLAGS((1 << 2)) ; - data PT_LOAD FLAGS((1 << 1) | (1 << 2)) ; - dynamic PT_DYNAMIC FLAGS((1 << 1) | (1 << 2)) ; + text PT_LOAD FLAGS(0x05); + rodata PT_LOAD FLAGS(0x04); + data PT_LOAD FLAGS(0x06); + dynamic PT_DYNAMIC FLAGS(0x06); } SECTIONS diff --git a/common/linker_uefi_x86_64.ld.in b/common/linker_uefi_x86_64.ld.in index 8a943db4..7df7fe3c 100644 --- a/common/linker_uefi_x86_64.ld.in +++ b/common/linker_uefi_x86_64.ld.in @@ -4,10 +4,10 @@ ENTRY(_start) PHDRS { - text PT_LOAD FLAGS((1 << 0) | (1 << 2)) ; - rodata PT_LOAD FLAGS((1 << 2)) ; - data PT_LOAD FLAGS((1 << 1) | (1 << 2)) ; - dynamic PT_DYNAMIC FLAGS((1 << 1) | (1 << 2)) ; + text PT_LOAD FLAGS(0x05); + rodata PT_LOAD FLAGS(0x04); + data PT_LOAD FLAGS(0x06); + dynamic PT_DYNAMIC FLAGS(0x06); } SECTIONS diff --git a/decompressor/linker.ld b/decompressor/linker.ld index 69d35322..ee246d0c 100644 --- a/decompressor/linker.ld +++ b/decompressor/linker.ld @@ -4,9 +4,9 @@ ENTRY(_start) PHDRS { - text PT_LOAD FLAGS((1 << 0) | (1 << 2)) ; - rodata PT_LOAD FLAGS((1 << 2)) ; - data PT_LOAD FLAGS((1 << 1) | (1 << 2)) ; + text PT_LOAD FLAGS(0x05); + rodata PT_LOAD FLAGS(0x04); + data PT_LOAD FLAGS(0x06); } SECTIONS diff --git a/test/linker.ld b/test/linker.ld index dd9e1b7d..7ccf4a4c 100644 --- a/test/linker.ld +++ b/test/linker.ld @@ -1,9 +1,9 @@ PHDRS { - text PT_LOAD FLAGS((1 << 0) | (1 << 2)) ; /* Execute + Read */ - rodata PT_LOAD FLAGS((1 << 2)) ; /* Read only */ - data PT_LOAD FLAGS((1 << 1) | (1 << 2)) ; /* Write + Read */ - dynamic PT_DYNAMIC FLAGS((1 << 1) | (1 << 2)) ; /* Dynamic segment needed for PIE */ + text PT_LOAD FLAGS(0x05); /* Execute + Read */ + rodata PT_LOAD FLAGS(0x04); /* Read only */ + data PT_LOAD FLAGS(0x06); /* Write + Read */ + dynamic PT_DYNAMIC FLAGS(0x06); /* Dynamic segment needed for PIE */ } SECTIONS