I have a third party dll that I want to change the symbol names. Is this possible? I dont want the competition to know what component my product uses. I don't have the source for the dll.
-
Is this third-party DLL one that you are permitted to redistribute, according to its license? – Heath Hunnicutt Nov 09 '09 at 00:10
-
yes. They include the dll for distribution. An additional charge. – Memb Nov 09 '09 at 00:18
-
1I think that your algorithm and ideas in your app is more important than whether you use a particular DLL or not. Spending a lot of time obfuscating something just doesn't help, people will anyway figure it out if they want to. – AndersK Nov 09 '09 at 00:41
-
In 99.99% of the cases this is true. I agree wholeheartedly. But not this situation. it is very, very unique and thus I need to go through these hoops. – Memb Nov 09 '09 at 00:55
-
Related: [Can I change mangled C++ DLL export symbols? (Binary-compatible but Source-incompatible)](https://stackoverflow.com/q/15703546/11107541) – starball Apr 17 '23 at 03:40
3 Answers
Symbol table is required for binding executable with dll during linking and runtime. It usually contains decorated function names and ordinals. It is possible to use ordinals only. If you are building library you can define .def file to have a control over symbol tables. But if this is pre-built 3rd party library, it may be very hard way to go. Of course everything is possible but I doubt it is worth your efforts.
If you are desparate, I would try altering a letter in decorated function name in hex editor, lookup this function ordinal value and then try using GetProcAddress with ordinal of this function.

- 8,355
- 6
- 53
- 72
You might look at PE Explorer. I'm not sure it will do what you want, but maybe.

- 6,274
- 5
- 47
- 67
Not without modifying the binary, and if the DLL is signed then this would invalidate the signature.
Even if it isn't signed it would probably violate the license agreement that governs the use of the DLL.

- 46,588
- 15
- 99
- 136
-
do you know any program that does this? The license doesn't say anything and I doubt they care. I paid for the license. Changing a few names is harmless. – Memb Nov 09 '09 at 00:19
-
1I doubt there are any programs available to do this. The 'easiest' way would likely be to edit the export table of the dll with a hex editor and replace the names with strings of the same length. You'll have to also adjust the export lib you are linking against as well. All tool like http://texe.codeplex.com/ might help out. – Rob Walker Nov 09 '09 at 00:41
-
1The license doesn't *have* to say anything, Memb. The default is "all rights reserved." The license *relaxes* the default restrictions, so if the license doesn't grant permission to do something, and the copyright law in your country doesn't grant it, then you're not allowed to do it. Whether you paid money for it is irrelevant. You're not in a position to judge whether the license granter cares. Have you asked? – Rob Kennedy Nov 09 '09 at 07:40
-
Rob, not everyone must share your value system. Maybe Memb does not care about some copyright law issues? I also think that changing names in symbol table would not harm anyone. He will brake the license however, but I think in such case it's not worse than saying f***ck or photographing random person without a permission – mip Nov 09 '09 at 22:59