I found a presentation on this which looks to contain useful information:Another thing to try: recent gccs and their toolchains have a trick where they can stick every function in its own segment, then tell the linker to dump the unused ones. I believe it's called "gc-segments" or something. I have no idea if it would work with openssl, but it could be worth investigating. I believe there's a ticket for tor to use it by default when possible.