[PATCH] D22660: [ELF/LinkerScript] Support ONLY_IF_{RO, RW} directive
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 21 20:15:15 PDT 2016
ruiu added a comment.
I really appreciate adding linker script features as-needed basis. Still I got to ask for a reference if its not in a commit message, so please include a sentence that "it's used by FreeBSD kernel". :)
================
Comment at: ELF/LinkerScript.cpp:277
@@ +276,3 @@
+ Constraint == ReadWrite) {
+ Sec->DiscardFromOutput = true;
+ return;
----------------
I see the reason why you need it, but it can be done without adding a new field to OutputSection because this flag is used only in this function. You can define
DenseSet<OitputSectionBase<ELFT>> Removed;
and add a section to the set of it needs to be removed at end of this function.
https://reviews.llvm.org/D22660
More information about the llvm-commits
mailing list