Open ta264 opened 2 years ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
This should be straightforward to add: Copy over Windows version of these asm stubs https://github.com/dotnet/runtime/blob/main/src/coreclr/vm/i386/PInvokeStubs.asm#L32-L108 and adjust them for Linux asm syntax.
Description
The
JIT_PInvokeBegin
andJIT_PInvokeEnd
stubs are missing for i386.Currently you can compile a linux-x86 runtime and it seems functional. However if you allow the build process to run crossgen2 on the output, the resulting product fails and throws
SIGTRAP
at runtime.The missing stubs should be here: https://github.com/dotnet/runtime/blob/0e18cfda13a8136103c83442e1a649cdecc237b0/src/coreclr/vm/i386/pinvokestubs.S#L14-L30
Reproduction Steps
See the pipeline here: https://github.com/Servarr/dotnet-linux-x86/blob/4b0474c30e5ea2900e14fbe94831d64d7f44b318/azure-pipelines.yml#L73
Omit the following two lines to allow crossgen2 to run: https://github.com/Servarr/dotnet-linux-x86/blob/4b0474c30e5ea2900e14fbe94831d64d7f44b318/azure-pipelines.yml#L82-L83
Expected behavior
Resulting product can run a hello world
Actual behavior
seems to help.
Alternatively disable running crossgen completely.
Configuration
.NET 7 Preview 3 Cross compiling on Ubuntu 20.04 for linux-x86 Running the output in an Ubuntu 20.04 docker with multilib support enabled
Other information
Would be happy to help to try to implement this but I'm totally out of my depth so would need some pointers