Path: blob/main/contrib/llvm-project/llvm/lib/MC/MCAsmInfoELF.cpp
35233 views
//===- MCAsmInfoELF.cpp - ELF asm properties ------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file defines target asm properties related what form asm statements9// should take in general on ELF-based targets10//11//===----------------------------------------------------------------------===//1213#include "llvm/MC/MCAsmInfoELF.h"14#include "llvm/BinaryFormat/ELF.h"15#include "llvm/MC/MCContext.h"16#include "llvm/MC/MCSectionELF.h"1718using namespace llvm;1920void MCAsmInfoELF::anchor() {}2122MCSection *MCAsmInfoELF::getNonexecutableStackSection(MCContext &Ctx) const {23// Solaris doesn't know/doesn't care about .note.GNU-stack sections, so24// don't emit them.25if (Ctx.getTargetTriple().isOSSolaris())26return nullptr;27return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS, 0);28}2930MCAsmInfoELF::MCAsmInfoELF() {31HasIdentDirective = true;32WeakRefDirective = "\t.weak\t";33PrivateGlobalPrefix = ".L";34PrivateLabelPrefix = ".L";35}363738