bootstrap: Map .data.rel.ro, GOT and PLT as read-only

This commit is contained in:
bjorn3
2026-03-07 12:22:02 +01:00
parent 0216268ee3
commit a8f3e83e9d
5 changed files with 45 additions and 1 deletions
+9
View File
@@ -16,6 +16,15 @@ SECTIONS {
.rodata : {
__rodata_start = .;
*(.rodata*)
}
.data.rel.ro : {
*(.data.rel.ro*)
}
.got : {
*(.got)
}
.got.plt : {
*(.got.plt)
. = ALIGN(4096);
__rodata_end = .;
}
+9
View File
@@ -16,6 +16,15 @@ SECTIONS {
.rodata : {
__rodata_start = .;
*(.rodata*)
}
.data.rel.ro : {
*(.data.rel.ro*)
}
.got : {
*(.got)
}
.got.plt : {
*(.got.plt)
. = ALIGN(4096);
__rodata_end = .;
}
+9
View File
@@ -16,6 +16,15 @@ SECTIONS {
.rodata : {
__rodata_start = .;
*(.rodata*)
}
.data.rel.ro : {
*(.data.rel.ro*)
}
.got : {
*(.got)
}
.got.plt : {
*(.got.plt)
. = ALIGN(4096);
__rodata_end = .;
}
+9 -1
View File
@@ -16,6 +16,15 @@ SECTIONS {
.rodata : {
__rodata_start = .;
*(.rodata*)
}
.data.rel.ro : {
*(.data.rel.ro*)
}
.got : {
*(.got)
}
.got.plt : {
*(.got.plt)
. = ALIGN(4096);
__rodata_end = .;
}
@@ -23,7 +32,6 @@ SECTIONS {
__data_start = .;
*(.data*)
*(.sdata*)
*(.got*)
. = ALIGN(4096);
__data_end = .;
+9
View File
@@ -16,6 +16,15 @@ SECTIONS {
.rodata : {
__rodata_start = .;
*(.rodata*)
}
.data.rel.ro : {
*(.data.rel.ro*)
}
.got : {
*(.got)
}
.got.plt : {
*(.got.plt)
. = ALIGN(4096);
__rodata_end = .;
}