aboutsummaryrefslogtreecommitdiff
path: root/src/lib/program.ld
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/program.ld')
-rw-r--r--src/lib/program.ld7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/program.ld b/src/lib/program.ld
index 88a3126038..3b6aa2ecba 100644
--- a/src/lib/program.ld
+++ b/src/lib/program.ld
@@ -51,7 +51,7 @@
_etext = .;
} : to_load
-#if ENV_RAMSTAGE && CONFIG(COVERAGE)
+#if ENV_RAMSTAGE && (CONFIG(COVERAGE) || CONFIG(ASAN_IN_RAMSTAGE))
.ctors . : {
. = ALIGN(0x100);
__CTOR_LIST__ = .;
@@ -126,6 +126,11 @@
}
#endif
+#if ENV_RAMSTAGE && CONFIG(ASAN_IN_RAMSTAGE)
+ _shadow_size = (_eheap - _data) >> 3;
+ REGION(asan_shadow, ., _shadow_size, ARCH_POINTER_ALIGN_SIZE)
+#endif
+
_eprogram = .;
/* Discard the sections we don't need/want */