mirror of
https://github.com/zephyrproject-rtos/zephyr.git
synced 2024-12-04 10:18:24 +08:00
98b8f30a04
Thumb/ARM interworking causes problems with Zephyr's multiple link build process when userspace is enabled. When compiling with userspace, the first link process uses a dummy PROVIDE in the linker script for z_object_find and z_object_wordlist_foreach. This dummy symbol is treated as an ARM function call, but one of the calling functions is in thumb mode. The compiler generates a veneer for thumb functions to call z_object_wordlist_foreach. On the final link step, z_object_find and z_object_wordlist_foreach are real functions and get compiled in thumb mode, thus no veneer is generated in the text section. This means that the .text size changes between the second and third link steps changing the start of the devices section. That causes the kobject code to look in the wrong spot for kernel objects and a crash ensues. Workaround this for now by only compiling in ARM mode so that no veneer is needed. Thus the section sizes stay the same during the different linking steps. Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
20 lines
278 B
Plaintext
20 lines
278 B
Plaintext
# Copyright (c) 2019 Lexmark International, Inc.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
if BOARD_QEMU_CORTEX_R5
|
|
|
|
config BUILD_OUTPUT_BIN
|
|
default n
|
|
|
|
config BOARD
|
|
default "qemu_cortex_r5"
|
|
|
|
if USERSPACE
|
|
|
|
config COMPILER_ISA_THUMB2
|
|
default n
|
|
|
|
endif
|
|
|
|
endif # BOARD_QEMU_CORTEX_R5
|