From 7fbef1b1121bd1073cdbe4c45f7e544921fb8b42 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Thu, 22 Feb 2024 15:01:04 +0100 Subject: lib: Remove heap from rmodules No rmodule was using heap. Change-Id: I0bc049a5231dabbec1c962a99ef875eddcc4ac6e Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/80733 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/lib/Makefile.mk | 9 ++++----- src/lib/program.ld | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/lib') diff --git a/src/lib/Makefile.mk b/src/lib/Makefile.mk index fe24156dad..e22fd08723 100644 --- a/src/lib/Makefile.mk +++ b/src/lib/Makefile.mk @@ -310,14 +310,13 @@ RMODULE_LDFLAGS := -z defs -Bsymbolic # rmodule_link_rules is a function that should be called with: # (1) the object name to link # (2) the dependencies -# (3) heap size of the relocatable module -# (4) arch for which the rmodules are to be linked +# (3) arch for which the rmodules are to be linked # It will create the necessary Make rules to create a rmodule. The resulting # rmdoule is named $(1).rmod define rmodule_link -$(strip $(1)): $(strip $(2)) $$(COMPILER_RT_rmodules_$(4)) $(call src-to-obj,rmodules_$(4),src/lib/rmodule.ld) | $$(RMODTOOL) - $$(LD_rmodules_$(4)) $$(LDFLAGS_rmodules_$(4)) $(RMODULE_LDFLAGS) $($(1)-ldflags) -T $(call src-to-obj,rmodules_$(4),src/lib/rmodule.ld) --defsym=__heap_size=$(strip $(3)) -o $$@ --whole-archive --start-group $(filter-out %.ld,$(2)) --end-group - $$(NM_rmodules_$(4)) -n $$@ > $$(basename $$@).map +$(strip $(1)): $(strip $(2)) $$(COMPILER_RT_rmodules_$(3)) $(call src-to-obj,rmodules_$(3),src/lib/rmodule.ld) | $$(RMODTOOL) + $$(LD_rmodules_$(3)) $$(LDFLAGS_rmodules_$(3)) $(RMODULE_LDFLAGS) $($(1)-ldflags) -T $(call src-to-obj,rmodules_$(3),src/lib/rmodule.ld) -o $$@ --whole-archive --start-group $(filter-out %.ld,$(2)) --end-group + $$(NM_rmodules_$(3)) -n $$@ > $$(basename $$@).map endef endif diff --git a/src/lib/program.ld b/src/lib/program.ld index 68bcab6405..21f4be8d32 100644 --- a/src/lib/program.ld +++ b/src/lib/program.ld @@ -134,7 +134,7 @@ .heap . : { . = ALIGN(ARCH_POINTER_ALIGN_SIZE); _heap = .; - . += (ENV_RMODULE ? __heap_size : CONFIG_HEAP_SIZE); + . += CONFIG_HEAP_SIZE; . = ALIGN(ARCH_POINTER_ALIGN_SIZE); _eheap = .; RECORD_SIZE(heap) -- cgit v1.2.3