[PATCH] bfd: xtensa: keep property tables without linker script KEEP

Project / Subsystem

binutils / bfd

Date

2026-08-11

Proposer

Alexey Lapshin <alexey.lapshin@espressif.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Reduced executable size by eliminating dead code retained due to incorrect garbage collection of property tables.
  • • Simplified linker scripts by removing the need for explicit `KEEP()` directives for `.xt.prop` and `.xt.lit` sections.

All attributes

project
binutils
subsystem
bfd
patch_id
—
discussion_id
12fadd324212a4171569d0c545bd4e9b3888a163.camel@espressif.com
source_type
public_inbox
title
[PATCH] bfd: xtensa: keep property tables without linker script KEEP
headline
bfd: xtensa: keep property tables without linker script KEEP
tldr
Improve garbage collection for Xtensa property tables to avoid bloating images with dead code.
proposer
Alexey Lapshin <alexey.lapshin@espressif.com>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Reduced executable size by eliminating dead code retained due to incorrect garbage collection of property tables.
  • • Simplified linker scripts by removing the need for explicit `KEEP()` directives for `.xt.prop` and `.xt.lit` sections.
series_id
—
series_role
standalone
series_parts
[]
tags
  • • binutils
  • • bfd
  • • xtensa
  • • garbage collection
  • • linker
bugzilla_url
—
date
2026-08-11T00:00:00.000Z

[PATCH] bfd: xtensa: keep property tables without linker script KEEP

Alexey Lapshin proposes changes to how Xtensa property tables are handled during garbage collection in Binutils’ BFD library. Previously, linker scripts used KEEP() to retain these unreferenced tables, which inadvertently kept dead code and other unreferenced sections. This patch modifies the garbage collection process to mark property tables correctly, eliminating the need for KEEP() and preventing image bloat.