[PATCH] D85056: [ELF] Add --keep-section to expose linkerscript KEEP directive as a linker flag

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 17:23:28 PDT 2020


phosek added a comment.

In D85056#2225093 <https://reviews.llvm.org/D85056#2225093>, @MaskRay wrote:

> I created https://sourceware.org/bugzilla/show_bug.cgi?id=26404 for the discussion on the syntax.
>
> @christylee @phosek You may consider starting a thread on binutils at sourceware.org to expedite their processing:)

Like I mentioned in D76482 <https://reviews.llvm.org/D76482>, I'm not a fan of this solution. The problem is that the runtimes are typically static libraries, e.g. `libclang_rt.profile.a`, which means that we would need to start distributing a linker script with each runtime and ensure that this linker script is always going to be used with that runtime. That's going to require additional complexity in the Clang driver. This is far less elegant than what we proposed in D76482 <https://reviews.llvm.org/D76482> which is contained entirely in the linker.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85056



More information about the llvm-commits mailing list