Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
2.3 KiB

  1. //===- MCELFSymbolFlags.h - ELF 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 ELF target.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_MC_MCELFSYMBOLFLAGS_H
  14. #define LLVM_MC_MCELFSYMBOLFLAGS_H
  15. #include "llvm/Support/ELF.h"
  16. // Because all the symbol flags need to be stored in the MCSymbolData
  17. // 'flags' variable we need to provide shift constants per flag type.
  18. namespace llvm {
  19. enum {
  20. ELF_STT_Shift = 0, // Shift value for STT_* flags.
  21. ELF_STB_Shift = 4, // Shift value for STB_* flags.
  22. ELF_STV_Shift = 8, // Shift value for STV_* flags.
  23. ELF_Other_Shift = 10 // Shift value for other flags.
  24. };
  25. enum SymbolFlags {
  26. ELF_STB_Local = (ELF::STB_LOCAL << ELF_STB_Shift),
  27. ELF_STB_Global = (ELF::STB_GLOBAL << ELF_STB_Shift),
  28. ELF_STB_Weak = (ELF::STB_WEAK << ELF_STB_Shift),
  29. ELF_STB_Loproc = (ELF::STB_LOPROC << ELF_STB_Shift),
  30. ELF_STB_Hiproc = (ELF::STB_HIPROC << ELF_STB_Shift),
  31. ELF_STT_Notype = (ELF::STT_NOTYPE << ELF_STT_Shift),
  32. ELF_STT_Object = (ELF::STT_OBJECT << ELF_STT_Shift),
  33. ELF_STT_Func = (ELF::STT_FUNC << ELF_STT_Shift),
  34. ELF_STT_Section = (ELF::STT_SECTION << ELF_STT_Shift),
  35. ELF_STT_File = (ELF::STT_FILE << ELF_STT_Shift),
  36. ELF_STT_Common = (ELF::STT_COMMON << ELF_STT_Shift),
  37. ELF_STT_Tls = (ELF::STT_TLS << ELF_STT_Shift),
  38. ELF_STT_Loproc = (ELF::STT_LOPROC << ELF_STT_Shift),
  39. ELF_STT_Hiproc = (ELF::STT_HIPROC << ELF_STT_Shift),
  40. ELF_STV_Default = (ELF::STV_DEFAULT << ELF_STV_Shift),
  41. ELF_STV_Internal = (ELF::STV_INTERNAL << ELF_STV_Shift),
  42. ELF_STV_Hidden = (ELF::STV_HIDDEN << ELF_STV_Shift),
  43. ELF_STV_Protected = (ELF::STV_PROTECTED << ELF_STV_Shift),
  44. ELF_Other_Weakref = (1 << ELF_Other_Shift),
  45. ELF_Other_ThumbFunc = (2 << ELF_Other_Shift)
  46. };
  47. } // end namespace llvm
  48. #endif