Skip to content

loongarch: use "_mcount" as the default mcount symbol#154566

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
heiher:loong-mcount-sym
Mar 30, 2026
Merged

loongarch: use "_mcount" as the default mcount symbol#154566
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
heiher:loong-mcount-sym

Conversation

@heiher
Copy link
Copy Markdown
Contributor

@heiher heiher commented Mar 29, 2026

Set the mcount field to "_mcount" for all LoongArch targets to match Clang/GCC behavior [1]. This fixes linking failures when using -Z instrument-mcount, where the runtime expects "_mcount" instead of "mcount".

[1] https://github.com/llvm/llvm-project/blob/main/clang/lib/Basic/Targets/LoongArch.h#L60

Set the `mcount` field to "_mcount" for all LoongArch targets to match
Clang/GCC behavior [1]. This fixes linking failures when using
`-Z instrument-mcount`, where the runtime expects "_mcount" instead of
"mcount".

[1] https://github.com/llvm/llvm-project/blob/main/clang/lib/Basic/Targets/LoongArch.h#L60
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 29, 2026

These commits modify compiler targets.
(See the Target Tier Policy.)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 29, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 29, 2026

r? @chenyukang

rustbot has assigned @chenyukang.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 69 candidates
  • Random selection from 12 candidates

@chenyukang
Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 30, 2026

📌 Commit 6e984cd has been approved by chenyukang

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 30, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Mar 30, 2026
loongarch: use "_mcount" as the default mcount symbol

Set the `mcount` field to "_mcount" for all LoongArch targets to match Clang/GCC behavior [1]. This fixes linking failures when using `-Z instrument-mcount`, where the runtime expects "_mcount" instead of "mcount".

[1] https://github.com/llvm/llvm-project/blob/main/clang/lib/Basic/Targets/LoongArch.h#L60
rust-bors bot pushed a commit that referenced this pull request Mar 30, 2026
Rollup of 3 pull requests

Successful merges:

 - #154548 (Add regression test for TransmuteFrom ICE with min_generic_const_args)
 - #154564 (Tweak wording of E0275 WF errors)
 - #154566 (loongarch: use "_mcount" as the default mcount symbol)
rust-bors bot pushed a commit that referenced this pull request Mar 30, 2026
Rollup of 4 pull requests

Successful merges:

 - #154548 (Add regression test for TransmuteFrom ICE with min_generic_const_args)
 - #154563 (Point at binop lhs and rhs when expression is multiline)
 - #154564 (Tweak wording of E0275 WF errors)
 - #154566 (loongarch: use "_mcount" as the default mcount symbol)
rust-timer added a commit that referenced this pull request Mar 30, 2026
Rollup merge of #154566 - heiher:loong-mcount-sym, r=chenyukang

loongarch: use "_mcount" as the default mcount symbol

Set the `mcount` field to "_mcount" for all LoongArch targets to match Clang/GCC behavior [1]. This fixes linking failures when using `-Z instrument-mcount`, where the runtime expects "_mcount" instead of "mcount".

[1] https://github.com/llvm/llvm-project/blob/main/clang/lib/Basic/Targets/LoongArch.h#L60
@rust-bors rust-bors bot merged commit 89eb329 into rust-lang:main Mar 30, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 30, 2026
@heiher heiher deleted the loong-mcount-sym branch March 30, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants