freenode/#clasp - IRC Chatlog
Search
15:09:15
drmeister
For some reason dlsym is return NULL for everything at snapshot load time. But it works fine when I call (core:dlsym... ). it from the CL repl Grrrrr
15:48:52
drmeister
In the snapshot save function I call dladdr on every address that I need to identify the symbol name and then I dlsym on the symbol name and at 6073/9084 the dlsym calls start failing.
15:51:55
drmeister
But I want to turn my head to the sky and just start screaming incoherently. This is so frustrating.
15:53:14
beach
I guess it's because you are trying to do it the Unix/C++ way with the standard dynamic linker.
15:53:20
drmeister
It's navigating the unix dynamic linking layer and ELF files and macho files and my own stupid bugs.
15:54:42
drmeister
It's because I have to use symbols and basically implement my own linker because I need this to be robust to linking new executables if I want to embed the snapshot within an executable.
15:56:55
drmeister
This looks like it's probably my fault - everything works for about 6000 symbols and then it starts failing. That smells like my problem.
15:58:20
drmeister
This appears to work on linux - but I'm moving the code back into linux to look at the output of this address -> dladdr -> dlsym -> address test.
16:56:13
frgo
drmeister: Some code to stare at? Do you use dlinfo to check symbol visibility? Hey, btw.