-
Notifications
You must be signed in to change notification settings - Fork 10
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
Building with "-flto=auto" causes apps to crash #33
Comments
This is probably because we're using a custom Lines 85 to 92 in 1083369
|
|
Sooo, this essentially boils down to a With LTO: $ nm -D result/lib/libip2unix.so | grep socket
0000000000000000 A socket Without LTO: $ nm -D result/lib/libip2unix.so | grep socket
000000000000fed0 T socket |
Okay, backtracking on what I wrote earlier, it is the linker script indeed. I accidentally run a isolated test which ran into essentially a no-op without the linker script. |
Right now, link-time optimisation doesn't work and produces symbols with null references with our linker script. For example without LTO: $ nm -D result/lib/libip2unix.so | grep socket 000000000000fed0 T socket With LTO enabled however, we get the following: $ nm -D result/lib/libip2unix.so | grep socket 0000000000000000 A socket I haven't managed to find out why *exactly* this happens, but since we don't have a fix yet, let's at least make sure users get an error message early on instead of a crash. Signed-off-by: aszlig <aszlig@nix.build> Issue: #33
In openSUSE all packages have by default enabled LTO (but in cases like this it can be easily disabled). Fortunately this is caught by the tests, because helpers/helper_accept_no_peer_addr crashes and a test fails.
The text was updated successfully, but these errors were encountered: