Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the name of DLL from which binary depends?

In my program I'm using libcurl that is built with SSL support. So I have libcurl.dll that depends on libeay32.dll and ssleay32.dll. I need to change the names of libeay32.dll to libeay32_10_x32.dll. How to tell libcurl to use libeay32_10_x32.dll not libeay32.dll?

like image 884
fsquirrel Avatar asked Nov 24 '25 01:11

fsquirrel


1 Answers

This question talks about doing something like this. You have to edit the PE file and change the imported dll name. The one thing that question doesn't address is when the new name is longer or shorter than the original import name. If the length is different you run the risk of killing offsets in your executable that were calculated by the linker.

Given that libcurl is open source your best bet would be to rebuild it linking against your renamed libraries.

like image 186
Dave Rager Avatar answered Nov 25 '25 16:11

Dave Rager