-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Some linker sections are missing when building project with nightly toolchain #130397
Comments
Does it work on nightly with |
yes, it works with that flag on nightly. |
What is the output of |
Here is output:
|
|
The |
I don't think this should get the regression-from-stable-to-nightly label. We only enable lld on nightly, right? So it will keep working on stable and beta until we make lld the default there too. |
After some research I've found an option to link successfully with nightly linker with following flags in [target.'cfg(unix)']
rustflags = ["-C", "link-args=-z nostart-stop-gc"] That way the tracing works with resulting binary and |
This looks like an issue in how LTTng generates its tracepoint symbols, without ever referencing them to ensure they'll be present in the final binary (not an LLD issue). They should already have issues with uses of This case is also hard to efficiently detect on our side, unlike some other lld/bfd differences. It's possible we can have a migration period where we also pass |
We have a several target platforms ( In the end we reverted transition to Rust for our lttng tracepoints and keep those in C. Also, we tried to rewrite our |
With #137685, we now pass the LLD |
I'm using Ubuntu Linux 20.04.
I have a project which build some
.c
files (lttng tracepoints) inbuild.rs
withcc::Build
and link it to executable.In
stable
version of Rust toolchain everything works fine.But when compiling it with
nightly
Rust toolchain some tracepoint data is missing in resulting executable and tracing does not working.Code
Here is the archive of minimal project which have a link problem on
nightly
:lttng_link_test.zip
To build the code you may need to install
liblttng-ust-dev
package.The Rust toolchain is specified in
rust-toolchain.toml
file of the project.I tried this code:
I expected to see this happen:
Instead, this happened:
The
__tracepoint_ptr_hello_world___my_first_tracepoint
is missing.Version it worked on
It most recently worked on:
Version with regression
The text was updated successfully, but these errors were encountered: