# Better Firmware with LLVM/Clang | Interrupt

**URL:** <https://community.memfault.com/t/better-firmware-with-llvm-clang-interrupt/195>\
**Category:** Blog\
**Created:** [May 20, 2020, 5:59am UTC](https://community.memfault.com/t/better-firmware-with-llvm-clang-interrupt/195 "2020-05-20T05:59:25Z")\
**Posts on this page:** 1\
**Showing post:** 29

<div class="post-metadata">

**Author:** ![francois](https://avatars.discourse-cdn.com/v4/letter/f/77aa72/32.png) [@francois](https://community.memfault.com/u/francois)\
**Post date:** [September 23, 2020, 11:13pm UTC](https://community.memfault.com/t/better-firmware-with-llvm-clang-interrupt/195/29 "2020-09-23T23:13:37Z")

</div>

> [@lonelyjoey1905](#):
>
> Currently my `lld.ld` fails due to the symbol `COPY` in the linker file ( `nrf52.ld` ).

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:

```auto
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](https://github.com/memfault/interrupt/commit/2bd1eb540c1ddf817f314f34111412c2866853e2). If you’re seeing both “GCC compiler detected” and “Clang compiler detected” in the output, there’s a problem!

---

_[View the full topic](https://community.memfault.com/t/better-firmware-with-llvm-clang-interrupt/195)._
