[all-commits] [llvm/llvm-project] 0ab350: [RISC-V][MC] Fix mapping symbol section tracking o...
Alexander Richardson via All-commits
all-commits at lists.llvm.org
Sat Sep 26 19:02:21 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0ab3502ec56a5d8330c79849945b9fefd2668f01
https://github.com/llvm/llvm-project/commit/0ab3502ec56a5d8330c79849945b9fefd2668f01
Author: Alexander Richardson <alexrichardson at google.com>
Date: 2026-09-26 (Sat, 26 Sep 2026)
Changed paths:
M llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp
M llvm/test/MC/RISCV/mapping-across-sections.s
Log Message:
-----------
[RISC-V][MC] Fix mapping symbol section tracking on popSection() (#225131)
Previously, RISCVELFStreamer::changeSection() saved LastEMS and LastEmittedArch
under getPreviousSection().first instead of getCurrentSection().first. When
MCStreamer::popSection() switches back to a previous section,
getPreviousSection() already points to the destination section being restored
rather than the section being exited. This clobbered the destination section's
saved mapping symbol state and caused duplicate `$x<arch>` mapping symbols to
be emitted whenever returning to `.text`.
Use getCurrentSection().first instead, matching AArch64ELFStreamer and
ARMELFStreamer.
This commit was created with the help of AI tools
Pull-Request: https://github.com/llvm/llvm-project/pull/225131
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list