@@ -36,9 +36,18 @@ SECTIONS
__efi_runtime_stop = .;
}
+#ifdef CONFIG_MMU_PGPROT
+ .text_rest ALIGN(CONSTANT(COMMONPAGESIZE)) :
+#else
.text_rest :
+#endif
{
+ __text_start = .;
*(.text*)
+#ifdef CONFIG_MMU_PGPROT
+ . = ALIGN(CONSTANT(COMMONPAGESIZE));
+#endif
+ __text_end = .;
}
#ifdef CONFIG_ARMV8_PSCI
@@ -97,35 +106,43 @@ SECTIONS
LONG(0x1d1071c); /* Must output something to reset LMA */
}
#endif
-
- . = ALIGN(8);
- .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
-
- . = ALIGN(8);
- .data : {
- *(.data*)
+ .efi_runtime_rel : {
+ __efi_runtime_rel_start = .;
+ *(.rel*.efi_runtime)
+ *(.rel*.efi_runtime.*)
+ __efi_runtime_rel_stop = .;
}
- . = ALIGN(8);
-
- . = .;
+#ifdef CONFIG_MMU_PGPROT
+ .rodata ALIGN(CONSTANT(COMMONPAGESIZE)): {
+#else
+ .rodata ALIGN(8) : {
+#endif
+ __start_rodata = .;
+ *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
+ }
- . = ALIGN(8);
- __u_boot_list : {
+ __u_boot_list ALIGN(8) : {
KEEP(*(SORT(__u_boot_list*)));
+#ifdef CONFIG_MMU_PGPROT
+ . = ALIGN(CONSTANT(COMMONPAGESIZE));
+#endif
+ __end_rodata = .;
}
- .efi_runtime_rel : {
- __efi_runtime_rel_start = .;
- *(.rel*.efi_runtime)
- *(.rel*.efi_runtime.*)
- __efi_runtime_rel_stop = .;
+#ifdef CONFIG_MMU_PGPROT
+ .data ALIGN(CONSTANT(COMMONPAGESIZE)) : {
+#else
+ .data ALIGN(8) : {
+#endif
+ __start_data = .;
+ *(.data*)
}
. = ALIGN(8);
__image_copy_end = .;
- .rela.dyn : {
+ .rela.dyn ALIGN(8) : {
__rel_dyn_start = .;
*(.rela*)
__rel_dyn_end = .;
@@ -136,11 +153,15 @@ SECTIONS
/*
* arch/arm/lib/crt0_64.S assumes __bss_start - __bss_end % 8 == 0
*/
- .bss ALIGN(8) : {
+ .bss ADDR(.rela.dyn) (OVERLAY) : {
__bss_start = .;
*(.bss*)
. = ALIGN(8);
__bss_end = .;
+#ifdef CONFIG_MMU_PGPROT
+ . = ALIGN(CONSTANT(COMMONPAGESIZE));
+#endif
+ __end_data = .;
}
/DISCARD/ : { *(.dynsym) }
@@ -23,6 +23,7 @@ extern char __kprobes_text_start[], __kprobes_text_end[];
extern char __entry_text_start[], __entry_text_end[];
extern char __initdata_begin[], __initdata_end[];
extern char __start_rodata[], __end_rodata[];
+extern char __start_data[], __end_data[];
extern char __efi_helloworld_begin[];
extern char __efi_helloworld_end[];
extern char __efi_var_file_begin[];
@@ -63,6 +64,7 @@ static inline int arch_is_kernel_data(unsigned long addr)
/* Start of U-Boot text region */
extern char __text_start[];
+extern char __text_end[];
/* This marks the text region which must be relocated */
extern char __image_copy_start[], __image_copy_end[];