1 //===- MCMachOSymbolFlags.h - MachO Symbol Flags ----------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the SymbolFlags used for the MachO target.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_MC_MCMACHOSYMBOLFLAGS_H
15 #define LLVM_MC_MCMACHOSYMBOLFLAGS_H
17 // These flags are mostly used in MCMachOStreamer.cpp but also needed in
18 // MachObjectWriter.cpp to test for Weak Definitions of symbols to emit
19 // the correct relocation information.
22 /// SymbolFlags - We store the value for the 'desc' symbol field in the lowest
23 /// 16 bits of the implementation defined flags.
24 enum SymbolFlags { // See <mach-o/nlist.h>.
25 SF_DescFlagsMask = 0xFFFF,
27 // Reference type flags.
28 SF_ReferenceTypeMask = 0x0007,
29 SF_ReferenceTypeUndefinedNonLazy = 0x0000,
30 SF_ReferenceTypeUndefinedLazy = 0x0001,
31 SF_ReferenceTypeDefined = 0x0002,
32 SF_ReferenceTypePrivateDefined = 0x0003,
33 SF_ReferenceTypePrivateUndefinedNonLazy = 0x0004,
34 SF_ReferenceTypePrivateUndefinedLazy = 0x0005,
36 // Other 'desc' flags.
37 SF_NoDeadStrip = 0x0020,
38 SF_WeakReference = 0x0040,
39 SF_WeakDefinition = 0x0080
42 } // end namespace llvm