# bpf: do not invoke lld when linking eBPF relocatables · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/d6f43a1eac6d8d0405b870a46f202d71957b5ba4)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: d6f43a1eac6d8d0405b870a46f202d71957b5ba4

Requested commit: d6f43a1eac6d8d0405b870a46f202d71957b5ba4

Commit: d6f43a1eac6d8d0405b870a46f202d71957b5ba4

Tree: 0bfdd47e5600b7e4430c167d8c30b073c4da8604

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
bpf: do not invoke lld when linking eBPF relocatables

Due to a deficiency in LLD, we need to special-case BPF to a simple
file copy when generating relocatables. Normally, we would expect
`lld -r` to work. However, because LLD wants to resolve BPF relocations
which it shouldn't, it fails before even generating the relocatable.

Co-authored-by: Matthew Knight <mattnite@protonmail.com>

```

## Parents

- [a96b6ad83f4385dd47112084baeeb24e7e9356fa](https://git.cafe/gitcafe/zig/commit/a96b6ad83f4385dd47112084baeeb24e7e9356fa?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/d6f43a1eac6d8d0405b870a46f202d71957b5ba4?format=markdown)
