summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/program.ld13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/program.ld b/src/lib/program.ld
index 178444733c..b3ddc0b762 100644
--- a/src/lib/program.ld
+++ b/src/lib/program.ld
@@ -10,6 +10,11 @@
* SoC's entry points due to artificial alignment restrictions, see
* https://sourceware.org/binutils/docs/ld/Output-Section-Address.html
*/
+
+/* Starting with version 18 LLVM the combination -ffunction-section -mcmodel=large
+ * puts code and data in '.ltext, '.lrodata', '.ldata' and '.lbss'
+ */
+
.text . : {
_program = .;
_text = .;
@@ -23,6 +28,8 @@
KEEP(*(.metadata_hash_anchor));
*(.text);
*(.text.*);
+ *(.ltext);
+ *(.ltext.*);
#if ENV_HAS_CBMEM
. = ALIGN(ARCH_POINTER_ALIGN_SIZE);
@@ -55,6 +62,8 @@
. = ALIGN(ARCH_POINTER_ALIGN_SIZE);
*(.rodata);
*(.rodata.*);
+ *(.lrodata);
+ *(.lrodata.*);
. = ALIGN(ARCH_POINTER_ALIGN_SIZE);
_etext = .;
RECORD_SIZE(text)
@@ -93,6 +102,8 @@
*(.data);
*(.data.*);
+ *(.ldata);
+ *(.ldata.*);
*(.sdata);
*(.sdata.*);
@@ -122,6 +133,8 @@
_bss = .;
*(.bss)
*(.bss.*)
+ *(.lbss)
+ *(.lbss.*)
*(.sbss)
*(.sbss.*)
. = ALIGN(ARCH_POINTER_ALIGN_SIZE);