Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/84004?usp=email )
Change subject: NOT_FOR_MERGE: Check garbage collection using LTO ......................................................................
NOT_FOR_MERGE: Check garbage collection using LTO
Result: Clang throws away the romstage. GCC not...
Change-Id: I6fed7671739bfec49fbfc78c1416b5ea7dc9f236 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/arm64/Makefile.mk M src/arch/arm64/romstage.c M src/include/romstage_common.h 3 files changed, 6 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/84004/1
diff --git a/src/arch/arm64/Makefile.mk b/src/arch/arm64/Makefile.mk index f4ca29b..7730ad1 100644 --- a/src/arch/arm64/Makefile.mk +++ b/src/arch/arm64/Makefile.mk @@ -77,6 +77,7 @@
ifeq ($(CONFIG_ARCH_ROMSTAGE_ARM64),y)
+romstage-y += return_early.c romstage-y += boot.c romstage-y += div0.c romstage-y += eabi_compat.c diff --git a/src/arch/arm64/romstage.c b/src/arch/arm64/romstage.c index 0c37711..a05dd52 100644 --- a/src/arch/arm64/romstage.c +++ b/src/arch/arm64/romstage.c @@ -22,9 +22,12 @@ romstage_main(); } #endif +int return_early(void);
-void __noreturn romstage_main(void) +void romstage_main(void) { + if (return_early()) + return; platform_romstage_main(); cbmem_initialize_empty(); platform_romstage_postram(); diff --git a/src/include/romstage_common.h b/src/include/romstage_common.h index f376864..f530934 100644 --- a/src/include/romstage_common.h +++ b/src/include/romstage_common.h @@ -3,6 +3,6 @@ #ifndef ROMSTAGE_COMMON_H #define ROMSTAGE_COMMON_H
-void __noreturn romstage_main(void); +void romstage_main(void);
#endif /* ROMSTAGE_COMMON_H */