https://bugs.llvm.org/show_bug.cgi?id=39662
Bug ID: 39662
Summary: Inconsistent target strings
Product: lld
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: ELF
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Hi,
This is not really a bug, but rather a very inconvinient and annoying little
thing (at least for me, and I think I'm not alone).
When I use clang, I use "--target=x86_64-elf" or "--target=aarch64-elf". I
would like to use the same arguments with lld, but it has "-m elf_x86_64" and
"-m aarch64elf". I think that it would be very nice to have the same target
strings for both the compiler and the linker.
I've checked the code, and I believe the only modification it needs is simply
adding those two strings to
https://github.com/llvm-mirror/lld/blob/master/ELF/Driver.cpp#L124
so that the StringSwitch would read:
.Cases("aarch64elf", "aarch64linux", "aarch64_elf64_le_vec", "aarch64-elf",
and
.Cases("elf_amd64", "elf_x86_64", "x86_64-elf", {ELF64LEKind, EM_X86_64})
If there're other parts that also need to be modified, I haven't found them.
But I admit I don't have much experience with the lld source yet.
I think many developers would welcome this small modification, as using unified
target strings for the two most common architectures would simplify their
lives. I don't use formats other than ELF, but I assume the same unification
would be nice for them too, if not done already.
Otherwise I'd like to say thanks for lld, it works great! I was able to replace
GNU ld with ld.lld, and I only had to find workarounds to the missing STARTUP()
linker script directive and the -nostartfiles argument (I usually work for bare
metal). It wasn't a big deal and that was all, so imho you have done a really
really amazing job! Keep up the good work!
Thanks,
bzt
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs