MCAsmInfoELF.cpp 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. //===- MCAsmInfoELF.cpp - ELF asm properties ------------------------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file defines target asm properties related what form asm statements
  10. // should take in general on ELF-based targets
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #include "llvm/MC/MCAsmInfoELF.h"
  14. #include "llvm/BinaryFormat/ELF.h"
  15. #include "llvm/MC/MCContext.h"
  16. #include "llvm/MC/MCSectionELF.h"
  17. using namespace llvm;
  18. void MCAsmInfoELF::anchor() {}
  19. MCSection *MCAsmInfoELF::getNonexecutableStackSection(MCContext &Ctx) const {
  20. return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS, 0);
  21. }
  22. MCAsmInfoELF::MCAsmInfoELF() {
  23. HasIdentDirective = true;
  24. WeakRefDirective = "\t.weak\t";
  25. PrivateGlobalPrefix = ".L";
  26. PrivateLabelPrefix = ".L";
  27. }