freenode/#clasp - IRC Chatlog
Search
20:39:36
drmeister
I am unable yet to generate a symbol list automatically that is anywhere as good as the one I constructed by hand. It's very frustrating.
20:40:07
drmeister
A whole new stupid problem to solve - because C++ doesn't let you explicitly control attributes of the vtable symbol.
20:41:09
drmeister
If I take control of the exported symbols list I have to figure out every symbol that the compiler and linker would make exported.
20:41:16
frgo
drmeister: Another idea: Why not have a special variant of dlsym that doesn't check for symbol "visibility" and just returns the address just like on unix?
20:42:27
drmeister
Then I have to have go back to scraping ELF files and macho files or running 'nm' at startup on macos.
20:43:52
frgo
If that's the case then I don't understand the process on linux. I seem to recall that you just had to call dlsym and that's it.
20:46:50
drmeister
No - that's not the problem. I don't actually have a problem on linux using dladdr/dlsym
20:49:07
frgo
I know. The reason why this is working on Linux is that dlsym doesn't check for the symbol being local. On macOS it does. So, if we replace the stock dlsym call to a call to "our" dlsym where just one line of code is changed compared to the stock dlsym - then I assume this should work on macOS.
20:59:31
drmeister
I kind of have a solution for macOS - I have a symbol list that I put together by hand that contains 12,210 symbols - if I could figure out how to recreate that list automatically - I'd be done.
21:00:54
drmeister
My attempts up until now generate lists that are >10x larger and cause the linker to spit out tens of thousands of warnings.