LLVM
24.0.0git
lib
Target
M68k
M68kTargetObjectFile.cpp
Go to the documentation of this file.
1
//===-- M68kELFTargetObjectFile.cpp - M68k Object Files ---------*- C++ -*-===//
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
/// \file
10
/// This file contains definitions for M68k ELF object file lowering.
11
///
12
//===----------------------------------------------------------------------===//
13
14
#include "
M68kTargetObjectFile.h
"
15
16
#include "
M68kSubtarget.h
"
17
18
#include "
llvm/BinaryFormat/ELF.h
"
19
#include "
llvm/IR/DataLayout.h
"
20
#include "
llvm/IR/DerivedTypes.h
"
21
#include "
llvm/IR/GlobalVariable.h
"
22
#include "
llvm/MC/MCContext.h
"
23
#include "
llvm/MC/MCSectionELF.h
"
24
#include "
llvm/Target/TargetMachine.h
"
25
26
using namespace
llvm
;
27
28
void
M68kELFTargetObjectFile::initialize
(
MCContext
&Ctx,
29
const
TargetMachine
&
TM
,
30
const
Module
&M) {
31
TargetLoweringObjectFileELF::initialize
(Ctx,
TM
, M);
32
InitializeELF
(
TM
.Options.UseInitArray);
33
34
// FIXME do we need `.sdata` and `.sbss` explicitly?
35
SmallDataSection =
getContext
().
getELFSection
(
36
".sdata"
,
ELF::SHT_PROGBITS
,
ELF::SHF_WRITE
|
ELF::SHF_ALLOC
);
37
38
SmallBSSSection =
getContext
().
getELFSection
(
".sbss"
,
ELF::SHT_NOBITS
,
39
ELF::SHF_WRITE
|
ELF::SHF_ALLOC
);
40
}
ELF.h
DataLayout.h
DerivedTypes.h
GlobalVariable.h
M68kSubtarget.h
This file declares the M68k specific subclass of TargetSubtargetInfo.
M68kTargetObjectFile.h
This file contains declarations for M68k ELF object file lowering.
MCContext.h
MCSectionELF.h
llvm::M68kELFTargetObjectFile::initialize
void initialize(MCContext &Ctx, const TargetMachine &TM, const Module &M) override
This method must be called before any actual lowering is done.
Definition
M68kTargetObjectFile.cpp:28
llvm::MCContext
Context object for machine code objects.
Definition
MCContext.h:83
llvm::MCContext::getELFSection
MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)
Definition
MCContext.h:552
llvm::MCObjectFileInfo::getContext
MCContext & getContext() const
Definition
MCObjectFileInfo.h:254
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition
Module.h:68
llvm::TargetLoweringObjectFileELF::initialize
void initialize(MCContext &Ctx, const TargetMachine &TM, const Module &M) override
This method must be called before any actual lowering is done.
Definition
TargetLoweringObjectFileImpl.cpp:122
llvm::TargetLoweringObjectFileELF::InitializeELF
void InitializeELF(bool UseInitArray_)
Definition
TargetLoweringObjectFileImpl.cpp:1302
llvm::TargetLoweringObjectFile::TM
const TargetMachine * TM
Definition
TargetLoweringObjectFile.h:70
llvm::TargetMachine
Primary interface to the complete machine description for the target machine.
Definition
TargetMachine.h:85
TargetMachine.h
llvm::ELF::SHF_ALLOC
@ SHF_ALLOC
Definition
ELF.h:1067
llvm::ELF::SHF_WRITE
@ SHF_WRITE
Definition
ELF.h:1064
llvm::ELF::SHT_PROGBITS
@ SHT_PROGBITS
Definition
ELF.h:965
llvm::ELF::SHT_NOBITS
@ SHT_NOBITS
Definition
ELF.h:972
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
DefaultTargetInfo.h:21
Generated on
for LLVM by
1.14.0