Re: AVR: Support .gnu_attribute to encode the size of [long] double

Project / Subsystem

binutils / avr

Date

2026-09-02

Proposer

Georg-Johann Lay <avr@gjlay.de>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Increases the complexity of ELF parsing and attribute handling in binutils.
  • • Ensures ABI compatibility, preventing potential runtime errors or difficult-to-debug issues.

All attributes

project
binutils
subsystem
avr
patch_id
—
discussion_id
55570124-c5b7-4065-ab90-11a34104bd94@gjlay.de
source_type
public_inbox
title
Re: AVR: Support .gnu_attribute to encode the size of [long] double
headline
AVR: Support .gnu_attribute to encode the size of [long] double
tldr
Adds .gnu_attribute support to binutils for AVR to encode double/long double sizes, enabling ABI compatibility checks.
proposer
Georg-Johann Lay <avr@gjlay.de>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Increases the complexity of ELF parsing and attribute handling in binutils.
  • • Ensures ABI compatibility, preventing potential runtime errors or difficult-to-debug issues.
series_id
—
series_role
standalone
series_parts
[]
tags
  • • avr
  • • elf
  • • attributes
  • • abi
  • • linker
bugzilla_url
—
date
2026-09-02T00:00:00.000Z

Re: AVR: Support .gnu_attribute to encode the size of [long] double

This patch introduces support for .gnu_attribute tags (Tag_GNU_AVR_BITS_DOUBLE and Tag_GNU_AVR_BITS_LONG_DOUBLE) in binutils for the AVR architecture. This allows the compiler to encode the size of double and long double (32 or 64 bits) into object files. The linker can then use these attributes to detect and reject attempts to link object files with incompatible floating-point ABI settings, ensuring ABI consistency.