Simplify elf64_alpha_relocate_section
Project / Subsystem
binutils / binutils
Date
2026-05-03
Proposer
Alan Modra <amodra@gmail.com>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Code becomes more readable.
- • Removes redundant code, potentially slightly improving performance.
- • Depends on the correctness of elf_section_data.
All attributes
- project
- binutils
- subsystem
- binutils
- patch_id
- —
- discussion_id
- afczs0mC2uqrchvT@squeak.grove.modra.org
- source_type
- public_inbox
- title
- Simplify elf64_alpha_relocate_section
- headline
- Simplify elf64_alpha_relocate_section
- tldr
- Use elf_section_data to access the dynamic relocation section in elf64_alpha_relocate_section, simplifying the code.
- proposer
- Alan Modra <amodra@gmail.com>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Code becomes more readable.
- • Removes redundant code, potentially slightly improving performance.
- • Depends on the correctness of elf_section_data.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • binutils
- • elf
- • alpha
- • relocation
- • bfd
- bugzilla_url
- —
- date
- 2026-05-03T00:00:00.000Z
Simplify elf64_alpha_relocate_section
This patch simplifies the elf64_alpha_relocate_section function by using elf_section_data to retrieve the dynamic relocation section associated with the input section. Prior to a previous change, the alpha architecture didn’t use elf_section_data(sec)->sreloc to store the dynamic relocation section. This change streamlines the code by using the already-set elf_section_data instead of re-deriving the information.