Closed Phate6660 closed 3 years ago
Does it work if you pass the flag -fuse-ld=bfd
? If so, then the issue might be that your distro is configured to use the Gold linker. Could you provide details on how your linker came to be configured that way by default?
Yep, that was the issue. I personally set it to Gold linker because I prefer it and rarely have issues with it. Don't know why I didn't think to try with bfd first before opening the issue.
The root cause seems to be that Gold doesn't support SORT_NONE
which is sad. Google did a great job contributing the Gold linker long ago, but they probably stopped maintaining it when they switched to LLVM. No one's happy with BFD's performance but it is certainly the most dependable and featureful linker.
This is with using the files from the provided zip.
It also fails when using files compiled from this repo.