Open tiagoporsch opened 1 year ago
Can you share you DLL? It would make it easier to debug.
On Mon, 17 Oct 2022, 21:22 tiagoporsch, @.***> wrote:
Hello, I'm trying to load a very simple DLL that just contains some string manipulation functions, however when I attempt to run my program it segfaults with
pelinker (fixup_reloc:390): fixup_block=0xf7f4c000, image=0xf7f48000 pelinker (fixup_reloc:391): fixup_block info: 1000 84 Segmentation fault
This is the all the code that runs before the segmentation fault:
struct pe_image image = { .entry = NULL, .name = "engine/SeedNKeyXcp.dll", }; if (!pe_load_library(image.name, &image.image, &image.size)) return 1; link_pe_images(&image, 1);
How could I go about debugging this? Thank you.
— Reply to this email directly, view it on GitHub https://github.com/taviso/loadlibrary/issues/115, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGW4SP3RQ74AK6VXSWC3ATWDWKOPANCNFSM6AAAAAARHKPHOQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Of course. Here it is. SeedNKeyXcp.zip
I've fixed this issue by opening the DLL as O_RDWR
and mapping it as PROT_READ | PROT_WRITE
, in the function pe_load_library
.
However, I don't think this is the correct solution, as a segfault now occurs when I attempt to call a function from this DLL.
Hello, I'm trying to load a very simple DLL that just contains some string manipulation functions, however when I attempt to run my program it segfaults with
This is the all the code that runs before the segmentation fault:
How could I go about debugging this? Thank you.