mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
riscv: Enable function sections
The linker can remove sections that are never addressed, so it makes a lot of sense to declare every function as an individual section. This reduces the output U-Boot code size by ~30kb for me. Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
@@ -29,5 +29,5 @@ CONFIG_STANDALONE_LOAD_ADDR = 0x00000000 \
|
||||
-T $(srctree)/examples/standalone/riscv.lds
|
||||
|
||||
PLATFORM_CPPFLAGS += -ffixed-gp -fpic
|
||||
PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -gdwarf-2
|
||||
PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -gdwarf-2 -ffunction-sections
|
||||
LDFLAGS_u-boot += --gc-sections -static -pie
|
||||
|
Reference in New Issue
Block a user