diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-08-13 05:07:35 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-08-13 05:07:35 +0000 |
commit | b808588a3a5febe931896b3779d159ba90d836f7 (patch) | |
tree | e07ae309748105f8a462ce435a66f3412dce5ba6 /lib/Target/ARM/ARMTargetObjectFile.h | |
parent | 62728dc14d05e9a677664b784c4f5c6e188aa11a (diff) | |
download | llvm-b808588a3a5febe931896b3779d159ba90d836f7.tar.gz llvm-b808588a3a5febe931896b3779d159ba90d836f7.tar.bz2 llvm-b808588a3a5febe931896b3779d159ba90d836f7.tar.xz |
Change MCSectionELF to represent a section semantically instead of
syntactically as a string, very similiar to what Chris did with MachO.
The parsing support and validation is not introduced yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78890 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMTargetObjectFile.h')
-rw-r--r-- | lib/Target/ARM/ARMTargetObjectFile.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Target/ARM/ARMTargetObjectFile.h b/lib/Target/ARM/ARMTargetObjectFile.h index 13fa7e202a..9703403db2 100644 --- a/lib/Target/ARM/ARMTargetObjectFile.h +++ b/lib/Target/ARM/ARMTargetObjectFile.h @@ -11,6 +11,7 @@ #define LLVM_TARGET_ARM_TARGETOBJECTFILE_H #include "llvm/Target/TargetLoweringObjectFile.h" +#include "llvm/MC/MCSectionELF.h" namespace llvm { @@ -21,14 +22,14 @@ namespace llvm { void Initialize(MCContext &Ctx, const TargetMachine &TM) { TargetLoweringObjectFileELF::Initialize(Ctx, TM); - // FIXME: Add new attribute/flag to MCSection for init_array/fini_array. - // That will allow not treating these as "directives". if (TM.getSubtarget<ARMSubtarget>().isAAPCS_ABI()) { StaticCtorSection = - getELFSection("\t.section .init_array,\"aw\",%init_array", true, + getELFSection(".init_array", MCSectionELF::SHT_INIT_ARRAY, + MCSectionELF::SHF_WRITE | MCSectionELF::SHF_ALLOC, SectionKind::getDataRel()); StaticDtorSection = - getELFSection("\t.section .fini_array,\"aw\",%fini_array", true, + getELFSection(".fini_array", MCSectionELF::SHT_FINI_ARRAY, + MCSectionELF::SHF_WRITE | MCSectionELF::SHF_ALLOC, SectionKind::getDataRel()); } } |