Issue 109896
Summary [lld] Replicate GNU ld behavior regarding `--dynamic-linker`
Labels lld
Assignees
Reporter RossComputerGuy
    In reference to: https://lore.kernel.org/all/CAFP8O3Kqx-gdTBFn_hesWzd-6NCpGEz1=fmojxux+n4c7sp...@mail.gmail.com/

> GNU ld seems to ignore --dynamic-linker for a position-dependent
executable (ET_EXEC) when there is no DT_NEEDED entry.
ld.lld respects --dynamic-linker in this case. Before this kernel
report, I do not know any user inconvenienced by this difference.
(mold respects --dynamic-linker as well.)
This could be helpful to test an executable with PT_INTERP but no DT_NEEDED.

If we're able to replicate this behavior inside of LLVM lld then it'll make using LLVM to build the Linux kernel inside of Nix a lot easier. It's likely other distros or build environments could benefit from having consistent behavior. I might be able to write this in a PR myself but I am not familiar with the codebase.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to