summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCAssembler.cpp
diff options
context:
space:
mode:
authorJack Carter <jcarter@mips.com>2013-01-30 02:09:52 +0000
committerJack Carter <jcarter@mips.com>2013-01-30 02:09:52 +0000
commit1bd90ff6cc7de818c824b7ff5c84d6b34ca82095 (patch)
tree8095886da191e2f02920065fc19d52304d083fca /llvm/lib/MC/MCAssembler.cpp
parent17441589c324f88c95e98c7e5d8d5e55cdd7c949 (diff)
downloadbcm5719-llvm-1bd90ff6cc7de818c824b7ff5c84d6b34ca82095.tar.gz
bcm5719-llvm-1bd90ff6cc7de818c824b7ff5c84d6b34ca82095.zip
This patch reworks how llvm targets set
and update ELF header e_flags. Currently gathering information such as symbol, section and data is done by collecting it in an MCAssembler object. From MCAssembler and MCAsmLayout objects ELFObjectWriter::WriteObject() forms and streams out the ELF object file. This patch just adds a few members to the MCAssember class to store and access the e_flag settings. It allows for runtime additions to the e_flag by assembler directives. The standalone assembler can get to MCAssembler from getParser().getStreamer().getAssembler(). This patch is the generic infrastructure and will be followed by patches for ARM and Mips for their target specific use. Contributer: Jack Carter llvm-svn: 173882
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r--llvm/lib/MC/MCAssembler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp
index c51ddc800e2..983de1a115a 100644
--- a/llvm/lib/MC/MCAssembler.cpp
+++ b/llvm/lib/MC/MCAssembler.cpp
@@ -264,7 +264,7 @@ MCAssembler::MCAssembler(MCContext &Context_, MCAsmBackend &Backend_,
raw_ostream &OS_)
: Context(Context_), Backend(Backend_), Emitter(Emitter_), Writer(Writer_),
OS(OS_), BundleAlignSize(0), RelaxAll(false), NoExecStack(false),
- SubsectionsViaSymbols(false) {
+ SubsectionsViaSymbols(false), ELFHeaderEFlags(0) {
}
MCAssembler::~MCAssembler() {
@@ -281,6 +281,7 @@ void MCAssembler::reset() {
RelaxAll = false;
NoExecStack = false;
SubsectionsViaSymbols = false;
+ ELFHeaderEFlags = 0;
// reset objects owned by us
getBackend().reset();
OpenPOWER on IntegriCloud