Home | History | Annotate | Download | only in MC
      1 //===- MCMachOSymbolFlags.h - MachO Symbol Flags ----------------*- C++ -*-===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is distributed under the University of Illinois Open Source
      6 // License. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 //
     10 // This file declares the SymbolFlags used for the MachO target.
     11 //
     12 //===----------------------------------------------------------------------===//
     13 
     14 #ifndef LLVM_MC_MCMACHOSYMBOLFLAGS_H
     15 #define LLVM_MC_MCMACHOSYMBOLFLAGS_H
     16 
     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.
     20 
     21 namespace llvm {
     22   /// MachOSymbolFlags - We store the value for the 'desc' symbol field in the
     23   /// lowest 16 bits of the implementation defined flags.
     24   enum MachOSymbolFlags { // See <mach-o/nlist.h>.
     25     SF_DescFlagsMask                        = 0xFFFF,
     26 
     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,
     35 
     36     // Other 'desc' flags.
     37     SF_ThumbFunc                            = 0x0008,
     38     SF_NoDeadStrip                          = 0x0020,
     39     SF_WeakReference                        = 0x0040,
     40     SF_WeakDefinition                       = 0x0080,
     41     SF_SymbolResolver                       = 0x0100
     42   };
     43 
     44 } // end namespace llvm
     45 
     46 #endif
     47