[PATCH v4 12/12] RISC-V/bfd: warn about non-power-of-2 stack-align attribute

Project / Subsystem

binutils / risc-v/bfd

Date

2026-07-24

Proposer

Jan Beulich <jbeulich@suse.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

/10

Technical tradeoffs

  • Enforces stricter validation of the stack_align attribute, potentially rejecting some previously accepted code.
  • Improves robustness by preventing the use of non-sensical alignment values.

All attributes

project
binutils
subsystem
risc-v/bfd
patch_id
discussion_id
9ab61932-ebdf-4136-bb1f-b9482aa75ea7@suse.com
source_type
public_inbox
title
[PATCH v4 12/12] RISC-V/bfd: warn about non-power-of-2 stack-align attribute
headline
RISC-V/bfd: warn about non-power-of-2 stack-align attribute
tldr
Warn about and ignore non-power-of-2 values for the RISC-V stack_align attribute.
proposer
Jan Beulich <jbeulich@suse.com>
consensus
Proposed
outcome
ready
sentiment_score
technical_tradeoffs
  • Enforces stricter validation of the stack_align attribute, potentially rejecting some previously accepted code.
  • Improves robustness by preventing the use of non-sensical alignment values.
series_id
binutils:risc-v/bfd: warn about non-power-of-2 stack-align attribute
series_role
reply
series_parts
[]
tags
  • binutils
  • risc-v
  • bfd
  • elf
  • attribute
bugzilla_url
date
2026-07-24T00:00:00.000Z

[PATCH v4 12/12] RISC-V/bfd: warn about non-power-of-2 stack-align attribute

This patch introduces a warning for non-power-of-2 values used with the RISC-V stack_align attribute, enforcing sensible alignment. It also refactors some conditional logic for clarity. The change ensures that only power-of-2 alignment values are accepted, promoting correct code generation.