Skip to content

LTO removes necessary symbols from NXP i.MX RT10xx boards #90581

@timoaarnipuro-qt

Description

@timoaarnipuro-qt

When building application binaries for NXP i.MX RT 10xx boards (tested on 1060 EVKB and 1064 EVK), with CONFIG_LTO=y, symbols image_vector_table and boot_data get removed. The board does not boot up.

To Reproduce
Steps to reproduce the behavior:

  1. Set CONFIG_ISR_TABLES_LOCAL_DECLARATION=y and CONFIG_LTO=y
  2. west build -b mimxrt1064_evk --shield rk043fn66hs_ctg zephyr/samples/basic/blinky
  3. west flash
  4. Board does not boot. (arm-none-eabi-objdump -D build/zephyr/zephyr.elf does not show image_vector_table and boot_data at expected addresses)

Expected behavior

Symbols are there and board boots.

Impact

Blocker with workaround.

Environment (please complete the following information):

  • OS: Linux
  • Toolchain: Tested with zephyr-sdk-0.17.0 and arm_gcc_12_3_1
  • Commit SHA: 4189364 (4.1)

Additional context

Marking the symbols undefined for the linker fixes the issue and the symbols are then kept and the board boots normally.

Metadata

Metadata

Labels

StalebugThe issue is a bug, or the PR is fixing a bugplatform: NXPNXPpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions