}
static inline bool shouldPrintPLT(TargetMachine &TM, const X86Subtarget* ST) {
- return ST->isTargetELF() && TM.getRelocationModel() == Reloc::PIC_ &&
- (ST->isPICStyleRIPRel() || ST->isPICStyleGOT());
+ return ST->isTargetELF() && TM.getRelocationModel() == Reloc::PIC_;
}
static inline bool shouldPrintStub(TargetMachine &TM, const X86Subtarget* ST) {
}
if (shouldPrintStub(TM, Subtarget)) {
+ // DARWIN/X86-32 in != static mode.
+
// Link-once, declaration, or Weakly-linked global variables need
// non-lazily-resolved stubs
if (GV->isDeclaration() || GV->isWeakForLinker()) {
O << Name;
}
} else {
- if (GV->hasDLLImportLinkage()) {
+ if (GV->hasDLLImportLinkage())
O << "__imp_";
- }
O << Name;
if (shouldPrintPLT(TM, Subtarget)) {
Name += MO.getSymbolName();
// Print function stub suffix unless it's Mac OS X 10.5 and up.
if (shouldPrintStub(TM, Subtarget) &&
+ // DARWIN/X86-32 in != static mode.
!(Subtarget->isTargetDarwin() && Subtarget->getDarwinVers() >= 9)) {
+
FnStubs.insert(Name);
printSuffixedName(Name, "$stub");
return;
}
if (shouldPrintStub(TM, Subtarget)) {
+ // DARWIN/X86-32 in != static mode.
+
// Link-once, declaration, or Weakly-linked global variables need
// non-lazily-resolved stubs
if (GV->isDeclaration() || GV->isWeakForLinker()) {