diff options
Diffstat (limited to 'include/llvm/MC/MCAssembler.h')
-rw-r--r-- | include/llvm/MC/MCAssembler.h | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h index 8269f08c44..43fbdc9301 100644 --- a/include/llvm/MC/MCAssembler.h +++ b/include/llvm/MC/MCAssembler.h @@ -122,10 +122,6 @@ public: virtual void setBundlePadding(uint8_t N) { } - virtual bool hasFixups() const { - return false; - } - void dump(); }; @@ -182,10 +178,6 @@ public: virtual ~MCEncodedFragmentWithFixups(); - virtual bool hasFixups() const { - return true; - } - typedef SmallVectorImpl<MCFixup>::const_iterator const_fixup_iterator; typedef SmallVectorImpl<MCFixup>::iterator fixup_iterator; @@ -198,7 +190,8 @@ public: virtual const_fixup_iterator fixup_end() const = 0; static bool classof(const MCFragment *F) { - return isa<MCEncodedFragment>(F) && F->hasFixups(); + MCFragment::FragmentType Kind = F->getKind(); + return Kind == MCFragment::FT_Relaxable || Kind == MCFragment::FT_Data; } }; @@ -856,6 +849,10 @@ private: std::vector<IndirectSymbolData> IndirectSymbols; std::vector<DataRegionData> DataRegions; + + /// The list of linker options to propagate into the object file. + std::vector<std::vector<std::string> > LinkerOptions; + /// The set of function symbols for which a .thumb_func directive has /// been seen. // @@ -874,6 +871,12 @@ private: unsigned NoExecStack : 1; unsigned SubsectionsViaSymbols : 1; + /// ELF specific e_header flags + // It would be good if there were an MCELFAssembler class to hold this. + // ELF header flags are used both by the integrated and standalone assemblers. + // Access to the flags is necessary in cases where assembler directives affect + // which flags to be set. + unsigned ELFHeaderEFlags; private: /// Evaluate a fixup to a relocatable expression and the value which should be /// placed into the fixup. @@ -951,6 +954,10 @@ public: /// Flag a function symbol as the target of a .thumb_func directive. void setIsThumbFunc(const MCSymbol *Func) { ThumbFuncs.insert(Func); } + /// ELF e_header flags + unsigned getELFHeaderEFlags() const {return ELFHeaderEFlags;} + void setELFHeaderEFlags(unsigned Flags) { ELFHeaderEFlags = Flags;} + public: /// Construct a new assembler instance. /// @@ -1067,6 +1074,14 @@ public: size_t indirect_symbol_size() const { return IndirectSymbols.size(); } /// @} + /// @name Linker Option List Access + /// @{ + + std::vector<std::vector<std::string> > &getLinkerOptions() { + return LinkerOptions; + } + + /// @} /// @name Data Region List Access /// @{ |