Issue 78873
Summary lld behaves differently from ld.bfd when adding `.interp`
Labels lld
Assignees
Reporter yshui
    `lld` adds the `.interp` section whenever `--dynamic-linker` is set. whereas `ld.bfd` won't add `.interp` unless the resulting binary has a `NEEDED` shared library.

in other words,

```console
ld a.o --dynamic-linker /asdf -o a
```

won't generate an `.interp` section, but

```console
ld a.o a.so --dynamic-linker /asdf -o a
```

will.

OTOH 

```console
ld.lld a.o --dynamic-linker /asdf -o a
```

adds an `.interp`, unlike `ld.bfd`.

This is related to nixos/nixpkgs#242244, which breaks clang+lld kernel build on nixos.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to