diff options
Diffstat (limited to 'arch/sandbox')
-rw-r--r-- | arch/sandbox/config.mk | 3 | ||||
-rw-r--r-- | arch/sandbox/cpu/u-boot.lds | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk index 2babcde881..5e7077bfe7 100644 --- a/arch/sandbox/config.mk +++ b/arch/sandbox/config.mk @@ -5,6 +5,9 @@ PLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM PLATFORM_LIBS += -lrt +LDFLAGS_FINAL += --gc-sections +PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections + # Define this to avoid linking with SDL, which requires SDL libraries # This can solve 'sdl-config: Command not found' errors ifneq ($(NO_SDL),) diff --git a/arch/sandbox/cpu/u-boot.lds b/arch/sandbox/cpu/u-boot.lds index 3a6cf55eb9..727bcc3598 100644 --- a/arch/sandbox/cpu/u-boot.lds +++ b/arch/sandbox/cpu/u-boot.lds @@ -24,8 +24,9 @@ SECTIONS } .efi_runtime : { - *(efi_runtime_text) - *(efi_runtime_data) + *(.text.efi_runtime*) + *(.rodata.efi_runtime*) + *(.data.efi_runtime*) } .__efi_runtime_stop : { @@ -38,8 +39,8 @@ SECTIONS } .efi_runtime_rel : { - *(.relefi_runtime_text) - *(.relefi_runtime_data) + *(.rel*.efi_runtime) + *(.rel*.efi_runtime.*) } .efi_runtime_rel_stop : |