|Dynamic linking with "digested" names? email@example.com (1999-04-03)|
|From:||firstname.lastname@example.org (john paulson)|
|Date:||3 Apr 1999 21:57:01 -0500|
|Keywords:||linker, question, comment|
With shared libraries and dynamic linking, symbol names
are stored in full in both the shared library and the
client of the shared library. In some environments,
(embedded systems which allow dynamic linking of
client code), the space required for symbols can be
Given that I have complete control over the shared library
mechanism, what if I mangle the imports and exports in a
post-linker, replacing the full names with a fixed-length
digested form. For example, I can feed the symbol name
"_sprintf" into MD5 and then reduce that signature (by
XOR? by dividing by 2^64-1?) into an 8byte digested
Does anyone have any experience doing this?
In a C environment, would this produce worthwhile savings?
What about in a C++ environment?
Is MD5+XOR a good way to reduce? I don't want to inadvertently
introduce collisions (two distinct symbols yielding the same
digest). I'll take my chances with 2^64.
I'd really like to get by with reducing to 2^32. Any good
Thanks for any insight.
[Microsoft optionally does this with DLLs, you can import DLL symbols
either by name or by the index in the export table. No need to MD5,
just keep a symbol table available at link time. -John]
Return to the
Search the comp.compilers archives again.