MCAsmInfoELF.cpp 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. //===-- MCAsmInfoELF.cpp - ELF asm properties -------------------*- 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 defines target asm properties related what form asm statements
  11. // should take in general on ELF-based targets
  12. //
  13. //===----------------------------------------------------------------------===//
  14. #include "llvm/MC/MCAsmInfoELF.h"
  15. #include "llvm/MC/MCContext.h"
  16. #include "llvm/MC/MCSectionELF.h"
  17. #include "llvm/Support/ELF.h"
  18. using namespace llvm;
  19. void MCAsmInfoELF::anchor() { }
  20. MCSection *MCAsmInfoELF::getNonexecutableStackSection(MCContext &Ctx) const {
  21. return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS, 0);
  22. }
  23. MCAsmInfoELF::MCAsmInfoELF() {
  24. HasIdentDirective = true;
  25. WeakRefDirective = "\t.weak\t";
  26. PrivateGlobalPrefix = ".L";
  27. PrivateLabelPrefix = ".L";
  28. }