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
neceve_ has joined #rust-embedded
neceve has quit [Ping timeout: 268 seconds]
causal has joined #rust-embedded
bpye has quit [Quit: Ping timeout (120 seconds)]
bpye has joined #rust-embedded
starblue has quit [Ping timeout: 264 seconds]
starblue has joined #rust-embedded
neceve_ has quit [Quit: ZNC - https://znc.in]
neceve has joined #rust-embedded
neceve has quit [Quit: ZNC - https://znc.in]
neceve has joined #rust-embedded
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
crabbedhaloablut has quit [Ping timeout: 255 seconds]
crabbedhaloablut has joined #rust-embedded
neceve has quit [Quit: ZNC - https://znc.in]
neceve has joined #rust-embedded
neceve has quit [Client Quit]
neceve has joined #rust-embedded
starblue has quit [Ping timeout: 265 seconds]
starblue has joined #rust-embedded
IlPalazzo-ojiisa has joined #rust-embedded
neceve has quit [Quit: ZNC - https://znc.in]
neceve has joined #rust-embedded
starblue has quit [Quit: WeeChat 3.0]
<re_irc> < (@Ericson2314:matrix.org)> Can one set a symbol to an arbitrary value by making a ZST global at a certain address?
<re_irc> < (@Ericson2314:matrix.org)> or is there a better way?
<re_irc> < (@Ericson2314:matrix.org)> oh hmm confusing I thought I could specify the address of a global but not seeing that either
<re_irc> < (@Ericson2314:matrix.org)> I guess extern and do via linker script?
<re_irc> < (@jamesmunns:beeper.com)> > Can one set a symbol to an arbitrary value by making a ZST global at a certain address?
<re_irc> could you maybe explain what you're actually trying to do here? I feel like this is a bit of an X/Y question
<re_irc> < (@jamesmunns:beeper.com)> In general, you can't specify the location (address) of anything in Rust, you can only specify it's link section (and have the linker resolve the specific location).
<re_irc> You _can_ create a pointer to an arbitrary location, but not create a variable/static at a given location.
<re_irc> < (@jamesmunns:beeper.com)> (also mixing ZSTs and the linker I think is a little sketchy, but I don't remember exactly the rules here, I'd have to read one of the nomicons)
starblue has joined #rust-embedded
<re_irc> < (@Ericson2314:matrix.org)> : very fun hacks :)
<re_irc> < (@Ericson2314:matrix.org)> this device doesn't have proper loader, so we are obj copying in the relocations and running them by hand
<re_irc> < (@Ericson2314:matrix.org)> getting around ropi limitations
<re_irc> < (@Ericson2314:matrix.org)> and we leave some space in the original linker script for the relocations
<re_irc> < (@Ericson2314:matrix.org)> (because trying put directly have hte main linker script put the relocations in there does not work, I guess because that could be causality loop)
<re_irc> < (@Ericson2314:matrix.org)> so we want the app to specify a symbol which is not an address but a length, now much room to leave for the relocations to be object coppied in later
<re_irc> < (@Ericson2314:matrix.org)> we're just going to do through something in the build.rs
<re_irc> < (@Ericson2314:matrix.org)> "--defsym=" ftw
<re_irc> < (@Ericson2314:matrix.org)> Thanks, though!
emerent has quit [Ping timeout: 260 seconds]
emerent has joined #rust-embedded
conplan has joined #rust-embedded
dc740 has joined #rust-embedded
IlPalazzo-ojiisa has quit [Quit: Leaving.]