sorear changed the topic of #riscv to: RISC-V instruction set architecture | https://riscv.org | Logs: https://libera.irclog.whitequark.org/riscv
jjido has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Sofia has quit [Ping timeout: 276 seconds]
Sofia has joined #riscv
peeps[zen] has joined #riscv
peepsalot has quit [Ping timeout: 252 seconds]
jacklsw has joined #riscv
freakazoid12345 has joined #riscv
freakazoid343 has quit [Ping timeout: 268 seconds]
elms has quit [Read error: Connection reset by peer]
elms has joined #riscv
meowray has quit [Remote host closed the connection]
jrtc27 has quit [Remote host closed the connection]
meowray has joined #riscv
jrtc27 has joined #riscv
Slide-O-Mix has quit [Ping timeout: 265 seconds]
psydroid has quit [Ping timeout: 265 seconds]
AhmedCharles[m] has quit [Ping timeout: 265 seconds]
CarlosEDP has quit [Ping timeout: 265 seconds]
Slide-O-Mix has joined #riscv
psydroid has joined #riscv
AhmedCharles[m] has joined #riscv
CarlosEDP has joined #riscv
[itchyjunk] has quit [Read error: Connection reset by peer]
PyroPeter has quit [Ping timeout: 250 seconds]
PyroPeter has joined #riscv
jacklsw has quit [Ping timeout: 245 seconds]
geranim0 has quit [Ping timeout: 252 seconds]
mthall has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
mthall has joined #riscv
meowray has quit [Changing host]
meowray has joined #riscv
Sofia has quit [Remote host closed the connection]
Sofia has joined #riscv
mahmutov has quit [Ping timeout: 245 seconds]
riff-IRC has quit [Remote host closed the connection]
riff-IRC has joined #riscv
jacklsw has joined #riscv
jtdowney has quit [Quit: Bye]
jtdowney has joined #riscv
Sofia has quit [Remote host closed the connection]
Sofia has joined #riscv
Sofia has quit [Remote host closed the connection]
Sofia has joined #riscv
Sofia has quit [Remote host closed the connection]
Sofia has joined #riscv
BOKALDO has joined #riscv
jjido has joined #riscv
winterflaw has joined #riscv
jjido has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
pecastro has joined #riscv
hendursa1 has joined #riscv
hendursaga has quit [Ping timeout: 276 seconds]
jacklsw has quit [Quit: Back to the real world]
jjido has joined #riscv
jellydonut has quit [Quit: jellydonut]
ntwk has quit [Ping timeout: 260 seconds]
ln5 has quit [Remote host closed the connection]
jellydonut has joined #riscv
jjido has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Sofia has quit [Remote host closed the connection]
Sofia has joined #riscv
Ivii has joined #riscv
sm2n_ is now known as sm2n
ntwk has joined #riscv
loki_val has quit [Ping timeout: 276 seconds]
Sofia has quit [Remote host closed the connection]
Sofia has joined #riscv
crabbedhaloablut has joined #riscv
TMM_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM_ has joined #riscv
jwillikers has joined #riscv
jwillikers has quit [Remote host closed the connection]
jwillikers has joined #riscv
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #riscv
jamtorus has joined #riscv
jellydonut has quit [Ping timeout: 245 seconds]
jjido has joined #riscv
jamtorus is now known as jellydonut
jjido has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
[itchyjunk] has joined #riscv
[itchyjunk] has quit [Remote host closed the connection]
[itchyjunk] has joined #riscv
SpaceCoaster has joined #riscv
SpaceCoaster has quit [Remote host closed the connection]
zjason` is now known as zjason
elastic_dog has quit [Ping timeout: 246 seconds]
geranim0 has joined #riscv
elastic_dog has joined #riscv
BOKALDO has quit [Quit: Leaving]
NeoCron has joined #riscv
jellydonut has quit [Quit: jellydonut]
smartin has joined #riscv
mmind00 has joined #riscv
TMM_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM_ has joined #riscv
BOKALDO has joined #riscv
compscipunk has joined #riscv
pabs3 has quit [Read error: Connection reset by peer]
pabs3 has joined #riscv
peepsalot has joined #riscv
peeps[zen] has quit [Ping timeout: 245 seconds]
jacklsw has joined #riscv
[itchyjunk] has quit [Read error: Connection reset by peer]
hendursa1 has quit [Ping timeout: 276 seconds]
cp- has quit [Ping timeout: 245 seconds]
hendursaga has joined #riscv
cp- has joined #riscv
jacklsw has quit [Ping timeout: 265 seconds]
cp- has quit [Excess Flood]
cp- has joined #riscv
peeps[zen] has joined #riscv
peepsalot has quit [Ping timeout: 265 seconds]
Narrat has joined #riscv
cp- has quit [Read error: Connection reset by peer]
mahmutov has joined #riscv
___nick___ has joined #riscv
jjido has joined #riscv
cp- has joined #riscv
EchelonX has joined #riscv
<EchelonX> Would someone be able to help me understand why I can not get linker relaxation to work in my program?
<jrtc27> if you post details of what you're doing and what problems you hit someone might
<EchelonX> Operations which should be able to occur relative to GP with a single instruction, do not get simplified from AUIPC and Lx, Sx, ADDI, etc...]
<EchelonX> Well I'm trying to better understand RISC-V and have been attempting to write an SBI implementation
<EchelonX> But...currently, I am just trying to write some machine-level code
<EchelonX> It is probably just easier if I point you to the Github REPO where it is
<EchelonX> Just a minute, I need to push the latest changes
<EchelonX> jrtc27: It is here https://github.com/echelonxray/riscv32_testing under the riscv_sbi branch.
<EchelonX> jrtc27: The linker script is ./emulation.ld, the entry point is in ./src/kernel/kstart_entry.s
<EchelonX> And that calls the C function kmain() in ./src/kernel/kernel.c
<EchelonX> Building is easy. Just make sure that you set the correct tuple at the start of the Makefile. Then run "make all"
<EchelonX> Emulation can be done with "make emu" or "make emu-debug", assuming you have QEMU installed
<EchelonX> "make debug" run in another terminal will connect GDB to "make emu-debug" to allow stepping through instructions
<EchelonX> jrtc27: Anyway, the problem is that even though I have defined __global_pointer$ in ./emulation.ld it still doesn't relax references to global variables, etc...
<EchelonX> I don't understand why
<jrtc27> saying "go build my software" is not a good way to get people to help you
<jrtc27> reduce it down to a simple example
<jrtc27> and there is no kstart_entry.s, only entry.s
<EchelonX> Branch riscv_sbi
<EchelonX> And, yes, I agree. It's just kind of hard to reduce further. Most of what is there is just infrastructure.
<EchelonX> It doesn't actually do much
<jrtc27> it does way more than it needs to
<jrtc27> have a single file, one or two commands to build the tiny example
<EchelonX> There is a lot of unused stuff, but the current execution pathway is very simple
<EchelonX> I will try to break it down for you
<EchelonX> Into one file
<EchelonX> Just a minute
mmohammadi9812 has joined #riscv
adjtm_ has quit [Remote host closed the connection]
adjtm_ has joined #riscv
<EchelonX> jrtc27: Here is the program https://pastebin.com/iNBkJHVK
<EchelonX> jrtc27: Here is the linker script: https://pastebin.com/qX4NnYay
<EchelonX> jrtc27: Finally, here is the terminal: https://pastebin.com/n7DY3843
unmanbearpig has quit [Ping timeout: 245 seconds]
Ivii has quit [Remote host closed the connection]
<jrtc27> it doesn't work because my_string is right on the boundary
<jrtc27> binutils is conservative in what it relaxes since there are cases where not doing so would be unsound
<jrtc27> as relaxation itself moves things
<EchelonX> Okay, let me try that
Ivii has joined #riscv
<jrtc27> though it seems to work with 0x7ff
<jrtc27> this might just be an off-by-one error for the negative case
<EchelonX> Yes. I just tried that too. Hmm...now I have to figure out what is different in my larger program for it not be working.
Ivii has quit [Client Quit]
Ivii has joined #riscv
<jrtc27> exactly
<jrtc27> this is the value of reducing the code
<jrtc27> not just that it's a courtesy to someone helping you
rjek has left #riscv [#riscv]
BOKALDO has quit [Quit: Leaving]
unmanbearpig has joined #riscv
hendursaga has quit [Remote host closed the connection]
hendursaga has joined #riscv
mmohammadi9812 has quit [Remote host closed the connection]
mwbrown has joined #riscv
<EchelonX> jrtc27: Looks to be mostly working now. It seems like an alignment conflict was hampering the linkers decision to relax the instructions. I eased the alignment constraints and it is much more actively relaxing very the GP. For some reason, it is still not relaxing access to the strings in .rodata
<EchelonX> Not really sure why, but it must be some protection measure against breaking the code
<jrtc27> string constants from C aren't relaxed because they're special, they go in SHF_MERGE sections
<jrtc27> which means they jump around all over the place during linking
<EchelonX> Do you have any links for further reading on that?
avoidr has quit [Ping timeout: 265 seconds]
<EchelonX> jrtc27: Thank you
avoidr has joined #riscv
smartin has quit [Quit: smartin]
zkrx has quit [Ping timeout: 260 seconds]
zkrx has joined #riscv
NeoCron has quit [Quit: Leaving]
NeoCron has joined #riscv
___nick___ has quit [Ping timeout: 265 seconds]
dermato has joined #riscv
EchelonX has quit [Quit: Leaving]
mahmutov has quit [Ping timeout: 265 seconds]
Narrat has quit [Quit: They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.]
freakazoid343 has joined #riscv
freakazoid12345 has quit [Ping timeout: 246 seconds]
winterflaw has quit [Ping timeout: 276 seconds]
jjido has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
pecastro has quit [Ping timeout: 265 seconds]
NeoCron has quit [Quit: Leaving]
peeps[zen] is now known as peepsalot
nvmd has joined #riscv