diff options
-rw-r--r-- | src/arch/x86/Kconfig | 11 | ||||
-rw-r--r-- | src/arch/x86/bootblock.ld | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig index d2ae320810..7d255619ba 100644 --- a/src/arch/x86/Kconfig +++ b/src/arch/x86/Kconfig @@ -412,4 +412,15 @@ config SOC_PHYSICAL_ADDRESS_WIDTH If not set, both CPU and SoC physical address width are assume to be the same. +config X86_BOOTBLOCK_EXTRA_PROGRAM_SZ + int + default 1024 if CHROMEOS + default 0 + help + Add extra space to prevent overlap between .text and .init sections. + This is necessary for older linkers (pre-binutils 2.4x) like those used + on ChromeOS platforms. + + The default value is 1024 bytes (1 KiB) for ChromeOS and 0 for other platforms. + endif diff --git a/src/arch/x86/bootblock.ld b/src/arch/x86/bootblock.ld index 73a3d18360..1f44d6abef 100644 --- a/src/arch/x86/bootblock.ld +++ b/src/arch/x86/bootblock.ld @@ -26,7 +26,7 @@ SECTIONS { INCLUDE "bootblock/lib/program.ld" - PROGRAM_SZ = SIZEOF(.text) + SIZEOF(.data); + PROGRAM_SZ = SIZEOF(.text) + SIZEOF(.data) + CONFIG_X86_BOOTBLOCK_EXTRA_PROGRAM_SZ; . = MIN(_ECFW_PTR, MIN(_ID_SECTION, _FIT_POINTER)) - EARLYASM_SZ; . = CONFIG(SIPI_VECTOR_IN_ROM) ? ALIGN(4096) : ALIGN(16); |