summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-10-17 08:10:25 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-10-17 08:10:25 +0200
commite66acf22a48a8163292eae03bca9baac874905bc (patch)
tree16cbd12d66b6c85637be89a2939306a4c9406ccb /arch
parent9156b904baf981561a8ed486db52746b04d2e464 (diff)
parent9341918ba869bcbdd1b9147d1ae85f1f27440557 (diff)
downloadbarebox-e66acf22a48a8163292eae03bca9baac874905bc.tar.gz
barebox-e66acf22a48a8163292eae03bca9baac874905bc.tar.xz
Merge branch 'for-next/rsa'
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/lib32/barebox.lds.S44
-rw-r--r--arch/arm/lib64/barebox.lds.S46
-rw-r--r--arch/mips/lib/barebox.lds.S45
-rw-r--r--arch/nios2/cpu/barebox.lds.S29
-rw-r--r--arch/openrisc/cpu/barebox.lds.S29
-rw-r--r--arch/ppc/boards/pcm030/barebox.lds.S28
-rw-r--r--arch/ppc/mach-mpc85xx/barebox.lds.S24
-rw-r--r--arch/riscv/lib/barebox.lds.S30
-rw-r--r--arch/sandbox/board/barebox.lds.S26
-rw-r--r--arch/x86/lib/barebox.lds.S43
-rw-r--r--arch/x86/mach-efi/elf_ia32_efi.lds.S26
-rw-r--r--arch/x86/mach-efi/elf_x86_64_efi.lds.S26
12 files changed, 31 insertions, 365 deletions
diff --git a/arch/arm/lib32/barebox.lds.S b/arch/arm/lib32/barebox.lds.S
index 7230e5f31f..c479e02e91 100644
--- a/arch/arm/lib32/barebox.lds.S
+++ b/arch/arm/lib32/barebox.lds.S
@@ -55,7 +55,10 @@ SECTIONS
BAREBOX_BARE_INIT_SIZE
. = ALIGN(4);
- .rodata : { *(.rodata*) }
+ .rodata : {
+ *(.rodata*)
+ RO_DATA_SECTION
+ }
#ifdef CONFIG_ARM_UNWIND
/*
@@ -82,45 +85,6 @@ SECTIONS
.barebox_imd : { BAREBOX_IMD }
. = .;
- __barebox_cmd_start = .;
- .barebox_cmd : { BAREBOX_CMDS }
- __barebox_cmd_end = .;
-
- __barebox_ratp_cmd_start = .;
- .barebox_ratp_cmd : { BAREBOX_RATP_CMDS }
- __barebox_ratp_cmd_end = .;
-
- __barebox_magicvar_start = .;
- .barebox_magicvar : { BAREBOX_MAGICVARS }
- __barebox_magicvar_end = .;
-
- __barebox_initcalls_start = .;
- .barebox_initcalls : { INITCALLS }
- __barebox_initcalls_end = .;
-
- __barebox_exitcalls_start = .;
- .barebox_exitcalls : { EXITCALLS }
- __barebox_exitcalls_end = .;
-
- __usymtab_start = .;
- __usymtab : { BAREBOX_SYMS }
- __usymtab_end = .;
-
-#ifdef CONFIG_PCI
- __start_pci_fixups_early = .;
- .pci_fixup_early : { KEEP(*(.pci_fixup_early)) }
- __end_pci_fixups_early = .;
- __start_pci_fixups_header = .;
- .pci_fixup_header : { KEEP(*(.pci_fixup_header)) }
- __end_pci_fixups_header = .;
- __start_pci_fixups_enable = .;
- .pci_fixup_enable : { KEEP(*(.pci_fixup_enable)) }
- __end_pci_fixups_enable = .;
-#endif
-
- .oftables : { BAREBOX_CLK_TABLE() }
-
- .dtb : { BAREBOX_DTB() }
.rel_dyn_start : { *(.__rel_dyn_start) }
.rel.dyn : { *(.rel*) }
diff --git a/arch/arm/lib64/barebox.lds.S b/arch/arm/lib64/barebox.lds.S
index 694bbcaaf1..cf6ef18895 100644
--- a/arch/arm/lib64/barebox.lds.S
+++ b/arch/arm/lib64/barebox.lds.S
@@ -53,7 +53,10 @@ SECTIONS
BAREBOX_BARE_INIT_SIZE
. = ALIGN(4);
- .rodata : { *(.rodata*) }
+ .rodata : {
+ *(.rodata*)
+ RO_DATA_SECTION
+ }
_etext = .; /* End of text and rodata section */
_sdata = .;
@@ -63,47 +66,6 @@ SECTIONS
.barebox_imd : { BAREBOX_IMD }
- . = .;
- __barebox_cmd_start = .;
- .barebox_cmd : { BAREBOX_CMDS }
- __barebox_cmd_end = .;
-
- __barebox_ratp_cmd_start = .;
- .barebox_ratp_cmd : { BAREBOX_RATP_CMDS }
- __barebox_ratp_cmd_end = .;
-
- __barebox_magicvar_start = .;
- .barebox_magicvar : { BAREBOX_MAGICVARS }
- __barebox_magicvar_end = .;
-
- __barebox_initcalls_start = .;
- .barebox_initcalls : { INITCALLS }
- __barebox_initcalls_end = .;
-
- __barebox_exitcalls_start = .;
- .barebox_exitcalls : { EXITCALLS }
- __barebox_exitcalls_end = .;
-
- __usymtab_start = .;
- __usymtab : { BAREBOX_SYMS }
- __usymtab_end = .;
-
-#ifdef CONFIG_PCI
- __start_pci_fixups_early = .;
- .pci_fixup_early : { KEEP(*(.pci_fixup_early)) }
- __end_pci_fixups_early = .;
- __start_pci_fixups_header = .;
- .pci_fixup_header : { KEEP(*(.pci_fixup_header)) }
- __end_pci_fixups_header = .;
- __start_pci_fixups_enable = .;
- .pci_fixup_enable : { KEEP(*(.pci_fixup_enable)) }
- __end_pci_fixups_enable = .;
-#endif
-
- .oftables : { BAREBOX_CLK_TABLE() }
-
- .dtb : { BAREBOX_DTB() }
-
.rel_dyn_start : { *(.__rel_dyn_start) }
.rela.dyn : { *(.rela*) }
.rel_dyn_end : { *(.__rel_dyn_end) }
diff --git a/arch/mips/lib/barebox.lds.S b/arch/mips/lib/barebox.lds.S
index 58b0c5919d..e96c3bf6e2 100644
--- a/arch/mips/lib/barebox.lds.S
+++ b/arch/mips/lib/barebox.lds.S
@@ -30,7 +30,10 @@ SECTIONS
PRE_IMAGE
. = ALIGN(4);
- .rodata : { *(.rodata*) }
+ .rodata : {
+ *(.rodata*)
+ RO_DATA_SECTION
+ }
_etext = .; /* End of text and rodata section */
_sdata = .;
@@ -40,46 +43,6 @@ SECTIONS
.barebox_imd : { BAREBOX_IMD }
- . = .;
- __barebox_cmd_start = .;
- .barebox_cmd : { BAREBOX_CMDS }
- __barebox_cmd_end = .;
-
- __barebox_ratp_cmd_start = .;
- .barebox_ratp_cmd : { BAREBOX_RATP_CMDS }
- __barebox_ratp_cmd_end = .;
-
- __barebox_magicvar_start = .;
- .barebox_magicvar : { BAREBOX_MAGICVARS }
- __barebox_magicvar_end = .;
-
- __barebox_initcalls_start = .;
- .barebox_initcalls : { INITCALLS }
- __barebox_initcalls_end = .;
-
- __barebox_exitcalls_start = .;
- .barebox_exitcalls : { EXITCALLS }
- __barebox_exitcalls_end = .;
-
- __usymtab_start = .;
- __usymtab : { BAREBOX_SYMS }
- __usymtab_end = .;
-
-#ifdef CONFIG_PCI
- __start_pci_fixups_early = .;
- .pci_fixup_early : { KEEP(*(.pci_fixup_early)) }
- __end_pci_fixups_early = .;
- __start_pci_fixups_header = .;
- .pci_fixup_header : { KEEP(*(.pci_fixup_header)) }
- __end_pci_fixups_header = .;
- __start_pci_fixups_enable = .;
- .pci_fixup_enable : { KEEP(*(.pci_fixup_enable)) }
- __end_pci_fixups_enable = .;
-#endif
- .oftables : { BAREBOX_CLK_TABLE() }
-
- .dtb : { BAREBOX_DTB() }
-
_edata = .;
.image_end : { *(.__image_end) }
diff --git a/arch/nios2/cpu/barebox.lds.S b/arch/nios2/cpu/barebox.lds.S
index fbcd1cd3f7..8d82aa59e7 100644
--- a/arch/nios2/cpu/barebox.lds.S
+++ b/arch/nios2/cpu/barebox.lds.S
@@ -48,32 +48,11 @@ SECTIONS
BAREBOX_BARE_INIT_SIZE
. = ALIGN(4);
- .rodata : { *(.rodata) }
- . = .;
- __barebox_cmd_start = .;
- .barebox_cmd : { BAREBOX_CMDS }
- __barebox_cmd_end = .;
-
- __barebox_ratp_cmd_start = .;
- .barebox_ratp_cmd : { BAREBOX_RATP_CMDS }
- __barebox_ratp_cmd_end = .;
-
- __barebox_magicvar_start = .;
- .barebox_magicvar : { BAREBOX_MAGICVARS }
- __barebox_magicvar_end = .;
-
- __barebox_initcalls_start = .;
- .barebox_initcalls : { INITCALLS }
- __barebox_initcalls_end = .;
-
- __barebox_exitcalls_start = .;
- .barebox_exitcalls : { EXITCALLS }
- __barebox_exitcalls_end = .;
-
- ___usymtab_start = .;
- __usymtab : { BAREBOX_SYMS }
- ___usymtab_end = .;
+ .rodata : {
+ *(.rodata*)
+ RO_DATA_SECTION
+ }
_etext = .; /* End of text and rodata section */
diff --git a/arch/openrisc/cpu/barebox.lds.S b/arch/openrisc/cpu/barebox.lds.S
index c6807aec3a..adb0c22f85 100644
--- a/arch/openrisc/cpu/barebox.lds.S
+++ b/arch/openrisc/cpu/barebox.lds.S
@@ -49,36 +49,9 @@ SECTIONS
*(.rodata);
*(.rodata.*)
*(.bbenv.rodata.*)
+ RO_DATA_SECTION
} > ram
- . = ALIGN(4);
- . = .;
- __barebox_cmd_start = .;
- .barebox_cmd : { BAREBOX_CMDS } > ram
- __barebox_cmd_end = .;
-
- __barebox_ratp_cmd_start = .;
- .barebox_ratp_cmd : { BAREBOX_RATP_CMDS } > ram
- __barebox_ratp_cmd_end = .;
-
- __barebox_magicvar_start = .;
- .barebox_magicvar : { BAREBOX_MAGICVARS } > ram
- __barebox_magicvar_end = .;
-
- __barebox_initcalls_start = .;
- .barebox_initcalls : { INITCALLS } > ram
- __barebox_initcalls_end = .;
-
- __barebox_exitcalls_start = .;
- .barebox_exitcalls : { EXITCALLS } > ram
- __barebox_exitcalls_end = .;
-
- ___usymtab_start = .;
- __usymtab : { BAREBOX_SYMS } > ram
- ___usymtab_end = .;
-
- .dtb : { BAREBOX_DTB() } > ram
-
__etext = .; /* End of text and rodata section */
. = ALIGN(4);
diff --git a/arch/ppc/boards/pcm030/barebox.lds.S b/arch/ppc/boards/pcm030/barebox.lds.S
index 3b8bf3c0d0..6c91ed6256 100644
--- a/arch/ppc/boards/pcm030/barebox.lds.S
+++ b/arch/ppc/boards/pcm030/barebox.lds.S
@@ -38,6 +38,7 @@ SECTIONS
*(.rodata*)
*(.rodata1*)
*(.rodata.str1.4)
+ RO_DATA_SECTION
}
/* Read-only sections, merged into text segment: */
@@ -99,33 +100,6 @@ SECTIONS
_edata = .;
PROVIDE (edata = .);
- . = .;
- __barebox_cmd_start = .;
- .barebox_cmd : { BAREBOX_CMDS }
- __barebox_cmd_end = .;
-
- __barebox_ratp_cmd_start = .;
- .barebox_ratp_cmd : { BAREBOX_RATP_CMDS }
- __barebox_ratp_cmd_end = .;
-
- __barebox_magicvar_start = .;
- .barebox_magicvar : { BAREBOX_MAGICVARS }
- __barebox_magicvar_end = .;
-
- __barebox_initcalls_start = .;
- .barebox_initcalls : { INITCALLS }
- __barebox_initcalls_end = .;
- __initcall_entries = (__barebox_initcalls_end - __barebox_initcalls_start) >> 2;
-
- __barebox_exitcalls_start = .;
- .barebox_exitcalls : { EXITCALLS }
- __barebox_exitcalls_end = .;
- __exitcall_entries = (__barebox_exitcalls_end - __barebox_exitcalls_start) >> 2;
-
- __usymtab_start = .;
- __usymtab : { BAREBOX_SYMS }
- __usymtab_end = .;
-
__start___ex_table = .;
__ex_table : { *(__ex_table) }
__stop___ex_table = .;
diff --git a/arch/ppc/mach-mpc85xx/barebox.lds.S b/arch/ppc/mach-mpc85xx/barebox.lds.S
index 0001972831..a09a01eba1 100644
--- a/arch/ppc/mach-mpc85xx/barebox.lds.S
+++ b/arch/ppc/mach-mpc85xx/barebox.lds.S
@@ -71,6 +71,7 @@ SECTIONS
.rodata :
{
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
+ RO_DATA_SECTION
} :text
/* Read-write section, merged into data segment: */
@@ -101,29 +102,6 @@ SECTIONS
}
. = .;
- __barebox_cmd_start = .;
- .barebox_cmd : { BAREBOX_CMDS }
- __barebox_cmd_end = .;
-
- __barebox_ratp_cmd_start = .;
- .barebox_ratp_cmd : { BAREBOX_RATP_CMDS }
- __barebox_ratp_cmd_end = .;
-
- __barebox_initcalls_start = .;
- .barebox_initcalls : { INITCALLS }
- __barebox_initcalls_end = .;
- __initcall_entries = (__barebox_initcalls_end - __barebox_initcalls_start)>>2;
-
- __barebox_exitcalls_start = .;
- .barebox_exitcalls : { EXITCALLS }
- __barebox_exitcalls_end = .;
- __exitcall_entries = (__barebox_exitcalls_end - __barebox_exitcalls_start) >> 2;
-
- __usymtab_start = .;
- __usymtab : { BAREBOX_SYMS }
- __usymtab_end = .;
-
- . = .;
__start___ex_table = .;
__ex_table : { *(__ex_table) }
__stop___ex_table = .;
diff --git a/arch/riscv/lib/barebox.lds.S b/arch/riscv/lib/barebox.lds.S
index ffb97f40e8..5149f8ce28 100644
--- a/arch/riscv/lib/barebox.lds.S
+++ b/arch/riscv/lib/barebox.lds.S
@@ -30,7 +30,10 @@ SECTIONS
}
. = ALIGN(8);
- .rodata : { *(.rodata*) }
+ .rodata : {
+ *(.rodata*)
+ RO_DATA_SECTION
+ }
_etext = .; /* End of text and rodata section */
_sdata = .;
@@ -43,32 +46,11 @@ SECTIONS
. = ALIGN(8);
.got : { *(.got*) }
- . = .;
- __barebox_cmd_start = .;
- .barebox_cmd : { BAREBOX_CMDS }
- __barebox_cmd_end = .;
-
- __barebox_magicvar_start = .;
- .barebox_magicvar : { BAREBOX_MAGICVARS }
- __barebox_magicvar_end = .;
-
- __barebox_initcalls_start = .;
- .barebox_initcalls : { INITCALLS }
- __barebox_initcalls_end = .;
-
- __barebox_exitcalls_start = .;
- .barebox_exitcalls : { EXITCALLS }
- __barebox_exitcalls_end = .;
-
- __usymtab_start = .;
- __usymtab : { BAREBOX_SYMS }
- __usymtab_end = .;
-
.rela.dyn : { *(.rela*) }
- .oftables : { BAREBOX_CLK_TABLE() }
+ .oftables : { BAREBOX_CLK_TABLE }
- .dtb : { BAREBOX_DTB() }
+ .dtb : { BAREBOX_DTB }
_edata = .;
. = ALIGN(8);
diff --git a/arch/sandbox/board/barebox.lds.S b/arch/sandbox/board/barebox.lds.S
index 80e27fe87d..7a5a8eb1e7 100644
--- a/arch/sandbox/board/barebox.lds.S
+++ b/arch/sandbox/board/barebox.lds.S
@@ -3,29 +3,9 @@
SECTIONS
{
. = ALIGN(64);
- __barebox_initcalls_start = .;
- __barebox_initcalls : { INITCALLS }
- __barebox_initcalls_end = .;
-
- . = ALIGN(64);
- __barebox_exitcalls_start = .;
- __barebox_exitcalls : { EXITCALLS }
- __barebox_exitcalls_end = .;
-
- . = ALIGN(64);
- __barebox_magicvar_start = .;
- .barebox_magicvar : { BAREBOX_MAGICVARS }
- __barebox_magicvar_end = .;
-
- . = ALIGN(64);
- __barebox_cmd_start = .;
- __barebox_cmd : { BAREBOX_CMDS }
- __barebox_cmd_end = .;
-
- . = ALIGN(64);
- __barebox_ratp_cmd_start = .;
- __barebox_ratp_cmd : { BAREBOX_RATP_CMDS }
- __barebox_ratp_cmd_end = .;
+ .barebox_rodata : {
+ RO_DATA_SECTION
+ }
}
INSERT BEFORE .rodata;
diff --git a/arch/x86/lib/barebox.lds.S b/arch/x86/lib/barebox.lds.S
index 6ee9342f47..71251642dc 100644
--- a/arch/x86/lib/barebox.lds.S
+++ b/arch/x86/lib/barebox.lds.S
@@ -133,6 +133,7 @@ SECTIONS
*(.boot.rodata*)
*(.boot.data*)
. = ALIGN(4);
+ RO_DATA_SECTION
} > barebox
#endif
@@ -164,48 +165,6 @@ SECTIONS
. = ALIGN(4);
} > barebox
- .barebox_cmd : AT ( LOADADDR(.got) + SIZEOF (.got) ) {
- __barebox_cmd_start = .;
- BAREBOX_CMDS
- __barebox_cmd_end = .;
- . = ALIGN(4);
- } > barebox
-
- .barebox_ratp_cmd : AT ( LOADADDR(.got) + SIZEOF (.got) ) {
- __barebox_ratp_cmd_start = .;
- BAREBOX_RATP_CMDS
- __barebox_ratp_cmd_end = .;
- . = ALIGN(4);
- } > barebox
-
- .barebox_magicvars : AT ( LOADADDR(.barebox_cmd) + SIZEOF (.barebox_cmd) ) {
- __barebox_magicvar_start = .;
- BAREBOX_MAGICVARS
- __barebox_magicvar_end = .;
- . = ALIGN(4);
- } > barebox
-
- .barebox_initcalls : AT ( LOADADDR(.barebox_magicvars) + SIZEOF (.barebox_magicvars) ) {
- __barebox_initcalls_start = .;
- INITCALLS
- __barebox_initcalls_end = .;
- . = ALIGN(4);
- } > barebox
-
- .barebox_exitcalls : AT ( LOADADDR(.barebox_initcalls) + SIZEOF (.barebox_initcalls) ) {
- __barebox_exitcalls_start = .;
- EXITCALLS
- __barebox_exitcalls_end = .;
- . = ALIGN(4);
- } > barebox
-
- .__usymtab : AT ( LOADADDR(.barebox_exitcalls) + SIZEOF (.barebox_exitcalls) ) {
- __usymtab_start = .;
- BAREBOX_SYMS
- __usymtab_end = .;
- . = ALIGN(4);
- } > barebox
-
_edata = .;
.bss : {
__bss_start = .;
diff --git a/arch/x86/mach-efi/elf_ia32_efi.lds.S b/arch/x86/mach-efi/elf_ia32_efi.lds.S
index 9477aa7d73..18ddf17802 100644
--- a/arch/x86/mach-efi/elf_ia32_efi.lds.S
+++ b/arch/x86/mach-efi/elf_ia32_efi.lds.S
@@ -35,6 +35,7 @@ SECTIONS
.data : {
*(.rodata*)
+ RO_DATA_SECTION
*(.data)
*(.data1)
*(.data.*)
@@ -50,31 +51,6 @@ SECTIONS
*(COMMON)
}
- . = ALIGN(64);
-
- __barebox_initcalls_start = .;
- __barebox_initcalls : { INITCALLS }
- __barebox_initcalls_end = .;
-
- __barebox_exitcalls_start = .;
- __barebox_exitcalls : { EXITCALLS }
- __barebox_exitcalls_end = .;
-
- . = ALIGN(64);
- __barebox_magicvar_start = .;
- .barebox_magicvar : { BAREBOX_MAGICVARS }
- __barebox_magicvar_end = .;
-
- . = ALIGN(64);
- __barebox_cmd_start = .;
- __barebox_cmd : { BAREBOX_CMDS }
- __barebox_cmd_end = .;
-
- . = ALIGN(64);
- __barebox_ratp_cmd_start = .;
- __barebox_ratp_cmd : { BAREBOX_RATP_CMDS }
- __barebox_ratp_cmd_end = .;
-
. = ALIGN(4096);
.dynamic : { *(.dynamic) }
. = ALIGN(4096);
diff --git a/arch/x86/mach-efi/elf_x86_64_efi.lds.S b/arch/x86/mach-efi/elf_x86_64_efi.lds.S
index 90b6b9f3f1..40a9425034 100644
--- a/arch/x86/mach-efi/elf_x86_64_efi.lds.S
+++ b/arch/x86/mach-efi/elf_x86_64_efi.lds.S
@@ -38,6 +38,7 @@ SECTIONS
.data : {
*(.rodata*)
+ RO_DATA_SECTION
*(.got.plt)
*(.got)
*(.data*)
@@ -52,31 +53,6 @@ SECTIONS
*(.rel.local)
}
- . = ALIGN(64);
-
- __barebox_initcalls_start = .;
- __barebox_initcalls : { INITCALLS }
- __barebox_initcalls_end = .;
-
- __barebox_exitcalls_start = .;
- __barebox_exitcalls : { EXITCALLS }
- __barebox_exitcalls_end = .;
-
- . = ALIGN(64);
- __barebox_magicvar_start = .;
- .barebox_magicvar : { BAREBOX_MAGICVARS }
- __barebox_magicvar_end = .;
-
- . = ALIGN(64);
- __barebox_cmd_start = .;
- __barebox_cmd : { BAREBOX_CMDS }
- __barebox_cmd_end = .;
-
- . = ALIGN(64);
- __barebox_ratp_cmd_start = .;
- __barebox_ratp_cmd : { BAREBOX_RATP_CMDS }
- __barebox_ratp_cmd_end = .;
-
. = ALIGN(4096);
.dynamic : { *(.dynamic) }
. = ALIGN(4096);