]> git.saurik.com Git - apple/ld64.git/blob - src/ld/Options.h
ld64-123.2.tar.gz
[apple/ld64.git] / src / ld / Options.h
1 /* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*-
2 *
3 * Copyright (c) 2005-2010 Apple Inc. All rights reserved.
4 *
5 * @APPLE_LICENSE_HEADER_START@
6 *
7 * This file contains Original Code and/or Modifications of Original Code
8 * as defined in and that are subject to the Apple Public Source License
9 * Version 2.0 (the 'License'). You may not use this file except in
10 * compliance with the License. Please obtain a copy of the License at
11 * http://www.opensource.apple.com/apsl/ and read it before using this
12 * file.
13 *
14 * The Original Code and all software distributed under the License are
15 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
19 * Please see the License for the specific language governing rights and
20 * limitations under the License.
21 *
22 * @APPLE_LICENSE_HEADER_END@
23 */
24
25 #ifndef __OPTIONS__
26 #define __OPTIONS__
27
28
29 #include <stdint.h>
30 #include <mach/machine.h>
31
32 #include <vector>
33 #include <ext/hash_set>
34 #include <ext/hash_map>
35
36 #include "ld.hpp"
37
38 extern void throwf (const char* format, ...) __attribute__ ((noreturn,format(printf, 1, 2)));
39 extern void warning(const char* format, ...) __attribute__((format(printf, 1, 2)));
40
41 class LibraryOptions
42 {
43 public:
44 LibraryOptions() : fWeakImport(false), fReExport(false), fBundleLoader(false),
45 fLazyLoad(false), fUpward(false), fForceLoad(false) {}
46 // for dynamic libraries
47 bool fWeakImport;
48 bool fReExport;
49 bool fBundleLoader;
50 bool fLazyLoad;
51 bool fUpward;
52 // for static libraries
53 bool fForceLoad;
54 };
55
56
57
58 //
59 // The public interface to the Options class is the abstract representation of what work the linker
60 // should do.
61 //
62 // This abstraction layer will make it easier to support a future where the linker is a shared library
63 // invoked directly from Xcode. The target settings in Xcode would be used to directly construct an Options
64 // object (without building a command line which is then parsed).
65 //
66 //
67 class Options
68 {
69 public:
70 Options(int argc, const char* argv[]);
71 ~Options();
72
73 enum OutputKind { kDynamicExecutable, kStaticExecutable, kDynamicLibrary, kDynamicBundle, kObjectFile, kDyld, kPreload, kKextBundle };
74 enum NameSpace { kTwoLevelNameSpace, kFlatNameSpace, kForceFlatNameSpace };
75 // Standard treatment for many options.
76 enum Treatment { kError, kWarning, kSuppress, kNULL, kInvalid };
77 enum UndefinedTreatment { kUndefinedError, kUndefinedWarning, kUndefinedSuppress, kUndefinedDynamicLookup };
78 enum WeakReferenceMismatchTreatment { kWeakReferenceMismatchError, kWeakReferenceMismatchWeak,
79 kWeakReferenceMismatchNonWeak };
80 enum CommonsMode { kCommonsIgnoreDylibs, kCommonsOverriddenByDylibs, kCommonsConflictsDylibsError };
81 enum UUIDMode { kUUIDNone, kUUIDRandom, kUUIDContent };
82 enum LocalSymbolHandling { kLocalSymbolsAll, kLocalSymbolsNone, kLocalSymbolsSelectiveInclude, kLocalSymbolsSelectiveExclude };
83 enum DebugInfoStripping { kDebugInfoNone, kDebugInfoMinimal, kDebugInfoFull };
84
85 struct FileInfo {
86 const char* path;
87 uint64_t fileLen;
88 time_t modTime;
89 LibraryOptions options;
90 };
91
92 struct ExtraSection {
93 const char* segmentName;
94 const char* sectionName;
95 const char* path;
96 const uint8_t* data;
97 uint64_t dataLen;
98 typedef ExtraSection* iterator;
99 typedef const ExtraSection* const_iterator;
100 };
101
102 struct SectionAlignment {
103 const char* segmentName;
104 const char* sectionName;
105 uint8_t alignment;
106 };
107
108 struct OrderedSymbol {
109 const char* symbolName;
110 const char* objectFileName;
111 };
112 typedef const OrderedSymbol* OrderedSymbolsIterator;
113
114 struct SegmentStart {
115 const char* name;
116 uint64_t address;
117 };
118
119 struct SegmentSize {
120 const char* name;
121 uint64_t size;
122 };
123
124 struct SegmentProtect {
125 const char* name;
126 uint32_t max;
127 uint32_t init;
128 };
129
130 struct DylibOverride {
131 const char* installName;
132 const char* useInstead;
133 };
134
135 struct AliasPair {
136 const char* realName;
137 const char* alias;
138 };
139
140 typedef const char* const* UndefinesIterator;
141
142 // const ObjectFile::ReaderOptions& readerOptions();
143 const char* outputFilePath() const { return fOutputFile; }
144 const std::vector<FileInfo>& getInputFiles() const { return fInputFiles; }
145
146 cpu_type_t architecture() const { return fArchitecture; }
147 bool preferSubArchitecture() const { return fHasPreferredSubType; }
148 cpu_subtype_t subArchitecture() const { return fSubArchitecture; }
149 bool allowSubArchitectureMismatches() const { return fAllowCpuSubtypeMismatches; }
150 bool forceCpuSubtypeAll() const { return fForceSubtypeAll; }
151 const char* architectureName() const { return fArchitectureName; }
152 void setArchitecture(cpu_type_t, cpu_subtype_t subtype);
153 OutputKind outputKind() const { return fOutputKind; }
154 bool prebind() const { return fPrebind; }
155 bool bindAtLoad() const { return fBindAtLoad; }
156 NameSpace nameSpace() const { return fNameSpace; }
157 const char* installPath() const; // only for kDynamicLibrary
158 uint32_t currentVersion() const { return fDylibCurrentVersion; } // only for kDynamicLibrary
159 uint32_t compatibilityVersion() const { return fDylibCompatVersion; } // only for kDynamicLibrary
160 const char* entryName() const { return fEntryName; } // only for kDynamicExecutable or kStaticExecutable
161 const char* executablePath();
162 uint64_t baseAddress() const { return fBaseAddress; }
163 uint64_t maxAddress() const { return fMaxAddress; }
164 bool keepPrivateExterns() const { return fKeepPrivateExterns; } // only for kObjectFile
165 bool needsModuleTable() const { return fNeedsModuleTable; } // only for kDynamicLibrary
166 bool interposable(const char* name) const;
167 bool hasExportRestrictList() const { return (fExportMode != kExportDefault); } // -exported_symbol or -unexported_symbol
168 bool hasExportMaskList() const { return (fExportMode == kExportSome); } // just -exported_symbol
169 bool hasWildCardExportRestrictList() const;
170 bool hasReExportList() const { return ! fReExportSymbols.empty(); }
171 bool wasRemovedExport(const char* sym) const { return ( fRemovedExports.find(sym) != fRemovedExports.end() ); }
172 bool allGlobalsAreDeadStripRoots() const;
173 bool shouldExport(const char*) const;
174 bool shouldReExport(const char*) const;
175 bool ignoreOtherArchInputFiles() const { return fIgnoreOtherArchFiles; }
176 bool traceDylibs() const { return fTraceDylibs; }
177 bool traceArchives() const { return fTraceArchives; }
178 bool deadCodeStrip() const { return fDeadStrip; }
179 UndefinedTreatment undefinedTreatment() const { return fUndefinedTreatment; }
180 ld::MacVersionMin macosxVersionMin() const { return fMacVersionMin; }
181 ld::IPhoneVersionMin iphoneOSVersionMin() const { return fIPhoneVersionMin; }
182 bool minOS(ld::MacVersionMin mac, ld::IPhoneVersionMin iPhoneOS);
183 bool messagesPrefixedWithArchitecture();
184 Treatment picTreatment();
185 WeakReferenceMismatchTreatment weakReferenceMismatchTreatment() const { return fWeakReferenceMismatchTreatment; }
186 const char* umbrellaName() const { return fUmbrellaName; }
187 const std::vector<const char*>& allowableClients() const { return fAllowableClients; }
188 const char* clientName() const { return fClientName; }
189 const char* initFunctionName() const { return fInitFunctionName; } // only for kDynamicLibrary
190 const char* dotOutputFile();
191 uint64_t pageZeroSize() const { return fZeroPageSize; }
192 bool hasCustomStack() const { return (fStackSize != 0); }
193 uint64_t customStackSize() const { return fStackSize; }
194 uint64_t customStackAddr() const { return fStackAddr; }
195 bool hasExecutableStack() const { return fExecutableStack; }
196 bool hasNonExecutableHeap() const { return fNonExecutableHeap; }
197 UndefinesIterator initialUndefinesBegin() const { return &fInitialUndefines[0]; }
198 UndefinesIterator initialUndefinesEnd() const { return &fInitialUndefines[fInitialUndefines.size()]; }
199 bool printWhyLive(const char* name) const;
200 uint32_t minimumHeaderPad() const { return fMinimumHeaderPad; }
201 bool maxMminimumHeaderPad() const { return fMaxMinimumHeaderPad; }
202 ExtraSection::const_iterator extraSectionsBegin() const { return &fExtraSections[0]; }
203 ExtraSection::const_iterator extraSectionsEnd() const { return &fExtraSections[fExtraSections.size()]; }
204 CommonsMode commonsMode() const { return fCommonsMode; }
205 bool warnCommons() const { return fWarnCommons; }
206 bool keepRelocations();
207 FileInfo findFile(const char* path) const;
208 UUIDMode UUIDMode() const { return fUUIDMode; }
209 bool warnStabs();
210 bool pauseAtEnd() { return fPause; }
211 bool printStatistics() const { return fStatistics; }
212 bool printArchPrefix() const { return fMessagesPrefixedWithArchitecture; }
213 void gotoClassicLinker(int argc, const char* argv[]);
214 bool sharedRegionEligible() const { return fSharedRegionEligible; }
215 bool printOrderFileStatistics() const { return fPrintOrderFileStatistics; }
216 const char* dTraceScriptName() { return fDtraceScriptName; }
217 bool dTrace() { return (fDtraceScriptName != NULL); }
218 unsigned long orderedSymbolsCount() const { return fOrderedSymbols.size(); }
219 OrderedSymbolsIterator orderedSymbolsBegin() const { return &fOrderedSymbols[0]; }
220 OrderedSymbolsIterator orderedSymbolsEnd() const { return &fOrderedSymbols[fOrderedSymbols.size()]; }
221 bool splitSeg() const { return fSplitSegs; }
222 uint64_t baseWritableAddress() { return fBaseWritableAddress; }
223 uint64_t segmentAlignment() const { return fSegmentAlignment; }
224 uint64_t segPageSize(const char* segName) const;
225 uint64_t customSegmentAddress(const char* segName) const;
226 bool hasCustomSegmentAddress(const char* segName) const;
227 bool hasCustomSectionAlignment(const char* segName, const char* sectName) const;
228 uint8_t customSectionAlignment(const char* segName, const char* sectName) const;
229 uint32_t initialSegProtection(const char*) const;
230 uint32_t maxSegProtection(const char*) const;
231 bool saveTempFiles() const { return fSaveTempFiles; }
232 const std::vector<const char*>& rpaths() const { return fRPaths; }
233 bool readOnlyx86Stubs() { return fReadOnlyx86Stubs; }
234 const std::vector<DylibOverride>& dylibOverrides() const { return fDylibOverrides; }
235 const char* generatedMapPath() const { return fMapPath; }
236 bool positionIndependentExecutable() const { return fPositionIndependentExecutable; }
237 Options::FileInfo findFileUsingPaths(const char* path) const;
238 bool deadStripDylibs() const { return fDeadStripDylibs; }
239 bool allowedUndefined(const char* name) const { return ( fAllowedUndefined.find(name) != fAllowedUndefined.end() ); }
240 bool someAllowedUndefines() const { return (fAllowedUndefined.size() != 0); }
241 LocalSymbolHandling localSymbolHandling() { return fLocalSymbolHandling; }
242 bool keepLocalSymbol(const char* symbolName) const;
243 bool allowTextRelocs() const { return fAllowTextRelocs; }
244 bool warnAboutTextRelocs() const { return fWarnTextRelocs; }
245 bool usingLazyDylibLinking() const { return fUsingLazyDylibLinking; }
246 bool verbose() const { return fVerbose; }
247 bool makeEncryptable() const { return fEncryptable; }
248 bool needsUnwindInfoSection() const { return fAddCompactUnwindEncoding; }
249 const std::vector<const char*>& llvmOptions() const{ return fLLVMOptions; }
250 const std::vector<const char*>& dyldEnvironExtras() const{ return fDyldEnvironExtras; }
251 bool makeCompressedDyldInfo() const { return fMakeCompressedDyldInfo; }
252 bool hasExportedSymbolOrder();
253 bool exportedSymbolOrder(const char* sym, unsigned int* order) const;
254 bool orderData() { return fOrderData; }
255 bool errorOnOtherArchFiles() const { return fErrorOnOtherArchFiles; }
256 bool markAutoDeadStripDylib() const { return fMarkDeadStrippableDylib; }
257 bool removeEHLabels() const { return fNoEHLabels; }
258 bool useSimplifiedDylibReExports() const { return fUseSimplifiedDylibReExports; }
259 bool objCABIVersion2POverride() const { return fObjCABIVersion2Override; }
260 bool useUpwardDylibs() const { return fCanUseUpwardDylib; }
261 bool fullyLoadArchives() const { return fFullyLoadArchives; }
262 bool loadAllObjcObjectsFromArchives() const { return fLoadAllObjcObjectsFromArchives; }
263 bool autoOrderInitializers() const { return fAutoOrderInitializers; }
264 bool optimizeZeroFill() const { return fOptimizeZeroFill; }
265 bool logAllFiles() const { return fLogAllFiles; }
266 DebugInfoStripping debugInfoStripping() const { return fDebugInfoStripping; }
267 bool flatNamespace() const { return fFlatNamespace; }
268 bool linkingMainExecutable() const { return fLinkingMainExecutable; }
269 bool implicitlyLinkIndirectPublicDylibs() const { return fImplicitlyLinkPublicDylibs; }
270 bool whyLoad() const { return fWhyLoad; }
271 const char* traceOutputFile() const { return fTraceOutputFile; }
272 bool outputSlidable() const { return fOutputSlidable; }
273 bool haveCmdLineAliases() const { return (fAliases.size() != 0); }
274 const std::vector<AliasPair>& cmdLineAliases() const { return fAliases; }
275 bool makeTentativeDefinitionsReal() const { return fMakeTentativeDefinitionsReal; }
276 const char* dyldInstallPath() const { return fDyldInstallPath; }
277 bool warnWeakExports() const { return fWarnWeakExports; }
278 bool objcGcCompaction() const { return fObjcGcCompaction; }
279 bool objcGc() const { return fObjCGc; }
280 bool objcGcOnly() const { return fObjCGcOnly; }
281 bool canUseThreadLocalVariables() const { return fTLVSupport; }
282 bool demangleSymbols() const { return fDemangle; }
283 bool addVersionLoadCommand() const { return fVersionLoadCommand; }
284 bool addFunctionStarts() const { return fFunctionStartsLoadCommand; }
285 bool canReExportSymbols() const { return fCanReExportSymbols; }
286 const char* tempLtoObjectPath() const { return fTempLtoObjectPath; }
287 bool objcCategoryMerging() const { return fObjcCategoryMerging; }
288 bool hasWeakBitTweaks() const;
289 bool forceWeak(const char* symbolName) const;
290 bool forceNotWeak(const char* symbolName) const;
291 bool forceWeakNonWildCard(const char* symbolName) const;
292 bool forceNotWeakNonWildcard(const char* symbolName) const;
293
294 private:
295 class CStringEquals
296 {
297 public:
298 bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
299 };
300 typedef __gnu_cxx::hash_map<const char*, unsigned int, __gnu_cxx::hash<const char*>, CStringEquals> NameToOrder;
301 typedef __gnu_cxx::hash_set<const char*, __gnu_cxx::hash<const char*>, CStringEquals> NameSet;
302 enum ExportMode { kExportDefault, kExportSome, kDontExportSome };
303 enum LibrarySearchMode { kSearchDylibAndArchiveInEachDir, kSearchAllDirsForDylibsThenAllDirsForArchives };
304 enum InterposeMode { kInterposeNone, kInterposeAllExternal, kInterposeSome };
305
306 class SetWithWildcards {
307 public:
308 void insert(const char*);
309 bool contains(const char*) const;
310 bool containsNonWildcard(const char*) const;
311 bool empty() const { return fRegular.empty() && fWildCard.empty(); }
312 bool hasWildCards() const { return !fWildCard.empty(); }
313 NameSet::iterator regularBegin() const { return fRegular.begin(); }
314 NameSet::iterator regularEnd() const { return fRegular.end(); }
315 void remove(const NameSet&);
316 private:
317 static bool hasWildCards(const char*);
318 bool wildCardMatch(const char* pattern, const char* candidate) const;
319 bool inCharRange(const char*& range, unsigned char c) const;
320
321 NameSet fRegular;
322 std::vector<const char*> fWildCard;
323 };
324
325
326 void parse(int argc, const char* argv[]);
327 void checkIllegalOptionCombinations();
328 void buildSearchPaths(int argc, const char* argv[]);
329 void parseArch(const char* architecture);
330 FileInfo findLibrary(const char* rootName, bool dylibsOnly=false);
331 FileInfo findFramework(const char* frameworkName);
332 FileInfo findFramework(const char* rootName, const char* suffix);
333 bool checkForFile(const char* format, const char* dir, const char* rootName,
334 FileInfo& result) const;
335 uint32_t parseVersionNumber(const char*);
336 void parseSectionOrderFile(const char* segment, const char* section, const char* path);
337 void parseOrderFile(const char* path, bool cstring);
338 void addSection(const char* segment, const char* section, const char* path);
339 void addSubLibrary(const char* name);
340 void loadFileList(const char* fileOfPaths);
341 uint64_t parseAddress(const char* addr);
342 void loadExportFile(const char* fileOfExports, const char* option, SetWithWildcards& set);
343 void parseAliasFile(const char* fileOfAliases);
344 void parsePreCommandLineEnvironmentSettings();
345 void parsePostCommandLineEnvironmentSettings();
346 void setUndefinedTreatment(const char* treatment);
347 void setMacOSXVersionMin(const char* version);
348 void setIPhoneVersionMin(const char* version);
349 void setWeakReferenceMismatchTreatment(const char* treatment);
350 void addDylibOverride(const char* paths);
351 void addSectionAlignment(const char* segment, const char* section, const char* alignment);
352 CommonsMode parseCommonsTreatment(const char* mode);
353 Treatment parseTreatment(const char* treatment);
354 void reconfigureDefaults();
355 void checkForClassic(int argc, const char* argv[]);
356 void parseSegAddrTable(const char* segAddrPath, const char* installPath);
357 void addLibrary(const FileInfo& info);
358 void warnObsolete(const char* arg);
359 uint32_t parseProtection(const char* prot);
360 void loadSymbolOrderFile(const char* fileOfExports, NameToOrder& orderMapping);
361
362
363
364 // ObjectFile::ReaderOptions fReaderOptions;
365 const char* fOutputFile;
366 std::vector<Options::FileInfo> fInputFiles;
367 cpu_type_t fArchitecture;
368 cpu_subtype_t fSubArchitecture;
369 const char* fArchitectureName;
370 OutputKind fOutputKind;
371 bool fHasPreferredSubType;
372 bool fPrebind;
373 bool fBindAtLoad;
374 bool fKeepPrivateExterns;
375 bool fNeedsModuleTable;
376 bool fIgnoreOtherArchFiles;
377 bool fErrorOnOtherArchFiles;
378 bool fForceSubtypeAll;
379 InterposeMode fInterposeMode;
380 bool fDeadStrip;
381 NameSpace fNameSpace;
382 uint32_t fDylibCompatVersion;
383 uint32_t fDylibCurrentVersion;
384 const char* fDylibInstallName;
385 const char* fFinalName;
386 const char* fEntryName;
387 uint64_t fBaseAddress;
388 uint64_t fMaxAddress;
389 uint64_t fBaseWritableAddress;
390 bool fSplitSegs;
391 SetWithWildcards fExportSymbols;
392 SetWithWildcards fDontExportSymbols;
393 SetWithWildcards fInterposeList;
394 SetWithWildcards fForceWeakSymbols;
395 SetWithWildcards fForceNotWeakSymbols;
396 SetWithWildcards fReExportSymbols;
397 NameSet fRemovedExports;
398 NameToOrder fExportSymbolsOrder;
399 ExportMode fExportMode;
400 LibrarySearchMode fLibrarySearchMode;
401 UndefinedTreatment fUndefinedTreatment;
402 bool fMessagesPrefixedWithArchitecture;
403 WeakReferenceMismatchTreatment fWeakReferenceMismatchTreatment;
404 std::vector<const char*> fSubUmbellas;
405 std::vector<const char*> fSubLibraries;
406 std::vector<const char*> fAllowableClients;
407 std::vector<const char*> fRPaths;
408 const char* fClientName;
409 const char* fUmbrellaName;
410 const char* fInitFunctionName;
411 const char* fDotOutputFile;
412 const char* fExecutablePath;
413 const char* fBundleLoader;
414 const char* fDtraceScriptName;
415 const char* fSegAddrTablePath;
416 const char* fMapPath;
417 const char* fDyldInstallPath;
418 const char* fTempLtoObjectPath;
419 uint64_t fZeroPageSize;
420 uint64_t fStackSize;
421 uint64_t fStackAddr;
422 bool fExecutableStack;
423 bool fNonExecutableHeap;
424 bool fDisableNonExecutableHeap;
425 uint32_t fMinimumHeaderPad;
426 uint64_t fSegmentAlignment;
427 CommonsMode fCommonsMode;
428 enum UUIDMode fUUIDMode;
429 SetWithWildcards fLocalSymbolsIncluded;
430 SetWithWildcards fLocalSymbolsExcluded;
431 LocalSymbolHandling fLocalSymbolHandling;
432 bool fWarnCommons;
433 bool fVerbose;
434 bool fKeepRelocations;
435 bool fWarnStabs;
436 bool fTraceDylibSearching;
437 bool fPause;
438 bool fStatistics;
439 bool fPrintOptions;
440 bool fSharedRegionEligible;
441 bool fPrintOrderFileStatistics;
442 bool fReadOnlyx86Stubs;
443 bool fPositionIndependentExecutable;
444 bool fPIEOnCommandLine;
445 bool fDisablePositionIndependentExecutable;
446 bool fMaxMinimumHeaderPad;
447 bool fDeadStripDylibs;
448 bool fAllowTextRelocs;
449 bool fWarnTextRelocs;
450 bool fUsingLazyDylibLinking;
451 bool fEncryptable;
452 bool fOrderData;
453 bool fMarkDeadStrippableDylib;
454 bool fMakeCompressedDyldInfo;
455 bool fMakeCompressedDyldInfoForceOff;
456 bool fNoEHLabels;
457 bool fAllowCpuSubtypeMismatches;
458 bool fUseSimplifiedDylibReExports;
459 bool fObjCABIVersion2Override;
460 bool fObjCABIVersion1Override;
461 bool fCanUseUpwardDylib;
462 bool fFullyLoadArchives;
463 bool fLoadAllObjcObjectsFromArchives;
464 bool fFlatNamespace;
465 bool fLinkingMainExecutable;
466 bool fForFinalLinkedImage;
467 bool fForStatic;
468 bool fForDyld;
469 bool fMakeTentativeDefinitionsReal;
470 bool fWhyLoad;
471 bool fRootSafe;
472 bool fSetuidSafe;
473 bool fImplicitlyLinkPublicDylibs;
474 bool fAddCompactUnwindEncoding;
475 bool fWarnCompactUnwind;
476 bool fRemoveDwarfUnwindIfCompactExists;
477 bool fAutoOrderInitializers;
478 bool fOptimizeZeroFill;
479 bool fLogObjectFiles;
480 bool fLogAllFiles;
481 bool fTraceDylibs;
482 bool fTraceIndirectDylibs;
483 bool fTraceArchives;
484 bool fOutputSlidable;
485 bool fWarnWeakExports;
486 bool fObjcGcCompaction;
487 bool fObjCGc;
488 bool fObjCGcOnly;
489 bool fDemangle;
490 bool fTLVSupport;
491 bool fVersionLoadCommand;
492 bool fFunctionStartsLoadCommand;
493 bool fCanReExportSymbols;
494 bool fObjcCategoryMerging;
495 DebugInfoStripping fDebugInfoStripping;
496 const char* fTraceOutputFile;
497 ld::MacVersionMin fMacVersionMin;
498 ld::IPhoneVersionMin fIPhoneVersionMin;
499 std::vector<AliasPair> fAliases;
500 std::vector<const char*> fInitialUndefines;
501 NameSet fAllowedUndefined;
502 NameSet fWhyLive;
503 std::vector<ExtraSection> fExtraSections;
504 std::vector<SectionAlignment> fSectionAlignments;
505 std::vector<OrderedSymbol> fOrderedSymbols;
506 std::vector<SegmentStart> fCustomSegmentAddresses;
507 std::vector<SegmentSize> fCustomSegmentSizes;
508 std::vector<SegmentProtect> fCustomSegmentProtections;
509 std::vector<DylibOverride> fDylibOverrides;
510 std::vector<const char*> fLLVMOptions;
511 std::vector<const char*> fLibrarySearchPaths;
512 std::vector<const char*> fFrameworkSearchPaths;
513 std::vector<const char*> fSDKPaths;
514 std::vector<const char*> fDyldEnvironExtras;
515 bool fSaveTempFiles;
516 };
517
518
519
520 #endif // __OPTIONS__