-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[zig cc/elf] does not pass "-r" to ld.lld #11683
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
Comments
I have been working through the Go unit tests with Zig as the C compiler. The test below is the last Go unit test that fails on Go's master1. Steps to reproduce $HOME/zcc
run
As we can see, the resulting Footnotes
|
This makes -r treated the same as -c which is to output an object file. Zig's ELF linker code already handles multiple object files into an object file with the -r flag to LLD. closes #11683
Could you give #15201 a try? |
Yes. It helps for that particular test. Thank you! |
This makes -r treated the same as -c which is to output an object file. Zig's ELF linker code already handles multiple object files into an object file with the -r flag to LLD. closes #11683
Uh oh!
There was an error while loading. Please reload this page.
Zig Version
0.10.0-dev.2252+a4369918b
Steps to Reproduce
Compile an object file and pass
-r
to it:Expected Behavior
The underlying
ld.lld
command also has-r
Actual Behavior
The linker line is missing
-r
:This causes a Golang test cmd/link/elf_test.go:TestMinusRSymsWithSameName to fail when using
zig cc
as the compiler.To reproduce: this will build the Go sdk with Zig and attempt to run it's
cmd/link
tests:If we apply #11678, this test passes.
The text was updated successfully, but these errors were encountered: