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
cinemaSundays has quit [Quit: Connection closed for inactivity]
AlexStephanus[m] has quit [Quit: Idle timeout reached: 172800s]
cinemaSundays has joined #rust-embedded
stgl has quit [Quit: ZNC 1.8.2 - https://znc.in]
stgl has joined #rust-embedded
SanchayanMaity has quit [Ping timeout: 264 seconds]
Ekho has quit [Ping timeout: 246 seconds]
SanchayanMaity has joined #rust-embedded
Ekho- has joined #rust-embedded
cinemaSundays has quit [Quit: Connection closed for inactivity]
Foxyloxy has quit [Read error: Connection reset by peer]
Foxyloxy has joined #rust-embedded
cyrozap has quit [Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in]
cyrozap has joined #rust-embedded
emerent_ has joined #rust-embedded
emerent has quit [Killed (platinum.libera.chat (Nickname regained by services))]
emerent_ is now known as emerent
jiande2020 has quit [Quit: Ping timeout (120 seconds)]
jiande2020 has joined #rust-embedded
Guest71 has joined #rust-embedded
Guest71 has quit [Client Quit]
bitts[m] has quit [Quit: Idle timeout reached: 172800s]
GeorgesP[m] has quit [Quit: Idle timeout reached: 172800s]
NiaLinaLunaStorm has quit [Quit: Idle timeout reached: 172800s]
ryan-summers[m] has quit [Quit: Idle timeout reached: 172800s]
AdamHorden has quit [Quit: Adam Horden | adam.horden.me]
apirkle has quit [Ping timeout: 252 seconds]
apirkle has joined #rust-embedded
fooker has quit [Quit: WeeChat 4.2.2]
fooker has joined #rust-embedded
AdamHorden has joined #rust-embedded
newam[m] has quit [Quit: Idle timeout reached: 172800s]
bartmassey[m] has quit [Quit: Idle timeout reached: 172800s]
therealprof[m] has quit [Quit: Idle timeout reached: 172800s]
rmsyn[m] has quit [Quit: Idle timeout reached: 172800s]
adamgreig[m] has quit [Quit: Idle timeout reached: 172800s]
<dirbaio[m]> how do you even start debugging that
<dirbaio[m]> something breaks in asm sym if symbol names have quotes
jannic[m] has joined #rust-embedded
<dirbaio[m]> seems a llvm bug
<dirbaio[m]> llvm ir looks okay
<dirbaio[m]> yet clang lol.ll fails with "undefined reference to `foo"bar'"
<dirbaio[m]> which is broken syntax :D
<dirbaio[m]> this seems a bug of the asm pretty printer though. so maybe there's two bugs here
<thejpster[m]> For 879 maybe we could urlencode instead of hex encode?
<thejpster[m]> Uh, I mean 878
<dirbaio[m]> we could yeah
<dirbaio[m]> but
<dirbaio[m]> % itself might be a problematic character in symbol names
<dirbaio[m]> * % itself might be a problematic character in symbol names, because it's usually not found in identifiers
<dirbaio[m]> same with base64 +/
<dirbaio[m]> or even - in url-safe base64
<dirbaio[m]> my thought process in choosing hex was: if we're doing some encoding to workaround compiler bugs, we should pick one that produces symbols with really no special characters at all, to solve the problem for good
<thejpster[m]> Encode UTF-8 into a-zA-Z0-9 and _. Base 63.
<dirbaio[m]> like, even spaces are a "weird" character to have in symbol names
<dirbaio[m]> but percent-encoding spaces makes the symbol names quite unreadable already
<dirbaio[m]> dunno
<dirbaio[m]> but it still feels dirty to have to encode as a workaround :(
<dirbaio[m]> which is why I was looking into the bug, hoping it could be fixable. 🥲
<thejpster[m]> > Unless quoted, symbol names start with a letter, underscore, or point and may include any letters, underscores, digits, points, and hyphens.
<thejpster[m]> I guess it only has to work on LLD, LD and LINK.EXE. it’s a short list we have to test.
<thejpster[m]> If it doesn’t work on the IRIX MIPSPro linker I can deal with it.
<dirbaio[m]> it's not a linker issue, it's in llvm codegen :P
<thejpster[m]> Oh right so you can use sym in asm!
<dirbaio[m]> (but yeah linkers are another component in the chain that can potentially explode with "fun" symbol names...)
<thejpster[m]> I was thinking about the Mac linker shouting at me
<thejpster[m]> Technically it doesn’t have to be in the symbol name
<thejpster[m]> Pretty sure you can read the variable contents out of the ELF
<thejpster[m]> It could just be named ISTR and let the mangler have at it.
<thejpster[m]> Then it’s even easier to make the interning go away. You just make the section LOAD instead of NOLOAD. The downside is you burn up addresses more quickly and might need to exceed 64K.
<thejpster[m]> But then interned IDs should probably be varints anyway
<dirbaio[m]> if the string indices get larger than 16bit you can't fit them in a movw instruction anyway
<dirbaio[m]> so there'd be no code size savings
<thejpster[m]> 64K is a lot of format string
<dirbaio[m]> my firmware has 791 format strings, totaling 120kb if you add up all the jsons
RockBoynton[m] has quit [Quit: Idle timeout reached: 172800s]