Created attachment 566527 [details] [diff] [review]
It got broken by a commit from bug 684659. Before the breakage, there was a hack to set dllexport attribute for NS_InvokeByIndex_P by having C++ wrapper around an assembly function. For that to work, the assembly version had to be called _NS_InvokeByIndex_P. After the change, the assembly function's name is NS_InvokeByIndex_P on mingw, so there is a linker collision.
My proposed fix adds dllexport equivalent directly in assembly (by adding .drectve section). This way we may get rid of the C++ wrapper.