LLVM API Documentation

MCELFSymbolFlags.h
Go to the documentation of this file.
00001 //===- MCELFSymbolFlags.h - ELF Symbol Flags ----------------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file declares the SymbolFlags used for the ELF target.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef LLVM_MC_MCELFSYMBOLFLAGS_H
00015 #define LLVM_MC_MCELFSYMBOLFLAGS_H
00016 
00017 #include "llvm/Support/ELF.h"
00018 
00019 // Because all the symbol flags need to be stored in the MCSymbolData
00020 // 'flags' variable we need to provide shift constants per flag type.
00021 
00022 namespace llvm {
00023   enum {
00024     ELF_STT_Shift   = 0,  // Shift value for STT_* flags.
00025     ELF_STB_Shift   = 4,  // Shift value for STB_* flags.
00026     ELF_STV_Shift   = 8,  // Shift value for STV_* flags.
00027     ELF_STO_Shift   = 10  // Shift value for STO_* flags.
00028   };
00029 
00030   enum ELFSymbolFlags {
00031     ELF_STB_Local     = (ELF::STB_LOCAL     << ELF_STB_Shift),
00032       ELF_STB_Global    = (ELF::STB_GLOBAL    << ELF_STB_Shift),
00033       ELF_STB_Weak      = (ELF::STB_WEAK      << ELF_STB_Shift),
00034       ELF_STB_Loproc    = (ELF::STB_LOPROC    << ELF_STB_Shift),
00035       ELF_STB_Hiproc    = (ELF::STB_HIPROC    << ELF_STB_Shift),
00036 
00037       ELF_STT_Notype    = (ELF::STT_NOTYPE    << ELF_STT_Shift),
00038       ELF_STT_Object    = (ELF::STT_OBJECT    << ELF_STT_Shift),
00039       ELF_STT_Func      = (ELF::STT_FUNC      << ELF_STT_Shift),
00040       ELF_STT_Section   = (ELF::STT_SECTION   << ELF_STT_Shift),
00041       ELF_STT_File      = (ELF::STT_FILE      << ELF_STT_Shift),
00042       ELF_STT_Common    = (ELF::STT_COMMON    << ELF_STT_Shift),
00043       ELF_STT_Tls       = (ELF::STT_TLS       << ELF_STT_Shift),
00044       ELF_STT_GnuIFunc  = (ELF::STT_GNU_IFUNC << ELF_STT_Shift),
00045       ELF_STT_Loproc    = (ELF::STT_LOPROC    << ELF_STT_Shift),
00046       ELF_STT_Hiproc    = (ELF::STT_HIPROC    << ELF_STT_Shift),
00047 
00048       ELF_STV_Default   = (ELF::STV_DEFAULT   << ELF_STV_Shift),
00049       ELF_STV_Internal  = (ELF::STV_INTERNAL  << ELF_STV_Shift),
00050       ELF_STV_Hidden    = (ELF::STV_HIDDEN    << ELF_STV_Shift),
00051       ELF_STV_Protected = (ELF::STV_PROTECTED << ELF_STV_Shift)
00052   };
00053 
00054 } // end namespace llvm
00055 
00056 #endif