The x64 opends60.lib library interface contains instruction sequences like the following which mingw-w64 interprets as absolute locations.
Disassembly of section .idata$5:
0000000000000000 <__imp_srv_writebuf>:
0: 36 00 00 add %al,%ss:(%rax)
3: 00 00 add %al,(%rax)
5: 00 00 add %al,(%rax)
7: 80 .byte 0x80
Disassembly of section .text:
0000000000000000 <srv_writebuf>:
0: ff 25 00 00 00 00 jmpq *0x0(%rip) # 6 <srv_writebuf+0x6>
2: R_X86_64_32 __imp_srv_writebuf
6: 90 nop
7: 90 nop
Note that the relocation is interpreted as a R_X86_64_32 absolute relocation instead of the R_X86_64_PC32 which results in a segfault when added to the %rip register.
Is there some workaround for this issue?
Attached is the x64 opends60 library.
64-bit MSSQL interface library