IRC channel logs

2021-08-22.log

back to list of logs

<oriansj>stikonas: there is a pull request from you on M2libc. Did you want me to merge it or were you still working on it?
<stikonas>oh, is there, let me check
<stikonas>oh, elf header
<stikonas>let's merge it
<stikonas>I'll add debug header at some point later
<stikonas>haven't played with debug headers yet
<oriansj>merged
<oriansj>debug headers are trivial additions
<oriansj>the most important part is getting blood-elf output correct for your architecture
<oriansj>then just add %ELF_section_headers>ELF_base to e_shoff
<oriansj>(which just simply says where the symbol table is in the file)
<oriansj>then update e_shnum to 5
<oriansj>thus far the only architecture specific difference found in blood-elf is between 32bit and 64bit architectures. (hence the --64 flag)
<stikonas>well, good to know that it's easy
<oriansj>creating the original elf header is the hardest part of ELF support (unless your architecture does something completely different than expected in regards to dwarf stubs)
<oriansj>sorting out the dwarf differences between 64bit and 32bit took a couple days to figure out but it looks like all 64bit architectures standardized on the same dwarf format and all of the 32bit architectures standardized on the same dwarf format.
<oriansj>I just hope RISC-V didn't get creative there.
<stikonas>hopefully not, but that's just a guess right now until somebody looks at it
<fossy>yeah, its unrealted
<fossy>but i have a WTF solution
<fossy>make /bin/sh not a symlink
<fossy>cause i have /bin symlinked to /usr/bin in sysc
<fossy>but if i make /usr/bin/sh a copy of /usr/bin/bash rather than a symlink to /usr/bin/bash everything works ?!?!?!?
<xentrac>haa
<fossy>not gonna question that lol
<xentrac>hooray it works!
<stikonas>something is a bit strange with risc-v binaries, they seem to be working but somewhat slow.
<stikonas>time ./hex2 test.hex2 test gives real 0m7,181s
<stikonas>while GAS built binary is much faster: real 0m0,048s
<oriansj>stikonas: for that sort of slow down one would be having to throw an exception on every single instruction. Perhaps some sort of instruction alignment issue?
<oriansj>it certainly would be a clever way to slow down development of trusted bootstrap paths by malware at the kernel level. Figure if the program produces a valid ELF or executable file format as output and upload for inspection and review.