printMachineInstruction(II);
}
}
- O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n";
+ if (!forDarwin)
+ O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n";
// We didn't modify anything.
return false;
leadingUnderscore = false;
#endif
}
+
if (leadingUnderscore || forCygwin || forDarwin)
GlobalPrefix = "_";
}
if (forDarwin) {
+ // Output stubs for external global variables
+ if (GVStubs.begin() != GVStubs.end())
+ O << "\t.non_lazy_symbol_pointer\n";
+ for (std::set<std::string>::iterator i = GVStubs.begin(), e = GVStubs.end();
+ i != e; ++i) {
+ O << "L" << *i << "$non_lazy_ptr:\n";
+ O << "\t.indirect_symbol " << *i << "\n";
+ O << "\t.long\t0\n";
+ }
+
// Output stubs for dynamically-linked functions
unsigned j = 1;
for (std::set<std::string>::iterator i = FnStubs.begin(), e = FnStubs.end();
O << "\n";
- // Output stubs for external global variables
- if (GVStubs.begin() != GVStubs.end())
- O << ".data\n.non_lazy_symbol_pointer\n";
- for (std::set<std::string>::iterator i = GVStubs.begin(), e = GVStubs.end();
- i != e; ++i) {
- O << "L" << *i << "$non_lazy_ptr:\n";
- O << "\t.indirect_symbol " << *i << "\n";
- O << "\t.long\t0\n";
- }
-
// Output stubs for link-once variables
if (LinkOnceStubs.begin() != LinkOnceStubs.end())
O << ".data\n.align 2\n";