summaryrefslogtreecommitdiffstats
path: root/lld/COFF/MinGW.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/COFF/MinGW.cpp')
-rw-r--r--lld/COFF/MinGW.cpp69
1 files changed, 30 insertions, 39 deletions
diff --git a/lld/COFF/MinGW.cpp b/lld/COFF/MinGW.cpp
index ee9833edf55..9d3815d2e6e 100644
--- a/lld/COFF/MinGW.cpp
+++ b/lld/COFF/MinGW.cpp
@@ -18,7 +18,34 @@ using namespace lld::coff;
using namespace llvm;
using namespace llvm::COFF;
-void AutoExporter::initSymbolExcludes() {
+AutoExporter::AutoExporter() {
+ ExcludeLibs = {
+ "libgcc",
+ "libgcc_s",
+ "libstdc++",
+ "libmingw32",
+ "libmingwex",
+ "libg2c",
+ "libsupc++",
+ "libobjc",
+ "libgcj",
+ "libclang_rt.builtins",
+ "libclang_rt.builtins-aarch64",
+ "libclang_rt.builtins-arm",
+ "libclang_rt.builtins-i386",
+ "libclang_rt.builtins-x86_64",
+ "libc++",
+ "libc++abi",
+ "libunwind",
+ "libmsvcrt",
+ "libucrtbase",
+ };
+
+ ExcludeObjects = {
+ "crt0.o", "crt1.o", "crt1u.o", "crt2.o", "crt2u.o", "dllcrt1.o",
+ "dllcrt2.o", "gcrt0.o", "gcrt1.o", "gcrt2.o", "crtbegin.o", "crtend.o",
+ };
+
ExcludeSymbolPrefixes = {
// Import symbols
"__imp_",
@@ -31,10 +58,12 @@ void AutoExporter::initSymbolExcludes() {
// Artifical symbols such as .refptr
".",
};
+
ExcludeSymbolSuffixes = {
"_iname",
"_NULL_THUNK_DATA",
};
+
if (Config->Machine == I386) {
ExcludeSymbols = {
"__NULL_IMPORT_DESCRIPTOR",
@@ -72,44 +101,6 @@ void AutoExporter::initSymbolExcludes() {
}
}
-AutoExporter::AutoExporter() {
- ExcludeLibs = {
- "libgcc",
- "libgcc_s",
- "libstdc++",
- "libmingw32",
- "libmingwex",
- "libg2c",
- "libsupc++",
- "libobjc",
- "libgcj",
- "libclang_rt.builtins",
- "libclang_rt.builtins-aarch64",
- "libclang_rt.builtins-arm",
- "libclang_rt.builtins-i386",
- "libclang_rt.builtins-x86_64",
- "libc++",
- "libc++abi",
- "libunwind",
- "libmsvcrt",
- "libucrtbase",
- };
- ExcludeObjects = {
- "crt0.o",
- "crt1.o",
- "crt1u.o",
- "crt2.o",
- "crt2u.o",
- "dllcrt1.o",
- "dllcrt2.o",
- "gcrt0.o",
- "gcrt1.o",
- "gcrt2.o",
- "crtbegin.o",
- "crtend.o",
- };
-}
-
void AutoExporter::addWholeArchive(StringRef Path) {
StringRef LibName = sys::path::filename(Path);
// Drop the file extension, to match the processing below.
OpenPOWER on IntegriCloud