Linux: ld.lld: error: unknown emulation: aarch64linuxb

Created on 25 Feb 2019  路  5Comments  路  Source: ClangBuiltLinux/linux

trying to link an arm64 allyesconfig with LLD, it looks like LLD doesn't support CONFIG_CPU_BIG_ENDIAN=y.

Reported upstream [ARCH] arm64 [BUG] llvm [PATCH] Rejected [TOOL] lld feature-request

Most helpful comment

Thanks for highlighting the relevant code @nathanchance !
https://reviews.llvm.org/D58655

All 5 comments

Indeed: https://github.com/llvm/llvm-project/blob/4134143cf55d5cb68be12dd8511cdc7a254e31df/lld/ELF/Driver.cpp#L114-L146

Just FYI for others who want to avoid big endian on allyesconfig, you can use the KCONFIG_ALLCONFIG variable to force little endian during config time.

$ TMP=$(mktemp)
$ echo "CONFIG_CPU_BIG_ENDIAN=n" > "${TMP}"
$ make ARCH=arm64 KCONFIG_ALLCONFIG=${TMP} allyesconfig &>/dev/null
$ grep CONFIG_CPU_BIG_ENDIAN .config
# CONFIG_CPU_BIG_ENDIAN is not set

Thanks for highlighting the relevant code @nathanchance !
https://reviews.llvm.org/D58655

arm64 is little endian by default now, even with all{yes,mod}config: d8e85e144bbe12e8d82c6b05d690a34da62cc991

I am not sure it is really worth pursuing this further but I鈥檒l leave that up to you all.

Closing, I don't think LLD developers have the bandwidth to implement this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tpgxyz picture tpgxyz  路  4Comments

tpimh picture tpimh  路  5Comments

tpimh picture tpimh  路  4Comments

nathanchance picture nathanchance  路  3Comments

nickdesaulniers picture nickdesaulniers  路  4Comments