You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, small 50KiB executables balloon into >9MiB executables when we link in halomon. The reason why we had to go with a static library is due to issue #3.
Some progress was made on this front by not linking LLVM into halomon, but instead linking libLLVM into the executable (see issue #4). This brought down executable sizes by a few MiB.
What we're stuck on here is the need for only a subset of XRay to be statically linked in, due to the limitations of its implementation outlined in #3. The problem is that I don't know how to make a shared library resolve to symbols found in the executable that it is linked into.
I played very briefly with halomon as a shared lib and not linking with the XRay object file and declaring the XRay functions we needed to be weak symbols like #pragma weak __xray_init. The problem is when the library is linked into the executable, the symbols in the executable do not override our shared library's weak symbols, so those symbols become NULL and we segfault.
TODO: Play around with a tiny test library and see if you can synthesize the right linker flags to make this work, or ask on StackOverflow because this is a tricky problem.
The text was updated successfully, but these errors were encountered:
Currently, small 50KiB executables balloon into >9MiB executables when we link in halomon. The reason why we had to go with a static library is due to issue #3.
Some progress was made on this front by not linking LLVM into halomon, but instead linking
libLLVM
into the executable (see issue #4). This brought down executable sizes by a few MiB.What we're stuck on here is the need for only a subset of XRay to be statically linked in, due to the limitations of its implementation outlined in #3. The problem is that I don't know how to make a shared library resolve to symbols found in the executable that it is linked into.
I played very briefly with halomon as a shared lib and not linking with the XRay object file and declaring the XRay functions we needed to be weak symbols like
#pragma weak __xray_init
. The problem is when the library is linked into the executable, the symbols in the executable do not override our shared library's weak symbols, so those symbols becomeNULL
and we segfault.TODO: Play around with a tiny test library and see if you can synthesize the right linker flags to make this work, or ask on StackOverflow because this is a tricky problem.
The text was updated successfully, but these errors were encountered: