3 ms·
I'm actually super curious - and really wish they did a deeper dive on - how they narrowed down the glibc dependency to just the 3 math functions, and then how
by akavel 5y ago
I'm actually super curious - and really wish they did a deeper dive on - how they narrowed down the glibc dependency to just the 3 math functions, and then how they found the singular places where those were used, especially in a Rust codebase...?
Also, as to patchelf, does it require an absolute path? If yes, are they patching post-download? I doubt they would somehow try to force Linux or the user to always put the binary in the same abs path, right?
- Tobu 5y agoglibc uses versioned symbols, symbols are visible in the blog post's `objdump -T` output if you scroll to the right. Then you can use `objdump -d` to disassemble and see the callers. The fact that the binary is build from Rust isn't relevant at this point. patchelf is passed a special string, '$ORIGIN', which references the same directory as the binary, and won't require modifications for the target system. One disadvantage not mentioned in the blog post is that this facilitates something similar to the infamous DLL preloading attacks on Windows.