summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.rules4
-rw-r--r--chip/npcx/spiflashfw/npcx_monitor.ld1
2 files changed, 3 insertions, 2 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 91182a3a58..bf621f0191 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -670,14 +670,14 @@ $(npcx-monitor-fw-bin):$(npcx-monitor-fw).c npx-monitor-dir
$(Q)$(OBJCOPY) -O binary $(out)/$(npcx-monitor-fw).elf $@
$(out)/$(npcx-monitor-hdr)_ro.o:$(npcx-monitor-hdr).c npx-monitor-dir
- $(Q)$(CC) $(CFLAGS) -DSECTION_IS_RO=$(EMPTY) -MMD -c $< -MT $@ -o $@
+ $(Q)$(CC) $(CFLAGS) -DSECTION_IS_RO=$(EMPTY) -MMD -fno-lto -c $< -MT $@ -o $@
$(npcx-monitor-hdr-ro-bin):$(out)/$(npcx-monitor-hdr)_ro.o
$(if $(V),,@echo ' EXTBIN ' $(subst $(out)/,,$@) ; )
$(Q)$(OBJCOPY) -O binary $< $@
$(out)/$(npcx-monitor-hdr)_rw.o:$(npcx-monitor-hdr).c npx-monitor-dir
- $(Q)$(CC) $(CFLAGS) -MMD -c $< -MT $@ -o $@
+ $(Q)$(CC) $(CFLAGS) -MMD -fno-lto -c $< -MT $@ -o $@
$(npcx-monitor-hdr-rw-bin):$(out)/$(npcx-monitor-hdr)_rw.o
$(if $(V),,@echo ' EXTBIN ' $(subst $(out)/,,$@) ; )
diff --git a/chip/npcx/spiflashfw/npcx_monitor.ld b/chip/npcx/spiflashfw/npcx_monitor.ld
index 03e38b0609..ae7760c519 100644
--- a/chip/npcx/spiflashfw/npcx_monitor.ld
+++ b/chip/npcx/spiflashfw/npcx_monitor.ld
@@ -49,4 +49,5 @@ SECTIONS
*/
_sidata = _etext;
+ /DISCARD/ : { *(.ARM.*) }
}