Generate correct stubs for weak-linked symbols
llvm-svn: 17101
This commit is contained in:
		
							parent
							
								
									f60137501f
								
							
						
					
					
						commit
						844186b8b4
					
				| 
						 | 
					@ -366,8 +366,9 @@ void PowerPCAsmPrinter::printOp(const MachineOperand &MO,
 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    // External global variables need a non-lazily-resolved stub
 | 
					    // External or weakly linked global variables need non-lazily-resolved stubs
 | 
				
			||||||
    if (GV->isExternal() && getTM().AddressTaken.count(GV)) {
 | 
					    if ((GV->isExternal() || GV->hasWeakLinkage()) && 
 | 
				
			||||||
 | 
					        getTM().AddressTaken.count(GV)) {
 | 
				
			||||||
      GVStubs.insert(Name);
 | 
					      GVStubs.insert(Name);
 | 
				
			||||||
      O << "L" << Name << "$non_lazy_ptr";
 | 
					      O << "L" << Name << "$non_lazy_ptr";
 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue