aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/MCMachOStreamer.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-22 11:41:10 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-22 11:41:10 +0000
commit3edd9bb7a3da8526eb2f4a5dae2962a987d3d566 (patch)
treee8c2a4ed790801bb1a2f09f4bb5c158b517d1b0d /lib/MC/MCMachOStreamer.cpp
parentf3d2ef0c9712381a105118336975adcfbf733db0 (diff)
llvm-mc/Mach-O: Improve symbol table support:
- Honor .globl. - Set symbol type and section correctly ('nm' now works), and order symbols appropriately. - Take care to the string table so that the .o matches 'as' exactly (for ease of testing). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79740 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCMachOStreamer.cpp')
-rw-r--r--lib/MC/MCMachOStreamer.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/MC/MCMachOStreamer.cpp b/lib/MC/MCMachOStreamer.cpp
index 0b79944933..1a648ea5e4 100644
--- a/lib/MC/MCMachOStreamer.cpp
+++ b/lib/MC/MCMachOStreamer.cpp
@@ -142,7 +142,14 @@ void MCMachOStreamer::EmitAssignment(MCSymbol *Symbol,
void MCMachOStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
SymbolAttr Attribute) {
- llvm_unreachable("FIXME: Not yet implemented!");
+ switch (Attribute) {
+ default:
+ llvm_unreachable("FIXME: Not yet implemented!");
+
+ case MCStreamer::Global:
+ getSymbolData(*Symbol).setExternal(true);
+ break;
+ }
}
void MCMachOStreamer::EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) {