ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to #rust-embedded:matrix.org and logged at https://libera.irclog.whitequark.org/rust-embedded, code of conduct at https://www.rust-lang.org/conduct.html
cr1901_ has joined #rust-embedded
cr1901 has quit [Read error: Connection reset by peer]
cr1901_ is now known as cr1901
IlPalazzo-ojiisa has quit [Quit: Leaving.]
starblue has quit [Ping timeout: 246 seconds]
starblue has joined #rust-embedded
<re_irc> <@diondokter:matrix.org> Is there a way in Rust to do weak linkage in Rust?
<re_irc> In "cortex-m-rt" they kind of do it with the Hardfault, but the 'weak' function still remains in the binary and takes up 2 bytes.
<re_irc> <@diondokter:matrix.org> From the looks of it no...
<re_irc> <@9names:matrix.org> compiler_builtins uses "#[linkage = "weak"]", but it looks like it's unstable.
<re_irc> <@diondokter:matrix.org> Yeah, I need it stable. And the linkage feature has been unstable since 2015 :P
<re_irc> <@jamesmunns:beeper.com> : You uh, could use binutils to manually weaken symbols after creating an object like a staticlib
<re_irc> <@jamesmunns:beeper.com> I've used this in anger before: https://github.com/rust-lang/compiler-builtins/issues/345#issuecomment-975866310
<re_irc> <@diondokter:matrix.org> Haha, I asked this because I discovered the hard fault symbol being left in for cortex-m-rt
<re_irc> <@jamesmunns:beeper.com> But yeah, still no native weak linkage.
<re_irc> <@jamesmunns:beeper.com> Weak functions will still always make it to the final binary, unless you "override" them with something else
<re_irc> <@jamesmunns:beeper.com> Are you saying you override it but the weak one ALSO still exists?
<re_irc> <@diondokter:matrix.org> Anyways, made a PR https://github.com/rust-embedded/cortex-m/pull/476
<re_irc> <@diondokter:matrix.org> Check out what it does with the `HardFault_` function
<re_irc> <@diondokter:matrix.org> That supposedly weak function still remains in the final binary when it is overridden
IlPalazzo-ojiisa has joined #rust-embedded
emerent has quit [Ping timeout: 248 seconds]
emerent has joined #rust-embedded
dc740 has joined #rust-embedded
dc740 has quit [Remote host closed the connection]
<re_irc> <@shakencodes:matrix.org> : Alex, I am working with the stm32wlxx-hal building up infrastructure for a production development. I would like to understand your impression of the crate's maturity and where it needs improvement. (If we go forward on this platform, we will be happy to reflect PRs back with any improvements made.)
<re_irc> I am happy to have this chat in an open forum, but wanted to give you the opportunity to chat privately first.
dc740 has joined #rust-embedded
dc740 has quit [Remote host closed the connection]
dc740 has joined #rust-embedded
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #rust-embedded
dc740 has quit [Remote host closed the connection]