[PATCH] D126192: [Driver] Improve linking options for target AVR

Ben Shi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 1 00:54:06 PDT 2022


benshi001 added a comment.

I have a bit confused, why `clang --target=x86_64 -fuse-ld=lld` needs not to be explicitly specified with a linker script and produces a runnable x86_64 ELF? How does lld arrange code/data addresses for x86_64 by default ?

My original will is `clang --target=avr -fuse-lld abc.c` can correctly produce an AVR ELF, as both `clang --target=x86_64 -fuse-ld=lld abc.c` and `avr-gcc abc.c` do. The `avr-gcc abc.c` command will use the default linker script inside avr-libc.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126192/new/

https://reviews.llvm.org/D126192



More information about the cfe-commits mailing list