1 /* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*-
3 * Copyright (c) 2005-2010 Apple Inc. All rights reserved.
5 * @APPLE_LICENSE_HEADER_START@
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
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.
22 * @APPLE_LICENSE_HEADER_END@
30 #include <mach/machine.h>
33 #include <unordered_set>
34 #include <unordered_map>
39 extern void throwf (const char* format
, ...) __attribute__ ((noreturn
,format(printf
, 1, 2)));
40 extern void warning(const char* format
, ...) __attribute__((format(printf
, 1, 2)));
47 LibraryOptions() : fWeakImport(false), fReExport(false), fBundleLoader(false),
48 fLazyLoad(false), fUpward(false), fForceLoad(false) {}
49 // for dynamic libraries
55 // for static libraries
62 // The public interface to the Options class is the abstract representation of what work the linker
65 // This abstraction layer will make it easier to support a future where the linker is a shared library
66 // invoked directly from Xcode. The target settings in Xcode would be used to directly construct an Options
67 // object (without building a command line which is then parsed).
73 Options(int argc
, const char* argv
[]);
76 enum OutputKind
{ kDynamicExecutable
, kStaticExecutable
, kDynamicLibrary
, kDynamicBundle
, kObjectFile
, kDyld
, kPreload
, kKextBundle
};
77 enum NameSpace
{ kTwoLevelNameSpace
, kFlatNameSpace
, kForceFlatNameSpace
};
78 // Standard treatment for many options.
79 enum Treatment
{ kError
, kWarning
, kSuppress
, kNULL
, kInvalid
};
80 enum UndefinedTreatment
{ kUndefinedError
, kUndefinedWarning
, kUndefinedSuppress
, kUndefinedDynamicLookup
};
81 enum WeakReferenceMismatchTreatment
{ kWeakReferenceMismatchError
, kWeakReferenceMismatchWeak
,
82 kWeakReferenceMismatchNonWeak
};
83 enum CommonsMode
{ kCommonsIgnoreDylibs
, kCommonsOverriddenByDylibs
, kCommonsConflictsDylibsError
};
84 enum UUIDMode
{ kUUIDNone
, kUUIDRandom
, kUUIDContent
};
85 enum LocalSymbolHandling
{ kLocalSymbolsAll
, kLocalSymbolsNone
, kLocalSymbolsSelectiveInclude
, kLocalSymbolsSelectiveExclude
};
86 enum DebugInfoStripping
{ kDebugInfoNone
, kDebugInfoMinimal
, kDebugInfoFull
};
93 LibraryOptions options
;
94 ld::File::Ordinal ordinal
;
97 // These are used by the threaded input file parsing engine.
98 mutable int inputFileSlot
; // The input file "slot" assigned to this particular file
101 // The use pattern for FileInfo is to create one on the stack in a leaf function and return
102 // it to the calling frame by copy. Therefore the copy constructor steals the path string from
103 // the source, which dies with the stack frame.
104 FileInfo(FileInfo
const &other
) : path(other
.path
), fileLen(other
.fileLen
), modTime(other
.modTime
), options(other
.options
), ordinal(other
.ordinal
), fromFileList(other
.fromFileList
), inputFileSlot(-1) { ((FileInfo
&)other
).path
= NULL
; };
106 // Create an empty FileInfo. The path can be set implicitly by checkFileExists().
107 FileInfo() : path(NULL
), fileLen(0), modTime(0), options(), fromFileList(false) {};
109 // Create a FileInfo for a specific path, but does not stat the file.
110 FileInfo(const char *_path
) : path(strdup(_path
)), fileLen(0), modTime(0), options(), fromFileList(false) {};
112 ~FileInfo() { if (path
) ::free((void*)path
); }
114 // Stat the file and update fileLen and modTime.
115 // If the object already has a path the p must be NULL.
116 // If the object does not have a path then p can be any candidate path, and if the file exists the object permanently remembers the path.
117 // Returns true if the file exists, false if not.
118 bool checkFileExists(const char *p
=NULL
);
120 // Returns true if a previous call to checkFileExists() succeeded.
121 // Returns false if the file does not exist of checkFileExists() has never been called.
122 bool missing() const { return modTime
==0; }
125 struct ExtraSection
{
126 const char* segmentName
;
127 const char* sectionName
;
131 typedef ExtraSection
* iterator
;
132 typedef const ExtraSection
* const_iterator
;
135 struct SectionAlignment
{
136 const char* segmentName
;
137 const char* sectionName
;
141 struct OrderedSymbol
{
142 const char* symbolName
;
143 const char* objectFileName
;
145 typedef const OrderedSymbol
* OrderedSymbolsIterator
;
147 struct SegmentStart
{
157 struct SegmentProtect
{
163 struct DylibOverride
{
164 const char* installName
;
165 const char* useInstead
;
169 const char* realName
;
173 typedef const char* const* UndefinesIterator
;
175 // const ObjectFile::ReaderOptions& readerOptions();
176 const char* outputFilePath() const { return fOutputFile
; }
177 const std::vector
<FileInfo
>& getInputFiles() const { return fInputFiles
; }
179 cpu_type_t
architecture() const { return fArchitecture
; }
180 bool preferSubArchitecture() const { return fHasPreferredSubType
; }
181 cpu_subtype_t
subArchitecture() const { return fSubArchitecture
; }
182 bool allowSubArchitectureMismatches() const { return fAllowCpuSubtypeMismatches
; }
183 bool forceCpuSubtypeAll() const { return fForceSubtypeAll
; }
184 const char* architectureName() const { return fArchitectureName
; }
185 void setArchitecture(cpu_type_t
, cpu_subtype_t subtype
);
186 bool archSupportsThumb2() const { return fArchSupportsThumb2
; }
187 OutputKind
outputKind() const { return fOutputKind
; }
188 bool prebind() const { return fPrebind
; }
189 bool bindAtLoad() const { return fBindAtLoad
; }
190 NameSpace
nameSpace() const { return fNameSpace
; }
191 const char* installPath() const; // only for kDynamicLibrary
192 uint64_t currentVersion() const { return fDylibCurrentVersion
; } // only for kDynamicLibrary
193 uint32_t currentVersion32() const; // only for kDynamicLibrary
194 uint32_t compatibilityVersion() const { return fDylibCompatVersion
; } // only for kDynamicLibrary
195 const char* entryName() const { return fEntryName
; } // only for kDynamicExecutable or kStaticExecutable
196 const char* executablePath();
197 uint64_t baseAddress() const { return fBaseAddress
; }
198 uint64_t maxAddress() const { return fMaxAddress
; }
199 bool keepPrivateExterns() const { return fKeepPrivateExterns
; } // only for kObjectFile
200 bool needsModuleTable() const { return fNeedsModuleTable
; } // only for kDynamicLibrary
201 bool interposable(const char* name
) const;
202 bool hasExportRestrictList() const { return (fExportMode
!= kExportDefault
); } // -exported_symbol or -unexported_symbol
203 bool hasExportMaskList() const { return (fExportMode
== kExportSome
); } // just -exported_symbol
204 bool hasWildCardExportRestrictList() const;
205 bool hasReExportList() const { return ! fReExportSymbols
.empty(); }
206 bool wasRemovedExport(const char* sym
) const { return ( fRemovedExports
.find(sym
) != fRemovedExports
.end() ); }
207 bool allGlobalsAreDeadStripRoots() const;
208 bool shouldExport(const char*) const;
209 bool shouldReExport(const char*) const;
210 bool ignoreOtherArchInputFiles() const { return fIgnoreOtherArchFiles
; }
211 bool traceDylibs() const { return fTraceDylibs
; }
212 bool traceArchives() const { return fTraceArchives
; }
213 bool deadCodeStrip() const { return fDeadStrip
; }
214 UndefinedTreatment
undefinedTreatment() const { return fUndefinedTreatment
; }
215 ld::MacVersionMin
macosxVersionMin() const { return fMacVersionMin
; }
216 ld::IOSVersionMin
iOSVersionMin() const { return fIOSVersionMin
; }
217 bool minOS(ld::MacVersionMin mac
, ld::IOSVersionMin iPhoneOS
);
218 bool messagesPrefixedWithArchitecture();
219 Treatment
picTreatment();
220 WeakReferenceMismatchTreatment
weakReferenceMismatchTreatment() const { return fWeakReferenceMismatchTreatment
; }
221 const char* umbrellaName() const { return fUmbrellaName
; }
222 const std::vector
<const char*>& allowableClients() const { return fAllowableClients
; }
223 const char* clientName() const { return fClientName
; }
224 const char* initFunctionName() const { return fInitFunctionName
; } // only for kDynamicLibrary
225 const char* dotOutputFile();
226 uint64_t pageZeroSize() const { return fZeroPageSize
; }
227 bool hasCustomStack() const { return (fStackSize
!= 0); }
228 uint64_t customStackSize() const { return fStackSize
; }
229 uint64_t customStackAddr() const { return fStackAddr
; }
230 bool hasExecutableStack() const { return fExecutableStack
; }
231 bool hasNonExecutableHeap() const { return fNonExecutableHeap
; }
232 UndefinesIterator
initialUndefinesBegin() const { return &fInitialUndefines
[0]; }
233 UndefinesIterator
initialUndefinesEnd() const { return &fInitialUndefines
[fInitialUndefines
.size()]; }
234 bool printWhyLive(const char* name
) const;
235 uint32_t minimumHeaderPad() const { return fMinimumHeaderPad
; }
236 bool maxMminimumHeaderPad() const { return fMaxMinimumHeaderPad
; }
237 ExtraSection::const_iterator
extraSectionsBegin() const { return &fExtraSections
[0]; }
238 ExtraSection::const_iterator
extraSectionsEnd() const { return &fExtraSections
[fExtraSections
.size()]; }
239 CommonsMode
commonsMode() const { return fCommonsMode
; }
240 bool warnCommons() const { return fWarnCommons
; }
241 bool keepRelocations();
242 FileInfo
findFile(const char* path
) const;
243 UUIDMode
UUIDMode() const { return fUUIDMode
; }
245 bool pauseAtEnd() { return fPause
; }
246 bool printStatistics() const { return fStatistics
; }
247 bool printArchPrefix() const { return fMessagesPrefixedWithArchitecture
; }
248 void gotoClassicLinker(int argc
, const char* argv
[]);
249 bool sharedRegionEligible() const { return fSharedRegionEligible
; }
250 bool printOrderFileStatistics() const { return fPrintOrderFileStatistics
; }
251 const char* dTraceScriptName() { return fDtraceScriptName
; }
252 bool dTrace() { return (fDtraceScriptName
!= NULL
); }
253 unsigned long orderedSymbolsCount() const { return fOrderedSymbols
.size(); }
254 OrderedSymbolsIterator
orderedSymbolsBegin() const { return &fOrderedSymbols
[0]; }
255 OrderedSymbolsIterator
orderedSymbolsEnd() const { return &fOrderedSymbols
[fOrderedSymbols
.size()]; }
256 bool splitSeg() const { return fSplitSegs
; }
257 uint64_t baseWritableAddress() { return fBaseWritableAddress
; }
258 uint64_t segmentAlignment() const { return fSegmentAlignment
; }
259 uint64_t segPageSize(const char* segName
) const;
260 uint64_t customSegmentAddress(const char* segName
) const;
261 bool hasCustomSegmentAddress(const char* segName
) const;
262 bool hasCustomSectionAlignment(const char* segName
, const char* sectName
) const;
263 uint8_t customSectionAlignment(const char* segName
, const char* sectName
) const;
264 uint32_t initialSegProtection(const char*) const;
265 uint32_t maxSegProtection(const char*) const;
266 bool saveTempFiles() const { return fSaveTempFiles
; }
267 const std::vector
<const char*>& rpaths() const { return fRPaths
; }
268 bool readOnlyx86Stubs() { return fReadOnlyx86Stubs
; }
269 const std::vector
<DylibOverride
>& dylibOverrides() const { return fDylibOverrides
; }
270 const char* generatedMapPath() const { return fMapPath
; }
271 bool positionIndependentExecutable() const { return fPositionIndependentExecutable
; }
272 Options::FileInfo
findFileUsingPaths(const char* path
) const;
273 bool deadStripDylibs() const { return fDeadStripDylibs
; }
274 bool allowedUndefined(const char* name
) const { return ( fAllowedUndefined
.find(name
) != fAllowedUndefined
.end() ); }
275 bool someAllowedUndefines() const { return (fAllowedUndefined
.size() != 0); }
276 LocalSymbolHandling
localSymbolHandling() { return fLocalSymbolHandling
; }
277 bool keepLocalSymbol(const char* symbolName
) const;
278 bool allowTextRelocs() const { return fAllowTextRelocs
; }
279 bool warnAboutTextRelocs() const { return fWarnTextRelocs
; }
280 bool kextsUseStubs() const { return fKextsUseStubs
; }
281 bool usingLazyDylibLinking() const { return fUsingLazyDylibLinking
; }
282 bool verbose() const { return fVerbose
; }
283 bool makeEncryptable() const { return fEncryptable
; }
284 bool needsUnwindInfoSection() const { return fAddCompactUnwindEncoding
; }
285 const std::vector
<const char*>& llvmOptions() const{ return fLLVMOptions
; }
286 const std::vector
<const char*>& dyldEnvironExtras() const{ return fDyldEnvironExtras
; }
287 bool makeCompressedDyldInfo() const { return fMakeCompressedDyldInfo
; }
288 bool hasExportedSymbolOrder();
289 bool exportedSymbolOrder(const char* sym
, unsigned int* order
) const;
290 bool orderData() { return fOrderData
; }
291 bool errorOnOtherArchFiles() const { return fErrorOnOtherArchFiles
; }
292 bool markAutoDeadStripDylib() const { return fMarkDeadStrippableDylib
; }
293 bool removeEHLabels() const { return fNoEHLabels
; }
294 bool useSimplifiedDylibReExports() const { return fUseSimplifiedDylibReExports
; }
295 bool objCABIVersion2POverride() const { return fObjCABIVersion2Override
; }
296 bool useUpwardDylibs() const { return fCanUseUpwardDylib
; }
297 bool fullyLoadArchives() const { return fFullyLoadArchives
; }
298 bool loadAllObjcObjectsFromArchives() const { return fLoadAllObjcObjectsFromArchives
; }
299 bool autoOrderInitializers() const { return fAutoOrderInitializers
; }
300 bool optimizeZeroFill() const { return fOptimizeZeroFill
; }
301 bool mergeZeroFill() const { return fMergeZeroFill
; }
302 bool logAllFiles() const { return fLogAllFiles
; }
303 DebugInfoStripping
debugInfoStripping() const { return fDebugInfoStripping
; }
304 bool flatNamespace() const { return fFlatNamespace
; }
305 bool linkingMainExecutable() const { return fLinkingMainExecutable
; }
306 bool implicitlyLinkIndirectPublicDylibs() const { return fImplicitlyLinkPublicDylibs
; }
307 bool whyLoad() const { return fWhyLoad
; }
308 const char* traceOutputFile() const { return fTraceOutputFile
; }
309 bool outputSlidable() const { return fOutputSlidable
; }
310 bool haveCmdLineAliases() const { return (fAliases
.size() != 0); }
311 const std::vector
<AliasPair
>& cmdLineAliases() const { return fAliases
; }
312 bool makeTentativeDefinitionsReal() const { return fMakeTentativeDefinitionsReal
; }
313 const char* dyldInstallPath() const { return fDyldInstallPath
; }
314 bool warnWeakExports() const { return fWarnWeakExports
; }
315 bool objcGcCompaction() const { return fObjcGcCompaction
; }
316 bool objcGc() const { return fObjCGc
; }
317 bool objcGcOnly() const { return fObjCGcOnly
; }
318 bool canUseThreadLocalVariables() const { return fTLVSupport
; }
319 bool addVersionLoadCommand() const { return fVersionLoadCommand
; }
320 bool addFunctionStarts() const { return fFunctionStartsLoadCommand
; }
321 bool addDataInCodeInfo() const { return fDataInCodeInfoLoadCommand
; }
322 bool canReExportSymbols() const { return fCanReExportSymbols
; }
323 const char* tempLtoObjectPath() const { return fTempLtoObjectPath
; }
324 const char* overridePathlibLTO() const { return fOverridePathlibLTO
; }
325 bool objcCategoryMerging() const { return fObjcCategoryMerging
; }
326 bool pageAlignDataAtoms() const { return fPageAlignDataAtoms
; }
327 bool hasWeakBitTweaks() const;
328 bool forceWeak(const char* symbolName
) const;
329 bool forceNotWeak(const char* symbolName
) const;
330 bool forceWeakNonWildCard(const char* symbolName
) const;
331 bool forceNotWeakNonWildcard(const char* symbolName
) const;
332 Snapshot
& snapshot() const { return fLinkSnapshot
; }
333 bool errorBecauseOfWarnings() const;
334 bool needsThreadLoadCommand() const { return fNeedsThreadLoadCommand
; }
335 bool needsEntryPointLoadCommand() const { return fEntryPointLoadCommand
; }
336 bool needsSourceVersionLoadCommand() const { return fSourceVersionLoadCommand
; }
337 bool needsDependentDRInfo() const { return fDependentDRInfo
; }
338 uint64_t sourceVersion() const { return fSourceVersion
; }
339 uint32_t sdkVersion() const { return fSDKVersion
; }
340 const char* demangleSymbol(const char* sym
) const;
341 bool pipelineEnabled() const { return fPipelineFifo
!= NULL
; }
342 const char* pipelineFifo() const { return fPipelineFifo
; }
345 typedef std::unordered_map
<const char*, unsigned int, ld::CStringHash
, ld::CStringEquals
> NameToOrder
;
346 typedef std::unordered_set
<const char*, ld::CStringHash
, ld::CStringEquals
> NameSet
;
347 enum ExportMode
{ kExportDefault
, kExportSome
, kDontExportSome
};
348 enum LibrarySearchMode
{ kSearchDylibAndArchiveInEachDir
, kSearchAllDirsForDylibsThenAllDirsForArchives
};
349 enum InterposeMode
{ kInterposeNone
, kInterposeAllExternal
, kInterposeSome
};
351 class SetWithWildcards
{
353 void insert(const char*);
354 bool contains(const char*) const;
355 bool containsNonWildcard(const char*) const;
356 bool empty() const { return fRegular
.empty() && fWildCard
.empty(); }
357 bool hasWildCards() const { return !fWildCard
.empty(); }
358 NameSet::iterator
regularBegin() const { return fRegular
.begin(); }
359 NameSet::iterator
regularEnd() const { return fRegular
.end(); }
360 void remove(const NameSet
&);
362 static bool hasWildCards(const char*);
363 bool wildCardMatch(const char* pattern
, const char* candidate
) const;
364 bool inCharRange(const char*& range
, unsigned char c
) const;
367 std::vector
<const char*> fWildCard
;
371 void parse(int argc
, const char* argv
[]);
372 void checkIllegalOptionCombinations();
373 void buildSearchPaths(int argc
, const char* argv
[]);
374 void parseArch(const char* architecture
);
375 FileInfo
findLibrary(const char* rootName
, bool dylibsOnly
=false);
376 FileInfo
findFramework(const char* frameworkName
);
377 FileInfo
findFramework(const char* rootName
, const char* suffix
);
378 bool checkForFile(const char* format
, const char* dir
, const char* rootName
,
379 FileInfo
& result
) const;
380 uint64_t parseVersionNumber64(const char*);
381 uint32_t parseVersionNumber32(const char*);
382 void parseSectionOrderFile(const char* segment
, const char* section
, const char* path
);
383 void parseOrderFile(const char* path
, bool cstring
);
384 void addSection(const char* segment
, const char* section
, const char* path
);
385 void addSubLibrary(const char* name
);
386 void loadFileList(const char* fileOfPaths
, ld::File::Ordinal baseOrdinal
);
387 uint64_t parseAddress(const char* addr
);
388 void loadExportFile(const char* fileOfExports
, const char* option
, SetWithWildcards
& set
);
389 void parseAliasFile(const char* fileOfAliases
);
390 void parsePreCommandLineEnvironmentSettings();
391 void parsePostCommandLineEnvironmentSettings();
392 void setUndefinedTreatment(const char* treatment
);
393 void setMacOSXVersionMin(const char* version
);
394 void setIOSVersionMin(const char* version
);
395 void setWeakReferenceMismatchTreatment(const char* treatment
);
396 void addDylibOverride(const char* paths
);
397 void addSectionAlignment(const char* segment
, const char* section
, const char* alignment
);
398 CommonsMode
parseCommonsTreatment(const char* mode
);
399 Treatment
parseTreatment(const char* treatment
);
400 void reconfigureDefaults();
401 void checkForClassic(int argc
, const char* argv
[]);
402 void parseSegAddrTable(const char* segAddrPath
, const char* installPath
);
403 void addLibrary(const FileInfo
& info
);
404 void warnObsolete(const char* arg
);
405 uint32_t parseProtection(const char* prot
);
406 void loadSymbolOrderFile(const char* fileOfExports
, NameToOrder
& orderMapping
);
410 // ObjectFile::ReaderOptions fReaderOptions;
411 const char* fOutputFile
;
412 std::vector
<Options::FileInfo
> fInputFiles
;
413 cpu_type_t fArchitecture
;
414 cpu_subtype_t fSubArchitecture
;
415 const char* fArchitectureName
;
416 OutputKind fOutputKind
;
417 bool fHasPreferredSubType
;
418 bool fArchSupportsThumb2
;
421 bool fKeepPrivateExterns
;
422 bool fNeedsModuleTable
;
423 bool fIgnoreOtherArchFiles
;
424 bool fErrorOnOtherArchFiles
;
425 bool fForceSubtypeAll
;
426 InterposeMode fInterposeMode
;
428 NameSpace fNameSpace
;
429 uint32_t fDylibCompatVersion
;
430 uint64_t fDylibCurrentVersion
;
431 const char* fDylibInstallName
;
432 const char* fFinalName
;
433 const char* fEntryName
;
434 uint64_t fBaseAddress
;
435 uint64_t fMaxAddress
;
436 uint64_t fBaseWritableAddress
;
438 SetWithWildcards fExportSymbols
;
439 SetWithWildcards fDontExportSymbols
;
440 SetWithWildcards fInterposeList
;
441 SetWithWildcards fForceWeakSymbols
;
442 SetWithWildcards fForceNotWeakSymbols
;
443 SetWithWildcards fReExportSymbols
;
444 NameSet fRemovedExports
;
445 NameToOrder fExportSymbolsOrder
;
446 ExportMode fExportMode
;
447 LibrarySearchMode fLibrarySearchMode
;
448 UndefinedTreatment fUndefinedTreatment
;
449 bool fMessagesPrefixedWithArchitecture
;
450 WeakReferenceMismatchTreatment fWeakReferenceMismatchTreatment
;
451 std::vector
<const char*> fSubUmbellas
;
452 std::vector
<const char*> fSubLibraries
;
453 std::vector
<const char*> fAllowableClients
;
454 std::vector
<const char*> fRPaths
;
455 const char* fClientName
;
456 const char* fUmbrellaName
;
457 const char* fInitFunctionName
;
458 const char* fDotOutputFile
;
459 const char* fExecutablePath
;
460 const char* fBundleLoader
;
461 const char* fDtraceScriptName
;
462 const char* fSegAddrTablePath
;
463 const char* fMapPath
;
464 const char* fDyldInstallPath
;
465 const char* fTempLtoObjectPath
;
466 const char* fOverridePathlibLTO
;
467 uint64_t fZeroPageSize
;
470 uint64_t fSourceVersion
;
471 uint32_t fSDKVersion
;
472 bool fExecutableStack
;
473 bool fNonExecutableHeap
;
474 bool fDisableNonExecutableHeap
;
475 uint32_t fMinimumHeaderPad
;
476 uint64_t fSegmentAlignment
;
477 CommonsMode fCommonsMode
;
478 enum UUIDMode fUUIDMode
;
479 SetWithWildcards fLocalSymbolsIncluded
;
480 SetWithWildcards fLocalSymbolsExcluded
;
481 LocalSymbolHandling fLocalSymbolHandling
;
484 bool fKeepRelocations
;
486 bool fTraceDylibSearching
;
490 bool fSharedRegionEligible
;
491 bool fPrintOrderFileStatistics
;
492 bool fReadOnlyx86Stubs
;
493 bool fPositionIndependentExecutable
;
494 bool fPIEOnCommandLine
;
495 bool fDisablePositionIndependentExecutable
;
496 bool fMaxMinimumHeaderPad
;
497 bool fDeadStripDylibs
;
498 bool fAllowTextRelocs
;
499 bool fWarnTextRelocs
;
501 bool fUsingLazyDylibLinking
;
504 bool fMarkDeadStrippableDylib
;
505 bool fMakeCompressedDyldInfo
;
506 bool fMakeCompressedDyldInfoForceOff
;
508 bool fAllowCpuSubtypeMismatches
;
509 bool fUseSimplifiedDylibReExports
;
510 bool fObjCABIVersion2Override
;
511 bool fObjCABIVersion1Override
;
512 bool fCanUseUpwardDylib
;
513 bool fFullyLoadArchives
;
514 bool fLoadAllObjcObjectsFromArchives
;
516 bool fLinkingMainExecutable
;
517 bool fForFinalLinkedImage
;
520 bool fMakeTentativeDefinitionsReal
;
524 bool fImplicitlyLinkPublicDylibs
;
525 bool fAddCompactUnwindEncoding
;
526 bool fWarnCompactUnwind
;
527 bool fRemoveDwarfUnwindIfCompactExists
;
528 bool fAutoOrderInitializers
;
529 bool fOptimizeZeroFill
;
531 bool fLogObjectFiles
;
534 bool fTraceIndirectDylibs
;
536 bool fOutputSlidable
;
537 bool fWarnWeakExports
;
538 bool fObjcGcCompaction
;
543 bool fVersionLoadCommand
;
544 bool fVersionLoadCommandForcedOn
;
545 bool fVersionLoadCommandForcedOff
;
546 bool fFunctionStartsLoadCommand
;
547 bool fFunctionStartsForcedOn
;
548 bool fFunctionStartsForcedOff
;
549 bool fDataInCodeInfoLoadCommand
;
550 bool fDataInCodeInfoLoadCommandForcedOn
;
551 bool fDataInCodeInfoLoadCommandForcedOff
;
552 bool fCanReExportSymbols
;
553 bool fObjcCategoryMerging
;
554 bool fPageAlignDataAtoms
;
555 bool fNeedsThreadLoadCommand
;
556 bool fEntryPointLoadCommand
;
557 bool fEntryPointLoadCommandForceOn
;
558 bool fEntryPointLoadCommandForceOff
;
559 bool fSourceVersionLoadCommand
;
560 bool fSourceVersionLoadCommandForceOn
;
561 bool fSourceVersionLoadCommandForceOff
;
562 bool fDependentDRInfo
;
563 bool fDependentDRInfoForcedOn
;
564 bool fDependentDRInfoForcedOff
;
565 DebugInfoStripping fDebugInfoStripping
;
566 const char* fTraceOutputFile
;
567 ld::MacVersionMin fMacVersionMin
;
568 ld::IOSVersionMin fIOSVersionMin
;
569 std::vector
<AliasPair
> fAliases
;
570 std::vector
<const char*> fInitialUndefines
;
571 NameSet fAllowedUndefined
;
573 std::vector
<ExtraSection
> fExtraSections
;
574 std::vector
<SectionAlignment
> fSectionAlignments
;
575 std::vector
<OrderedSymbol
> fOrderedSymbols
;
576 std::vector
<SegmentStart
> fCustomSegmentAddresses
;
577 std::vector
<SegmentSize
> fCustomSegmentSizes
;
578 std::vector
<SegmentProtect
> fCustomSegmentProtections
;
579 std::vector
<DylibOverride
> fDylibOverrides
;
580 std::vector
<const char*> fLLVMOptions
;
581 std::vector
<const char*> fLibrarySearchPaths
;
582 std::vector
<const char*> fFrameworkSearchPaths
;
583 std::vector
<const char*> fSDKPaths
;
584 std::vector
<const char*> fDyldEnvironExtras
;
586 mutable Snapshot fLinkSnapshot
;
587 bool fSnapshotRequested
;
588 const char * fPipelineFifo
;
593 #endif // __OPTIONS__