summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCELFStreamer.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-05-16 16:17:21 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-05-16 16:17:21 +0000
commite90c1cb22181b42741053e27d90bced53bea3273 (patch)
treec7128b3e75c7ff1aaf3e59749781b93c48a392f9 /llvm/lib/MC/MCELFStreamer.cpp
parent71f8b08a808b12cdfc86113f6c206a8f03d130e5 (diff)
downloadbcm5719-llvm-e90c1cb22181b42741053e27d90bced53bea3273.tar.gz
bcm5719-llvm-e90c1cb22181b42741053e27d90bced53bea3273.zip
sets bit 0 of the function address of thumb function in .symtab
("T is 1 if the target symbol S has type STT_FUNC and the symbol addresses a Thumb instruction ;it is 0 otherwise." from "ELF for the ARM Architecture" 4.7.1.2) Patch by Koan-Sin Tan! llvm-svn: 131406
Diffstat (limited to 'llvm/lib/MC/MCELFStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCELFStreamer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCELFStreamer.cpp b/llvm/lib/MC/MCELFStreamer.cpp
index 7808e76203f..bbb2789ea81 100644
--- a/llvm/lib/MC/MCELFStreamer.cpp
+++ b/llvm/lib/MC/MCELFStreamer.cpp
@@ -66,6 +66,11 @@ void MCELFStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) {
void MCELFStreamer::EmitThumbFunc(MCSymbol *Func) {
// FIXME: Anything needed here to flag the function as thumb?
+
+ getAssembler().setIsThumbFunc(Func);
+
+ MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Func);
+ SD.setFlags(SD.getFlags() | ELF_Other_ThumbFunc);
}
void MCELFStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {
OpenPOWER on IntegriCloud