Open MichalStrehovsky opened 4 months ago
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas See info in area-owners.md if you want to be subscribed.
Author: | MichalStrehovsky |
---|---|
Assignees: | - |
Labels: | `arch-arm32`, `area-NativeAOT-coreclr` |
Milestone: | - |
FWIW I also tried with -p:LinkerFlavor=lld
and got ld.lld : error : undefined symbol: __start___modules
. Then I tried -p:LinkerFlavor=gold
but that gave me bus error
.
Cc @filipnavara
What Raspberry Pi version was it? We can certainly add the Tag_ABI_VFP_args
property but since we target armv7
(RPi 3+) I am not sure whether it makes sense.
What Raspberry Pi version was it? We can certainly add the
Tag_ABI_VFP_args
property but since we targetarmv7
(RPi 3+) I am not sure whether it makes sense.
Raspberry pi 4 with a 32bit Raspbian bookworm.
Raspberry pi 4 with a 32bit Raspbian bookworm.
Interesting, that matches one of my environments and I didn’t hit the issue there. Hopefully the EABI header change resolves it.
We can link fine on the default bookworm config now with BFD.
LLD still complains about the thing it complained before.
Gold now hangs instead of crashing. Progress, I guess?
Maybe we should explicitly set a few smoke tests projects to exercise certain linkers: bfd,lld,gold,mold, just enough to ensure basic coverage. Currently we are almost, always testing with lld in the CI: https://github.com/dotnet/runtime/blob/79dd9bae9bb881eb716b608577c4cedc6c9cba72/src/tests/Directory.Build.targets#L633 because the script which ultimately resolves _LDFLAGS favors lld; which, in realworld, is not very meaningful (majority of users end up with bfd linker while we are testing lld 24/7-365). Ideally, prereq images for CI (one per architecture) could have various linker flavors installed for testing.
Maybe we should explicitly set a few smoke tests projects to exercise certain linkers: bfd,lld,gold,mold, just enough to ensure basic coverage. Currently we are almost, always testing with lld in the CI:
We had discussion about the testing aspect when the official builds were being switched to use a rootfs that doesn't even have bfd. I can't find the discussion on Github so maybe it happened internally, but the conclusion is basically in https://github.com/dotnet/runtime/pull/85478#issuecomment-1531778436. It's not just about the flavor of the linker, but also the version. We'd be using the latest because that's necessary for our shipping criteria, but end users would be using whatever stale thing landed in their years old LTS distribution. To really test this, we'd want to pick some popular distros and versions and use whatever ships with them. But we're not equipped for that in dotnet/runtime repo and it hasn't been an issue we'd be getting user reports on.
What we do get user reports on is Apple platform linkers but that's a completely separate pit of pain an suffering.
not just about the flavor of the linker, but also the version
Yup, I remember adding lld v13 detection in BuildIntergration and linker script which goes with it. :)
But we're not equipped for that in dotnet/runtime repo and it hasn't been an issue we'd be getting user reports on.
Manual testing keep those issues from popping up. My point was CI is not helping in this regard. We can use one of the existing Ubuntu 22.04 image (we have plenty of them), which have lld and bfd already installed, we can install gold and mold as well to complete test apparatus. (we install GBs of optional stuff on those images, so few KBs of additional linker is not gonna hurt the size).
Latest dotnet/installer builds already have arm32 support so I gave it a try.
Looks like what it's complaining about might be related to:
https://github.com/dotnet/runtime/blob/bee4602cd5974c9abb2d83cc58d5342b75b4cdbe/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ObjectWriter/ElfObjectWriter.cs#L449-L469
Do we miss setting
Tag_ABI_VFP_args
? A hello world compiled with gcc produces an object file with this aeabi: