diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2024-04-08 02:13:11 +0200 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2024-04-12 03:04:06 +0000 |
commit | a24d002ac2b409788bb8cd53725f482c427ca232 (patch) | |
tree | f6052272b96cefcf8bd4fd0495e39d8374dcae5d | |
parent | 1a4c91aee09fa8fdd4608b4017521f87b2756e58 (diff) |
Makefile.mk: Account for large code model sections in cbfs_struct
Starting with version 18 LLVM puts code and data generated with
-ffunction-section -mcmodel=large inside sections with an 'l' prefix.
This would now also pick up const data in .rodata.
Change-Id: Ie07779ef548337772183ffe2d642f971d8cceae7
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81777
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
-rw-r--r-- | Makefile.mk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile.mk b/Makefile.mk index d7110a9caa..e642ac7a6e 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -366,7 +366,8 @@ cbfs-files-processor-struct= \ $(eval $(2): $(1) $(obj)/build.h $(obj)/fmap_config.h $(KCONFIG_AUTOHEADER); \ printf " CC+STRIP $(1)\n"; \ $(CC_ramstage) -MMD $(CPPFLAGS_ramstage) $(CFLAGS_ramstage) --param asan-globals=0 $$(ramstage-c-ccopts) -include $(KCONFIG_AUTOHEADER) -MT $(2) -o $(2).tmp -c $(1) && \ - $(OBJCOPY_ramstage) -O binary --only-section='.data*' --only-section='.bss*' --set-section-flags .bss*=alloc,contents,load $(2).tmp $(2); \ + $(OBJCOPY_ramstage) -O binary --only-section='.*data*' --only-section='.*bss*' \ + --set-section-flags .*bss*=alloc,contents,load $(2).tmp $(2); \ rm -f $(2).tmp) \ $(eval DEPENDENCIES += $(2).d) |