aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/vmlinux.lds.S')
-rw-r--r--arch/x86/kernel/vmlinux.lds.S26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index e7378cc..a74b86c 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -5,6 +5,8 @@
notice and this notice are preserved. */
#include <linux/sections.h>
+#include <linux/tables.h>
+#include <linux/ranges.h>
OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
"elf64-x86-64")
@@ -61,10 +63,19 @@ SECTIONS
*(.text.exit .text.exit.*)
*(.text.startup .text.startup.*)
*(.text.hot .text.hot.*)
+ *(SORT(SECTION_RANGE_ALL(SECTION_TEXT)))
*(SORT(SECTION_TBL_ALL(SECTION_TEXT)))
+
+ *(SORT(SECTION_RANGE_ALL(SECTION_INIT)))
*(SORT(SECTION_TBL_ALL(SECTION_INIT)))
+
+ *(SORT(SECTION_RANGE_ALL(SECTION_INIT_CALL)))
*(SORT(SECTION_TBL_ALL(SECTION_INIT_CALL)))
+
+ *(SORT(SECTION_RANGE_ALL(SECTION_EXIT)))
*(SORT(SECTION_TBL_ALL(SECTION_EXIT)))
+
+ *(SORT(SECTION_RANGE_ALL(SECTION_EXIT_CALL)))
*(SORT(SECTION_TBL_ALL(SECTION_EXIT_CALL)))
*(.text .stub .text.* .gnu.linkonce.t.*)
/* .gnu.warning sections are handled specially by elf32.em. */
@@ -81,8 +92,14 @@ SECTIONS
{
*(.rodata)
*(SORT(.rodata.*))
+
+ *(SORT(SECTION_RANGE_ALL(SECTION_RODATA)))
*(SORT(SECTION_TBL_ALL(SECTION_RODATA)))
+
+ *(SORT(SECTION_RANGE_ALL(SECTION_INIT_RODATA)))
*(SORT(SECTION_TBL_ALL(SECTION_INIT_RODATA)))
+
+ *(SORT(SECTION_RANGE_ALL(SECTION_REF_RODATA)))
*(SORT(SECTION_TBL_ALL(SECTION_REF_RODATA)))
*(.gnu.linkonce.r.*)
}
@@ -162,10 +179,19 @@ SECTIONS
.data :
{
*(.data .data.* .gnu.linkonce.d.*)
+
+ *(SORT(SECTION_RANGE_ALL(SECTION_DATA)))
*(SORT(SECTION_TBL_ALL(SECTION_DATA)))
+
+ *(SORT(SECTION_RANGE_ALL(SECTION_INIT_DATA)))
*(SORT(SECTION_TBL_ALL(SECTION_INIT_DATA)))
+
+ *(SORT(SECTION_RANGE_ALL(SECTION_REF_DATA)))
*(SORT(SECTION_TBL_ALL(SECTION_REF_DATA)))
+
+ *(SORT(SECTION_RANGE_ALL(SECTION_EXIT_DATA)))
*(SORT(SECTION_TBL_ALL(SECTION_EXIT_DATA)))
+
SORT(CONSTRUCTORS)
}
.data1 : { *(.data1) }