misc: Update linker scripts for better ld.gold compat

This commit is contained in:
mintsuki 2024-05-27 00:18:14 +02:00
parent 8a4ad07e38
commit 45fb3ded6f
7 changed files with 29 additions and 29 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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