[lld] [lld] More info for aarch64 ldr/str misaligning error (PR #135004)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 10 09:11:33 PDT 2025


MaskRay wrote:

The ELF port relies more heavily on `errorOrWarn` than on `error`. When the `--noinhibit-exec` option is used, errorOrWarn triggers a warning without preventing the output file from being generated. You can typically examine the output file using tools like llvm-readelf or `llvm-objdump -dr`, or employ the -Map option to create a link map for reviewing input sections. The functions in `lld/ELF/Target.h`:checkInt produce detailed diagnostics, which could serve as inspiration for the COFF port.

In contrast, the COFF port seems to use errorOrWarn only with the /force:unresolved option. This approach could potentially be expanded for broader application.

https://github.com/llvm/llvm-project/pull/135004


More information about the llvm-commits mailing list