Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly export function defined in test which uses global_asm!() #116458

Merged
merged 2 commits into from
Oct 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tests/ui/asm/x86_64/issue-96797.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ use std::arch::global_asm;
#[no_mangle]
fn my_func() {}

global_asm!("call_foobar: jmp {}", sym foobar);
global_asm!("
.globl call_foobar
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the actual change that matters. The rest is more to match what rustc would produce. (a separate section for each function and proper type and size metadata for the symbol.)

.type call_foobar,@function
.pushsection .text.call_foobar,\"ax\",@progbits
call_foobar: jmp {}
.size call_foobar, .-call_foobar
bjorn3 marked this conversation as resolved.
Show resolved Hide resolved
.popsection
", sym foobar);

fn foobar() {}

Expand Down
Loading