https://bugs.winehq.org/show_bug.cgi?id=28140
--- Comment #14 from Paul Gofman gofmanp@gmail.com --- Interesting enough, I don't have PIC disabled in my builds. Yet I suspected that my local build might be golden in some way, so I tested with the downloaded binaries of Wine 4.5 and 4.4 before writing Comment #10. Granted, I did not use winhq binaries but used playonlinux for getting that, and that was wrong.
With PIC enabled the compiled code for SizeofResources is different in my build from the snippet above (and the same as for the binaries I downloaded):
7b47c4b0 <SizeofResource>: 7b47c4b0: 55 push %ebp 7b47c4b1: 89 e5 mov %esp,%ebp 7b47c4b3: 8b 45 0c mov 0xc(%ebp),%eax 7b47c4b6: 85 c0 test %eax,%eax 7b47c4b8: 74 0e je 7b47c4c8 <SizeofResource+0x18> 7b47c4ba: 8b 40 04 mov 0x4(%eax),%eax 7b47c4bd: 5d pop %ebp 7b47c4be: c2 08 00 ret $0x8 7b47c4c1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 7b47c4c8: 31 c0 xor %eax,%eax 7b47c4ca: 5d pop %ebp 7b47c4cb: c2 08 00 ret $0x8
Must be compiler version and / or optimization flags. Looks like in my case compiler correctly deduced it doesn't need PIC prolog in this function.