JonathonReinhart / staticx

Create static executable from dynamic executable
https://staticx.readthedocs.io/
Other
324 stars 34 forks source link

ASan runtime does not come first in initial library list #263

Closed bcapt closed 10 months ago

bcapt commented 10 months ago

Hi, I've got a binary that requires libasan.so library that has to come first. This is an error I am getting when trying to run static binary after it is converted by the staticx tool:

==12345==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.

I am wondering if there's a way to fix this other than recompiling the binary without the -fsanitize=address option.

JonathonReinhart commented 10 months ago

We might be able to work around this, but I have to ask: why are you packaging asan-enabled binaries for distribution? Normally asan binaries are used for debug testing, but you wouldn't ship them, since they can be significantly larger and slower than a release build.

bcapt commented 10 months ago

Oh, in such case, Let me simply try to re-compile my binary without it. Sorry for being ignorant of the fact that this is usually used in a non-release build.