Looking at the log you posted, it appears it’s the COPY
directive itself that the linker fails to recognize. Could you try updating clang and lld to their latest version? Here’s what I’ve got here:
root@fbo-dev:~# clang --version
clang version 10.0.0-4ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
root@fbo-dev:~# ld.lld --version
LLD 10.0.0 (compatible with GNU linkers)
Alternatively you should be able to change that section to NOLOAD
rather than COPY
at line 76 of nrf52.ld
(though @chrisc can correct me if I’m wrong).
Edit: By the way, the libgcc
issue @mcrajah was talking about is due to the compiler detection bug I fixed at Fix llvm example on Linux · memfault/interrupt@2bd1eb5 · GitHub. If you’re seeing both “GCC compiler detected” and “Clang compiler detected” in the output, there’s a problem!