rust-lang / rust-lang/rustc_codegen_gcc
Some global symbols cannot be used
Open
Nobody has claimed this yet.
bug
libgccjit
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 105
- Avg merge
- 8h 20m
- Merged PRs (30d)
- 14
Description
Because we use -fasm=intel, we cannot use some symbols like byte.
For instance, the following code:
#[no_mangle]
pub fn byte() {
println!("Byte");
}
will cause the following error:
/tmp/libgccjit-Wnkc4D/fake.s: Assembler messages:
/tmp/libgccjit-Wnkc4D/fake.s: Error: .size expression for byte does not evaluate to a constant
See these:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the #[no_mangle] pub fn byte() example with -fasm=intel and inspect the generated assembler error. Investigate how this codegen path handles global symbols under Intel syntax; done means symbols such as byte compile successfully without the reported .size error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100