Skip to content

hexagon: Make fma label local to avoid symbol collision#1066

Merged
tgross35 merged 1 commit intorust-lang:mainfrom
androm3da:main
Jan 31, 2026
Merged

hexagon: Make fma label local to avoid symbol collision#1066
tgross35 merged 1 commit intorust-lang:mainfrom
androm3da:main

Conversation

@androm3da
Copy link
Copy Markdown
Contributor

@androm3da androm3da commented Jan 31, 2026

The fma: label in dffma.s was being exported as a global symbol causing a "symbol 'fma' is already defined" error when linking with libm's fma function.

Unfortunately #682 removed .global fma but didn't address the implicit global export of the label itself.

--- old.txt     2026-01-30 20:31:37.265844316 -0600
+++ new.txt     2026-01-30 20:31:46.531950264 -0600
@@ -1,4 +1,3 @@
-00000000 t fma
 00000000 T __hexagon_fmadf4
 00000000 T __hexagon_fmadf5
 00000000 T __qdsp_fmadf5

Copy link
Copy Markdown
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've run into this with build-std on the target before and meant to ask but never actually did. Thanks!

@androm3da
Copy link
Copy Markdown
Contributor Author

I've run into this with build-std on the target before and meant to ask but never actually did. Thanks!

I feel like I probably encountered it and was so convinced of my prowess w/ the original fix I just told myself "hmm - some echoes of that old bug. it'll come out when the crate gets updated ... " :facepalm:

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Jan 31, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

The `fma:` label in dffma.s was being exported as a global symbol
causing a "symbol 'fma' is already defined" error when linking with
libm's `fma` function.

Unfortunately rust-lang#682 removed `.global fma` but
didn't address the implicit global export of the label itself.

    --- old.txt     2026-01-30 20:31:37.265844316 -0600
    +++ new.txt     2026-01-30 20:31:46.531950264 -0600
    @@ -1,4 +1,3 @@
    -00000000 t fma
     00000000 T __hexagon_fmadf4
     00000000 T __hexagon_fmadf5
     00000000 T __qdsp_fmadf5
@tgross35
Copy link
Copy Markdown
Contributor

(pushed with a change to canonicalize the issue number in the commit message, since triagebot will yell about that soon #1065)

@tgross35 tgross35 merged commit e5726fd into rust-lang:main Jan 31, 2026
40 checks passed
@androm3da
Copy link
Copy Markdown
Contributor Author

@tgross35 how do I propagate this fix to mitigate the CI issue we see in stdarch? c-b needs to be updated in rust-src? Is that something I can do or something I request from some project role?

@tgross35
Copy link
Copy Markdown
Contributor

tgross35 commented Feb 3, 2026

I have a sync in progress (unfortunately they can be a bit tricky), will try to wrap it up today

@androm3da
Copy link
Copy Markdown
Contributor Author

I have a sync in progress (unfortunately they can be a bit tricky), will try to wrap it up today

Oh thanks so much. No hurry on my account, just wanted to know if I could shepherd it through. Good to hear you're on it.

@tgross35
Copy link
Copy Markdown
Contributor

That took longer than expected but this was synced back in rust-lang/rust#152420

tgross35 added a commit to tgross35/rust-libc that referenced this pull request Feb 13, 2026
compiler-builtins has been fixed such that this is no longer needed.

This reverts commit 5a9e1db.

Link: rust-lang/compiler-builtins#1066
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Feb 13, 2026
compiler-builtins has been fixed such that this is no longer needed.

This reverts commit 5a9e1db.

Link: rust-lang/compiler-builtins#1066
github-merge-queue Bot pushed a commit to rust-lang/libc that referenced this pull request Feb 13, 2026
compiler-builtins has been fixed such that this is no longer needed.

This reverts commit 5a9e1db.

Link: rust-lang/compiler-builtins#1066
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Feb 13, 2026
compiler-builtins has been fixed such that this is no longer needed.

This reverts commit 5a9e1db.

Link: rust-lang/compiler-builtins#1066

(backport <rust-lang#4971>)
(cherry picked from commit e79f46e)
github-merge-queue Bot pushed a commit to rust-lang/libc that referenced this pull request Feb 13, 2026
compiler-builtins has been fixed such that this is no longer needed.

This reverts commit 5a9e1db.

Link: rust-lang/compiler-builtins#1066

(backport <#4971>)
(cherry picked from commit e79f46e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants