[all-commits] [llvm/llvm-project] aaadfa: [RISC-V][MC] Fix mapping symbol section tracking o...
Alexander Richardson via All-commits
all-commits at lists.llvm.org
Mon Sep 21 09:00:15 PDT 2026
Branch: refs/heads/users/arichardson/risc-v-mc-fix-mapping-symbol-section-tracking-on-popsection
Home: https://github.com/llvm/llvm-project
Commit: aaadfa4ea365f743cc079765c51a196b0bb8f159
https://github.com/llvm/llvm-project/commit/aaadfa4ea365f743cc079765c51a196b0bb8f159
Author: Alex Richardson <alexrichardson at google.com>
Date: 2026-09-21 (Mon, 21 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()
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
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