hi i produced an executable that when i try to run it bash claims it's not real
@catoutofbed that's probably not bash claiming it then
multiple things can return the same errno
@catoutofbed run ldd on it
@iliana
what a badly named error then
@iliana
nope, i fixed that and it's a completely different error that's making bash error out
@catoutofbed errno(3) is a global variable that contains the last error, and the exec(3) family of functions returns errors like that
so *anything* in exec's path returning ENOENT causes bash to provide that error message
@catoutofbed you probably already knew that actually. hrm.
@catoutofbed anyway. how does ldd look now?
@iliana
it seems to be finding the libraries and i *should* be able to run x86_64 executables
@catoutofbed given that ldd is probably an x86_64 executable, I would believe you
now run ldd on liblib.so
@catoutofbed why does a.out not list a dependency on ld-linux-x86-64.so.2?
@catoutofbed what happens if you run
$ /usr/lib64/ld-linux-x86-64.so.2 ./a.out
@iliana so now the question of what the hell is ld doing that causes it to not link that
@iliana
so it gets weirder?
i tried invoking rustc with --crate-type=cdylib instead of dylib
now it's linking what appears to be correctly and yet????
@catoutofbed does ./a.out define _start?
@iliana
huh.....
how in the hell
i know what i'm linking with does?
weird thing is the elf header is valid except the entry point is at the top of the pheader for some reason?
@iliana
okay, now i've relinked and it does have _start in the symbol table
it seems that something is going srong in remapping /lib/ld64.so.1 to /usr/lib64/ld-linux-x86-64.so.2?
because ldd suggests that's what it's doing
but the executable doesn't load unless i manually specify that library?
@catoutofbed we have reached the limits of things I feel comfortable guessing about tbqh
good luck
@iliana
thanks for trying
there's plenty of stuff out there for calling into ffi from rust but not the other way around :\
@catoutofbed I guess I'm kind of confused as to what you're doing that would remap the 32-bit dynamic linker into the 64-bit one
that seems chaotic?
@iliana
i don't know what's doing that either tbqh
@iliana segfault
which is probably on my end so i think we're running properly