[PATCH] D24270: [ELF] Add support for -no-gc-sections flag
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 6 11:37:20 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL280729: [ELF] Add support for -no-gc-sections flag (authored by phosek).
Changed prior to commit:
https://reviews.llvm.org/D24270?vs=70432&id=70440#toc
Repository:
rL LLVM
https://reviews.llvm.org/D24270
Files:
lld/trunk/ELF/Driver.cpp
lld/trunk/ELF/Options.td
Index: lld/trunk/ELF/Driver.cpp
===================================================================
--- lld/trunk/ELF/Driver.cpp
+++ lld/trunk/ELF/Driver.cpp
@@ -400,7 +400,7 @@
Config->EnableNewDtags = !Args.hasArg(OPT_disable_new_dtags);
Config->ExportDynamic = Args.hasArg(OPT_export_dynamic);
Config->FatalWarnings = Args.hasArg(OPT_fatal_warnings);
- Config->GcSections = Args.hasArg(OPT_gc_sections);
+ Config->GcSections = getArg(Args, OPT_gc_sections, OPT_no_gc_sections, false);
Config->ICF = Args.hasArg(OPT_icf);
Config->NoGnuUnique = Args.hasArg(OPT_no_gnu_unique);
Config->NoUndefinedVersion = Args.hasArg(OPT_no_undefined_version);
Index: lld/trunk/ELF/Options.td
===================================================================
--- lld/trunk/ELF/Options.td
+++ lld/trunk/ELF/Options.td
@@ -106,6 +106,9 @@
def no_demangle: F<"no-demangle">,
HelpText<"Do not demangle symbol names">;
+def no_gc_sections: F<"no-gc-sections">,
+ HelpText<"Disable garbage collection of unused sections">;
+
def no_gnu_unique: F<"no-gnu-unique">,
HelpText<"Disable STB_GNU_UNIQUE symbol binding">;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24270.70440.patch
Type: text/x-patch
Size: 1129 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160906/2322f586/attachment.bin>
More information about the llvm-commits
mailing list