summaryrefslogtreecommitdiff
path: root/lib/Target/AArch64/MCTargetDesc
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2013-04-17 21:18:16 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2013-04-17 21:18:16 +0000
commitdf39be6cb4eb44011db3d3e86f8fe463f81ce127 (patch)
treea008e657a29cef0e9c842f58d4eebb9bd45aba2b /lib/Target/AArch64/MCTargetDesc
parent53c9def43359f9b908565b28340e461ce5463009 (diff)
downloadllvm-df39be6cb4eb44011db3d3e86f8fe463f81ce127.tar.gz
llvm-df39be6cb4eb44011db3d3e86f8fe463f81ce127.tar.bz2
llvm-df39be6cb4eb44011db3d3e86f8fe463f81ce127.tar.xz
Add support for subsections to the ELF assembler. Fixes PR8717.
Differential Revision: http://llvm-reviews.chandlerc.com/D598 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179725 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64/MCTargetDesc')
-rw-r--r--lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp b/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp
index b83577af45..3b811df212 100644
--- a/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp
+++ b/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp
@@ -63,14 +63,15 @@ public:
~AArch64ELFStreamer() {}
- virtual void ChangeSection(const MCSection *Section) {
+ virtual void ChangeSection(const MCSection *Section,
+ const MCExpr *Subsection) {
// We have to keep track of the mapping symbol state of any sections we
// use. Each one should start off as EMS_None, which is provided as the
// default constructor by DenseMap::lookup.
- LastMappingSymbols[getPreviousSection()] = LastEMS;
+ LastMappingSymbols[getPreviousSection().first] = LastEMS;
LastEMS = LastMappingSymbols.lookup(Section);
- MCELFStreamer::ChangeSection(Section);
+ MCELFStreamer::ChangeSection(Section, Subsection);
}
/// This function is the one used to emit instruction data into the ELF
@@ -129,7 +130,7 @@ private:
MCELF::SetType(SD, ELF::STT_NOTYPE);
MCELF::SetBinding(SD, ELF::STB_LOCAL);
SD.setExternal(false);
- Symbol->setSection(*getCurrentSection());
+ Symbol->setSection(*getCurrentSection().first);
const MCExpr *Value = MCSymbolRefExpr::Create(Start, getContext());
Symbol->setVariableValue(Value);