You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My crate is structured to build both a bin and a dylib that is loaded by a 3rd-party program. The stand-alone bin part doesn't actually use any of the external symbols, so despite it sharing code with the lib part, it runs fine without the symbols being defined.
However, when I turn on PGO, these undefined symbols cause linking errors. My expectation is that if my crate works without PGO, it should work with PGO enabled, but maybe that's incorrect?
jonas-schievink
added
A-linkage
Area: linking into static, shared libraries and binaries
O-Arm
Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state
labels
Jan 26, 2019
My crate is structured to build both a
bin
and adylib
that is loaded by a 3rd-party program. The stand-alonebin
part doesn't actually use any of the external symbols, so despite it sharing code with thelib
part, it runs fine without the symbols being defined.However, when I turn on PGO, these undefined symbols cause linking errors. My expectation is that if my crate works without PGO, it should work with PGO enabled, but maybe that's incorrect?
My actual crate gets these undefined symbols from here:
https://github.com/robsmith11/krust/blob/master/src/kbindings.rs#L483
But this minimal example reproduces the problem:
EDIT:
Not sure whether it's relevant, but removing the
#[no_mangle]
makes it work with PGO.The text was updated successfully, but these errors were encountered: